FreeNX rgb.txt configuration

I recently installed FreeNX. It's a very fast remote-desktop server – like VNC or Remote Desktop, only much faster over slow connections.

All was well until I tried running Emacs inside a FreeNX session. Emacs refused to start, complaining:

Undefined color: "black".

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

$ strings /usr/lib/nx/nxagent | grep /rgb

Whereas the real location of rgb.txt is /etc/X11/rgb.txt. I worked around this by making a symlink:

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

Then when FreeNX looks in /usr/X11R6/lib/X11 for rgb.txt, it can find it, and Emacs is able to start up.


8 Responses to “FreeNX rgb.txt configuration”

  1. Marc Says:

    FreeNX is a pretty amazing piece of software. You sound like you’re too far along to need this, but readers who are beginners to FreeNX might want to check out this article that I wrote for

  2. What’s All This Brouhaha? » FreeNX Says:

    […] When using FC3 on the remote host, you have to change the client configuration to use a custom session rather than a GNOME session, though you can run GNOME.  Rick’s page explains that.  But there is also a problem where starting Emacs as an X client gives an error ‘Undefined color: “black”‘.  jugboy ran into this problem with a different X distribution, and wrote about how he solved it.  Unfortunately his solution does not seem to work on FC3, because the rgb.txt file actually is in the place nxagent expects it. […]

  3. madajb Says:

    Thanks for this.
    I’ve been beating myself over the head for the last 2 hours trying to get aterm to run.
    Finally figured it was a freenx problem rather than a debian problem.
    Put rgb.txt and freenx into google, and up popped this page which solved the entire problem.


  4. hetvliegendvarkentje Says:

    I had exactly the same problem with vnc server; the same solution too

  5. SDM Says:

    ditto!! made my day w/ that soft link, bub. thx!!! freenx lookin’ solid now!

  6. SDM Says:

    oops, spoke too soon .. can’t de-iconify after minimizing an app like xterm. ouch!

  7. Hugo Heden Says:

    Another alternative to locate an rgb.txt file to use with nx:

    apt-file find rgb.txt

  8. Hugo Heden Says:

    Ping from: — thanks for this useful blogpost.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: