Hello. I have a new blog.

I've moved this blog to the following URL Kerkness.ca. Thank you for visiting, please update your bookmarks.

Wednesday, May 7, 2008

Accessing Ubuntu Gnome Applications from Mac OSX without using a Remote Desktop

99% of the work I do is done on an Ubuntu server but I'm not always using an Ubuntu desktop. Recently I just bought myself a nice 24" iMac to use as my main workstation. Most of the time when I need to do something on the Ubuntu server I just open a terminal use ssh. However sometimes I find this approach a little cumbersome. When making large edits to config files on the server I find using a terminal based text editor to be a pain in the ass. Lucky for me there are a few ways to remotely access an Ubuntu desktop.

The most common approach is to use a VNC client. For Mac OSX there is a client called Chicken which seems to be the most popular. This approach is easy to set up but for me I found it to be dreadfully slow and requires that the user is already logged onto the server.

Using X11 to access Gnome Applications on a Remote Ubuntu Server

The process which I've found to suit my needs to a tea, is using the X11 utility which comes with Leopard and can be easily installed in Tiger or Panther. Here is an example of how to log into a remote Ubuntu server and use gEdit to modify a text file. It works really fast and doesn't require a complete remote desktop type solution.

  1. Start up an X11 terminal. You can find it at Applications > Utilities > X11

  2. Use SSH to log into the remote Ubuntu machine using the -Y option
    ssh -Y user@192.168.1.3
  3. Use a terminal command to open a file in gEdit
    sudo gedit /etc/php5/apache2/php.ini
  4. Make changes to the file and close gEdit using the menu File > Quit
UPDATE:
I can confirm that at least with Leopard you don't need to start by opening an X11 terminal. You can log into the remote server using your default OSX Terminal as long as you use the Y option OSX will automatically start x11 when you try and launch a Gnome application.

Nice!

No comments:

Post a Comment

Thank you for the comments.