SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE...

47
SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10

Transcript of SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE...

Page 1: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Chapter 14Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10

Page 2: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Objectives

• Objective 1—Configure X, Xgl, and Compiz

• Objective 2—Customize the GNOME User Interface

• Objective 3—Define Mandatory Settings with GConf and Desktop Profile Editor

• Objective 4—Customize Applications

• Objective 5—Control Mounting of CD-ROM, DVD, and USB Devices

2

Page 3: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Objective 1—Configure X, Xgl, and Compiz

3

• SUSE Linux Enterprise Desktop 10 provides an entirely new Linux desktop experience– Through its use of 3D effects made possible by Xgl

and Compiz– See Figure 14-1

• Xgl is a new X Server architecture layered on top of OpenGL– Can perform intricate graphical operations

noticeably faster than other available X Servers that do not use OpenGL

Page 4: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 4

Figure 14-1 New SLED 10 Linux desktop

Page 5: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Objective 1—Configure X, Xgl, and Compiz (continued)

5

• Compiz is a combination of a window manager and a composite manager using OpenGL for rendering

• Window manager– Allows the manipulation of the multiple

applications and dialog windows that are presented on the screen

• Composite manager– Allows windows and other graphics to be

combined to create composite images, such as those used to create transparency effects

Page 6: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Configure X

• YaST Graphics Card and Monitor Module– Uses sax2 for the X configuration– Activate 3D acceleration by checking the Activate 3D

Acceleration option– See Figure 14-2

• sax2– Possible to use sax2 directly, without YaST– sax2 is best started from a text terminal in runlevel 3

• Avoids any possible interference with the currently running X session

– See Figures 14-3 and 14-46

Page 7: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 7

Figure 14-2 Activate 3D acceleration

Page 8: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 8

Figure 14-3 Activate SaX2

Configure X (continued)

Page 9: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 9

Figure 14-4 The YaST Graphics Card and Monitor module

Page 10: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Activate Compiz

• Packages needed to activate Compiz:– compiz– Xgl– Xgl-hardware-list– gnome-session– libwnck

• Once 3D acceleration has been activated, log in as a normal user to GNOME and activate Compiz– Select the Computer icon in the lower-left corner of the

desktop, open the GNOME Control Center, and start the Desktop Effects control panel

10

Page 11: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 11

Table 14-1 Frequently used controls

Activate Compiz (continued)

Page 12: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Exercise 14-1: Activate Compiz (Optional, Depending on Hardware

Support)

• In this exercise, you configure Compiz, provided the hardware supports it

12

Page 13: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Objective 2—Customize the GNOME User Interface

• You can customize the GNOME user interface in various ways

• The system used for storing application preferences in GNOME is Gconf– GConf provides a preferences database, similar to a

simple file system

• Keys are organized into a directory hierarchy– Each key is either:

• A directory containing more keys• A value that is contained in the %gconf.xml file in a key

directory

13

Page 14: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

User-Defined Settings

• When a user defines the settings for his or her workstation– The settings are written to a %gconf.xml file in a

directory beneath ~/.gconf

• You can define settings using the gconf-editor– Open a terminal window, type gconf-editor, and

press Enter– See Figure 14-5

• You can also use the gconftool-2 command-line tool to change the GConf setting

14

Page 15: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 15

Figure 14-5 The gconf-editor

Page 16: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Default Values

• Default values are used for any preferences that are not set specifically by the user

• Default values are set in /etc/opt/gnome/gconf/gconf.xml.defaults/

• Change default values– You can change the systemwide default values using

either gconf-editor or gconftool-2– You must be logged in as root

16

Page 17: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Exercise 14-2: Customize the GNOME User Interface

• In this exercise, you set the preference for the mouse click to single click to launch programs that have an icon on the desktop and change the default for the background image

17

Page 18: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Objective 3—Define Mandatory Settings with GConf and Desktop

Profile Editor

• You can set mandatory preferences using the following approaches:– Use GConf to set mandatory preference values– Use the desktop profile editor– Lock down the desktop

18

Page 19: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

• gconf-editor– To set or change mandatory settings, you must be

logged in as root when you use gconf-editor– Set preferences as mandatory for the first time

• Start gconf-editor• Browse the tree to the key you want to set as

mandatory and set it to the desired value

• Then select the entry with the right mouse button; in the context menu, select Set as Mandatory

SUSE Linux Enterprise Desktop Administration

Use GConf to Set Mandatory Preference Values

19

Page 20: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

• gconf-editor (continued)– Change existing mandatory preferences

• Start gconf-editor• Then select File > New Mandatory Settings

• To remove a key from the mandatory preferences, right-click on the entry and select Unset Key

• gconftool-2– When you use gconftool-2, the gconf-editor

can be helpful to browse the configuration repository tree to find the correct key and its path

SUSE Linux Enterprise Desktop Administration

Use GConf to Set Mandatory Preference Values (continued)

20

Page 21: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Use the Desktop Profile Editor

• The Desktop Profile Editor (Sabayon package)– Allows you as the administrator to set preferences on

a per-user basis

• Define a profile– Select Computer > More Applications > System >

Desktop Profile Editor– You are prompted for the root password– Select Add to add a profile and enter a name– Select the name; then select Edit– See Figure 14-6

21

Page 22: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Use the Desktop Profile Editor (continued)

• Define a profile (continued)– When you are done, in the Editing Profile profilename

window, select Edit > Changes– See Figure 14-7– To make a change mandatory, click on the lock on the

respective line– To save your profile, select Profile > Save

• The profile is saved in /etc/opt/gnome/desktop-profiles/ profilename.zip

22

Page 23: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 23

Figure 14-6 Add a new user profile

Use the Desktop Profile Editor (continued)

Page 24: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 24

Figure 14-7 Editing profiles properties

Page 25: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Use the Desktop Profile Editor (continued)

• Assign profiles to users– Select the profile and then Users in the User Profile

Editor– See Figure 14-8– This information is stored in /etc/opt/gnome/desktop-

profiles/users.xml– This, in turn, executes /opt/gnome/sbin/sabayon-apply

• For users with a profile, this command copies the files contained in the .zip file to the user’s home directory

– A user can at least temporarily circumvent the settings marked as mandatory in the Profile Editor of Sabayon

25

Page 26: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 26

Figure 14-8 Assign profiles to users

Use the Desktop Profile Editor (continued)

Page 27: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Exercise 14-3: Set Mandatory Values for Preferences

• In this exercise, you use the Desktop Profile Editor to set mandatory preferences

• Use the Desktop Profile Editor (Sabayon) to lock the screen of all users after five minutes of inactivity

27

Page 28: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Lock Down the Desktop

• Use GConf– The gconf-editor interface lists keys to lock down the

desktop in the tree on the left under Desktop > GNOME > Lockdown

– To prevent users from changing these settings, you should configure them in the mandatory part of the GConf repository

• Use the Desktop Profile Editor (Sabayon)– Offers some more options to restrict users

28

Page 29: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Lock Down the Desktop (continued)

• Use the Desktop Profile Editor (Sabayon)– Start the Desktop Profile Editor; then select Edit >

Lockdown in the xnest window menu

– See Figure 14-9

– Select the items that you want to disable

– To make the settings mandatory, select Edit > Changes in the menu of the xnest window and select the lock icon in front of the respective entries

– See Figure 14-10

– Save by selecting File > Save and choose the user or users these settings should be applied to

29

Page 30: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 30

Figure 14-9 Using the Desktop Profile Editor

Page 31: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 31

Figure 14-10 Setting properties as mandatory

Lock Down the Desktop (continued)

Page 32: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Exercise 14-4: Disable Access to the Command Line

• In this exercise, you use gconf-editor to disable access to the command line on the GNOME desktop

• Use gconf-editor to make the command line unavailable on the desktop

32

Page 33: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Objective 4—Customize Applications

• This objective covers two examples of configuration settings that can be made available to all users:– OpenOffice.org 2.0– Firefox

33

Page 34: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

OpenOffice.org 2.0

• Language Settings– Many different languages are available, but they are

contained in separate packages– To install a language, open a terminal window and

enter, as root, yast2sw_single• Search for Office and select the package for the desired

language

– Then start OpenOffice.org and select Tools > Options > Language Settings > Language

– Within a user’s home directory, the configuration directory for OpenOffice.org on SLED 10 is ~/.ooo-2.0

34

Page 35: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

OpenOffice.org 2.0 (continued)

• Templates– Companies usually develop their own templates for

company-specific documents– OpenOffice.org looks for templates in:

• Subdirectories of the systemwide /usr/lib/ooo-2.0/share/template/language/ directory

• The user’s home directory in /.ooo-2.0/user/template/

– If a user selects File > New > Templates and Documents > Templates, the user will find the company templates in a directory

35

Page 36: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 36

Figure 14-11 OpenOffice Templates and Documents

OpenOffice.org 2.0 (continued)

Page 37: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Firefox

• Firefox can be configured extensively via Edit > Preferences

• Several tabs cover various aspects of the configuration– See Figure 14-12

• You can also access the preferences at about:config– See Figure 14-13

• Changed values are stored in the home directory of the user in /.mozilla/firefox/ xxxxxxxx.default/prefs.js

37

Page 38: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 38

Figure 14-12 Firefox preferences

Page 39: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 39

Figure 14-13 Firefox about:config

Page 40: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Objective 5—Control Mounting of CD-ROM, DVD, and USB Devices

• To control the automatic mounting of media, you have to understand how to do the following:– Use the GNOME Volume Manager– Disable Automatic Mounting of Media

40

Page 41: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Use the GNOME Volume Manager

• The GNOME Volume Manager (gnome-volume-manager)– Started automatically when the GNOME desktop is

launched– Monitors volume-related events and responds with a

user-specified policy

• The GConf editor lists the available keys under Desktop >GNOME > Volume Manager– See Figure 14-14

41

Page 42: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration 42

Figure 14-14 GNOME Volume Manager

Page 43: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Disable Automatic Mounting of Media

• Various methods of configuration– GConf and /etc/fstab

• Use gconftool-2 to set the automount_drives and automount_media keys in /desktop/gnome/volume_manager in the mandatory GConf repository to false

– Kernel modules• To read from USB storage devices, the usb_storage

kernel module is needed

• Prevent the module from being loaded by entering the following line in /etc/modprobe.conf.local

43

Page 44: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Disable Automatic Mounting of Media (continued)

• Various methods of configuration (continued)– Configure udev rules

• With udev, device files are created only for actually present devices

• udev is very flexible and can be configured by writing rules to *.rules files in the /etc/udev/rules.d/ directory

• A rule to disable devices that require the usb_storage module could look like the following:

44

Page 45: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Disable Automatic Mounting of Media (continued)

• Various methods of configuration (continued)– Remove the hardware

• Physically remove CD-ROM and DVD drives as well as USB ports

• Also prevents the computer from being booted from bootable CDs

45

Page 46: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Summary

• Xgl and the Compiz window manager work with the X Window System and your KDE or GNOME desktop environment

• To configure your video graphics card and monitor for use with X, you can use YaST or sax2

• You can use GConf to customize the GNOME user interface for the system for individual users as well as lock down access to certain desktop areas

• To configure GConf, you can use gconf-editor, gconftool-2, or the GNOME Preferences panel

46

Page 47: SUSE Linux Enterprise Desktop Administration Chapter 14 Customize the Graphical Interface on SUSE Linux Enterprise Desktop 10.

SUSE Linux Enterprise Desktop Administration

Summary (continued)

• The Desktop Profile Editor can be used in addition to GConf to create custom desktop settings profiles for different user accounts– Or lock down access to the desktop

• You can customize graphical applications using YaST, as well as configure program preferences, alter configuration files, and create templates

• To enhance security on a computer that has removable media devices, you should prevent regular users from mounting removable media

47