Hideki A. Ikeda (HidekiAI) [池田英紀] ["Tony" Ikeda] –  BLog

Gentoo + XDM + LTSP

This is not a HOW-TO page. There are plenty of pages for that. But rather, this page is just a log/journal as a reminder to myself of what I had to go through and set to make the Gentoo with XDM and LTSP to function.

First off, I use my *nix box mainly in command line. Only time I switch to GUI is to browse the net and read my e-mail via webmail interface. So my setups are minimalist settings and it’s strictly X11. I like KDE but I don’t want extra stuffs in my system if I can help it. Some may suggest xfce, but X11 and twm is good enough for me.

In general, the Gentoo Wiki pages are the most excellent and well-written documentations (Ubuntu is another favorite documentation). So I didn’t have to do much. I got as far as getting the LTSP to work as well as the XDM to kick in.

FailSafe and XSession
This section is if you getting “chooseSessionListWidget” with choices of only “Default/Failsafe” and “Cancel”.

I do have my rc-update with xdm enabled, but I do not wish to (nor have the desire to) have by Gentoo box boot up in XDM login.

But what I was getting stuck on was that it would get to XDM and it would ask for username and password (whether from LTSP or local box) and once it authenticates (see /var/log/messages and search for ‘pam_unix’) it goes to the default grey screen and no xterm would pop up.

Note: see logic in “failsafe” case in /etc/X11/Sessions/Xsession

It turns out I had to do 2 things which I could not find documented anywhere…

  1. I had to create a local copy of ~/.xsession (just use the example found in http://www.xfree86.org/current/xdm.1.html
  2. chmod that ~/.xsession to be executable

Although the 2nd part (chmod) is obvious but it didn’t dawn on me for about half-an-hour.  Then I decided to run the shell script from command line and it told me I couldn’t.  *doh!*

Once it was created and executable, I was successfully able to use XWin (remotely) as well as locally (via startx) to start a X session.

Grey Screen Only No Login Widget
Whether you use plain vanilla XDM or other Desktop Managers (such as KDM, which is my second favored choice), if you just get the default grey screen without the login widget for your DM, it’s most likely because your service is not aware of the I.P. address of the connected clients.

I have a VLAN setup and I don’t follow the conventional setup of LTSP with DHCP service generating the I.P. for the client. It makes it difficult to PXE (or floppy) boot access right now but that is my choice since I want to have a dedicated (centralized and unified) DHCP service to manage my VLAN.

Because of this, if I try to use XWin from my (work loaner) XP laptop via Cygwin’s XWin (if you have your XDMCP setup correct, you can just type “XWin -once -broadcast“) and do multicast; else you will have to add “-query 192.168.xxx.255″ – for example “XWin -once -query 192.168.10.255” to directly connect to it) on a different VLAN (if my VLAN is on 192.168.11.X) if I don’t have that I.P. address in my /etc/hosts I will continuously get the grey-screen without any login widget.  At this moment, I could not find any indications in any of the log files found in /var/log/* files, so I had no clue what or why.  Then I switched my I.P. to be in the same subnet and it worked.

If you have messed around with ltspcfg and ltspadmin, you’d notice that your /etc/hosts has been added with list of I.P. addresses. Note that if you have multiple or dual-LAN (i.e. eth0 and eth1) with different subnet, ltspcfg makes you choose one of the connections to populate your hosts file.

I’m sure one of the main reasons for this is security, so that if your X server is open to WAN, unless that WAN I.P. is in your hosts list, it won’t give you the chance to hack on it. At the same time, for PXE (and floppy) boot settings for LTSP, because it’ll use the localized DHCP service, it should be guaranteed to meet the I.P. filtering requirements.

In any case, you have few choices. The simplest of course is to manually add (just ssh to your X box and add your I.P. to the hosts file) yourself to the hosts file and try XWin again. Other choices are probably more secure and much logical than to manually add, but because I only open my firewall for LAN to connect to the X server, I really didn’t care.

Related posts

Leave a Reply

You must be logged in to post a comment.

Google AdSense

Google Analytics

Google AdSense Search

Categories