synergy, ssh and port forwarding

How to use synergy over ssh with a gateway server, or
How to make port fowarding over a gateway ?

Ok then, someone last week showed me the great tool “synergy”. With it, two ore more computers can be controlled by one keyboard and one mouse. So that’s nothing new.
The nice thing is that if you move your mouse over the boarder of screen 1 if will appear on screen 2 just like this screen was connected to your computer.
It’s working great and I wanted to have this everywhere my MacBook goes.
Setup and Config is real easy and descibed at

The problem is that it’s build upon a server client architecture and you need to have a direct connection between your server and your client. Yes well that should be no problem but I’m working in an office where the networks for hosted computers and the computers ones bring in  are seperated. The only option to get a connection from my macbook to the linux machine I’m sitting right next to, is a connection over a gateway Server that’s somewhere else.
So ssh from my macbook -> gateway
and then from gateway -> to office local linux box
But if i do it this way I won’t be able to establish a direct connection. After some research on the net I came up with this:
Box1 = MacBook
Box2 = Gateway Server
Box3 = office linux box

1st of all start the Server on Port 8033 (or sth. else), Type this on bash in BOX3

synergys -a localhost:8033 -f –config ../conf/synergy.conf

then make a port forwarding from Box2 port 8033 to Box3 port 22. Type this on bash in BOX1

ssh -L 8033:BOX3:22 cb0@BOX2

Then make a port forward from localhost port 24810 to port 8033 on localhost which redirects us directly to Box3. Type this on bash in BOX1

ssh -p 8033 -v -f -N -L localhost:24810:localhost:8033 cb0@localhost

Now on Box1 type this to connect synergy to localhost on port 24810 which redirects it to Box 3.

./synergyc -f localhost:24810

thats it.
Hope you enjoy your new productivity with synergy 😉

A nice project I thought of was to teach my macbook to atomatically connect to a specific server dependent on the enviroment i’m in. This should somehow be possible using apple script but at the moment I have no Idea how.

recover zip password under os x

Marc Lehmann has written a zip Password cracker similar to fzc or zipcrack. It can be used to either bruteforce or try a dictionaty attack on a password protected file.
It’s called fcrackzip and can be found here.
Just follow the instruction given in the Readmefile and compile it. This work’s great for me under 10.5.6 as long as you have X Code installed.

Here’s how I use it:

fcrackzip -b -c aA1 -l 6-8 -v -u

-b : bruteforce the password
-c : use the following character classes for cracking:

a    use all lowercase character
A   use all uppercase character
1    use all digits

-l 6-8 : Try passwords between 6 to 8 characters in length
-v be more verbose (this will print out the actual used password)
-u : Try to decompress first file in with the generated password.

And when the output starts with ‘PASSWORD FOUND!!!!: pw ==’, I’m happy.

For more command line options see the project page under

open terminal here

Marc Liyanage wrote a nice Apple Script which easily allows you to switch from the Finder to the Terminal.
Just download it here and drag the script to the upper free space in the Finder.

Clicking it results in a new Terminal window which location is the same as the Finder location.
new Finder icon

Here’s how it looks.

P.S. this works under OS X 10.6 😉

Imac horror crash

I don’t know what’s going on. Last week my old Powerbook G4 suddenly stoped working because of some hdd error.
Today I told my 1 year old 24” iMac to shutdown and went away. When I returned it was still trying to shutdown but I couldn’t do anything except for resetting. After a reboot the horror was perfect because of this huge ? Symbol on the screen indicating that no hdd was found.
I was near crying
After running hardware test it told me there is an 4HDD/11/40000004 sata(0,0) error. ;(
Disk Utility told me that it couldn’t repair because of wrong disk permission and repair disk permission told me it couldn’t finish because of some unknown error ;(
I’ll now try to solve this with diskwarrior, tomorrow morning I’m going to buy some FireWire cable to try to rescue some of my data via target mode.
Wish me some luck, there’s too much work on it…
why is this happening, is there some kind if hardware destroying virus I’m infected with? A single person just can’t have so much bad luck

backspace problem with screen in remote debian with os x

Every time I use terminal in combination with an ssh connection to a remote host and the execute screen I’m not able to use the backspace key.
Found a soultion in the comment section of atomized

just put the following line into your ~/.bash_login script

export TERM=xterm


BibTeX and LaTeX in TeXShop OS X

  1. create a file (e.g. cites.bib) that will contain the cites
  2. create a cite in cites.bib (you may use as the simple solution)

      AUTHOR = {cb0},
      TITLE = {BibTeX and LaTeX in TeXShop OS X},
      PUBLISHER = {cb0},
      ADDRESS = {Leipzig},
      YEAR = {2009},
    URL = {},
    note = {This is an electronic document.
               Date retrieved: Feburay 22, 2009. Date last modified: Feburay 22, 2009},
    url = {},
  3. Insert the following 2 lines at the desired place of your bibliography

    cite is the reference to the created cites.bib

  4. cite it somewhere
    \cite[see cb0's Blog]{bibAndTex}
  5. Save all changes
  6. set Latex
  7. set BibTeX
    output should start with sth. like this
  8. 2 times step 6 for correct numbering of all cites
  9. look at the results
    the cite in the text

    the cite in the bibliography
  10. enjoy