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
/usr/X11R6/lib/X11/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.
June 21, 2006 at 9:17 am |
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 Linux.com.
September 5, 2006 at 4:48 am |
[…] 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. […]
September 20, 2006 at 10:05 am |
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.
-ajb
February 5, 2007 at 3:16 pm |
I had exactly the same problem with vnc server; the same solution too
May 15, 2007 at 11:03 am |
ditto!! made my day w/ that soft link, bub. thx!!! freenx lookin’ solid now!
May 15, 2007 at 11:11 am |
oops, spoke too soon .. can’t de-iconify after minimizing an app like xterm. ouch!
February 10, 2009 at 4:30 pm |
Another alternative to locate an rgb.txt file to use with nx:
apt-file find rgb.txt
May 8, 2009 at 10:00 pm |
Ping from: https://bugs.launchpad.net/ubuntu/+source/emacs22/+bug/358678 — thanks for this useful blogpost.