Using Calibre with a Kindle 3 on Ubuntu 10.04

I’ve been waiting and watching the eReader world for some time now, waiting for the price (for a half decent product) to drop below about £100. The Kindle 3, starting at £109, was close enough for me to preorder one – although I actually ended up being swayed by the allure of the 3G version at £149.

While waiting for it to arrive I installed the Calibre eBook manager on my Ubuntu 10.04 (Lucid Lynx) system from the repositories and went trotting off to download a bunch of out-of-copyright classics. The new Kindle arrived yesterday, so I plugged it into my machine, fired up Calibre, told it to send the eBooks to the reader… and got an error message.

The problem is that the Kindle 3 is supported on the latest version of Calibre (0.7.16) but of course the version in the Ubuntu repositories is far older than that (0.6.42). Even the version in the Maverick repository is too old (0.7.13). One obvious answer would be to download the source of the newest version from the Calibre site and build it myself, but where possible I prefer to stick to software from the official repositories so that I get automatic updates.

A bit of googling resulted in the answer in this forum thread: the changes to support a Kindle 3 are fairly trivial and only occur in one Python file, so it’s very easy to modify an installed 0.6.42 version. When Ubuntu pushes updates I’ll simply tell it to keep my modified file until they push a version >0.7.16, and which point I’ll let it get replaced with the official repository version.

So for anyone in a similar situation, here’s the step-by-step guide to getting the version of Calibre in the Ubuntu Lucid repositories to support a Kindle 3:

  1. Install Calibre from the Universe repository using your package manager of choice. You can click on this link and open with “apturl” to achieve the same effect: apt://calibre
  2. Press ALT-F2 to bring up a “Run Application” dialogue.
  3. Copy and paste the following line into that dialogue:
    gksudo gedit /usr/lib/calibre/calibre/devices/kindle/driver.py
  4. Enter your password when prompted and you should see “gedit” (text editor) open with the file ready for editing.
  5. Scroll to the bottom of the file.
  6. Copy and paste the following code at the end of the file:
    class KINDLE2(KINDLE):
    
        name           = 'Kindle 3 Device Interface'
        description    = _('Communicate with the Kindle 3 eBook reader.')
    
        FORMATS        = KINDLE.FORMATS + ['pdf']
        PRODUCT_ID = [0x0004]
        BCD        = [0x0100]
  7. Save the file and quit “gedit”.
  8. Launch Calibre from the Applications=>Office menu and start managing your eBook collection for your Kindle 3.

Note that I’m no Python programmer, but my reading of the code suggests that this change might stop Calibre working with a Kindle 2 as it appears to override the existing KINDLE2 class. So if you’ve got both a Kindle 2 and a Kindle 3 and want to use Calibre with both you’re probably better off downloading the latest version and building from the source.

Solved: Ubuntu Missing Numpad Issue

If you just want the quick fix: try pressing SHIFT+NUM_LOCK. For the full gory story, as it affected me, read on…

A few weeks ago the numeric keypad on my work PC stopped responding. The Enter key still worked, but most of the other keys didn’t seem to do much. I wasn’t really surprised that it had finally given up the ghost: it was supplied with the machine seven years ago, and wasn’t the most deluxe keyboard in the world even when new. The silver painted coating had long since worn off of the well travelled parts of the device, and it had probably collected enough particles of my lunch over seven years to furnish a full banquet if anyone were foolish enough to shake it out.

It wasn’t until I was devoid of a numeric keypad that I realised how much I use one. Dotted quads for IP addresses trip lightly off the fingers of the right-hand rather than being laboriously thumped out of the row of digits at the top of the typewriter section. When programming my muscle memory flitted /* and */ comment delimiters into existence almost subconsciously. And when working with Inkscape the +,-,* and / of the keypad are my preferred route into the world of boolean operations on paths. I quickly resolved that a replacement keyboard needed to be found, pronto.

I could have asked work to buy me a new keyboard, but that would have got me another cheap model. Now I don’t mind the cheap HP model that had just died: it was quite a comfy keyboard to type on, and I hadn’t felt a desperate need to replace it in the past 7 years. But I’ve used other cheap (and some expensive) keyboards that were just horrible – one of my colleagues has a Dell monstrosity that nearly breaks your fingers to type on. But I knew that I had an old buckling spring keyboard kicking around at home that would be a delight to use every day.

An AT-to-PS/2 adaptor into a PS/2-to-USB adaptor later and I was typing away, number pad and all, with two side-effects. Firstly the clicky-clacky sounds emanating from my cubicle were enough to keep them awake – Hah! Secondly they made it a lot more obvious when I wasn’t writing code – D’oh!

Everything was rosy, I was a happy, clicky-clacky man. And then it happened: my number pad stopped working again. This was too much of a coincidence, so I went off a-googling and quickly found this to be a common issue, with the culprit being one of the keyboard accessibility options. From the search results I found it would appear that this has been an issue at least since Hardy Heron (8.04); the machine I’m using has the latest release, Lucid Lynx (10.04) so presumably this has been an issue for all the versions in-between as well.

Go to the System menu, select Preferences, then Keyboard, then the Mouse Keys tab. The issue was that this option had become enabled, meaning that my numpad no longer acted as a pad for entering numbers, but as a pad for controlling the mouse:

How had this happened? I wasn’t aware of ever going into that window and enabling that option – let alone having done it twice. It seems that there’s a keyboard shortcut to enable that mode – SHIFT+NUM_LOCK – which immediately toggles Mouse Keys whatever you’re doing at the time. With my frequent use of CTRL+NUMPAD for various Inkscape options, an accidental brushing of SHIFT+NUM_LOCK is a likely candidate for the cause of this confusion.

I can understand that having a keyboard shortcut for toggling this is invaluable for anyone who needs to use Mouse Keys regularly. However I’m not the only person to have been caught out by this, so I would suggest making it a little harder to enable by mistake. Specifically, there is an application called Assistive Technologies Preferences in which I specifically have “Enable assistive technologies” unchecked. Perhaps the state this checkbox should be honoured when a SHIFT+NUM_LOCK is detected.

There’s also a section for Accessibility in the Keyboard Shortcuts control panel. Why isn’t SHIFT+NUM_LOCK exposed there? That would perhaps be the best solution of all, as it would allow the toggle to be set to Disabled for users like me, who don’t want to trigger it by accident, but it would also allow an even more convenient shortcut to be defined by anyone who does want to access this feature regularly.

So if you’ve stumbled across this post because you’ve been affected by this issue, and a web search has sent you this way, try SHIFT+NUM_LOCK first. Unless you want to use your “broken” keyboard as an excuse to invest in a nice clicky-clacky affair.

Oh, and for what it’s worth the 7 year-old keyboard turns out to be fine. But I think I’ll stick with the buckling spring monster, if only for the sadistic pleasure of keeping my colleagues awake.

sudo? sudon’t! Stupid “sudoers.d”

If you don’t know what “sudo” is, then this isn’t the post for you… it’s going to get technical and Linuxy. Let’s start with the summary, as it’s the most important part of this post:

If you use /etc/sudoers.d/ don’t create files in the directory – create them elsewhere, ‘chmod’ them, and only then copy them in

Now for the story about how I came to this discovery…

For reasons that I’ll describe in a future post, I have a need to be able to trigger the “chvt” command from a keyboard shortcut. More specifically I want to run “gksudo chvt 1″, as using chvt to switch from a graphical screen to a console requires superuser privileges on my Ubuntu box. This prompts for my password, which seems a little redundant as I can use CTRL-ALT-F1 to the same effect without having to enter a password. So I decided to add an entry to the sudoers file in order to grant myself passwordless access to the chvt command.

I went wandering over to /etc and found not only the expected “sudoers” file, but also a “sudoers.d” directory. This directory contained a single README file, as follows:

#
# As of Debian version 1.7.2p1-1, the default /etc/sudoers file created on
# installation of the package now includes the directive:
#
# #includedir /etc/sudoers.d
#
# This will cause sudo to read and parse any files in the /etc/sudoers.d
# directory that do not end in ‘~’ or contain a ‘.’ character.
#
# Note that there must be at least one file in the sudoers.d directory (this
# one will do), and all files in this directory should be mode 0440.
#
# Note also, that because the sudoers file is not a ‘conffile’ in the Debian
# sense, and sudoers contents can vary widely, no attempt is made to add this
# directive to existing sudoers files on upgrade. Feel free to add the above
# directive to the end of your /etc/sudoers file to enable this functionality
# for existing installations if you wish!
#

That seemed like just what I wanted. I could create my sudoers command in a file of its own, safe in the knowledge that it wouldn’t get trampled by any future upgrades that affect the sudoers file itself. I copied and pasted the #includedir line into my sudoers file (using “sudo visudo”), then set about adding my sudoers directive in a file I named “chvt”:


> cd /etc/sudoers.d/
> sudo touch chvt
> sudo chmod 0440 chvt

BANG!

My terminal was filled with a lengthy backtrace, but scrolling back up to the top, I found this little nugget:

sudo: /etc/sudoers.d/chvt is mode 0644, should be 0440

Well thanks for that marvellous insight – I was just trying to set it to 0440 when you stopped me, you stupid machine.

Because I committed the heinous crime of creating an empty file in /etc/sudoers.d/ “sudo” won’t work at all. I can’t correct the permissions, I can’t delete or move the file: in short, I’ve lost administrator access to my machine. All for the sake of an empty file.

Now I can understand sudo throwing a wobbly and quitting if it can’t parse the sudoers file – blindly proceeding to read a malformed file could be a quick route to a buffer overflow attack or similar. But dying completely because an empty file has the wrong permissions seems a little draconian. Yes, that README did say “…and all files in this directory should be mode 0440″ – but “should be” isn’t quite the same as “…MUST be 0440, or I’ll DIE!!!”. Here’s an idea: if you don’t like the permissions, just don’t read the file – there’s no need to get all suicidal about it.

It seems that the only way to recover from this situation is to reboot the machine: either booting from a Live CD, or selecting the recovery console during the GRUB boot sequence. You can then remove or change the permissions of the offending file and everything will be back to normal after you restart the machine. It does seem like a lot of hassle caused by a zero length file though – thank goodness I didn’t do this on a production server!

All of which leads back to the summary at the top of this post: Don’t create files directly in /etc/sudoers.d/ If you do use the #includedir directive in your sudoers file, make sure you create your files elsewhere, set the permissions to 0440, and only then copy them into place.

Top-left, top-right: why not let me choose?

As I mentioned in this post, the migration of Ubuntu’s window controls from the top right to the top-left were a precursor to other changes which would make use of the now-empty corner of the title bar. I’m still not sure why the controls had to move before any of these new widgets even exist, but at least now we have a little more information about the plans for the top-right corner of Ubuntu windows, as Mark Shuttleworth has posted a blog entry about the so-called “windicators” that they plan to put there.

On the whole I approve of the idea of adding more functionality to the title bar – it’s largely wasted space at the moment. But there’s one thing about this proposal which concerns me: the user has no choice about the position of the windicators. From the proposal it appears that the user can either accept the window controls at the top-left and the windicators at the top-right, or they will have to live without the windicators completely.

When you look at this suggestion in the context of the plans for the Ubuntu Netbook Remix it makes a lot of sense. By positioning the windicators at the top right they appear alongside the main panel indicators in the planned version of UNR which combines the window titlebar with the menu and the top panel into one composite element. But just because this positioning makes sense for UNR, that doesn’t necessarily mean it makes sense for normal desktop installations.

My personal preference would be to retain the close button in the top-right, but move the minimise and maximise buttons (which I rarely use) to the top-left. Windicators would appear in the top-right, but to the left of the close button. Of course this layout wouldn’t suit everyone. Perhaps you would rather have the windicators in the centre of the title bar, with the application name to the left and the window controls to the right? Perhaps you would prefer not to have windicators at all, or perhaps you could live without the maximise button if you’re one of those people who religiously use a double-click on the title bar for the same purpose.

The point is that a single layout arrangement, dictated from above, doesn’t suit everybody. So why not make it configurable? Why not turn the title bar into a container-like element, with the ability to host various widgets that are aligned to the left, right or center. The close button would be a widget. The minimise and maximise buttons would be widgets. Even the window title would be a widget. Windicators would probably be treated as one composite widget, rather than making the user deal with each one individually.

In this scenario the window title bar is more akin to the existing Gnome panels in Ubuntu. If you want to rearrange your window widgets you could just drag them around, much like you can with objects in a panel. If you want to remove a widget entirely you could do that too – although a sanity check would probably prevent you removing the only close button. All this configurability would be hidden away in a tab on the “Appearence” preferences panel, making it easy to get to when needed, but not so obvious that it distracts the average user who wants to stick with the defaults.

I suspect that the basics of this scheme are already in place. The fact that there are instructions floating around for using gconf-editor to switch the window controls back to the right would certainly suggest that title bars are already treated as simple containers for other widgets. So why not expose the functionality in a nice user-friendly way? Why can’t I tailor the title bar to my needs as easily as I can the Gnome panel?

Oh well, maybe next time (extended remix)

This is an extended version of a post associated with my webcomic, The Greys. I’ve posted it here because the extended version reflects my personal opinion, and not necessarily that of my comic strip co-author.

The winners for this year’s Ubuntu Free Culture Showcase have been announced, and unfortunately (for us, at least) our submission, “Ubuntufied Flying Object” didn’t make the cut (even after a quick change of clothes). Congratulations to the two guys who did get in, and whose works will be gracing many thousands of ISO downloads come April 29th.

I don’t want this to come across as sour grapes, but I’m a little disappointed with the Free Culture Showcase. Not with the winners, or any of the other submissions that were entered, but with the premise of the competition as a whole. Yes, it showcases Free Culture – deemed to be works released under a particular set of licenses which allow for free distribution and re-use – but that’s all it does. And it could do more.

Ubuntu – like any Linux distribution – relies on the fact that thousands of people around the world have licensed and shared their source code for free distribution and re-use. That the source code results in executable files which can also be freely distributed and re-used is largely irrelevant – it’s the license of the original source that is important.

But, with the exception of our entry*, every submission to the Free Culture Showcase was an “output” file – ogg audio, ogg video and a pdf. None of them include the “input” files – the audio samples, midi files, video footage or original text from which the final submission was created. None of them included information about how they were created, or what Ubuntu software could be used to edit them. None of them specify what software was used to create them in the first place. Note that such omissions are the result of the rules of the competition, not the fault of the submitters.

What is the purpose of the Free Culture Showcase? If it’s just to show that there’s more to “Free” than software, then perhaps it serves its purpose. But it could be so much more than that. It could be a way to demonstrate to new users some ways in which a Free software stack can be used, and as a very basic tutorial on how to get started in creating their own works. When I look at a Free Culture Showcase winner, I’d like to know how I can produce something similar using the operating system and tools I’ve just downloaded. What extra packages do I need to install? Where can I get the source files in order to recreate the work – or to remix them into my own creation? If the original creator used proprietary software or source material (such as sampled audio), then why? Does this represent a gap in the Free Software stack, or the Free Culture archives, which needs to be addressed?

My personal choice would be to modify the rules of the Free Culture Showcase in future:

  • Show a preference not only for open file formats, but also for those works which make their source files available as well (these could get very large, so Canonical should be prepared to mirror them somewhere). Space limitations will likely prevent these assets being put on the CD, so the winning entries should have an accompanying document added when the CD is mastered, detailing the download locations.
  • Show a preference for pieces created entirely using a Free Software stack.
  • Require a brief description of how the piece was created – what software was used, where audio samples were sourced from – enough to give an interested consumer somewhere to start with their own creations. If proprietary software or source files were used, a short explanation as to why.

This doesn’t prevent binary-only submissions to the competition, but does encourage the submission of files that not only represent Free Culture, but also indicate just what can be achieved using a Free Software stack and Free assets (clipart, samples, stock footage, and so on). Where proprietary software was used, it might indicate an area where Free Software needs to improve. Where source files can’t be released due to license restrictions, it might indicate a need for more comprehensive libraries of assets, or it might motivate another user to re-create the missing file as an equivalent, freely licensed alternative.

Let’s not waste the space on those thousands of ISOs with “here’s some Free stuff”. Let’s use that space with “here are some examples of what you can do with your new Operating System – and some pointers as to how you can do it”.


* Our entry was an SVG file, which is both an input and an output file – it is its own source code. It was created entirely using Inkscape on Ubuntu machines. Anyone can edit our file using the same software stack – or by using Inkscape on Windows or MacOS.

Will Lucid play havoc with the Dell Mini 10?

There has been a lot written about the change in position of the window controls in the alpha- and beta-releases of Ubuntu 10.04, Lucid Lynx. I haven’t really got much to add that’s not in this excellent post, and it’s already been discussed to death in this bug report. Basically the problem is that the window controls have been moved from their historical position on the right of the title-bar (where Windows also has them), over to the left:

The rationale behind the change – what there is of it – seems to be that the Ubuntu developers have some ideas for things that they want to put in the top-right of the window. I’ve always felt the window title bar to be a bit of a waste of screen space; I don’t want to see it removed entirely, but rather would like to see it gain some more useful functionality. For example, the window title on Apple’s Finder can also be used to navigate to parent directories, or as a drag-and-drop widget for the parent folder.

So I’m definitely not averse to them adding more power to the title bar, but why does that require the widow controls to move now? Why does it require them to move at all? Unless they’re going to magic some extra space from somewhere, I don’t see why the window controls can’t stay at the top-right, and the new widgets go to the top-left, or to the right of the title bar but just left of the window controls. There may be a very good reason why their new widgets should go to the top right, but with no indication as to what those new widgets might be, it’s a little hard to judge.

So what’s this got to do with the Dell Mini 10, specifically? It’s all about the trackpad.

I have a Mini 9, which I think is a great machine. It has a traditional old-fashioned trackpad, with a pair of buttons underneath it for left- and right-clicking. At the weekend I was working on a friend’s Mini 10, which has the buttons integrated into the trackpad itself. The result was that almost every time I tried to click, the mouse pointer would jump down the screen a little, often meaning I missed the target I was aiming for. Although my friend (who has owned the machine for a few months now) fared much better, even he had more mis-clicks than I would consider reasonable.

I’m not averse to integrated trackpad-and-button systems per se. The recent multi-touch trackpads on Mac laptops seem to work quite well in this regard – perhaps because the whole trackpad is a button, so there’s no need to move your finger away from the target to initiate a click. That’s not the case with the Mini 10: you always have to move your finger to the “button” area at the bottom of the trackpad, but doing so is liable to be interpreted as a desire to move the cursor. It also prevents the “move with the finger, click with the thumb” approach to trackpadding that I prefer. This isn’t the only machine I’ve ever used with such a troublesome trackpad, it just happens to be the most recent.

These jumpy mouse-clicks are problematic enough when window controls are at the right, but putting them on the left makes them a prime target for mis-clicks every time the user tries to open the Applications menu. Apart from the claim of mystery widgets in the future, I have yet to see a good reason for moving the window controls, while I’ve seen plenty of good reasons to keep them where they are. The Mini 10′s trackpad is just another one to add to a long list.

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. 2 Comments »

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. 6 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. 9 Comments »