Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Absolute Beginner Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Absolute Beginner Talk
The perfect starting place to find out more about computers, Linux and Ubuntu.

 
Thread Tools Display Modes
Old July 11th, 2005   #1
tospig
Just Give Me the Beans!
 
Join Date: Jul 2005
Location: Guildford
Beans: 54
synergy / boot up

Hey guys, my friend told me to install Linux on my 2nd machine, so I did, and here I am.

I have a windows machine, and a linux one, with one keyboard and one mouse, connected to windows machine.

I use synergy to allow the K & M to be used between machines much like a kvm switch. my question is this:

it's all fine and good once i've started linux, but before I boot it up, i have to unplug K & M from windows, and plug into Linux, to enable me to enter user & pass. What i would like is to have Synergy load on boot up, so that I don't have to plug in K&M when it boots up to enter my user/pass.

does anyone know how I go about doing this, or a way of doing this?

If so, a complete noob step by step guide would be greately appreciated (assume all i know how to do is open a terminal)

Thanks for any help


/end first post, woohoo
tospig is offline   Reply With Quote
Old July 12th, 2005   #2
tospig
Just Give Me the Beans!
 
Join Date: Jul 2005
Location: Guildford
Beans: 54
Re: synergy / boot up

is there anybody out there...

...that can help?

maybe not specific to my problem, but about how to make something run at boot-up before you have to log in??
tospig is offline   Reply With Quote
Old August 20th, 2005   #3
darksbane
First Cup of Ubuntu
 
Join Date: Aug 2005
Location: Australia
Beans: 4
Re: synergy / boot up

I want to do much the same thing, I've been looking around on the Synergy website and I came across this: http://synergy2.sourceforge.net/autostart.html

Quote:
Synergy requires an X server. That means a server must be running and synergy must be authorized to connect to that server. It's best to have the display manager start synergy. You'll need the necessary (probably root) permission to modify the display manager configuration files. If you don't have that permission you can start synergy after logging in via the .xsession file.

Typically, you need to edit three script files. The first file will start synergy before a user logs in, the second will kill that copy of synergy, and the third will start it again after the user logs in.

The contents of the scripts varies greatly between systems so there's no one definite place where you should insert your edits. However, these scripts often exit before reaching the bottom so put the edits near the top of the script.

The location and names of these files depend on the operating system and display manager you're using. A good guess for the location is /etc/X11. Typical file names are:

xdm gdm
1 xdm/Xsetup gdm/Init/Default (*)
2 xdm/Xstartup gdm/PostLogin/Default (*)
3 xdm/Xsession gdm/Sessions/Default (*, **)

*) The Default file is used if no other suitable file is found. gdm will try displayname (e.g. :0) and hostname (e.g. somehost), in that order, before and instead of Default.
**) gdm may use gdm/Xsession, xdm/Xsession or dm/Xsession if gdm/Sessions/Default doesn't exist.

For a synergy client, add the following to the first file: /usr/bin/killall synergyc sleep 1 /usr/bin/synergyc [<options>] synergy-server-hostname Of course, the path to synergyc depends on where you installed it so adjust as necessary.

Add to the second file: /usr/bin/killall synergyc sleep 1

And to the third file: /usr/bin/killall synergyc sleep 1 /usr/bin/synergyc [<options>] synergy-server-hostname Note that <options> must not include -f or --no-daemon or the script will never exit and you won't be able to log in.

The changes are the same for the synergy server except replace synergyc with synergys and use the appropriate synergys command line options. Note that the first script is run as root so synergys will look for the configuration file in root's home directory then in /etc. Make sure it exists in one of those places or use the --config config-pathname option to specify its location.

Note that some display managers (xdm and kdm, but not gdm) grab the keyboard and do not release it until the user logs in for security reasons. This prevents a synergy server from sharing the mouse and keyboard until the user logs in. It doesn't prevent a synergy client from synthesizing mouse and keyboard input, though.

If you're configuring synergy to start only after you log in then edit your .xsession file. Add just what you would add to the third file above.
Anyways after reading through that and looking through my Ubuntu directories I found that the files that seem to require editing aren't found in the directories they give, but I did find them all, for the first one you have to go to:

/etc/gdm/init/

for the second file you have to go to:

/etc/gdm/postlogin/

and for the third one I'm not 100% sure but I think its either

/etc/gdm/postsession/

or

/etc/gdm/presession/

Someone will have to help me out on that.

Anyways, you have to edit the file in those directories to include the code from the Synergy site. However this is where I'm stuck. I can't edit the files because they require a root login to edit them and I don't know how to login as root since it didnt ask me to specify a password for root or anything when I installed Ubuntu, so any help in this would be greatly appreciated
darksbane is offline   Reply With Quote
Old September 5th, 2005   #4
tospig
Just Give Me the Beans!
 
Join Date: Jul 2005
Location: Guildford
Beans: 54
Re: synergy / boot up

i found out that to edit you'll want to use the command

sudo gedit <filename>

(you dont' have to use gedit, any editor will do)
tospig is offline   Reply With Quote
Old April 30th, 2006   #5
Insti
First Cup of Ubuntu
 
Join Date: Apr 2006
Beans: 7
Xubuntu 6.06 Dapper
Re: synergy / boot up

I wanted to make the synergy server run from my ubuntu (5.10) box. (update: still works in 8.04)
Here is what you need to do:

Make a directory in /etc to store the configuration:

Code:
sudo mkdir /etc/synergy
Setup my synergy server configuration file:
Code:
sudo gedit /etc/synergy/synergy.conf
To make the server run when gdm runs, but before anyone has logged in:

edit /etc/gdm/Init/Default:
Code:
sudo gedit /etc/gdm/Init/Default
Added the following lines in the middle of the file BEFORE the "sysmodmap=/etc/X11/Xmodmap" line:

Code:
SYNERGYS=`gdmwhich synergys`
if [ x$SYNERGYS != x ] ; then
        $SYNERGYS --config /etc/synergy/synergy.conf
fi
The only problem with that is once you log in it kills off the server, so you need to make it start again for you.

edited /etc/gdm/Init/Default:
Code:
sudo gedit /etc/gdm/PreSession/Default
Added the following lines in the middle of the file BEFORE the "XSETROOT=`gdmwhich xsetroot`" line:
Code:
SYNERGYS=`gdmwhich synergys`
if [ x$SYNERGYS != x ] ; then
        $SYNERGYS --config /etc/synergy/synergy.conf
fi
Log out and back in again.

The synergy server should now startup and run whenever your gdm session does.

Last edited by Insti; June 18th, 2008 at 08:11 PM.. Reason: these steps still work in 8.04
Insti is offline   Reply With Quote
Old May 5th, 2006   #6
airtonix
Dipped in Ubuntu
 
airtonix's Avatar
 
Join Date: Oct 2005
Location: Adelaide, South Australia
Beans: 589
Ubuntu 8.10 Intrepid Ibex
Re: synergy / boot up

Ummm, im confused....because the server is what you run on your machine to send the keyboard and mouse singals to the remote machine........which leaves me wondering why you would want the server loading up on a machine that already has a keyboard and mouse on it....so im wondering .....your guide is for ....what?

But i'll make a guess and say that your talking about setting up the client to run on the remote machine with the gdm server, so that you can login from the synergy server that serves the keyboard and mouse data streams, rather than lean over....ruin your spine....and type in your details...

Am i right so far? sorry to be obtuse, but this needs clarification....for i run the server on my laptop....thus controlling the client running on my desktop......id o this at home and i do it at work.....for provids me with a psuedo twin head setup, that I find provides much better peformance that a twin head on a single computer...
airtonix is offline   Reply With Quote
Old May 5th, 2006   #7
Insti
First Cup of Ubuntu
 
Join Date: Apr 2006
Beans: 7
Xubuntu 6.06 Dapper
Re: synergy / boot up

Quote:
Originally Posted by airtonix
Ummm, im confused....because the server is what you run on your machine to send the keyboard and mouse singals to the remote machine
Correct.

Quote:
Originally Posted by airtonix
which leaves me wondering why you would want the server loading up on a machine that already has a keyboard and mouse on it
Because i want to send the keyboard and mouse signals to a client on another machine.
Your guess confused me, because you seemed to suggest something, and then give a completely different description of what you do. Which seems to be much the same as what I do. Unless the confusion happens because you think that the client computer must be the one with the keyboard and mouse attatched to it?

Here is what I do:

Computer A - Runs Linux - Has Keyboard and Mouse.
Computer B - Runs Windows - Has no keyboard or mouse.

Computer A runs synergy server on gdm startup + user login.
Computer B runs synergy client automatically on startup, and connects to the already running server on Computer A.

Now I can now log into and use my Windows machine using the keyboard and mouse attatched to my Linux machine.
(Computer A is used and 'on' a lot more than computer B)

Does that help?
Insti is offline   Reply With Quote
Old May 23rd, 2006   #8
nwgray
Just Give Me the Beans!
 
nwgray's Avatar
 
Join Date: May 2006
Location: Harrisonburg, VA
Beans: 66
Edgy Eft Testing
Send a message via Yahoo to nwgray
Re: synergy / boot up

Quote:
Originally Posted by Insti
I wanted to make the synergy server run from my ubuntu (5.10) box.
Here is what you need to do:

Make a directory in /etc to store the configuration:

Code:
sudo mkdir /etc/synergy
Setup my synergy server configuration file:
Code:
sudo gedit /etc/synergy/synergy.conf
To make the server run when gdm runs, but before anyone has logged in:

edit /etc/gdm/Init/Default:
Code:
sudo gedit /etc/gdm/Init/Default
Added the following lines in the middle of the file BEFORE the "sysmodmap=/etc/X11/Xmodmap" line:

Code:
SYNERGYS=`gdmwhich synergys`
if [ x$SYNERGYS != x ] ; then
        $SYNERGYS --config /etc/synergy/synergy.conf
fi
The only problem with that is once you log in it kills off the server, so you need to make it start again for you.

edited /etc/gdm/Init/Default:
Code:
sudo gedit /etc/gdm/PreSession/Default
Added the following lines in the middle of the file BEFORE the "XSETROOT=`gdmwhich xsetroot`" line:
Code:
SYNERGYS=`gdmwhich synergys`
if [ x$SYNERGYS != x ] ; then
        $SYNERGYS --config /etc/synergy/synergy.conf
fi
Log out and back in again.

The synergy server should now startup and run whenever your gdm session does.
Admitted serious Linux noob here. What syntax would I use if I wanted to start the client and not the server (synergyc)? I run an XP and Ubuntu box side by side and it is working great. I just need synergyc to start automatically.

Thx
__________________
Registered Linux User 417637
Registered Ubuntu User # 8199
nwgray is offline   Reply With Quote
Old May 23rd, 2006   #9
Insti
First Cup of Ubuntu
 
Join Date: Apr 2006
Beans: 7
Xubuntu 6.06 Dapper
Starting the Synergy CLIENT on boot up.

Quote:
Originally Posted by nwgray
Admitted serious Linux noob here. What syntax would I use if I wanted to start the client and not the server (synergyc)? I run an XP and Ubuntu box side by side and it is working great. I just need synergyc to start automatically.
These instructions should work for running the synergy client on your UBUNTU machine to connect to a locally networked computer running the synergy server. (I've not actually tried them myself.)
Let us know how you get on.

NOTE:
The <address of server machine> will probably be an ip address that looks something like 192.168.0.1 (DON'T put in the exact string <address of server machine>)

To make the client run when gdm runs, but before anyone has logged in:

edit /etc/gdm/Init/Default:
Code:
sudo gedit /etc/gdm/Init/Default
Added the following lines in the middle of the file BEFORE the "sysmodmap=/etc/X11/Xmodmap" line:

Code:
SYNERGYC=`gdmwhich synergyc`
if [ x$SYNERGYC != x ] ; then
        $SYNERGYC <address of server machine>
fi
The only problem with that is once you log in it kills off the client, so you need to make it start again for you.

edited /etc/gdm/Init/Default:
Code:
sudo gedit /etc/gdm/PreSession/Default
Added the following lines in the middle of the file BEFORE the "XSETROOT=`gdmwhich xsetroot`" line:
Code:
SYNERGYC=`gdmwhich synergyc`
if [ x$SYNERGYC != x ] ; then
        $SYNERGYC <address of server machine>
fi
Log out and back in again.

The synergy client should now startup and run whenever your gdm session does.

NOTE:
The <address of server machine> will probably be an ip address that looks something like 192.168.0.1 (DON'T put in the exact string <address of server machine>)
Insti is offline   Reply With Quote
Old June 24th, 2006   #10
daesae
First Cup of Ubuntu
 
Join Date: Jun 2006
Beans: 1
Talking Re: synergy / boot up

Thank you Insti, et al.

This method was by far the simplest and easiest way I have seen, and it was the first among many that worked. I am now happily moving back and forth between GDM and KDE using my Windows machine's peripherials.

I am aware that Synergy can only run under an X server, but is anyone aware of a method that would allow me to use the keyboard without the X server? Such an option would be convenient when updating video drivers and reinstalling my linux distro as I so often do(another psychiatric session on it own).

-James
daesae is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:19 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry