Installing X11

From ComputingPlugs

Jump to: navigation, search

You can install and run X11 on the Sheeva Plug so that you can use X11 applications. The Sheeva Plug does not have any video output so you obviously need to remotely access the X11 applications. There are a few of ways to do that; VNC, NX and X over ssh.

Contents

Install X11

First thing is to install the X11 libraries, a few basic apps and utilities. To do that, type:

apt-get install x11-common x11-apps x11-utils

It'll take a little while to gather all the libraries for X. I would like to say that is all you need to do, but there is a bug in libXt that cause problems on some X applications. You will not see the bug right now since you have no way of running an X application just yet. I will discuss the fix at the end of this page.

X over ssh

First make sure that sshd on the Sheeva Plug allows X11 Forwarding. Edit the file /etc/ssh/sshd_config and make sure you see

X11Forwarding yes

if not, change it to yes and restart sshd with

/etc/init.d/ssh restart

You also need to install xauth in order to use X over ssh, and xauth is in the xbase-clients package. So type:

apt-get install xbase-clients

You can tell xauth is installed correctly if you type the following on another computer

ssh -X -v <SheevaPlugsIP>

and it does not say:

Remote: No xauth program; cannot forward with spoofing.

After all of that, ssh with X forwarding into the Sheeva Plug:

ssh -X <SheevaPlugsIP>

Test your X11 install by running:

xeyes

You will, of course, need to do this on a computer that will accept an X connect like any Linux machine or Cygwin/X.

Xwindow desktop

If you want an Xwindow desktop on the SheevaPlug, you'll need to install either VNC or NX. You could install both if you like and pick the one that suits the task at hand. VNC is easier to install but NX is generally faster.

VNC and IceWM

Screen shot of VNC running on the Sheeva Plug

To install VNC, type:

apt-get install vnc-server

and to install IceWM type:

apt-get install icewm icewm-gnome icewm-themes

You may not want to install icewm-gnome depending on disk space. I installed it because firefox uses the gnome libraries. After that, simply type:

vncserver

to start the vncserver. If you not familiar with VNC server in Linux, the VNC desktop starts as 1, not 0 like the windows VNC server. So you need to connect to port 5901 of the Sheeva Plug to connect to the VNC server. The command to do that is:

xtightvncviewer <SheevaPlugsIP>::5901

or

xtightvncviewer <SheevaPlugsIP>:1

After that, you'll have your VNC window with a nice IceWM desktop running on the Sheeva Plug. I really only use 2 applications under X; Firefox and Pan. Both run just fine on the Sheeva Plug. To get those 2 applications, just type:

apt-get install firefox
apt-get install pan

Note that the only vncserver available to the Sheeva Plug is tightvnc. So make sure when you connect to the server you are using xtightvncviewer and not xvnc4viewer. It is fantastically slow if you use mix the two.

NX

You can also run NX on the SheevaPlug. Here are the details of how to install FreeNX server and the NX Open Source components.

libXt bug

Now that you have VNC and IceWM installed, you may notice that the terminal windows in VNC is a blank screen. You may also notice that the terminal is somewhat working, such that if you type a command into the window it will execute correctly. This is the libXt bug I had talked about earlier. It doesn't affect all the applications, for example firefox seems to work ok. But if does affect the terminal which is very annoying. To fix the problem would require recompiling libXt from source. If don't want to do compile your own, and you trust binary blobs from me, then you can download the library file here.

To compile your own, first add the following to your /etc/apt/sources.list.

deb-src http://ports.ubuntu.com jaunty main restricted universe multiverse

Update apt-get and install the build tools

apt-get update
apt-get install build-essential xorg-dev

Get the source to libXt

apt-get source libxt

build the library

cd /root/libxt-1.0.5
./configure
make

The end result is the file ./libxt-1.0.5/src/.libs/libXt.so.6.0.0.

The correct location of this file is in /usr/lib. If you go there, you will see the following:

root$:/usr/lib# ll libXt.so*
lrwxrwxrwx 1 root root      14 2009-04-20 19:53 libXt.so -> libXt.so.6.0.0
lrwxrwxrwx 1 root root      14 2009-04-20 19:53 libXt.so.6 -> libXt.so.6.0.0
-rwxr-xr-x 1 root root 1595086 2009-04-15 17:10 libXt.so.6.0.0

Most people would make a backup of the old libXt.so.6.0.0 before replacing it with the new one. That is a good practice. However, I notice a very strange behavior that if you leave the old file in the same directory, and renamed it to libXt.so.6.0.0.back for example, the softlinks libXt.so.6 will be re-pointed to the old library after a power cycle. So to eliminate the problem, I moved the backup to another directory (in my case, /root) and copy the new libXt.so.6.0.0 to /usr/lib.



Comments:
  • Kenny Says:

    Please keep comments clean and constructive. Inappropriate comments will be removed. Thank you.

  • IanJB Says:

    I read this with great interest and thought at the end "Wouldn't it be great to have NX access rather than VNC" and I see that you have a new wiki for NX. Awesome.

  • Kenny Says:

    You found it?! Damn....there goes my thunder. Yeah, NX works. I'm at the process of cleaning up the server/client setup and I have to write a startup script so that the server starts at boot. Otherwise it works just fine.

  • IanJB Says:

    Sorry to steal your thunder ... I found it by clicking on "recent changes" I've found vnc frustratingly slow in the past and NX is much faster. Seeing as the plug is headless to start with it makes sense to use NX if possible. I've found a lot of good stuff on your site. Keep up the good work!

  • Kenny Says:

    Thanks Ian, I'm glad you find the information here useful.

  • TomR Says:

    I tried to install VNC per the instructions here.

    apt-get install VNC

    does not work --- I got an error that the package didn't exist. I looked around in aptitude and found that "tightvncserver" does exist, and installed that.

    Oddly, when I was doing the "apt-get install icewm...." line, it tried to reconfigure hald, hung and eventually failed. From that point forward, hald will not start cleanly on reboot even after removing all the stuff I had just added (with "apt-get remove" everywhere I did an "apt-get install"

    Anyone had *that* experience?

  • Kenny Says:

    Tom, I fixed the statement so that it is "apt-get install vnc-server". Thanks for the heads up.

    I don't know about icewm reconfiguring hald. Its been a while since I've installed vnc and I don't remember if it reconfigured hal. I can check the console message the next time I reboot the server, but "dmesg" doesn't show any hald problems.

  • TomR Says:

    Just a quick FYI: It appears that the libXt fixes were committed and are now available without having to rebuild from source.

    I still had success with VNC after my first attempt, but I did have success running xterm over ssh and there were no problems there. According to the launchpad site regarding the libXt bug, the fix was committed --- so I think this source rebuild is no longer necessary.

    BTW, my hal issues were clearly due to something in the installation of icewm components (probably icewm-gnome) --- I ultimately had to reflash my filesystem to get back to square one and get rid of hal. Apparently something in that set of packages was what installed hal, and the installation got hosed somewhere. I haven't tried it again since that one failed attempt --- I think I might wait until I have set myself up with an alternative boot medium (as you suggest on this site) and leave my NAND set-up as a back-up.

    When I get that done I'll try the set-up again, first leaving out icewm-gnome to see if that's really the culprit, and then trying icewm-gnome to see if it wedges my system again. I'll let you know either way.

  • Kenny Says:

    Thanks for the update on libXt, I'll make a note of it on the page.

    About icewm-gnome, you don't really need it unless you plan on running gnome apps. I did it for firefox because if you "apt-get firefox", it'll pull in the entire gnome desktop. At the time I though that was unnecessary, but I had to do it anyway when I started to use NX. So ultimately turned out to be a waste to install icewm-gnome.

    Keep us updated on your progress, I'm sure it'll help a lot of people.

  • TomR Says:

    Update on libXt and Hal:

    No, libXT is not fixed in repositories. The launchpad issue is closed with a supposed fix, but apparently the fix has not propagated to the repositories that apt-get uses on the sheevaplug.

    I was able to get vnc running without hal being installed by leaving off the icewm-gnome install. VNC works, but as you say the xterm window is busted.

    Xterm looks fine when displayed on a remote X server through ssh, though.

    Guess it's still necessary to build libXt from source. Thanks for the instructions.

  • Kenny Says:

    hmm..... ok, that's too bad. I'll leave the libXt instructions as is.

  • Surak Says:

    Excellent website!

    Some of the "apt-get"s are missing the "install", could be a trouble for newbies.

    Also, I think it is worth the observation to make it clear that someone could choose between VNC OR NX...just for people new to Linux.

  • Kenny Says:

    Thanks for the catch Surak, I've fixed the apt-get errors and added a few words on vnc and nx.

  • Ken Shirriff Says:

    The wiki says to start up vncviewer:

    vncviewer :5901

    I believe two colons are required before the 5901.

  • Kenny Says:

    Thanks, I got that fixed.

    Oddly enough, the single colon also worked if you're using xtightvncviewer 1.3.9. It didn't work with 1.2.x.

  • Sven Killig Says:

    You can even drive a monitor directly with an USB DVI adapter:

    http://plugcomputer.org/plugforum/index.php?topic=107.msg2689#msg2689

    I installed your patched libXt, but still have problems:

    Menus under Gnome only 1 pixel high at the top of the screen, strange behaviour under XFCE, KDE eats all RAM, but icewm and Firefox work.

  • Kenny Says:

    Yeah, I read about that. It is pretty neat that it all works but I'm not too into the idea of using the sheeva plug as a desktop computer. There are better alternatives for that. I don't think the problem you're seeing is the same that was fixed by libXt since gnome works fine under NX. I image it has to do with the video driver of the usb adapter. Again, I don't know for sure and I can't test it because I don't have the setup. If you figure it out, let us know, I'm sure lots of people would be interested.

  • Sven Killig Says:

    I find it quite interesting to have a X11 box that uses 4 W idle. This is really low power. I don't know of an alternative that needs so few power.

  • silverspoon Says:

    Hi,

    I am trying to install IceWM on my sheevaplug, and got the following error [in the end]:

    ------------------------------------------------------------------------ root@debian:~# apt-get install icewm icewm-gnome icewm-themes Reading package lists... Done Building dependency tree Reading state information... Done Note, selecting icewm-gnome-support instead of icewm-gnome Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

    The following packages have unmet dependencies:

     icewm-gnome-support: Depends: libgnome-desktop-2-11 (>= 1:2.25.90) but it is not going to be installed
    

    E: Broken packages ------------------------------------------------------------------------

    Any suggestion on how to fix this? Thanks in advance.

  • silverspoon Says:

    My apologies for poor text formatting in above post. I realized it after posting. Sorry!

  • Kenny Says:

    it may be possible that the repository is broken, TomR from above also had problems with icewm-gnome. He got around it by just not installing icewm-gnome. VNC should still work, maybe you can try that first.

  • Oler Says:

    Hi I am having the same problem as in the post above saying that icewm-gnome won't be installed as well as firefox.

    Is there a way to fix this? Can I download it on another machine and install it from an usb drive?

    VNC does work without the gnome package.

  • Kenny Says:

    Perhaps it'll work if you install the entire gnome desktop. Sorry, I can't walk you through this because I already now gnome installed (for NX) so I'm only guessing that it'll work. Please try that and see if it does.

  • Oli Says:

    I had some of the same problems with hal on my system. It wasn't, however, caused by icewm components. I didn't attempt to install these. The problem was caused by the apt-get install xbase-clients. After I removed hal and all it's dependencies (apt-get remove hal), I was able to get X forwarding and tightvnc to work for me. I'm using the following repositories:

    deb http://ports.ubuntu.com jaunty main restricted universe multiverse

    deb http://debian.slimdevices.com stable main

    deb http://mirrors.kernel.org/debian unstable main

    Thanks once again for the sweet work.

  • six Says:

    I may also use Openbox with lxpanel :

    apt-get install openbox obconf lxpanel

    It proves to run faster than icewm on my plug.

    I also suggest to use midori which is based on WebKit. This browser is very fast :

    apt-get install midori

  • mitek Says:

    I installed vnc and corrected libXt binary you provided.

    Now xterm is working fine.

    The problem is when in xterm I'm trying to run "mc" - It shows me black terminal window.

  • mitek Says:

    After searching I found that missing is /etc/X11/rgb.txt file.

    You can find it's content at:

    http://cvsweb.xfree86.org/cvsweb/*checkout*/xc/programs/rgb/rgb.txt?rev=HEAD&content-type=text/plain

  • Kenny Says:

    Thanks for the tip mitek, I'm sure it'll help a lot of people.

  • tspoon Says:

    I am having trouble with a missing file, it stops installation of x11, Xbase and vnc-server. The code is the same for all 3:

    Err http://ports.ubuntu.com jaunty-updates/main libgl1-mesa-glx 7.4-0ubuntu3.1 404 Not Found

    Failed to fetch http://ports.ubuntu.com/pool/main/m/mesa/libgl1-mesa-glx_7.4-0ubuntu3.1_armel.deb 404 Not Found

    E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

    I am a total linux newb, suggestions? (to fix this :) )

  • tspoon Says:

    ok, I did an 'apt-get update' and repeated. Everything installed ok, I can use tightvnc and see a desktop. I installed xfm file manager, but it won't run, it shows in the taskbar for an instant, then gone. Some of the other apps don't work, some do. I'm thinking I must be missing some type of system files but have no idea what. Any help would be appreciated

  • Kenny Says:

    hmm....I've never used xfm before. Maybe you can try icewm to see if that works?

  • tspoon Says:

    I installed IceWM, just as detailed in your page, but I would like a file manager to use so I can start to configure the system how I want (of course there are other ways, I'm lazy, and a windows refugee). Is there a file manager that works well for IceWM on a plug?

  • tspoon Says:

    Ok, I got EmelFM2 to install, I'm starting to get the hangof it :)

Click here to leave a comment




... ...

Did you find this page useful?
Help others find this site
by linking here.

... ...
Personal tools