Tunnel X from Gutsy to Leopard
I have been tunneling X from Linux to Tiger for almost two years without any problems and happy with it. After upgrading to Leopard, a disaster struck me. I was unable to access my Linux applications on my Ubuntu box. I used to do it with Tiger without any problems. When I ssh tunnel X from Gutsy to Leopard, I had keyboard problem. When I pressed some keys on the keyboard, I got numbers and some weird characters like close windows and minimize windows.
The problem lies within Apple’s new X11 in Leopard. The keyboard is not properly mapped after establishing the X tunnel. After searching the web and Ubuntu forum, I found a solution:
% ssh -X username@gutsy
% xmodmap -pke > ~/.keymap
% gnome-panel 1>/dev/null 2>/dev/null & xmodmap ~/.keymap
Just do xmodmap map once will do. After that, ssh into Ubuntu and invoke gnome-panel.
HOWTO - Building GtkAda project with xcode
My current project (here) requires to develop a GUI application for displaying some JPEG images. I intended to develop a native Mac OS X GUI application using Carbon or Cocoa. Since there is no Cocoa binding in Ada, I narrowed down my option to Carbon. I hit on the wall of frustration where Carbon binding on MacAda.org is very old and supports only gnat-3.3 and PPC (I hope I am not wrong on this).
I have to turn to Gtk+ which will require GtkAda and X11 on Mac OS X. I compiled my test code written for GtkAda very well on console. But when I imported the codes into xcode project, it did not compile. I got the following errors:
error: "gtk.ads" must be recompiled ("a-except.ads" has been modified)
error: "gdk.ads" must be recompiled ("a-except.ads" has been modified)
error: "glib.adb" must be recompiled ("a-except.ads" has been modified)
error: "glib-object.adb" must be recompiled ("a-except.ads" has been modified)
error: "glib-type_conversion_hooks.adb" must be recompiled ("a-except.ads" has been modified)
error: "gtkada.ads" must be recompiled ("system.ads" has been modified)
error: "gtkada-bindings.adb" must be recompiled ("a-except.ads" has been modified)
error: "gtkada-c.adb" must be recompiled ("system.ads" has been modified)
...
I sought help from GNAT-OSX mailing list (September 2007 archive), but there was no avail. I spent many days investigating the cause of the errors. I found out that gtkada source codes would be compiled and produced .ali and .o files in the build directory when I used gnatmake to build my GtkAda application.
$ gnatmake testproject.adb `gtkada-config`
To build a GtkAda project in xcode, follow the instructions below:
- In the project browser, under the Group & Files column, locate Targets and the your project name. Right click your project name and select Add Link Binary With Libraries. Select GtkAda libraries from /opt/local/lib/gtkada and necessary libraries from /opt/local/lib.
- Select your project name and click on the Info button. In Build tab, select Search Paths under Collection. Include /opt/local/include/gtkada in Header Search Paths. Also include /opt/local/lib and /opt/local/lib/gtkada in Library Search Paths.
- Select Source in your project. Select Add to Project … in Project menu. Include all the GtkAda source files in /opt/local/include/gtkada.


Listen to my podcast