Generally I like to keep Linux servers text-only, to save on disk-space and memory, however it is sometimes useful to be able to administer a server remotely using a GUI, e.g. if you need to run a web browser. Therefore I came up with this procedure for a minimal graphical desktop using openbox and various lightweight utilites, accessed remotely using NoMachine’s FreeNX server.
This guide has been tested on Ubuntu Server 7.10 and 8.04.
Step One: Install X.org, openbox and pypanel:
sudo aptitude install xorg openbox openbox-themes obconf pypanel rxvt
Step Two: Now go to NoMachine and download NX Server Free edition. Chose i386 or x86_64 depending on your architecture, and download and install nxclient, nxnode, and nxserver.
wget http://64.34.161.181/download/3.2.0/Linux/nxclient_3.2.0-14_i386.deb http://64.34.161.181/download/3.2.0/Linux/nxnode_3.2.0-11_i386.deb http://64.34.161.181/download/3.2.0/Linux/FE/nxserver_3.2.0-13_i386.deb
sudo aptitude install libaudiofile0 && sudo dpkg -i nxclient_*.deb nxnode_*.deb nxserver_*.deb
Step Three: On the machine you want to connect from, download and install nxclient for your OS here. When you run it the Connection Wizard will appear:
- Click Next
- Enter a name for the session, and the IP address or hostname of your server. You may want to change the internet connection type to LAN if the server is local. Click Next.
- In the drop-down boxes, choose “Unix”, “Custom”, and click Settings. Under application click the box next to “Run the following command” and type openbox-session in the box below. Under Options click the box next to “New Virtual Desktop”. Click OK.
- Set the size of the remote desktop to “Available area”. Click Next.
- Tick the option to create a shortcut if you wish, then click Finish.
Step Four: Back on the server, set rxvt as the default terminal emulator:
sudo update-alternatives --set x-terminal-emulator /usr/bin/rxvt-xterm
Install update-notifier, Epiphany, conky and thunar:
sudo aptitude install update-notifier epiphany-browser conky thunar
Epiphany is the Gnome web browser, and is less resource-hungry than Firefox. However feel free to install a different browser such as Firefox, Opera (not available in the standard repos) or (if you want really light-weight) Dillo.
Step Five: Configure openbox and pypanel.
Using nxclient, log in to the server. Right-click on the desktop to see the Openbox Menu, and run ObConf. To give you more productive space on the desktop, set one of the simple-* themes, reduce the font sizes by 1 point and change the number of desktops to 1.
Add startup programs to ~/.config/openbox/autostart.sh
pypanel &
conky &
update-notifier &
Download the .pypanelrc file below, and save it in your home directory.
This changes the font colour and panel layout, and sets up some launcher icons on the left of the panel.
Step Six: Install ObMenu
For Ubuntu 7.10:
Download from here
tar xvfz obmenu-*.tar.gz
cd obmenu-*
sudo python setup.py install
For Ubuntu 8.04:
sudo aptitude install obmenu
Then:
cp /etc/xdg/openbox/menu.xml ~/.config/openbox/
Run ObMenu from a terminal, and set up menu entries, including one for Ob Menu itself.
Step Seven: Configure conky
Download the file below and save to your home directory
You may need to edit it to change the filesystems for which you want conky to show free space.
Step Eight: Set up thunar SMB browsing.
Adapted from here: http://ubuntuforums.org/showthread.php?t=304131
- Install samba and fusesmb
- Edit /etc/samba/smb.conf and set WORKGROUP = <YOUR-DOMAIN>
- sudo adduser <username> fuse
- mkdir ~/network
- Reboot
- add “fusesmb /home/<username>/network” to .config/openbox/autostart.sh
- Open Thunar, and navigate to the parent folder of your mountpoint… then drag the ‘mounpoint folder’ to the places (shortcut) pane of thunar.
Well, that’s how I like to do it. Please leave comments, suggestions, abuse etc.
Entries (RSS)