Questo contenuto non è disponibile nella lingua selezionata.
14.3. User Sessions
14.3.1. What Are Typical Processes in User Sessions? Copia collegamentoCollegamento copiato negli appunti!
- dbus-daemon
- The dbus-daemon provides a message bus daemon which programs can use to exchange messages with one another. dbus-daemon is implemented with the D-Bus library which provides one-to-one communication between any two applications.For extended information, see the
dbus-daemon(1) man page. - gnome-keyring-daemon
- Credentials such as user name and password for various programs and websites are stored securely using the
gnome-keyring-daemon. This information is written into an encrypted file called the keyring file and saved in the user's home directory.For extended information, see thegnome-keyring-daemon(1) man page. - gnome-session
- The gnome-session program is responsible for running the GNOME Desktop environment with help of a display manager, such as GDM. The default session for the user is set at the time of system installation by the system administrator. gnome-session typically loads the last session that ran successfully on the system.For extended information, see the
gnome-session(1) man page. - gnome-settings-daemon
- The
gnome-settings-daemonhandles settings for a GNOME session and for all programs that are run within the session.For extended information, see thegnome-settings-daemon(1) man page. - gnome-shell
gnome-shellprovides the core user interface functionality for GNOME, such as launching programs, browsing directories, viewing files and so on.For extended information, see thegnome-shell(1) man page.- pulseaudio
- PulseAudio is a sound server for Red Hat Enterprise Linux that lets programs output audio using the Pulseaudio daemon.For extended information, see the
pulseaudio(1) man page.
dconf-serviceibusat-spi2-dbus-launcherat-spi2-registrydgnome-shell-calendar-servergoa-daemongsd-printer- various Evolution factory processes
- various
GVFSprocesses
14.3.2. Configuring a User Default Session Copia collegamentoCollegamento copiato negli appunti!
/var/lib/AccountsService/users/ directory.
Note
.dmrc file in the user home directory was used to create default sessions. This .dmrc file is no longer used.
Procedure 14.5. Specifying a Default Session for a User
- Make sure that you have the gnome-session-xsession package installed by running the following command:
yum install gnome-session-xsession
# yum install gnome-session-xsessionCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Navigate to the
/usr/share/xsessionsdirectory where you can find.desktopfiles for each of the available sessions. Consult the contents of the.desktopfiles to determine the session you want to use. - To specify a default session for a user, update the user's
account servicein the/var/lib/AccountsService/users/username file:[User] Language= XSession=gnome
[User] Language= XSession=gnomeCopy to Clipboard Copied! Toggle word wrap Toggle overflow In this sample, GNOME has been set as the default session, using the/usr/share/xsessions/gnome.desktopfile. Note that the system default in Red Hat Enterprise Linux 7 is GNOME Classic (the/usr/share/xsessions/gnome-classic.desktopfile).
14.3.3. Creating a Custom Session Copia collegamentoCollegamento copiato negli appunti!
- Create a
.desktopfile in/etc/X11/sessions/new-session.desktop. Make sure that the file specifies the following entries:Copy to Clipboard Copied! Toggle word wrap Toggle overflow TheExecentry specifies the command, possibly with arguments, to execute. You can run the custom session with thegnome-session --session=new-sessioncommand.For more information on the parameters that you can use withgnome-session, see thegnome-session(1) man page. - Create a custom session file in
/usr/share/gnome-session/sessions/new-session.sessionwhere you can specify the name and required components for the session:[GNOME Session] Name=Custom Session RequiredComponents=gnome-shell-classic;gnome-settings-daemon;
[GNOME Session] Name=Custom Session RequiredComponents=gnome-shell-classic;gnome-settings-daemon;Copy to Clipboard Copied! Toggle word wrap Toggle overflow Note that any item that you specify inRequiredComponentsneeds to have its corresponding.desktopfile in/usr/share/applications/.
GDM login screen.
14.3.4. Viewing User Session Logs Copia collegamentoCollegamento copiato negli appunti!
systemd journal. Because Red Hat Enterprise Linux 7 is a systemd-based system, the user session log data is stored directly in the systemd journal in a binary format.
Note
~/.xsession-errors file, which is no longer used.
Procedure 14.6. Viewing User Session Logs
- Determine your user ID (
uid) by running the following command:id --user
$ id --user 1000Copy to Clipboard Copied! Toggle word wrap Toggle overflow - View the journal logs for the user ID determined above:
journalctl _UID=1000
$ journalctl _UID=1000Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Getting More Information
journalctl(1) man page provides more information on the systemd journal usage.
systemd journal on Red Hat Enterprise Linux 7, see the Red Hat Enterprise Linux 7 System-Level Authentication Guide.
14.3.5. Adding an Autostart Application for All Users Copia collegamentoCollegamento copiato negli appunti!
.desktop file for that application in the /etc/xdg/autostart/ directory.
Procedure 14.7. Adding an Autostart (Startup) Application for All Users
- Create a
.desktopfile in the/etc/xdg/autostart/directory:Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Replace Files with the name of the application.
- Replace nautilus -n with the command you wish to use to run the application.
- You can use the
AutostartConditionkey to check for a value of a GSettings key.The session manager runs the application automatically if the key's value is true. If the key's value changes in the running session, the session manager starts or stops the application, depending on what the previous value for the key was.
14.3.6. Configuring Automatic Login Copia collegamentoCollegamento copiato negli appunti!
GDM custom configuration file, as follows.
Example 14.1. Configuring Automatic Login for a user john
/etc/gdm/custom.conf file and make sure that the [daemon] section in the file specifies the following:
[daemon] AutomaticLoginEnable=True AutomaticLogin=john
[daemon]
AutomaticLoginEnable=True
AutomaticLogin=john
14.3.7. Configuring Automatic Logout Copia collegamentoCollegamento copiato negli appunti!
Warning
Procedure 14.8. Setting Automatic Logout for a Mains Powered Machine
- Create a
localdatabase for machine-wide settings in/etc/dconf/db/local.d/00-autologout:[org/gnome/settings-daemon/plugins/power] # Set the timeout to 900 seconds when on mains power sleep-inactive-ac-timeout=900 # Set action after timeout to be logout when on mains power sleep-inactive-ac-type='logout'
[org/gnome/settings-daemon/plugins/power] # Set the timeout to 900 seconds when on mains power sleep-inactive-ac-timeout=900 # Set action after timeout to be logout when on mains power sleep-inactive-ac-type='logout'Copy to Clipboard Copied! Toggle word wrap Toggle overflow - Override the user's setting and prevent the user from changing it in
/etc/dconf/db/local.d/locks/autologout:Lock automatic logout settings
# Lock automatic logout settings /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-timeout /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-typeCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Update the system databases:
dconf update
# dconf updateCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Users must log out and back in again before the system-wide settings take effect.
org.gnome.settings-daemon.plugins.power.sleep-inactive-ac-timeoutThe number of seconds that the computer needs to be inactive before it goes to sleep if it is running from AC power.org.gnome.settings-daemon.plugins.power.sleep-inactive-ac-typeWhat should happen when the timeout has passed if the computer is running from AC power.org.gnome.settings-daemon.plugins.power.sleep-inactive-battery-timeoutThe number of seconds that the computer needs to be inactive before it goes to sleep if it is running from power.org.gnome.settings-daemon.plugins.power.sleep-inactive-battery-typeWhat should happen when the timeout has passed if the computer is running from battery power.
gsettings range command on a key for a list of values which you can use. For example:
14.3.8. Setting Screen Brightness and Idle Time Copia collegamentoCollegamento copiato negli appunti!
Example 14.2. Setting the Drop in the Brightness Level
local database for machine-wide settings in /etc/dconf/db/local.d/00-power, as in the following example:
[org/gnome/settings-daemon/plugins/power] idle-dim=true
[org/gnome/settings-daemon/plugins/power]
idle-dim=true
Example 14.3. Setting Brightness Level
local database for machine-wide settings in /etc/dconf/db/local.d/00-power, as in the following example, and replace 30 with the integer value you want to use:
[org/gnome/settings-daemon/plugins/power] idle-brightness=30
[org/gnome/settings-daemon/plugins/power]
idle-brightness=30
Example 14.4. Setting Idle Time
local database for machine-wide settings in /etc/dconf/db/local.d/00-session, as in the following example, and replace 900 with the integer value you want to use:
[org/gnome/desktop/session] idle-delay=uint32 900
[org/gnome/desktop/session]
idle-delay=uint32 900
uint32 along with the integer value as shown.
dconf update command as root.
Note
14.3.9. Locking the Screen When the User Is Idle Copia collegamentoCollegamento copiato negli appunti!
Procedure 14.9. Enabling the Screensaver and Locking the Screen
- Create a
localdatabase for system-wide settings in/etc/dconf/db/local.d/00-screensaver:Copy to Clipboard Copied! Toggle word wrap Toggle overflow You must include theuint32along with the integer key values as shown. - Override the user's setting and prevent the user from changing it in the
/etc/dconf/db/local.d/locks/screensaverfile:Lock desktop screensaver settings
# Lock desktop screensaver settings /org/gnome/desktop/session/idle-delay /org/gnome/desktop/screensaver/lock-enabled /org/gnome/desktop/screensaver/lock-delayCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Update the system databases:
dconf update
# dconf updateCopy to Clipboard Copied! Toggle word wrap Toggle overflow - Users must log out and back in again before the system-wide settings take effect.
14.3.10. Screencast Recording Copia collegamentoCollegamento copiato negli appunti!
webm format.
Procedure 14.10. Making a Screencast
- To start the recording, press Ctrl+Alt+Shift+R.When the recorder is capturing the screen activity, it displays a red circle in the bottom-right corner of the screen.
- To stop the recording, press Ctrl+Alt+Shift+R. The red circle in the bottom-right corner of the screen disappears.
- Navigate to the
~/Videosfolder where you can find the recorded video with a file name that starts withScreencastand includes the date and time of the recording.