个人工具

UbuntuHelp:UbuntuLTSP/LDMThemeChange

来自Ubuntu中文

跳转至: 导航, 搜索
This page is specific to Ubuntu versions 8.04

If you find this information applicable to additional versions/releases, please edit this page and modify this header to reflect that. Please also include any necessary modifications for this information to apply to the additional versions.


This page is dedicated to changing / modifying the graphical theme for the LTSP Display Manager (LDM). This is a really good idea because it gives you the chance to customize your LTSP client login screens to better reflect your actual environment with customized logos, backgrounds and icons. It's a big deal to a lot of "normal people". =) There are some pre-packaged themes available, and you also have the ability to modify an existing theme to create a custom look when people boot up. LDM theme files are located in /opt/ltsp/i386/usr/share/ldm/themes (substitute i386 if you have a different client architecture). I simply copied an existing theme directory (in my case, the "edubuntu" directory) to my own home directory to work on it. There are several image files in PNG format that you can customize for your environment, including the following:

-rw-r--r-- 1 root root 189137 2009-04-23 23:24 bg.png
-rw-r--r-- 1 root root   5216 2009-04-23 23:24 greeter-gtkrc
-rw-r--r-- 1 root root   3500 2009-04-23 23:24 host.png
-rw-r--r-- 1 root root   1135 2009-04-23 23:24 language.png
-rw-r--r-- 1 root root  36066 2009-04-23 23:24 logo.png
-rw-r--r-- 1 root root   1760 2009-04-23 23:24 reboot.png
-rw-r--r-- 1 root root    784 2009-04-23 23:24 session.png
-rw-r--r-- 1 root root   1835 2009-04-23 23:24 shutdown.png

For my case, I wanted a simple logo change to the name of a school. I created a new logo.png file in Gimp and proceeded to make my own logo. I'm not sure about how LDM handles different size images - I simply stuck with the original size of the logo.png I copied. YMMV, and if you find out more please add to this and let us know how it works. Gimp has some great filters that make normal text look good (I personally like "Filters -> Alpha to Logo -> Glossy" look, but play around, you might find one you like better). It might be interesting to note that if you want to keep the font that *buntu uses, you can install the ttf-ubuntu-title package with the following command:

sudo apt-get install ttf-ubuntu-title

Once you get the images looking the way you want, copy the modified theme directory back into /opt/ltsp/i386/usr/share/ldm/themes as a new name (as to not overwrite the existing theme directory). Make sure the permissions on the dir and underlying files match the other themes, and then update your LTSP client image:

sudo ltsp-update-image

Now, all you need to do is point to your new theme. You can do this by modifying your lts.conf file to reflect the new theme:

sudo vi /var/lib/tftpboot/ltsp/i386/lts.conf

lts.conf:

LDM_THEME = newthemedirectoryname

NOTE: Use the directory name only, not the full path. Reboot your thin clients and enjoy your new theme! P.S. Remember, with lts.conf you can specify individual clients or groups of clients - this means you can have custom themes for different LTSP clients (for example, a theme that says "Mrs. Rushka's Class" for the clients in her classroom, vs. "Computer Lab" in the lab).