Linux / Unix Tips and Tricks

This blog contains Linux / Unix Tips and Tricks, collected during my work as a Unix System Administrator.
They are here for my own reference, but they might help you as well !

Setting your X environment

len | 15 December, 2008 14:15

Most Unix sysadmins are hardcore Command Line gurus. However, sometimes you may need to run a graphical application on Unix.
The graphical environment on Unix is called the X Window System (or X or X11). Unlike most other graphical systems, X is designed to be used over the network.

It's important to understand that in the X Window concept the application that runs on Unix is the Client, while your PC is the Server.
So the first thing you'll need is a X Server. On my Windows PC I have Reflection X installed (propertary software), but there are free alternatives, like Xming.

Once you have an X Server running on your PC, it's time to log in to the Unix box. On the Unix prompt you need to tell where the X Server resides. This is done by setting the DISPLAY variable:

$ DISPLAY=10.0.0.1:0              # Change 10.0.0.1 in your actual IP address
$ export DISPLAY

Now you can test the X Server by starting a X application, like xclock:

xclock screenshot

$  /usr/openwin/bin/xclock

A simple graphical clock should appear

 

 

 

 

 

 

 
Accessible and Valid XHTML 1.0 Strict and CSS
Powered by LifeType - Design by BalearWeb