I am less than mobile at the moment. Recovery from surgery takes longer than I expected (one week has passed and I still can wear normal trousers only for short periods of time).
It takes me some effort to go up two stairs and work at my Slackware desktop system, so that left me less than happy yesterday when I was facing the living room PC which is running Vista. I still wanted to work with my trusted Slackware display, and of course there is a solution for that.
Ever heard of XDMCP or “X Display Manager Control Protocol“? A Linux (or as it stands, any UNIX) computer running a graphical login manager like KDM can be configured to listen for remote login requests made by computers on the LAN. The protocol used for this, is XDMCP.
What I needed to do was twofold:
- enable XDMCP on my Slackware box, two floors up
- install an X server for MS Windows
A Slackware computer does not enable XDMCP by default. The reason should be obvious – security reasons. Unlike remote logins using ssh, the XDMCP network packets travel across your wires unencrypted.
If you are not too concerned about security (for instance, nobody else uses your local network) these simple steps enable XDMCP – if security is an issue you may want to have a look at NoMachine’s NX technology instead.
- In the file “/etc/X11/xdm/xdm-config” comment out this line (by placing a ! in front):
which prevents XDM from listening to XDMCP requests
- In the file “/etc//X11/xdm/Xaccess” uncomment this line (remove the #):
#* #any host can get a login window
so that any host is allowed to see the login window
- If you are going to use KDM as the graphical login manager, then edit the file “/etc/kde/kdm/kdmrc” and comment out this line in the section “[X-:*-Core]“:
which inhibits KDM from listening on a network socket
Also, look in section “[Xdmcp]” and change
- Finally, make sure that your machine starts in the graphical runlevel ( for Slackware that is runlevel 4) by editing the file “/etc/inittab” and changing
Simple enough isn’t it?
When you have rebooted your Slackware computer, it will be listening on your local network for incoming login requests. When you have KDE installed, then Slackware will use KDM as the login manager. Otherwise, XDM will be used. If you decide to install one of the 3rd-party Gnome add-ons that exist for Slackware (GnomeSlackBuild, gware, dropline, gnomeslacky) then by default GDM will be running to manage your logins.
Next step is to install a X-Server for the MS Windows machine. There is one that I really like a lot. It is called Xming and you can find it at http://www.straightrunning.com/XmingNotes . It is a cross-compiled X.Org using the mingw compiler. Xming comes in two flavours – a version that is non-free (you have to pay to get access to the binaries) and a version that is in the “public domain” (you are free to use and distribute it). The author has written a page with an overview of the component licenses and has all his patches to the original X.Org/freetype/Mesa sourcecode available for download. The free version lags a bit behind with regards to version number but it does all the things I need. The installer comes with a handy tool called “Xlaunch” which is a wizard-like application to configure access to the remote server.
After installation of Xming, and running Xlaunch, it took only a few mouseclicks and entering my Slackware hostname to be greeted by my familiar KDM login screen 🙂
Note: if you have two Linux computers, the story is even simpler if you want to perform a remote graphical login. After enabling XDMCP on one computer, you run the following command on the other (assuming you are already running X locally and want a second parallel X session to the remote machine on IP address 192.168.0.11):
- X -query 192.168.0.11 :1
To switch between your local and remote X sessions, use the <Ctrl><Alt>F8 and <Ctrl><Alt>F7 key combinations.
What about VNC? Is it also possible to use that for two different platform?
Yes, VNC would have been an alternative. But you’d have to run a VNC server session on the Slackware computer and it would have fixed dimensions for width and height (you define Width x Height in the vncserver configuration). This usually means the vncviewer session window is not covering your full screen or it can even bee too large (VNCviewer can not scale the display).
On the other hand, a X session always uses your own computer screen’s dimensions. That makes it feel “more natural”.
Still, to show you that I use both: I write this message in a VNCviewer that connects to a VNCserver session which runs 24/7 on my server 🙂
That remote x window works great on my home network. Thanks. -CD-
Pingback: Securing X
Pingback: Can not get XDMCP to work on 13.37
Pingback: Ratpoison + XDMCP issue. (Nothing seems to Lanuch)
Pingback: Ratpoison + XDMCP issue. (Nothing seems to Lanuch) | Coders & Admins
Pingback: How to enable XDMCP on Slackware « Giovanni’s Blog
Pingback: Xorg listening on TCP by default
Pingback: First time Slack Installation - Page 2
Pingback: Need help with xdm
Thanks, it works perfectly 🙂