Autostart Synergy on Fedora Linux

Category: Note to Self

Synergy is a really useful piece of open source software that lets me share a single keyboard and mouse between multiple computers on my desk.

In my work environment my  Mac acts as ‘server’ (because this machine is rarely switched off) which shares its keyboard and mouse with my Linux development machine. Getting the synergy client to start automatically on the Linux box took me a while to work out, this is how I finally got it to work.

This works for me with Fedora 16 & KDE Desktop and is based on the info found here

I use 2 shell scripts to handle starting and stopping of the synergy client:

Shell script 1 –

#Make sure any existing instances are shutdown
/usr/bin/killall -9 synergyc
sleep 1
#Start synergy - use your own IP
# This fixes a bug with synergy that causes @ to display as omega symbol
xmodmap -e "keycode 24 = q Q at at at at"

Shell script 2 –

#Stop synergy
/usr/bin/killall -9 synergyc

1. To have synergy startup after system boot, edit file /etc/gdm/Init/Default and add the line near bottom (before exit):


2. After logging in, we should kill the current instance of synergy because it as running as root – to do this, edit (or create) file /etc/gdm/PostLogin/Default and add the line:


3. To start synergy after user has logged in place script 1 (or a symlink to it) in folder ~/.kde/Autostart

4. To have synergy stop once the user has logged out of a KDE session, place script 2 (or a symlink to it) in folder ~/.kde/shutdown

Mount or automount samba share

Category: Note to Self

Works with Fedora 16

From command line:

$ mount -t cifs -o user=lopez,password=mypassword  // /mnt/share/mntpoint

If samba folder has a space in the name:

$ mount -t cifs -o user=lopez,password=mypassword  //"path with spaces" /mnt/share/mntpoint


edit /etc/fstab and add the following lines:

//\path1 /mnt/share/mountpoint1  cifs  user=lopez,password=mypassword,uid=lopez,gid=users 0 0
//\040space /mnt/share/mountpoint2  cifs  user=lopez,password=mypassword,uid=lopez,gid=users 0 0

(note use of \040 to escape space in fstab, rather than surrounding quotes used in command line)

Rsync examples

Category: Note to Self

To rsync between 2 hosts you should have a public key to allow password-free login

Example 1: Copy all files to remote folder

rsync -avz -e ssh /source/path/

Example 2:  rsync operation deleting files on the remote side that do not exist on local:

rsync -azv --delete -e ssh /source/path/

Example 3:  exclude specified files from operation

rsync -azv --delete -e --exclude 'Thumbs.db' --exclude '.DS_Store' /source/path/ /destination/folder/