The white paper provides some simple modifications that you can make on select HP Compaq Linux thin
clients. Linux is a very powerful and flexible operating system that you can customize in many ways. The
more you understand how the Linux operating system works, the better you can tailor the operating system to meet your needs.
This white paper covers the following specific topics related to customization:
1. Using the HP Linux thin client Altiris manageability scripts.
2. Modifying the right-click menu to remove non-root access to the Linux console.
3. Modifying the right-click menu to add a custom application command.
4. Modifying the global key set for XFCE to remove access to the manual Linux RUN command.
5. Manually adding additional keyboard layouts to the HP Linux thin client.
6. Manually adding additional Linux libraries for additional application support.
This paper assumes that the IT Professional has basic knowledge of navigating directory structures using
the Linux console, editing files using the “vi” editor, and an understanding of how to set file permissions
through the Linux console. A listing of some basic vi editor commands is provided in Appendix A.
Modifying the right-click menu
The right-click menu is displayed while holding down the right mouse button while the mouse pointer is on
the HP Compaq Linux thin client workspace or desktop area. The information displayed on the right-click
menu varies based on whether you are logged in as root user (administrator) or non-root user. By default,
the right-click menu content changes depending on the user type. By default, the right-click menu for nonroot user is the same for all non-root users on the same system; however, you can configure the right-menu
differently for two non-root users.
2
Linux configuration files that control the right-click menu
The files that control the content of the right-click menu are located in the /etc/xfce4 subdirectory. The file
directory is shown below:
drwxrwxr-x4 rootroot1024 Mar 8 18:08 .
drwxrwxr-x20 rootroot1024 Mar 14 02:04 ..
drwxrwxr-x2 rootroot1024 Jan 4 23:50 applets
-rw-rw-rw-1 rootroot41 Apr 15 2005 blank.menu.xml
-rw-rw-rw-1 rootroot53 Apr 15 2005 ff.menu.xml
-rw-rw-rw-1 rootroot2014 Mar 14 01:04 menu.xml
-rw-rw-rw-1 rootroot1747 Mar 7 19:04 menu.xml.cma
-rw-rw-rw-1 rootroot2012 Mar 14 01:06 menu.xml.cman.root
Note that the non-root files control all non-root users for that system. You can customize non-root files per user by
appending the system defined user name to the end of the file. For example, a custom non-root user file for user
“Bob” can be created by creating and modifying the file “menu.xml.cman.Bob”.
3
The basic structure of each of these files is similar but varies depending on the current startup shell (XFCE,
HP Connection Administrator, Citrix ICA Client) and the current logged in user. A partial display of the
menu.xml.cman file is shown below.
<app name="Console" cmd="xfterm4 -bg black -fg white -rightbar" />
<separator/>
2. From a console, change the file permissions on the menu.xml file located in the /etc/xfce4 subdirec-
tory by typing chmod 666 menu.xml.
3. Reboot the system or restart X-Windows for the change to take affect. To restart X-Windows, press the
Control-Alt-Backspace keys simultaneously.
The following image illustrates the new menu:
Modifying the right-click menu to add a custom command
Modifying the menu.xml.cman file allows you to add additional custom commands to the menu. In the following procedure, adding the lines in bold demonstrates this technique.
To modify the right-click menu to add a custom command:
2. From a console, change the file permissions on the menu.xml file located in the /etc/xfce4 subdirec-
tory by typing chmod 666 menu.xml.
3. Reboot the system or restart X-Windows for the change to take affect. To restart X-Windows, press the
Control-Alt-Backspace keys simultaneously.
The following image shows the new menu:
Modifying the global key set for XFCE to remove access to the
manual Linux RUN command
You can also modify a Linux configuration file to remove the capability to use the ALT-F2 keyboard
sequence within the Linux shell. The ALT-F2 key sequence window is similar to the Start > Run com-
mand in Windows, which displays the RUN command input dialog, as displayed below.
Making this modification requires changes to the XFCE Global key settings.
To remove access to the manual Linux RUN command:
1. Log in as the root user.
2. Before making changes, use the Linux copy command cp keythemerc keythermerc_backup
to backup the following file: /usr/share/xfwm4/themes/default.keys/keythemerc
7
3. Disable the ALT-F2 key sequence by editing the keythemerc Linux configuration file. This file controls
keyboard shortcut behavior on the Linux desktop. To edit the file:
•Using the vi editor, scroll down to the following two lines:
shortcut_2_key=Alt+F2 (Note: Binds the command “xfrun” from the “shortcut_2_exec=”
line to ALT+F2 key sequence)
shortcut_2_exec=xfrun4 (Note: “xfrun4” command causes the dialog to display upon
ALT+F2 key)
4. Edit the second line, “shortcut_2_exec” line to read as follows: shortcut_2_exec=
5. Reboot the system or restart X-Windows for the change to take affect. To restart X-Windows, press the
Control-Alt-Backspace keys simultaneously.
6. Test the ALT+F2 key sequence to ensure that the “run program” dialog does not function.
Manually adding additional keyboard layouts to the HP Linux
thin client
The HP Linux thin client supports the use of additional local keyboard mappings, which align to languagespecific keyboard hardware used throughout the world. HP Linux thin clients ship with several keyboard
mappings installed in the image; however, user requests indicate a need to manually add keyboard
maps.
You can add additional mappings by installing the appropriate keyboard map files onto the HP Linux thin
client and modifying the Linux configuration file that controls the keyboard maps within the desktop environment. You must compile the keyboard mapping you want to install in “xkm” format, which is used in
many other Linux distributions.
To manually add additional keyboard layouts:
1. Log in as the root user.
2. Copy the keyboard map to the HP Linux thin client and place it into the /etc/X11/xkb subdirectory.
The file name of the new keyboard map must be two characters plus the .xkm file extension.
8
A following is a sample listing of the /etc/X11/xkb directory:
/usr/X11/xkb # ls
drwxrwxr-x2 rootroot1024 Jan 4 23:50 .
drwxr-xr-x11 rootroot1024 Mar 20 22:52 ..
-rw-r--r-1 rootroot7940 Apr 20 2005 ar.xkm
-rw-r--r-1 rootroot8024 Apr 20 2005 be.xkm
-rw-r--r-1 rootroot7820 Apr 20 2005 br.xkm
-rw-r--r-1 rootroot9884 Apr 20 2005 cz.xkm
-rw-rw-r--1 rootroot8340 Apr 20 2005 de_CH.xkm
-rw-r--r-1 rootroot8024 Apr 20 2005 de.xkm
-rw-rw-r--1 rootroot8344 Apr 20 2005 dk.xkm
-rw-r--r-1 rootroot8024 Apr 20 2005 es.xkm
-rw-r--r-1 rootroot9176 Apr 20 2005 fi.xkm
-rw-r--r-1 rootroot8340 Apr 20 2005 fr_CH.xkm
-rw-r--r-1 rootroot8020 Apr 20 2005 fr.xkm
-rw-r--r-1 rootroot9132 Apr 20 2005 gr.xkm
-rw-r--r-1 rootroot8024 Apr 20 2005 hu.xkm
-rw-r--r-1 rootroot9156 Apr 20 2005 il.xkm
Each file listed in the previous directory corresponds to a local Linux keyboard mapping on the HP
Linux thin client. You must compile the new keyboard mappings in “xkm” format and copy them into
the /etc/X11/xkb directory.
3. Update a Linux configuration file to make the new mapping available to the window manager. To
make the keyboard map available, complete the following steps:
•In the Linux console, navigate to the /etc/xfce4/applets subdirectory.
•Using the vi editor, open the keyboard.conf text file.
•Add the new keyboard mapping using the conventions in the file. The text inserted into the
first column represents the file name of the keyboard map without the file extension, followed
by the name to be displayed in the operating system. A few lines from the keyboard.conf file
are shown below. Note that Mongolian has been added to the file using the mo.xkm keyboard file.
ar “Arabic”
be “Belgian-French” #is there Bel-Eng
br “Brazilian”
mo “Mongolian” (Note: This line added to support the new key mapping)
4. Save the file and exit the vi editor.
9
Manually adding extra libraries for additional application
support
While not supported by HP, Linux-proficient IT professionals may install additional Linux applications and/
or drivers onto HP Linux thin clients. Keep in mind that you must compile additional applications and drivers on full Linux clients prior to installation, as thin clients have limited flash memory space and operating
system tools. A few additional considerations include:
•Flash size - Is there enough free space on the flash to support the application and/or driver plus the
required support files?
•Linux kernel versions - Many applications and drivers are sensitive to the kernel version they were
compiled under. The HP Linux thin client kernel version is 2.4.25.
•Compiler and C library compatibility issues - Many applications and drivers are sensitive to the com-
piler and C libraries they were compiled under. The HP Linux thin client image is compiled with version gcc 3.3.2 using glibc version 2.3.2.
When adding libraries or other files required for supporting additional applications or drivers, HP recommends installing the additional files into a separate and unique file directory and configuring the
LD_LIBRARY_PATH variable to expose the files to the applications and/or drivers.
HP recommends using the following steps to install the files and edit the path variable:
•Add libraries and other support files to the /opt/lib Linux sub-directory. Note that you must create the
lib directory.
•Using the vi editor, modify the /etc/profile file and append the text /opt/lib to the end of the
LD_LIBRARY_PATH variable to make the new library path available to the newly-installed application
or driver known to the operating system.
10
Appendix A: Partial list of vi commands
Starting an Editing SessionText Insertion Commands
vi filename, where filename is name of file to be edited. a
Appends text after cursor. Terminated by ESC key.
Undo CommandA
u Appends text at end of the line. Terminated the ESC key.
undo the last command. i
Cursor Positioning Commands
jl
Moves cursor down one line, same column.Inserts text at beginning of line. Terminated by ESC key.
ko
Moves cursor up one line, same column.Opens new line below current line for text insertion. Termi-
hO
Moves cursor back one character.Opens new line above the current line for text insertion. Termi-
lDEL
Moves cursor forward one character. Overwrites last character during text insertion.
RETESC
Moves cursor to beginning of next line. Stops text insertion. The ESC key on the DECstations is F11.
O
Moves cursor to start of current line. x
$Deletes current character.
Moves cursor to end of current line. dd
SPACEDeletes current line.
Moves cursor forward one character. dw
nG Deletes the current word.
Moves cursor to beginning of line n. Default is last
line of file.
ODeletes the rest of the current sentence.
Moves cursor to 1st char. of line.D, d$
:nDeletes from cursor to end of line.
Moves cursor to beg. of line n.P
bPuts back text from the previous delete.
Moves cursor backward to beginning of previous word.
eyy
Moves the cursor backward to the end of the previous
word.
wp
Moves cursor forward to next word.Places line in the buffer after the current position of the cursor.
n
Repeats last / or ? pattern search.ZZ
Changing Commands
cw:wq
Changes characters of current word until stopped with ESC.Writes changes to current file and quits edit session.
Inserts text before cursor. Terminated by the ESC key.
nated by ESC key.
nated by the ESC key.
Text Deletion Commands
d)
Cut and Paste Commands
Puts current line in a buffer. Does not delete line from current
position.
This document contains proprietary information that is protected by copyright. No part of this document may be photocopied,
reproduced, or translated to another language without the prior written consent of Hewlett-Packard Company.
405022-001, 08/2005
12
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.