Search Tillamook Rage
Google Custom Search

9.11.2007

LTSP Client Shuts Down Server - The Fix

You might be interested in this post if you're running an LTSP client-server setup and the server shuts down when you tell the client to shut down. This problem is filed under Ubuntu bug #65010 and we believe it is the result of the LTSP client not being aware that it is hosting a remote LTSP desktop session.

This procedure was developed using Xubuntu 7.04 (Feisty Fawn) with XFCE4, but should work equally well with any Ubuntu derivative, or Debian derivative for that matter. Also, always be careful when editing your system configuration files, or following any procedures from any site, as you can do harm to your system if a mistake is made. Always make backups of the configuration files that you change, or you might just find yourself with a broken system that's a pain to fix.

This is what I would classify as a work-around, but it's effective and fairly straight forward. There are other work-arounds to this problem that you will see other places, but this is the one that we feel is the best so far. Some other solutions promote the use of granting sudo permissions on a group basis or setting the SUID bit for certain files. If you decide to follow those methods instead, please be cautious and make sure that you understand the security implications of granting root privileges that way.

Editing the XFCE Applications Menu
Once you log onto the LTSP server (make sure you select an XFCE session) using the LTSP client login account, right click on the Applications button and click Edit Menu in the popup menu that comes up (Figure 1).

Figure 1

The 'Xfce4-MenuEditor' window will come up. Click the Hidden checkbox for the Quit menu item (Figure 2). Next, click on the Edit menu and click Add entry (Edit -> Add entry). This will bring up the Add menu entry dialog box. Make sure the Type is set to Submenu and type Shutdown for the Name. You can set an icon for this submenu item in this window too if you want (I used the Gnome shutdown icon). Once everything is set, hit the OK button. Make sure the newly created Shutdown menu is selected by clicking on it, and repeat the process (Edit -> Add entry...) to add a new item of type Launcher and a Name of Logout. You'll see that the Command text box is enabled here too, so type xfce4-session-logout in it. You can set the icon for this here as well (I used the Gnome logout icon). Click the OK button and you should see your Logout launcher added just below your Shutdown menu entry (and slightly indented). If the Logout entry is not below the Shutdown entry, or it is not indented, just drag it on top of the Shutdown menu entry and that should fix it. At this point, your 'Xfce4-MenuEditor' window should look like Figure 2 from the Quit entry down. Go up to File in the 'Xfce-MenuEditor' menu and then down to Save (File -> Save) to save your changes to the XFCE menu. Close the menu editor.

Figure 2

At this point, your Applications menu should look like Figure 3.

Figure 3

Turn Off the Logout Confirmation Dialog
The last step is turning off logout confirmation. You do this so that the user is not presented with the logout panel that gives them the option of shutting down from inside XFCE. Click on the Applications button, then go Settings -> Sessions and Startup Settings. The Sessions and Startup dialog box (Figure 4) will come up. Un-check the Prompt on logout check box (if it needs to be un-checked) and then click the Close button.

Figure 4

An Explanation
What you are basically doing with this setup is enforcing a safe method of shutting down the LTSP client. The Shut Down button on the client's logon screen is safe to use, and so you can train your users to logout from XFCE and then shutdown from the logon screen. Unfortunately, forcing users to remember what ways they can and cannot shut down usually doesn't work very well. This method will give your users just one path to shut down the client. The reason that the 'Logout' launcher is in its own submenu is to keep users from accidentally clicking it, since you have disabled logout confirmation. Otherwise they might accidentally log out while they are trying to click the 'About Xfce' menu item.

No comments: