Categories
Uncategorized

osx2x

If you’ve more than one computer at your desk, and one of them is a Mac, you need osx2x. It lets you use all the other computers via VNC or X-Windows connections, using only the one mouse and keyboard. Shiny.

Sadly, the download link on the main site is broken. This is a bit of a pain as it doesn’t appear to be mirrored anywhere.

Luckily, I found one chap who had created a fresh distribution from the (still available) source: osx2x Mac OS 10.4 (Tiger) Universal Binary. I’ve installed that version and it’s working great. My sincere thanks to jamesotron.

Update: Annoyingly, I can’t figure out how to right click when talking to the windows box. That’s a bit annoying.

Categories
Uncategorized

Cygwin / X

At work, I get quite a bit of use out of cygwin. In particular, I find the X server really handy. But I had been using a small batch file to start up the X server, which annoyingly left behind a DOS box whilst the X server was running.

But yesterday, I found the c:/cygwin/usr/X11R6/bin/startxwin.bat script. This manages to start up the X server without leaving behind the DOS box. Much nicer. I did have to edit the script to not start up an xterm, but apart from that it works great.

One other little feature that’s quite handy: If you create an ~/.XWinrc file with this contents:

MENU systray {
  xterm EXEC "xterm -ls -display %display%"
  SEPARATOR
}
ROOTMENU systray

Then you have a convenient link on the X server menu to fire up an xterm. Very handy. My next step is to get it to automatically ssh over to the dev server and fire up Emacs. But I’m not sure if cygwin’s ssh client will interact with the pageant that I’m already running.

Categories
Uncategorized

X debug trick

A useful tip I found in work today for debugging deeply embedded stuff. I was in the middle of some Perl tests talking to a PostgreSQL database. The database was created at the start of the test, and dropped at the end of the test, so there was no oppurtunity to see inside it whilst the test was running.

I remembered seeing an X trick in postfix and realised I could do something similiar. So I came up with this.

system "xterm -e psql -d $ENV{DBNAME}";

I put that in my function where I wanted to examine the database. When the line ran, I got a nice new window all ready for me to inspect that database. Needless to say, it quickly revealed the problem in my code…