Moonic's notes


Saturday, March 03, 2007

muCRL + CADP + NX + Ubuntu = hell?

I've installed mucrl tool on my machine (Ubuntu Dapper 2.6.15 platform) with the support of the CADP tool for visualisation of generated state spaces. All was well until I tried to run CADP inside a NX Client for Windows session. CADP refused to start, complaining:
user@host:~/test$ xeuca
Application initialization failed: this
isn't a Tk applicationunknown
color name "Black"
Error in startup script:
can't invoke "option" command: application has
been destroyed
while
executing
"option add *background $Bg_Color"
(file
"/home/user/tools/cadp/src/eucalyptus/eucalyptus.tcl" line
5410)
Fortunately (or unfortunately ?), I have no patience to wait for reply from developers of CADP and have decided to fix the problem myself.

It turned out that NX's nxagent program has the path to X's rgb.txt file hardcoded inside itself:

$ strings /usr/lib/nx/nxagent grep /rgb
/usr/X11R6/lib/X11/rgb

whereas the real location of rgb.txt is /etc/X11/rgb.txt

[source page]

Here are steps to overcome the problem:
1. Make a symlink:

sudo ln -s /etc/X11/rgb.txt /usr/X11R6/lib/X11/

Now NX looks in /usr/X11R6/lib/X11 for rgb.txt.

[source page]

2. Check if a line that says:

Section "Files"
RgbPath "/etc/X11/rgb"
exists in your /etc/X11/xorg.conf. If not, add it under the section "Files".

[source page]

3. Restart X server using ssh:
$ sudo /etc/init.d/gdm stop
and
$ sudo /etc/init.d/gdm start

[source link]

4. Connect back and use :)