chacadwa.com

Technical blog and writings by Micah Webner.

Rudimentary X Sessions on Fedora

Blackbox and JMeter

I run Fedora Core on the Linux boxen I manage, and in most cases, they're configured for text-only operation. However, there are cases where running X is desirable, but usually remotely and generally not with all the bloat associated with a full desktop installation. (I've got nothing against Gnome or KDE; I just don't need them most of the time.) For this scenario, I generally use Xvnc and the Blackbox Window Manager.

In order to do this with current versions of Fedora, simply use yum to install the following packages:

yum --enablerepo=extras install blackbox bbkeys vnc-server xterm xauth

(Some of these packages might already be installed, depending on how much X you included in your installation. If you didn't then you might need to add some font libraries and other fundamentals for this to work.)

Create the following ${HOME}/.vnc/xstartup script:

#!/bin/sh
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
blackbox &

Then fire off this command to start the server:

vncserver :1 -name MYNAME -geometry 950x700

I like the 950x700 size for running the VNC client in a 1024x768 Windows session, as the windows fill most of the screen without needing scrollbars or fullscreen mode.

I'm using this setup right this very minute to perform some load testing using Apache JMeter on some remote Linux boxen. It works great.