Fight for the Internet 1!

Friday, May 21, 2010

Synergy configuration example

For a year or more, I have been using the program called Synergy to control multiple computers from a single machine with a single keyboard and mouse. Synergy is available for most Linux distributions, but it is also interesting to note the original program has not been upgraded since 2006.

Synergy+ is a maintenance fork for implementing bug fixes to the original Synergy by Chris Schoeneman, which hasn't any source updates or new releases since 2006 (as of writing this). If you experience any odd problems with your Synergy that are not configuration bugs, try using Synergy+ instead.

My configuration of Synergy is slightly more complex than your average one. The main differences are that the top and bottom 5% of each screen are not shared, so you can safely use the buttons and window-controls in each corner without problems of jumping to adjoining screens. Also, I have a Logitech Revolution MX mouse, which has about 9 buttons. I have added mouse button configuration to make sure I can use Thumb buttons for Forward-History and Back-History. (Without this configuration, my machines were disconnecting from each other.)

In this example, I have two screens. Misty is on the Left, and Jenny is one the Right.
section: screens
Jenny:
Misty:
end
section: links
Jenny:
left(10,90) = Misty
Misty:
right(10,90) = Jenny
end
section: options
mousebutton(6) = keystroke(WWWBack)
mousebutton(7) = keystroke(WWWForward)
mousebutton(4) = ;
mousebutton(5) = ;
end

I hope this example configuration file is helpful to any viewers.

(And by the way viewers, connections with Synergy are not encrypted, meaning not secure. It is open to monitoring, so if you type something critical or secret, it can possibly be viewed. To secure Synergy, you should tunnel it through a secure connection, like SSH for example.)

Sunday, May 2, 2010

Ubuntu Logitech diNovo Edge Bluetooth Wireless Keyboard

I use the Logitech diNovo Edge in Ubuntu/Kubuntu and I love it. When I installed Kubuntu 10.04 Lucid, this wireless keyboard failed to work. The bluetooth device manager kept prompting me to connect and pair the device with a PIN but nothing I did ever worked.

UPDATE/EDIT: This problem has been reported in version dating from 10.04 to 11.04. This solution works for those, but there is a slightly different solution for 11.10.

Here is the solution / fix for getting the keyword to work. The source for this information is here.

Edit the file: /lib/udev/rules.d/70-hid2hci.rules

(If you need help editing a file, see bottom section.)

Change this line:

# Logitech devices
KERNEL=="hiddev*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \
RUN+="hid2hci --method=logitech-hid --devpath=%p"

to

KERNEL=="hidraw*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c70[345abce]|c71[34bc]", \
RUN+="hid2hci --method=logitech-hid --devpath=%p"

I have made the changed sections BOLD. I also turned bluetooth off from the icon in the system tray.

After making this change, I turned on my wireless keyboard, unplugged it's bluetooth dongle, plugged it back in, paired the keyword with the dongle, and a few seconds later it worked. I did not even have to reboot.

HOW TO EDIT THE FILE (for those who need help with this stage)

New users to Linux may have trouble editing text files at first. I'll try to be simple, and this guide is for people using Gnome or KDE.

The simplest way is using a user friendly program. In Gnome (which is normal Ubuntu), the default text editor is gedit. In KDE (in Kubuntu) it is Kate. Also, this is a protected system file, so you need to use special Administrator privileges before you can edit it. Don't worry. This is simply.

KDE

In KDE, you need to find the "Run Command" option the Application menu. (The App menu is usually in the lower left-hand corner, with a colorful K-button.) In KDE4's new menu style, the "Run Command" is (currently) under the 'Computer' section, near the top of the small list. Find the option and click it.

In the input box that displays, copy/paste the this command into it and press enter:
kdesu kate /lib/udev/rules.d/70-hid2hci.rules

The 'kdesu' program tells the system you want to run the text editor (kate) with Admin access. You will be prompted for your individual user password, which you enter. Then kate should open with a file ready for you. (This is the /lib/udev/rules.d/70-hid2hci.rules file which we told kate to open for us.) If this file does not open, you can open it manually by going to menu File -> Open... and then navigating to the '/' root directory, down to 'lib' and so on until you find the file ' 70-hid2hci.rules'.

Edit the file as directed earlier in this article. Save the file, close the file (menu File -> Close), and then finally exit Kate.

GNOME

In Gnome, first open the Terminal through the Application menu. (The App menu is usually in the upper left-hand corner, labeled as Applications.) On my system, it is under Applications -> Accessories -> Terminal.

In the input command window that displays, copy/paste the this command into it and press enter:
gksu gedit /lib/udev/rules.d/70-hid2hci.rules

The 'gksu' tells the system you want to run the text editor (gedit) with Admin access. You will be prompted for your individual user password, which you enter. Then gedit should open with a file ready for you. (This is the /lib/udev/rules.d/70-hid2hci.rules file which we told gedit to open for us.) If this file does not open, you can open it manually by going to menu File -> Open... and then navigating to the '/' root directory, down to 'lib' and so on until you find the file ' 70-hid2hci.rules'.

Edit the file as directed earlier in this article. Save the file, close the file (menu File -> Close), and then finally exit gedit. You can close the Terminal also.

Hope that helps.