XDMCP support in Ubuntu: make your voice heard

As I’ve pointed out previously, the XDMCP support has been severely crippled in Ubuntu 9.10, Karmic Koala. I suspect that XDMCP is something that isn’t considered a very high priority by the Ubuntu and upstream developers, as it’s an old protocol with security issues. Up until Karmic, however, it had the distinct advantage of being already installed (even on a Live CD) and easy to activate and access via the GUI.

It seems that I’m not the only one affected by this issue. In fact I’ve been quite surprised by the number of people who have flooded to this blog as a result of my articles on this. The most heavily visited page has received over 9,000 page views since I posted it. That’s NINE THOUSAND views, from over 6,000 unique visitors. Not bad for an old protocol with security issues. If I add together the hits for all the XDMCP pages on my blog, the total is over 23,000.

Clearly there are lots of people being affected by this issue, but most of them are suffering in silence or just getting on with it, perhaps by using one of the workarounds or alternatives I’ve talked about previously. Up to now I’ve avoided posting links to the relevant bugs on Ubuntu’s Launchpad site, as I didn’t want the bugs to get filled with a load of “me too” comments. But the other day I came across this blog post from the Launchpad developers about a new feature of Launchpad, “bug heat”. This extract from that post explains it better than I could:

…A bug’s heat is a calculated estimate of its importance, using factors such as how many people are subscribed, whether it’s a security issue, how many people have marked the bug as affecting them, and so on…

So I figured that if even a small proportion of those 6,000 visitors affected by this issue were to mark the relevant bug as affecting them, we can turn up the heat on this issue. So if you want to register yourself as a fellow sufferer, please do the following:

  1. Visit https://bugs.launchpad.net/gdm/+bug/408417 – the bug title is “No option to log in remotely via XDMCP”
  2. Read the bug description and have a look at the comments. Make sure that this really is the bug that’s affecting you, and that you’re happy to register yourself as being affected by it
  3. Log in to Launchpad (top right-hand corner), if necessary. If you don’t already have a Launchpad account you can create one there. Once you’re logged in you should be redirected back to bug #408417, but if not you can use the link above
  4. Find the line just below the bug title which says “This bug affects NN people. Does this bug affect you?” – where NN is the number of people who have already registered this bug as affecting them
  5. Having found that line, you should see a little exclamation mark to the right. I’ve subtly pointed it out on the screenshot below using a red arrow.
  6. Select the option for “Yes, This bug affects me” (or select “No” if you’ve changed your mind) and click on the “Change” button
  7. You should be returned to the bug page, and the text should have changed to read something like: “This bug affects you and NN other people”

That’s it. Job done. Another count for the tally, and hopefully a little increase in the bug heat. Please do not add any other comments or information to the bug unless you genuinely have something useful to contribute.

Please note that no matter how “hot” this bug becomes, it’s not likely to be addressed in time for Ubuntu 10.04. By raising awareness like this, however, it might stand more of a chance of being looked at for 10.10. Because it’s not likely to get fixed in the near future, you might also be interested in voting for bug #217798 which proposes adding Xephyr support to the terminal services client, given that the official party line from the Ubuntu devs seems to be that using tsclient is the recommended way of accessing XDMCP servers currently.

 
 
 

* tsclient+XNest is currently the recommended way to access an XDMCP server, since the removal of the remote login option in GDM, despite the fact that XDMCP support in tsclient requires XNest to be downloaded as it’s not shipped on the CD by default. This means that it’s no longer available to a Live CD user with no internet connection as a thin XDMCP client. These days I prefer to use Remmina over tsclient, as it does support Xephyr – but again that option is only practical if you can download and install applications to the client machine.

Posted in Linux, Tech. No Comments »

Another use for 3D TVs

It seems that just about every manufacturer is planning to launch 3D-capable TVs this year. Most of them use high frequency refresh rates, synchronised with LCD shutter specs, to present a different image to each eye: the screen is actually switching between two images extremely quickly, and each lens on the glasses switches between dark and clear so that the left eye only sees image 1, and the right eye only sees image 2. Let’s get that 100% clear: the left eye for all the viewers sees image 1 while the right eye is blanked out, then a fraction of a second later the left eye is blanked and the right eye sees image 2. Persistence of vision deals with the discontinuity in the images, just as it does with a regular TV.

That’s great… except that there isn’t a great deal of 3D content to watch at the moment. Most people will use their expensive new 3D TVs to watch predominantly 2D content for the time being. It seems a shame to waste all that image switching tech and LCD glasses… but perhaps there’s another use for technology: showing two different TV programmes at once.

Consider the following theoretical 3D TV: It has a single main remote control which has all the features you’ll never use, but comes with a second mini-remote which lets you change channels, select AV inputs, and adjust the volume of the second headphone socket. Second headphone socket? This imaginary TV has two separate headphone sockets, to go with the twin tuners that are built-in. The frames from one tuner or AV input are interlaced with the frames from the second, so that the TV is constantly switching between the two images at a high frequency.

The LCD glasses are also slightly modified with a 3-way switch to select between “3D”, “Programme 1″ and “Programme 2″. This just changes the way in which they synchronise with the TV. In 3D mode they operate as described above, alternating between which eye is clear and which is dark. In the other two modes both eyes operate synchronously, so that both eyes see image 1, but are blanked from image 2 (or vice versa).

This setup means that two people can watch different programmes on the same TV at the same time by setting one pair of glasses to “Programme 1″ and another to “Programme 2″, and donning a pair of headphones. It’s not hard to imagine a pair of kids playing a videogame, with the sound coming from the main speakers, while a parent or guardian watches a film using headphones. Want to check that the kids are playing something appropriate to their age? Just flick the switch on your glasses to see what they’re watching.

I have to admit that I haven’t used a pair of LCD shutter glasses, so I don’t know how much shadowing of the second image will be visible, but I would imagine it is likely to be acceptable for day-to-day use. It will probably also depend on the content – trying to watch a dark and moody horror film while the second programme is displaying a brightly coloured game will probably show more of a shadow than two images of similar brightness. But if it means being able to watch something different to your partner without having to become a social pariah, banished to “the spare room”, then it’s probably worth a little bit of ghosting.

Posted in Miscellaneous, Tech. No Comments »

Removing the mystery lines on a XUL checkbox

XUL has a checkbox widget, which you are expected to use like this:


<checkbox label="Account Locked" />

That will give you a perfectly functional checkbox with a label to the right of it (add dir=”rtl” if you want the label to the left of the checkbox). The image below shows how they appear on my Linux machine – the top part is an unselected checkbox, whereas the lower one has been clicked on, which has the effect of both checking the checkbox and focussing the widget:

Standard XUL checkboxes

It’s the focussing that’s the important bit here – notice how the label gets surrounded by a dotted border. A similar effect is used on a Windows machine, and is generally “a good thing” as it makes it clear which widget will be affected by keyboard presses (such as using the space bar to toggle the checkbox state).

Sometimes, however, the presence of this focus border is not “a good thing”, and can in fact become “a confusing thing”. Consider a user interface which has labels and widgets all neatly aligned using a XUL grid. In that case you might not want to have a label directly on the checkbox element at all, in which case you can find that a focussed checkbox takes on a most disconcerting appearance:

checkbox_no_label_1

The focus border is still being drawn around the non-existent label text. In this case it’s made worse by the checkbox being the second item in the row of a XUL grid with two columns. Because the field in the row below is much wider than the checkbox, the non-existent label flexes to fill the space, making an already odd looking widget seem even weirder. Incidentally, the field below is an XBL widget of my own devising, which is why it doesn’t look like a normal XUL textbox.

Putting the checkbox inside a XUL hbox element has the effect of curtailing its flexing habits, so that the focus border, while still present, is a little less offensive:

checkbox_no_label_2

But wouldn’t it be better to get rid of the focus border altogether? A little digging with the DOM inspector revealed that the checkbox label is being targetted with the following CSS selectors – the first on my Linux installation, and the second on Windows XP:


checkbox:focus > .checkbox-label-center-box > .checkbox-label-box

checkbox:focus > .checkbox-label-box

It’s possible to hit both of these by losing the immediate child selector (the “>”) and the “checkbox-label-center-box” class, so that the rule matches any descendent of a focussed checkbox which has a class of “checkbox-label-box”. A blunt approach would be to just disable the focus border altogether, by adding this to your CSS file:


checkbox:focus .checkbox-label-box
{
-moz-appearance: none;
border: none;
}

That does disable the focus border, but it disables it completely – even if the checkbox is used in a situation where it does have a label. Thankfully Firefox’s CSS engine is rich enough to let us use the [label] selector, to match elements which have the “label” attribute, as well as the :not() pseudo-class to negate the match. The result is this chunk of CSS, which will disable the focus border on checkboxes which don’t have a “label” attribute, but leave it untouched on those that do:


checkbox:focus:not([label]) .checkbox-label-box
{
-moz-appearance: none;
border: none;
}

Of course the proof of the pudding is in the slightly doctored screenshot (only doctored in that I pasted two together). In this you can see that the top row contains a checkbox with no label, and no focus border, and the bottom row contains a checkbox with a label which gets the default focus border that we all know and tolerate:

checkboxes_modified

Posted in Tech, XUL. No Comments »

What have they done to Bitzer?

I’m going to come out of the toy-chest here and reveal that I watch Shaun The Sheep. Yes it might nominally be a kids’ show, but if you think of it as “Wallace and Gromit Lite” then it’s not a bad way to spend a few minutes of downtime. Besides, you only have to look at the list of references to popular culture on Wikipedia to realise that it’s not aimed solely at children.

So I was quite pleased when I noticed that my MythTV box had recorded a couple of episodes that I hadn’t noticed in the schedules: it turns out that the second series has started. I settled down to watch it with my girlfriend (who is quite the Shaun fan) only to raise my eyebrows at what they’d done to the farmer.

The farmer used to look like this:
farmer_1024
[Original Source]

Now he looks like this:
farmer-1024x768
[Original Source - zip file of images]

The key difference isn’t easy to spot in those images, so I’ve combined and re-oriented them to make it a bit clearer:
farmer_diff

The key point is the line running around the farmer’s mouth. It’s a lot more pronounced on the show itself. It appears to me that Aardman have decided to speed up their work (or reduce costs, depending on how you look at it) by making the mouth section removable. This lets them animate the mouth movement independently of the rest of the body – and indeed the rest of the head. They did a similar trick on Chicken Run, where it was less noticeable due to the difference in colour and texture between the chickens’ beaks and faces. It stands out more on the farmer, but it’s not too bad, as it generally just makes it look like he’s got a five o’clock shadow.

So, a reasonably subtle change to the design of the farmer. He’s a secondary character anyway, so it wasn’t too distracting. But next to the eponymous Shaun, possibly the most prominent character is the farmer’s dog, Bitzer. Yes, you’ve guessed it, they’ve changed that character too. But unlike the relatively minor change to the farmer’s face, Bitzer has had a complete overhaul. And not in a good way.

Old Bitzer:
bitzer_1024
[Original Source]

New Bitzer:
bitzer-golf-1024x768
[Original Source - zip file of images]

The new Bitzer has acquired a furry texture… but not on his head. Maybe I missed the episode titled “Bitzer gets alopecia”. Perhaps the hair loss is a side effect of his efforts to dye his fur, as indicated by the colour change on his chest, throat and lower jaw. That’s the most egregious change and one which, in my opinion, really spoils the design of the character. It’s pretty obvious that, much like the farmer, they’ve decided to reduce costs by making the mouth into a removable section, independent of the rest of the head. But on the Bitzer model the distinction between the two parts – especially once animated – makes it look like Bitzer has been attacked by a bestial Hannibal Lecter, and his skin turned into a mask covering the top of the imposter’s face.

Watch out Shaun, I think there might be a serial killer on the farm. One who plans to destroy your very soul. I think his name is Aardman.

Enabling XDMCP on Karmic Koala (Pt. IV)

Other posts in this series:

  • Pt. I – Enabling GDM as an XDMCP server
  • Pt. II – Four XDMCP client options for Ubuntu 9.10
  • Pt. III – Three ways to use the host chooser
  • Pt. IV – Alternatives to XDMCP

If you’re affected by this issue, please also take a look at this post:
XDMCP support in Ubuntu: make your voice heard


Okay, that’s enough about how to get XDMCP working in Karmic. If you really, really, specifically, definitely want XDMCP support, then have a read of the previous posts. If, however, you just want a remote connection between two Ubuntu machines, then there are alternative solutions that you might want to consider.

Before abandoning XDMCP entirely, let’s just have a quick look at the pros and cons of the protocol – as it was implemented in Jaunty (i.e. back when it worked and everyone was happy). That will make it easier to compare with the other systems I’ll be describing below.

Pros

  • Already built into the X server – no need to install anything, even on a live CD
  • Easy to enable the server end via the GUI
  • Easy to connect from the client end, even without a local login on the client machine

Cons

  • High bandwidth required
  • Security is poor
  • Only cross-platform in one direction (Windows or MacOS can only be clients, not servers)

When it comes to remote access there are loads of alternatives available. I’m only going to consider a few of them. If none of these seem to suit your needs, please keep looking because there might be something else that does. With that, let’s start with that king of remote connections, OpenSSH.


OpenSSH

OpenSSH is a veritable toolkit of remote connectivity. In its simplest incarnation (ssh username@host) you get a command line running on the remote machine, and it can also be used to transfer files (scp and sftp). Those features alone can often be a viable replacement for a full remote desktop, if you know how to drive the command line. But it’s the transparent tunnelling of X data that interests us here.

Add the -X option to your ssh command and, assuming your server allows it, you can now run a graphical application from your ssh shell and have it displayed on your local machine. Note that it’s a capital X, a lower case x disables the option, and the default configuration of the OpenSSH server in Ubuntu will allow X forwarding. Ubuntu comes with the OpenSSH client by default, but you’ll need to install the server using your package manger of choice (it’s called “openssh-server”).

So, we’ve got our OpenSSH server installed on a machine called “karmic.localdomain”, and we want to run an application on that machine, but displaying on the local machine. If it’s just a one-shot command, you can do something like this:

ssh -X johndoe@karmic.localdomain xclock

As if by magic, Xclock appears on your local display, and when you close it your ssh connection is closed as well. I suppose Xclock might be handy if the server’s in a different timezone, but in practice you’re more likely to want something useful launched – perhaps Nautilus:

ssh -X johndoe@karmic.localdomain "nautilus --no-desktop"

It’s still some way from an XDMCP replacement though. It would be better if you could launch multiple applications, right? Well, just connect without specifying an application to run, then run it from the command line:

ssh -X johndoe@karmic.localdomain
karmic> nautilus --no-desktop &
karmic> xclock &
karmic>

Note the trailing ampersands – that’s standard command line usage from way back when, which causes the process to run in the background, so you get a prompt back and can launch something else. If you forget an ampersand (or want to see the console output during the application’s startup), you can press CTRL-Z to suspend the process, then run “bg” to resume it in the background. A basic grounding in Unix command-line job control is worthwhile if you use ssh a lot. I also recommend running “screen” as your first application, if it’s installed – a worthwhile addition to any command line junkie’s toolkit, but not something I will be going into any more detail about here.

The ability to launch individual GUI apps might make SSH a viable alternative to XDMCP in some situations, but often you just can’t get away from the fact that a full desktop is easier to use. You might be tempted to run “gnome-session” from your SSH command line, but that way madness lies. Trying to run a full desktop like that will work to a degree, but will also clash with your local desktop and can really screw it up when you log out of the remote session.

If you really need a full desktop connection, and really want to run it over SSH yourself, you can use OpenSSH’s ability to tunnel arbitrary TCP data to forward a VNC connection. You can’t do the same with an XDMCP connection, as that uses UDP not TCP, and OpenSSH can’t forward that in the same way. It is possible to set up a full VPN via SSH which will work, but is usually more hassle than it’s worth. A sneaky workaround is just to SSH into your remote machine, then run Xnest or Xephyr at the remote command line. Because these are both X clients, they will appear on your local desktop just like Xclock did. But they’re also X servers, so you can use them to make a connection to an XDMCP server that would otherwise be out of reach.


VNC

When talking about remote desktop connections, VNC is the first thing that will spring to the mind of many computer veterans. VNC was originally written to allow a user to make a remote connection to a Unix desktop. In that sense it is similar to XDMCP, but with one significant difference: disconnecting from an XDMCP session would kill the desktop and any applications running in it, whereas disconnecting from a VNC session would simply close the viewing application while leaving the desktop running “headless” on the server. This meant that it was possible to disconnect a VNC session on one machine then re-connect to it later, or from a different machine.

Some time later VNC was ported to Windows. Because most versions of Windows don’t support multiple users being logged-in and using a machine simultaneously, the Windows implementation of VNC shares the currently logged-in desktop with the viewer, rather than creating a new desktop. It quickly became clear that for some purposes this was actually better than the Unix approach – especially if you want to share someone’s desktop for support or training purposes.

Because of the advantages of being able to connect to a currently logged-in desktop, it wasn’t long before this same functionality was ported back across to Linux – in addition to the original Unix VNC server that could be used. Meanwhile extensions were made to the VNC protocol to support better compression algorithms or additional features, with the result that there are now a variety of different VNC servers and clients across all the major (and several minor) operating systems. I’m going to describe a few of them below, but there are many others, each with their own advantages and disadvantages, so if you don’t find one that suits you below try googling or searching in your package manager to see what other options are available.

Vino

If you want the Windows-style of VNC server, whereby the currently logged in desktop is shared over the network, then you’ll be pleased to know that it’s built into GNOME (and hence into a stock Ubuntu installation) by default. The server is called “Vino”, but in practice the name is irrelevant as you can just enable or disable it via System=>Preferences=>Remote Desktop.

There’s a counterpart to Vino, and that’s a VNC viewer called “Vinaigre” – though again, in practice, the name is irrelevant as you access it via Applications=>Internet=>Remote Desktop Viewer. Vinaigre isn’t tied specifically to Vino – it’s a general purpose VNC viewer which can be used with just about any VNC server, so it’s worth knowing about if you need to share a Windows or MacOS desktop and view it on a Ubuntu box. And it’s a whole lot more modern-looking than the old “vncviewer” application.

vnc4server

What if you don’t want to share a logged-in desktop, but want a completely different session to be available over VNC? That’s where “vnc4server” comes in. You’ll need to install it using the package manager of your choosing as a starting point. What you do with it next depends on your needs, but in any case it will involve running it on the remote machine as the user of your choice. For this example we’re going to pretend that there is a remote machine with an IP of 192.168.0.2, and your local machine with an IP of 192.168.0.3.

1) At the remote machine make sure you are not logged into the GNOME desktop. Press CTRL-ALT-F1 to get to a console, and log in. In practice you might find it easier to ssh into the remote machine instead, depending on how remote “remote” actually is.

2) At the console, run “vnc4server”. You will be prompted to create a password the first time you run it, which you can subsequently change using “vnc4passwd” if you need to.

3) You should get a few lines printed on the screen, amongst which is the address of the new VNC connection you’ve just started – in our case it will say something like “your-machine-name:1″, but I prefer to use IP addresses to avoid any name resolution issues, so we’ll access it as “192.168.0.2:1″.

4) On the local machine, launch a VNC viewer. Because it’s already installed on a stock Ubuntu system, I would use Vinaigre (Applications=>Internet=>Remote Desktop Viewer) as a starting point. Create a new connection, and put in the VNC server’s address (192.168.0.2:1 in our case). The :1 refers to the first VNC server running on the machine, which operates on port 5901 by default.

5) Enter your VNC password when prompted

6) Sigh with disappointment as you see this screen:

The default vnc4server desktop. Hmm...

The default vnc4server desktop. Hmm...

Not great, eh? Let’s try to improve matters by getting to an actual working GNOME desktop…

1) Close your local VNC viewer. On the remote machine we want to stop the vnc4server that’s running, so issue the following command

vnc4server -kill :1

2) The problem is that vnc4server starts the applications specified in the ~/.vnc/xstartup file – and because this file didn’t exist the first time you ran the server, it created it and populated it with some pretty useless defaults. Let’s take a look at this file:

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &

You might be tempted by the section that says “Uncomment the following two lines for normal desktop”… but you probably won’t end up with the “normal desktop” you were expecting:

This is not the desktop you were looking for...

This is not the desktop you were looking for...

Instead try editing the file to look like this (hint: as you’re at the command line, use “nano -w .vnc/xstartup” if you’re not already a vi or emacs fiend):

#!/bin/sh
unset SESSION_MANAGER
exec gnome-session &

3) Now start the VNC server again (“vnc4server”), and connect using your VNC client:

At last, a real desktop

At last, a real desktop

Okay, time for the bad news. First, this doesn’t play nicely with an already logged-in GNOME desktop, so whilst it’s good for headless servers or a machine on which you’re the sole user, it’s not so good for multiple users on a desktop machine which might have a user logged in directly on it. Second, don’t log out of your GNOME session if you want to come back to it later – just quit the VNC viewer. If you log out, it doesn’t respawn, and you’ll need to kill then restart the VNC server.

Now for the good news. You can run more than one VNC server on a machine – they’ll end up as screen :1, :2 and so on. Useful if you want to share a single server with multiple users. You can also run the server from a startup script if you don’t want to ssh in to start the server all the time – but I’ll leave that as an exercise for the reader (hint: this article is a good starting point).

Gitso

While I’m on the subject of VNC and its use, Windows-style, as a support tool it would be remiss of me not to mention Gitso (an awful recursive acronym for “Gitso Is To Support Others”!).

It’s a VNC server/viewer packaged up via a simple UI and preconfigured to make a reverse VNC connection from the server to the viewer. What this means, in practice, is that a non-techie user seeking support can run the application and type in an address given to them by the person offering support. The support person runs the application, and a VNC connection is set up such that they can see and control the user’s desktop.

There is some firewall configuration that will generally be needed, but by using a reverse VNC connection all of that is pushed off to the techie end of the line where, hopefully, the support person will know what they’re doing and be able to forward the necessary port.

Because it uses VNC it’s cross-platform, allowing you to support (and be supported) on Linux, Windows or MacOS. It’s not in the standard Ubuntu repositories, but you can download a suitable .deb package file from their website:

http://code.google.com/p/gitso/


Empathy. Or not. Or perhaps maybe.

One of the biggest issues with providing some sort of remote desktop access for support purposes is actually getting a safe connection from one machine to another. Typically most users are behind some sort of firewall or NAT, even if they don’t realise it, meaning that tunnelling a remote desktop connection becomes an exercise in port-forwarding and TCP/IP. There are numerous commercial operations who make a lot of money out of making remote desktop access easy without having to change firewall settings by having relay servers which are accessible to both ends of the connection.

As an example of this issue, Gitso (described above) requires the “techie” user to open port 5500 so that the supported user doesn’t have to. But what if there was already a near-instant communication channel between the two endpoints? Wouldn’t it be possible to use that as a tunnel for the data, with no need to go poking around in router settings? How about this Empathy instant-messaging software I’ve already got? Wouldn’t that do the trick?

The answer, in theory, is “yes”. Throughout a large period of the Karmic beta test the answer was, in practice, “yes”. Then Karmic was released… and the answer was “no”.

According to one of the comments in this bug report, the problem was a change in the terminology used to identify the remote desktop protocol, which put Empathy out of synch with Vinagre. That bug report also suggests that the problem is now solved… so I tried it, using a netbook running Karmic UNR and a desktop machine running a full version of Karmic. Both had all updates applied, and the two instances of Empathy were working fine when sending instant messages between the two GTalk accounts I was using for this test. But no matter what I tried, I couldn’t get the “Share my desktop” option to work.

Hence the title of this section. It apparently did work. Then it definitely stopped working. Then it apparently worked again, but not for me. If you need to provide remote support to another Ubuntu user, it might be worth a try – but if it’s important you should probably set up Gitso as well, just in case.


NX, and any others I’ve missed

This post is already way overdue, so I’m going to stop my experiments now and actually post the damned thing. One technology that I had planned to cover, and haven’t got round to trying, is “NX”, so I’ll give it a brief honourable mention in case you want to investigate it on your own, or have any experience with it that you want to share in the comments.

NX is a technology that takes the best bits of the X protocol, thins it out to reduce bandwidth, tunnels it over an SSH connection, and caches it heavily at the client end to reduce bandwidth even further. It’s not as cross-platform as VNC, nor as secure as SSH alone (due to its default use of well-known encryption keys), but as an alternative to XDMCP – especially over a slow internet connection – it’s well worth considering. You can find out more about it from the Wikipedia page about the technology itself, and from this Ubuntu Wiki page about installing it on Karmic.

There are other approaches and technologies that I haven’t even mentioned here, so if you’ve got any experience, good or bad, with any other remote desktop software please leave a comment for the benefit of everyone else. Personally I’m going to muddle along with XDMCP and Xephyr for intranet connections, and Gitso for remote support, whilst hoping that the built-in XDMCP support returns in Lucid, or that something comes along to fill its space that doesn’t need additional software installing on a Live CD.

Posted in Linux, Tech. 4 Comments »

Enabling XDMCP on Karmic Koala (Pt. III)

Other posts in this series:

  • Pt. I – Enabling GDM as an XDMCP server
  • Pt. II – Four XDMCP client options for Ubuntu 9.10
  • Pt. III – Three ways to use the host chooser
  • Pt. IV – Alternatives to XDMCP

If you’re affected by this issue, please also take a look at this post:
XDMCP support in Ubuntu: make your voice heard


Older versions of Ubuntu – or more specifically, older versions of GDM – had an option to remotely log into another server using XDMCP right from the main login screen. Selecting that option brought up a host chooser which scoured your local network for any XDMCP serving hosts, and then presented you with a list from which to choose a machine to log into. On a network with several serving hosts (such as the virtual machines we have running where I work) this was far more convenient than actually having to memorise the name or IP of the machine you want to connect to.

Of the four XDMCP client options I presented in my previous post, only one provided this host chooser functionality. Unfortunately that one was to replace GDM with KDM, which also implies adding a whole load of KDE libraries to your system.

This post will tell you a couple of ways to work around the loss of the host chooser from the login screen. Neither approach is perfect, but if you don’t want to replace your GDM login with KDM or something else, then they’re about the only choice you’ve got. They’re also useful if you want to make an XDMCP connection from within a running desktop environment, using Xnest or Xephyr, as described in the previous post.

Option 1: Run gdm-host-chooser and copy the IP

You may not be able to get to the host chooser from the GDM login screen, but that doesn’t mean it’s gone away altogether. It’s still hanging around in the depths of your machine, and you can launch it by typing the following line into a terminal or the ALT-F2 “Run Application” dialogue:

/usr/lib/gdm/gdm-host-chooser

(Note that on 9.04, Jaunty Jackalope, and earlier releases, it was “/usr/lib/gdmchooser”)

The first thing to note is that it’s not as easy on the eye as the old version. Previously it was possible to provide custom icons for each host by putting images into /usr/share/hosts/ with suitable names. If no host image was found, the image at /usr/share/pixmaps/nohost.png was used by default. With Karmic Koala this latter image still exists, but isn’t displayed in the chooser. Neither are any images in the hosts icon directory.

Host choosers: Jaunty and Karmic

Host choosers: Jaunty and Karmic

In the image above you can see the Jaunty chooser on the left, complete with several default host icons, and one quickly thrown together custom icon at the bottom. On the right is the icon-less Karmic chooser, which is also much larger than the Jaunty chooser, making it too tall for many netbook screens. The image shows the smallest size that each dialogue will scale to – they can be made larger if necessary.

What’s interesting is that the Jaunty chooser shows the host name of the Karmic box in a fairly readable way (“markc-desktop.local (192.168.49.1)”) whereas the Karmic chooser shows only its IPv6 address, with no host name. What you can discern from the chooser, however, is the IP address of each of the XDMCP serving hosts on your network. With that information you can use the “-query” option to xinit, Xnest or Xephyr in order to log into the machine of your choice. If you really, really want to log into a machine by selecting it from this list, rather than copying the IP, take a look at the other options below.

Option 2: Use -indirect, with an older server

Cast your mind back through the mists of time, way back to when XDMCP was invented and dumb X terminals were connecting to Unix mainframes in universities the world over. Particularly well funded universities might even have more than one Unix server – and hence the need for a host chooser – but if the dumb X terminals had to become intelligent enough to go scouring the network for willing servers and present their own local chooser… well, that would likely push their already exorbitant prices even further skyward. So “-indirect” was born.

This option is used in place of “-query” or “-broadcast” when starting an X server. In the case of Ubuntu you might specify it when using xinit, Xnest or Xephyr, as described in the previous post. It has one parameter, the IP of a server which will serve up a host chooser. So back in our university scenario, each dumb terminal could still remain dumb, provided it knew how to connect to a single specified server. That server then took on the responsibility of displaying a host chooser to the user. Once the user selected a host, the dumb terminal would reconnect to the selected machine, and everyone was happy.

Up until Jaunty you could also use this approach with Ubuntu. If you had a Ubuntu machine on your network with a known IP or name, you could use -indirect to bring up that machine’s chooser in order to see any other XDMCP servers on your network. In a complex environment with several such servers it meant that you could get away with only remembering the address of one of them.

This still works from the client end in Karmic, but not from the server end. The changes to GDM mean that it will no longer serve up a host chooser to any wandering clients that may request one. You can, however, still get a chooser up from another machine that’s not yet been upgraded to Karmic. So if you’ve got a lot of machines to connect to it might be worth leaving at least one of them running an older version of Ubuntu for the time being, so that you can use it as the source of a host chooser with the -indirect option.

Option 3: Use gdm-host-chooser in a subshell

If you tried running gdm-host-chooser using the command above from within a terminal, you may have noticed a load of text spewed out into your command line. If you subsequently selected an entry in the host chooser and clicked the “Connect” button, you may have noticed some more text being spewed out. If you were really observant you may have noticed that, amongst the text being spewed, was the word “hostname:” followed by a space, then the name (or more probably the IP) of the machine you selected. We can use this particular bit of textual spew to our advantage.

Instead of simply executing /usr/lib/gdm/gdm-host-chooser we can pipe its output through some other command line tools so that all we get out is the selected host IP. I’ve used “grep” to isolate the line in question, and “cut” to separate out the IP, but there are many other ways to do this (feel free to post if you’ve got a better approach):

/usr/lib/gdm/gdm-host-chooser | grep "hostname:" |cut -d' ' -f2

Now if you select a server in the chooser and click the “Connect” button, you should see the IP address appear on the command line without the “hostname: ” prefix. Using this mechanism it’s possible to insert the selected IP directly into the command line when using the “-query” option to xinit, Xnest or Xephyr by putting the whole of that line into a subshell:

xinit -- :1 -once -query $(/usr/lib/gdm/gdm-host-chooser | grep "hostname:" |cut -d' ' -f2)

Xnest :1 -once -query $(/usr/lib/gdm/gdm-host-chooser | grep "hostname:" |cut -d' ' -f2)

Xephyr :1 -once -query $(/usr/lib/gdm/gdm-host-chooser | grep "hostname:" |cut -d' ' -f2)

Pick one of those lines, depending on which type of X server you want to run. They’re all a little unwieldy for day-to-day use, so you might prefer to create a small shell script containing the appropriate line. That way you can launch your chooser and X server from a single command, or even assign it to a launcher on your panel.

I should note that the performance of the host chooser on my test machine was less than stellar, taking several seconds for clicks to register, so if you do use this approach you might need to be a bit patient.

Posted in Linux, Tech. No Comments »

Enabling XDMCP on Karmic Koala (Pt. II)

Other posts in this series:

  • Pt. I – Enabling GDM as an XDMCP server
  • Pt. II – Four XDMCP client options for Ubuntu 9.10
  • Pt. III – Three ways to use the host chooser
  • Pt. IV – Alternatives to XDMCP

If you’re affected by this issue, please also take a look at this post:
XDMCP support in Ubuntu: make your voice heard


In my previous post I described how to get GDM acting as an XDMCP server by creating a suitable configuration file and restarting GDM. I also mentioned a workaround to let you connect to an XDMCP server even from a Live CD with no internet connection. Hopefully that was enough to get you out of a bind if you were desperately looking for a solution to Gnome’s removal of the XDMCP login option from GDM.

In this post I’m going to describe some other methods for connecting to an XDMCP server, though they all have the disadvantage of requiring additional software to be downloaded. I’ll also mention a workaround for the lack of the host chooser that used to appear when using GDM to start an XDMCP session. I’ll start with reiterating the no-download method of making a connection though – although it’s covered in my previous post, it doesn’t hurt to have all the client options on a single page.

xinit

This is the only option here that doesn’t require additional software to be installed, and as such it’s useful when you want to use a Live CD to create a temporary thin client. From within a terminal, type:

sudo xinit -- :1 -broadcast

If there is more than one XDMCP server on your network, replace “-broadcast” with “-query” followed by the IP address of the server – so you end up with something like this:

sudo xinit -- :1 -query 192.168.0.100

This should start a new X server and present you with a login screen on the remote server. You can switch back to the local X server using CTRL-ALT-F7, then back to the new one using CTRL-ALT-F8 (or F9 or something similar).

When you log out the server will spawn a new login screen – which is great if your temporary thin terminal might be used by several people. If you just want the X server to stop when you log out, append “-once” to the end of the command line.

Xnest

The most common “workaround” for the loss of the XDMCP login option that I’ve seen suggested is to “install Xnest and use tsclient”, so I’ll deal with this approach next.

Xnest is a “nested X server”. What does that mean? It means that it’s an X server, but it’s also an X client. It runs as a client application in one X server (your normal desktop), but it acts as an X server itself. It’s one X server nested inside another. In real terms it means that you can run an XDMCP session to another machine within a window on your normal dekstop.

It doesn’t ship on the Ubuntu desktop CD, so you need to install it using Synaptic, apt, aptitude or whatever other package manager you prefer. The package name is “xnest”, and if you’re reading this using Firefox on the Karmic machine you want to use, you should be able to install it by clicking on the link below and letting it open with “apturl” (which should be the default option anyway):

apt://xnest

I’m going to discuss two ways to run Xnest – from the command line, or via the Terminal Services Client. The latter actually just provides a GUI for the former, but if you prefer point-and-click, have trouble remembering command line options, or want to store your settings for later use, it can be handy.

The basic command line syntax for Xnest is very similar to that of the “xinit” solution above. To connect to a specified server, killing Xnest when you log out, you can get away with the following:

Xnest :1 -query 192.168.0.100 -once

“-broadcast” also works, as does omitting “-once” for a persistent login screen. By default Xnest will open a window that is 3/4 of the size of your desktop. Often this is good enough, and there’s no need to specify the Xnest window size any further, but if you need to specify the window size you can add “-geometry 1024×768″ (swapping the numbers for whatever width and height you want). There is no full-screen option.

Once Xnest is installed it automatically becomes available as an option in the Terminal Services Client. There is a Gnome panel applet for accessing this – but it crashes every time I try to add it to the panel in my Karmic virtual machine or via a Live CD. Otherwise you can run it from a terminal, or by pressing ALT-F2 then typing:

tsclient

However you launch it, you should end up with a screen similar to the one below. Simply select “XDMCP” from the “Protocol:” dropdown, and enter the address of your server in the “Computer:” text box. You can leave the other fields blank, and optionally change the settings on the other tabs. Note that not all the settings will have an effect – for example, although you can select the screen size on the “Display” tab, the full screen option doesn’t work. Once you’ve set the parameters the way you want them, use the buttons at the bottom to save (or load) them for future use – or just click the “Connect” button to get going immediately:

tsclient

One thing to note is that Xnest is an old application, and the X server it exposes doesn’t support many of the newer X extensions. For most applications this isn’t a problem, but some may run slowly as they fall back to alternative code, and some may not work at all if they require things like 3D compositing. As noted in my previous post, the Netbook Launcher on the Ubuntu Netbook Remix falls into this category.

Xephyr

Xephyr is also a nested X server, much like Xnest. Xephyr, however, is a much more recent development, and supports most modern X extensions. Note that “supports” means “it runs”, not necessarily “it runs well”. Although it might let you run software which otherwise wouldn’t work at all via Xnest, you may find that the performance is so bad as to render that benefit moot. Give it a try, though – sometimes it’s a better choice than Xnest if only because of the broader range of command line options it supports.

Xephyr is in the Ubuntu repositories as “xserver-xephyr”, or you can click on the link below:

apt://xserver-xephyr

At the simplest level launching Xephyr is almost identical to launching Xnest:

Xephyr :1 -query 192.168.0.100 -once

Again “-broadcast” also works. Unfortunately the default screen size for Xephyr is somewhat on the small side, so you’ll probably want to add the “-screen 1024×768″ parameter (replace with your preferred width and height, note that although the syntax is the same, Xephyr uses “-screen” to Xnest’s “-geometry”). Xephyr also has a full screen option, using the “-fullscreen” parameter.

That should be enough to get you going with Xephyr, but if you do want to tweak or adjust it further check the man page (“man Xephyr”) – there are far more options than are available with Xnest.

KDM

One suggestion made in the comments to my previous post was to install KDM as a login manager, as it still has support for XDMCP logins. If you really want to be able to connect to an XDMCP server from the login screen, then this might be a viable option. Note, however, that installing KDM on a vanilla Ubuntu installation will also drag along with it 50 other packages totalling about 60MB to download and nearly 190MB when decompressed. That’s a lot of baggage just to regain one option on the login screen!

If you decide to go down this route then you’ll find the option on the power menu. The item you want is “Remote Login”, or just press ALT-R (ALT-L will return you to the local login screen). Don’t get tempted by the “Secure Remote Connection” in the session menu – that’s won’t get you an XDMCP connection. You can see the power menu in this screenshot, using the default theme that KDM installs with:

KDM

When you do want to login locally, make sure you choose something in the session menu (you probably want GNOME if you’ve just installed KDM on a stock Ubuntu machine), otherwise you can end up with a minimal X session which probably isn’t what you want (if you do end up there, just log out of the terminal by pressing CTRL-D or typing “logout”).

Unlike the other options here, KDM does display a host chooser, much like the old GDM did. If you frequently have to connect to several different XDMCP servers, this feature alone might swing your choice.

GDM 2.20

It seems like an obvious option: The features we want were present in GDM 2.20; GDM 2.20 is in the Ubuntu repositories; surely it’s a no-brainer – just install GDM 2.20 and all our problems will go away.

Unfortunately life’s rarely that simple. Installing GDM 2.20 resulted in my machine becoming unable to start X at all. I suspect that it was the lack of a suitable config file that was to blame, but that would have taken more than five minutes to fix. Given that there are other solutions here that can be made to work in less than five minutes, diagnosing issues on a legacy version of GDM didn’t seem like a great use of my time.

And even if it had worked first time, there’s still that word “legacy”. Sure, I may not like the removal of some useful features from GDM, but reverting back to an older version doesn’t strike me as a practical answer to the solution either. With each new release my installation would become increasingly anachronistic. No, better to work with what solutions I do have available, rather than stick my head in the sand and pretend that nothing’s changed.

Of course, if you want to try playing with GDM 2.20, I’d be more than happy for you to comment about your experiences here. If you do go off experimenting and get stuck at a command line, unable to start X, “sudo aptitude install gdm” (or kdm) will probably get you going again. Unless you’ve really screwed things up, in which case you’re on your own, kid.

Conclusion

There you have it, four different ways of making an XDMCP connection, and one way that sounds like it should work, but doesn’t (or at least not trivially). Which approach you choose will depend on what your particular requirements are, but there’s nothing to stop you trying any or all of them – it’s not like you’re being charged for the privilege :)

Posted in Linux, Tech. 7 Comments »

Enabling XDMCP on Karmic Koala (Pt. I)

Other posts in this series:

  • Pt. I – Enabling GDM as an XDMCP server
  • Pt. II – Four XDMCP client options for Ubuntu 9.10
  • Pt. III – Three ways to use the host chooser
  • Pt. IV – Alternatives to XDMCP

If you’re affected by this issue, please also take a look at this post:
XDMCP support in Ubuntu: make your voice heard


As promised a couple of days ago, here’s how to enable XDMCP on Ubuntu 9.10, Karmic Koala. Note that none of these instructions are as simple as the point-and-click methods of earlier releases, but they’re not too bad either. I’ve used “gksudo gedit” for people trying to do this in a GUI – if you’ve used CTRL-ALT-F1 to get to a console screen, then replace those with “sudo nano -w” – but if you know enough to have got to a console screen then you could probably have worked that out anyway (and may want to replace nano with the editor of your choice).

Enabling the XDMCP server

With Karmic the GDM config screen has been stripped to the point of excess, as discussed in my previous post. So whereas earlier releases let you enable an XDMCP server with a few mouse clicks, Karmic requires you to edit the GDM configuration file on the disk. There is a slight problem in that the GDM configuration file doesn’t actually exist, but there is a copy hanging around in the GDM documentation on your machine, so we can use that as a starting point:

  1. Open a terminal (Applications=>Accessories=>Terminal), or switch to a virtual console if you prefer
  2. Copy /usr/share/doc/gdm/examples/custom.conf to /etc/gdm/ – the command line below will do the job for you:
    gksudo cp /usr/share/doc/gdm/examples/custom.conf /etc/gdm/
  3. Open the file for editing:
    gksudo gedit /etc/gdm/custom.conf
  4. Add the line “Enable=true” after the “[xdmcp]” line (to enable the XDMCP server)
  5. Also add “DisplaysPerHost=2″ on the line after that (avoids a problem with the server locking you out – see the comments for more details)
  6. Save the file. It should look something like this:
    # GDM configuration storage
    
    [xdmcp]
    Enable=true
    DisplaysPerHost=2
    
    [chooser]
    
    [security]
    
    [debug]
  7. Restart GDM with the following command (note that this will kill your current X session, so please make sure you’ve saved anything important first):
    gksudo restart gdm

[EDIT: Updated the above to include DisplaysPerHost=2 as described in the comments below]

And that’s it, XDMCP enabled. The usual caveats apply – XDMCP is an inherently insecure protocol, please do not enable it on an internet-facing machine or the laptop you take to the coffee shop. The chances are that if you’ve come here looking for XDMCP information then you already know enough about it to determine whether it’s safe for you, but it never hurts to have a reminder.

If you want to disable XDMCP then edit the file to read “Enable=false” and restart GDM (or your whole machine).

If you just want to enable Karmic for use with my article about Rootless Linux on a Windows Machine, that could well be all you need to do.

There are other settings that you can add to the [xdmcp] section, but this should be enough to get you started. In particular the MaxSessions option may be useful if you need multiple XDMCP users connected at once, or as a workaround if you find that stale connections are preventing you from getting a login screen. [Edit: It appears to be DisplaysPerHost=2 that is the workaround for this problem]

UNR Problems

One of my favourite uses for XDMCP on Jaunty was with Ubuntu Netbook Remix. You could switch from the netbook launcher screen to the full desktop mode, connect it to the network, enable XDMCP, then easily log in from your Ubuntu desktop machine to use the netbook with a full-sized keyboard and screen. With Karmic they’ve screwed up this approach in just about every way possible:

  • You can’t easily enable XDMCP on the Netbook via the GUI (so you have to use the steps above)
  • You can’t switch between the netbook launcher and full desktop, which leaves you with a netbook UI on a screen which is more suited to a full desktop
  • The netbook launcher is a lovely translucent thing, which uses compositing to give it its bling. That means it doesn’t display anything via a normal XDMCP connection*, making it a bit more tricky to launch applications

(*It works, albeit slowly, if you use Xephyr – which is something I”ve covered in the next thrilling instalment)

There are a few workarounds which will at least let you launch other applications. You can launch them by pressing ALT-F2 to open the “Run Application” dialogue. You can add launchers for your most commonly used applications to the Gnome panel. Or you can add a “Main Menu” applet to the panel. The latter is the most obvious and user-friendly solution, but the obvious and user-friendly place to put it (in the top left) already features a near-identical looking icon for the UNR go-to-the-launcher functionality. So yes you can have a full menu to launch apps from, but prepare to get confused if you also want the UNR functionality.

I suggest that moving the UNR icon to the right of the panel, just before the system tray icons, makes most sense. That way you have a full menu at the top left, and the go-home functionality to the right of the window title.

Connecting to an XDMCP server

As my previous post mentioned, the option to make an XDMCP connection has been removed from GDM – and therefore from the Karmic login screen. From the Gnome GDM documentation:

GDM 2.20 and earlier supported the ability to manage multiple displays with separate graphics cards, such as used in terminal server environments, login in a window via a program like Xnest or Xephyr, the gdmsetup program, XML-based greeter themes, and the ability to run the XDMCP chooser from the login screen. These features were not added back during the 2.22 rewrite.

It’s that last feature – the ability to run the XDMCP chooser from the login screen – which is the omission I’m dealing with here. The wording of the text above is a bit ambiguous in that it’s not clear whether it means “these features were not added, but will be at some point”, or whether it means “these features were not added and never will be”. I hope it’s the former.

The text above mentions Xnest and Xephyr, which are both X-servers that are also X-clients and allow you to do fancy things like run an XDMCP connection to another machine in a window on your normal desktop. In fact one of the most common comments I’ve seen about the removal of the XDMCP Chooser option from GDM was that you can “just” install Xnest and use the terminal services client if you need to connect via XDMCP. Although this will work in many cases it’s not equivalent to having it built into the login screen for several reasons:

  • It assumes you actually do have the ability to log in to the local machine, which may not be the case
  • It doesn’t run an XDMCP chooser, so you need to know the IP of the machine you’re connecting to
  • It requires the installation of Xnest, so won’t work from a Live CD with no internet connection
  • At least on the virtual machine I’m currently running Karmic on, the Terminal Services Gnome Applet dies every time I try to add it to the panel

So here’s a workaround for use with a Live CD, and which doesn’t require you to have an internet connection. It doesn’t use the XDMCP Chooser, however, so you will either need to know the IP of the machine you’re connecting to (if you use the -query option), or only have one XDMCP server on your network (if you use the -broadcast option):

  1. From within the Live desktop environment open a terminal (Applications=>Accessories=>Terminal)
  2. Enter the following command if you only have one XDMCP server on your network:
    sudo xinit -- :2 -broadcast
  3. Alternatively if you wish to specify the IP of the machine you’re connecting to, use the -query option like this (replacing 123.456.789.0 with the IP of the server):
    sudo xinit -- :2 -query 123.456.789.0

This will start a second X server and should give you a login screen for the XDMCP host. Because you now have two X servers running, you can switch between them if you want to – the default will be on CTRL-ALT-F7 and the XDMCP desktop will be on some higher number (CTRL-ALT-F8 seems like it should be the most likely candidate, but mine was on CTRL-ALT-F9 when I tried it).

This should be sufficient for many of the use-cases of XDMCP on a live CD. For full installations, or when you want to run your XDMCP connection in a window, you might find Xnest or Xephyr to be more useful, so I’ll discuss those next time.

Finally, a plug

Based on the stats I see for other XDMCP-related posts on this site, I suspect that this page will rapidly become one of my most popular. It would be remiss of me not to take that as an opportunity to plug “The Greys”, the humourous, sci-fi based webcomic that I’m involved in. If that sounds like the sort of thing that might interest you, please take a look.

Posted in Linux, Tech. 23 Comments »

Karmic Koala, GDM, XDMCP and some other stuff

Update: I’ve written another post which describes how to work around some of the XDMCP regressions in Karmic

Ubuntu 9.10, Karmic Koala, has been released. So it’s time to provide some updates on my older posts to cover the changes, both good and bad, that are relevant to the subjects I’ve raised in the past.

Last night I installed Karmic on my Dell Mini 9 netbook. Today I’ve created a virtual machine to test the desktop edition. I haven’t done a real install on an actual hardware desktop machine yet though, so take the following with a pinch of salt: the installation takes too long.

I don’t mean that it takes too long chronologically, but rather it takes too long relative to the accompanying slideshow which introduces you to some of the included applications. In both cases the slideshow reached its end, telling me that the installation would finish shortly, before I was even half way through the installation process. It should either wrap back round to the start, or spend more time on each slide, when the installation is going too slowly. As a final niggle on this part, the last slide tells me I can get help from the white/blue question mark “above” – which is true on a desktop installation where a link is placed on the top panel, but isn’t true on a netbook installation where it’s placed in the “favourites” section of the netbook launcher instead.

On the subject of the netbook launcher, one of my complaints about the previous version was that the background was too opaque, making it somewhat pointless letting the user choose a desktop image. In the 9.10 release the background is far more translucent, a definite improvement.

When it comes to desktop images, Karmic Koala ships with far more than previous versions of Ubuntu did. There’s a nice selection of photographic images which were contributed by the Ubuntu community, and stand up well against the desktop backgrounds available by default in Windows and MacOS. I would have liked to have seen some vector or 3D-modelled backgrounds as well though, as these can have source code, helping to reinforce the fact that you have the right to modify and change every aspect of an Open Source desktop.

Karmic ships with a nice selection of desktop backgrounds

Karmic ships with a nice selection of desktop backgrounds

One annoying change was that there’s no longer an application to let you switch between the netbook launcher and “normal” Ubuntu desktop modes. I’ll grant you that the full Ubuntu desktop doesn’t make much sense on a netbook screen, but when the machine it plugged into a larger monitor – and possibly with an external keyboard and mouse attached – it’s nice to be able to switch it to a conventional desktop that suits the extra space more. With the previous edition of UNR one of my favourite tricks was to enable XDMCP, then log into the netbook via a desktop machine elsewhere on the network. You get to work on the netbook, but using a big screen and sensible keyboard and mouse, and all without having to route around to re-plug cables. This approach also benefits from a dektop mode switcher… but as they’ve essentially killed support for XDMCP with Karmic, it’s a bit moot.

What’s that? Killed XDMCP support you say? Unfortunately, yes. It’s still there under the hood, but all the user-facing UI has gone. What was once an easy way to set up multiple users on a single machine by setting one dropdown and booting a few old boxes from Live CDs, has now turned into a technical obstacle race requiring you to manually edit a config file, and install extra software on the live machines.

In previous Ubuntu releases the GDM configuration app (System=>Administration=>Login Screen) was an overly complex collection of tabs and widgets which exposed far too many options. Below is an image from one of my earlier posts which shows the sheer number of options on the “Remote” tab – and that was just one of six.

Remote Login Window Preferences

In practice a lot of people just want to enable or disable XDMCP and aren’t too worried about being able to set all of the other parameters, so it would have been practical to reduce this whole tab down to just the dropdown at the top. Even that could probably be reduced to a simple checkbox: Enable Remote Logins (XDMCP) – Yes/No. But instead of slightly simplifying all of the tabs and removing the more esoteric features, Karmic sees this whole dialogue reduced to this:

Simplicity can be taken too far

Simplicity can be taken too far

So how do you enable XDMCP on a Karmic box? It’s back to the bad old days of editing the gdm config file, I’m afraid (I’ll go into the details in a future post). Now there are good reasons why it should be tricky to enable XDMCP. It’s an inherently insecure protocol, so accidentally leaving it on when you take your laptop out of the security of your local network is a bad thing. But it’s also an incredibly useful feature:

  • As mentioned above, it lets you use your netbook on a big screen without the need to route cables around
  • It’s a great way to turn an old machine into a simple terminal for a newer, faster model. No need to throw out your old machine when you upgrade – just use it as a thin client for the kids to use
  • Are the kids on your Ubuntu box, just when you need to access it? Use your laptop to log into it without having to boot them off
  • I know of one case where a child was allowed her own PC, but only as a remote terminal to the family PC in the living room. They knew that when the family machine was off she couldn’t be playing with the computer or browsing the web into the small hours
  • It’s also the closest equivalent to Microsoft’s Remote Desktop Protocol, familiar to any enterprise Windows user. Being able to share the desktop you’re currently logged into, while useful, is not the same thing as being able to log in from any machine on the network

At the very least I’m sure that the complete removal of a UI for this will annoy the 150 people who hit my site every month looking to run a rootless Linux desktop on their Windows machine.

While we’re on the subject of XDMCP, it’s worth noting that they’ve killed it at the other end as well. Whereas the old GDM login had a menu option to select XDMCP Login, the Karmic version doesn’t. Pressing F10 to bring up the option doesn’t work either. It used to be that you could temporarily convert any machine into a thin terminal by booting a Live CD, logging out, then selecting XDMCP login. That’s no longer the case. In fact, if you try to do that you’ll probably find that you can’t log back in either, as the default user has no password, and the automatic login doesn’t work at that point. Never mind, ctrl-alt-backspace will restart GDM and get you in… oh, hold on, they got rid of that in the last version, didn’t they. I hope you know your Magic SysRq Keys or you’ll have no choice but to shut the machine down.

In theory you could connect to an XDMCP server using the Terminal Server Client Applet from within the live environment – except that needs XNest to be installed, so you’re out of luck if you haven’t got an internet connection. The applet also crashes for me every time I try to add it to the panel – though this is in a virtual machine, so you might fare better on real hardware.

So, no way to easily configure XDMCP from the server end, and no way to easily connect from the client end. Perhaps changing the GDM theme will bring back that useful F10 menu. Here’s the overly complex GDM setup screen from Jaunty, showing the theme selector:

login_screen_theme

Yes, there are too many settings again. But at least it gives you a thumbnail view of what your login screen will look like. Just find the one you want and select it. There are plenty more in the repositories if you want, or you can use the “Add…” button if you’ve grabbed one off the internet. Ignoring the rest of the options on here, that bit at least does what it needs to. But we’ve already seen the GDM Settings screen in Karmic, and there’s no sign of a thumbnail viewer – so how do we change the GDM login screen in this brave new world? The answer can be found in this useful list of Karmic tips and tricks:

8. What happened to GDM theming?

* The new GDM uses the GTK theme for the gdm user. To change it, you’ll need to run gksudo -u gdm gnome-appearance-properties and select a new theme

Hmmm…. okay, let’s give that a try…. Open a terminal, type in the command line, provide my password… and get an error message:

That can't be right, surely?

That can't be right, surely?

Not a great start. Clicking through fills the terminal with more error messages, but eventually the Gnome Appearance Properties dialogue does come up:

Now where are those GDM thumbnails?

Now where are those GDM thumbnails?

Yes, it looks like the normal Appearance dialogue, because that’s what it is – it’s just that this one is for the “gdm” user rather than your normal user. As a result, you won’t find a thumbnail list of GDM themes, no matter how hard you look. Instead the GDM theme is taken from the GTK theme, so you can try changing to another GTK theme, perhaps select a different background, maybe an alternative window decoration. Then you exit the dialogue, log out and… it looks exactly the same as before. Hmm…

I suspect that the tip above actually relates to the “simple” login screen that GDM can use, rather than the full graphical version. Switching to the simple screen now requires editing the GDM configuration file, so I can’t be bothered to pursue that line of investigation any further. Suffice to say that changing the style of the graphical GDM login screen has gone from being a point-and-click affair, reminiscent of changing the desktop background, into a who-knows-how-the-hell-to-do-it conundrum. All of which means that, no, changing the GDM theme to get the F10 menu back isn’t an easy solution to the XDMCP problem either.

Finally onto another bugbear of mine from Jaunty: the shutdown menu. Six months ago the shutdown options got removed from the System menu and put onto the “fast user switcher applet” (FUSA). Now FUSA has some advantages, but I do prefer my shutdown options on the System menu. Unfortunately you can’t have both – it’s one or the other. If you remove FUSA you get them back on the System menu, but then you lose the FUSA advantages.

Nothing has improved with Karmic. In fact if anything, it’s got worse. Not only is it still an either/or proposition (Why, Canonical? Why can’t we have both?), but if you do remove the FUSA and decide that you want it back again things have got more confusing. In Jaunty the FUSA was exposed via the add applets menu as “User Switcher”. There was also a “Log Out” and a “Shut Down” applet to add to the confusion, but once you remembered that the widget in the corner was also used to switch users, it wasn’t too hard to find.

In Karmic, if you remove the FUSA then want it back, good luck in finding it. Karmic has a “Log Out” and a “Shut Down”. It also has a “User Switcher” – but that’s not what you want anymore. Yes, it kind of does the job, but it’s not the one that’s on the panel by default. If you want that one back, the thing you’re looking for is “Indicator Applet Session”. Don’t get it confused with “Indicator Applet” just above it, even though they have the same icon – they’re related, but very different things.

So Karmic still doesn’t let me have a shutdown option on my System menu and the FUSA (sorry, Indicator Applet Session). It will let me load up the panel with a whole load of Shut Down, Log Out, Switch User, and Indicator Applet Session widgets instead though. Phew! That makes my life so much simpler.

You may be thinking that I’m making a lot of fuss over a little menu entry, but my post about this for Jaunty is my most popular page, getting over 160 hits per month. Looks like I’m not the only one who wants his menu entries back.

Posted in Linux, Tech. 13 Comments »

That porridge is too cold. This porridge is too hot.

But I can’t seem to find any porridge that is just right. Except that for “porridge” you should read “software”, and for “too hot” read “too expensive”.

For years now it’s been possible to request CDs of Ubuntu releases, which were delivered completely free of charge – as mentioned a couple of times before on this blog. Alas! That is now set to stop.

More specifically it’s set to stop for people like me, who have had free CDs in the past, and who seemingly don’t contribute to Ubuntu. If you’re a new user who has never requested any CDs before, you can still have one. If you’re a developer or artist who has made significant contributions to Ubuntu then you can become a Ubuntu Member in order to continue receiving free CDs.

Other than a few bug reports, I don’t really contribute much to Ubuntu itself – certainly not enough to become a Ubuntu Member. But that doesn’t mean that I do nothing. I’m one of the many users round the world who know enough about computers to be the local go-to guy when things go wrong. As such I’ve used Ubuntu CDs for proving that hardware is (or isn’t) working, even on a Windows machine. I’ve used Ubuntu CDs to recover data from otherwise non-functional systems which won’t boot from the resident OS. I’ve used them as sandboxed environments for examining potentially dangerous files. I’ve installed several virtual machines from them. And of course I’ve installed a full copy of Ubuntu onto several real machines – converting a few Windows users in the process.

Many of these tasks are made a bit easier by having a properly pressed CD in a sleeve which explicitly states that it can be installed on more than one machine. It gives an air of legitimacy. If fixing a machine appears to involve an OS burned onto a CD-R, with a hand scribbled label, some people might wonder what makes that OS better than the dodgy copy of Windows that their friend got off eBay.

I understand why Canonical has taken this step – but it does seem like a step too far to me. I’d be more than happy to pay the delivery costs for my Ubuntu CD, they don’t have to send it to me for free. I’d be happy to pay for the CD and sleeve itself, so that they’re not out of pocket. I’d even be happy to pay a little over the odds so that they can make a small profit, or to subsidise those CDs that are still sent out for free.

But I don’t want five CDs. I particularly don’t want five CDs at a cost of £5 + VAT + carriage. Yet that’s the smallest quantity I can order from the Canonical shop. Sure, £5+ isn’t hideously expensive for a fully-featured OS, but compared to downloading it for free it feels that way, given that four of them will probably join my pile of prospective drinks coasters. Here’s an idea: if you really want a fiver off me, then send me a variety pack – a Ubuntu CD, a Kubuntu CD, a Xubuntu CD and a Ubuntu Server CD. That’s one less CD for you to send, but a better value prospect for me.

So the CD’s have gone from being too cold, to being too hot. They’re too cheap for Canonical to continue sending out, but too expensive for me to want to buy five at a time.


With the imminent release of Ubuntu 9.10 (“Karmic Koala”) Canonical are integrating support for “Ubuntu One” – a storage facility hosted on their servers. You can get 2GB of storage space for free, which is a pretty good deal by anyone’s standards. Need more space? Perhaps you want 5GB or maybe 10GB. Sorry, you’re out of luck – the next step from “2GB for free” is “50GB for $10 per month”. That’s $120 per year, or just shy of £75 at the current exchange rate.

For £75 I could buy a 1TB external hard drive, and still have change. For £80 I could get a 500GB NAS if I want to put my backups a little further away. Even 64GB USB flash drives have dropped down to about £80 now, if I want to be able to access the data wherever I go. None of these options offers quite the same facilities as a cloud-based storage service, but if all you want is somewhere to back-up some important files you might find they’re good enough.

2GB for free is great. 50GB for £75 per year is too much space for too much money for a lot of people. Where’s the middle tier option of 15GB for £25 per year?


My girlfriend’s company has a Linux server. On that server is a copy of VMWare Server, running two Windows virtual machines. She’s a partner in a small design and print business, working mostly with Macs. They have one Windows VM to run Sage (accounting software), and one to run MS Office (for those annoying customers who come in with their “artwork” prepared in Publisher or Word). Apart from her business partner, there is one employee and an occasional part-time worker. That’s three-and-a-bit members of staff in total – it’s not exactly a big business.

VMWare Server is great except for a couple of things. Firstly it has a dreadful web interface to manage it (replacing the stand-alone application, which worked quite well, from earlier versions). Secondly the web interface doesn’t work on Macs. The latter point is a real problem, as it means that any use of the virtual machines takes place via a Linux box they’ve got in the office. One Linux box to manage two VMs means inevitable time-sharing.

An obvious solution would be to switch from VMWare Server to VirtualBox, which does at least have a Mac client. But whereas VMWare Server is free of charge, VirtualBox is only free if you use the Open Source edition – which lacks support for USB devices and RDP connections, both of which would be invaluable. The commercial version, however, starts at $50 per user. That’s $200 (or $150 if they never let the part-timer anywhere near it). Compared with free-of-charge, that’s a lot of money.

So they make do with the porridge that’s too cold, because despite the annoying time-sharing, they can’t really justify spending that much money just to open a few Publisher documents. Sun’s porridge is just too hot.


I work for a small company with about a dozen employees. We have a copy of the Open Source version of SugarCRM which we use for our minimal CRM requirements. Our requirements are so minimal that the CRM software only gets accessed once or twice a day, and only then by three members of staff.

But the Open Source version of SugarCRM isn’t perfect, even for our modest requirements. There are some features of the commercial version that we’d really like to have. But the cheapest commercial version costs $360 per user, per year – with a minimum of five users. So that’s at least $1800 per year! We’ll make do with the Open Source version, thanks. Sure, the cold porridge might lack some flavour, but at least it won’t scald us.


What all these situations have in common is that they involve Open Source software which is available free of charge, or for too much money. Where is the middle ground? The £2 Ubuntu CD? The £20 per year storage solution? The £20 VirtualBox licence? The £200 SugarCRM licence?

Note to software vendors: if you offer your wares for free, make sure the step up to the first tier of your paid offerings isn’t too steep, or you might end up getting burned by your own porridge.