Author Topic: Xdm Login From Windows Machine  (Read 4225 times)


  • Hero Member
  • *****
  • Posts: 1248
    • View Profile
Xdm Login From Windows Machine
« on: April 01, 2006, 06:23:30 am »

For a while now I have wanted to be able to simply run an X server on a Windows machine periodically to access the Zaurus in the hope of having more screen real-estate. The main stumbling block has always been that there were no quality free X servers that I could install on machines without licensing for each of those X servers.

Another thread got me started on using X/deep-32 which is now free and offers a good X11R6.5.1 server for installation on Windows.

I have been running a moinmoin Wiki on my Zaurus for a while now and have both the X/deep-32 installation and files present on the wiki pages for download so that they may be easily accessed for installation on a Window machine without carrying them around on seperate storage. You could use this or apache to host the files... this side of things I'm not going to go into.

What I will discuss are the minor settings required to get xdm login running from the X server.

Step 1, configuring xdm for xdmcp

Firstly it should be noted that the default xdm configuration on OpenBSD runs a local X server and services a login on the local display. This isn't what we are interested in here so the first thing is to disable the local server.

Edit the /etc/X11/xdm/Xservers file, you will find a line that looks like this..
Code: [Select]
:0 local /usr/X11R6/bin/X
comment that line out with a # and save the file.

Now we must configure the xdmcp chooser..

edit /etc/X11/xdm/Xaccess file and add a line (you may want to position this line near the similar, commented out line, this is a matter of preference)..
Code: [Select]
*                 CHOOSER NOBROADCAST
I choose to use NOBROADCAST because I only want my own X server to show the Zaurus and I don't really want other clients running xdmcp to spot the Zaurus and attempt to login there.

Finally I created two scripts to be run by root because I didn't want to run xdm constantly from startup.. if you do want to run xdm constantly then simply specify the -tcpPort 177 as opts in /etc/rc.conf. Here are my 2 scripts.
Code: [Select]
if [ -f '/var/run/' ]; then
echo XDM maybe already running /var/run/ already exists..
xdm -udpPort 177
Code: [Select]
if [ -f '/var/run/' ]; then
kill `cat /var/run/`
rm /var/run/
echo XDM wasn\'t running

Step 2, configuring X/deep-32 for access

Install and run X/deep-32.

On the X-server menu select X-server options and go to the XDMCP page.

Deselect the broadcast options for XDMCP and in the section X-Deep/32 Local XDM Chooser select XDMCP by Query Host then type in either the hostname or IP address of the Zaurus. Note that you may need to set up name resolution either by hosts file on the Windows box or by a name server if you are using a name.

OK, that's it...

If you startxdm now and then start X/Deep32 you will should get an OpenBSD login screen.

Additional tip, if you are using an environment such as xfce4 on the Zaurus and you want this to be active under xdm rather than just on the Zaurus console create a .xsession file in the user's home directory that starts the environment. This is a good place to put in profile type statements also that you may want to use to configure the environment... mine looks like this...

Code: [Select]
export TERMCMD=aterm
export LANG=en_GB
export PS1="\h$ "

(TERMCMD is used by xfterm4 to select the desired term application, LANG I am using to select the en_GB dictionaries for ispell from AbiWord but it does cause PERL to complain... PERL_BADLANG=0 stops perl complainiing, I haven't seen a downside to using the BADLANG env variable yet. PS1 sets my prompt and finally the startxfce4 command starts my xfce4 environment).

 [ Invalid Attachment ]

Apologies for the screen shot quality, at 1920x1200 the files are huge unless I reduce the quality considerably.

« Last Edit: April 01, 2006, 06:28:56 am by iamasmith »
OpenBSD 4.2 -current on full 4Gb of SL-C3000
Microdrive replaced with 4Gb SanDisk Extreme III card