Este contenido no está disponible en el idioma seleccionado.
14.3. User Sessions
14.3.1. What Are Typical Processes in User Sessions?
- 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-daemon
handles 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-shell
provides 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-service
ibus
at-spi2-dbus-launcher
at-spi2-registryd
gnome-shell-calendar-server
goa-daemon
gsd-printer
- various Evolution factory processes
- various
GVFS
processes
14.3.2. Configuring a User Default Session
/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
- Navigate to the
/usr/share/xsessions
directory where you can find.desktop
files for each of the available sessions. Consult the contents of the.desktop
files to determine the session you want to use. - To specify a default session for a user, update the user's
account service
in the/var/lib/AccountsService/users/username file
:[User] Language= XSession=gnome
In this sample, GNOME has been set as the default session, using the/usr/share/xsessions/gnome.desktop
file. Note that the system default in Red Hat Enterprise Linux 7 is GNOME Classic (the/usr/share/xsessions/gnome-classic.desktop
file).
14.3.3. Creating a Custom Session
- Create a
.desktop
file in/etc/X11/sessions/new-session.desktop
. Make sure that the file specifies the following entries:[Desktop Entry] Encoding=UTF-8 Type=Application Name=Custom Session Comment=This is our custom session Exec=gnome-session --session=new-session
TheExec
entry specifies the command, possibly with arguments, to execute. You can run the custom session with thegnome-session --session=new-session
command.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.session
where you can specify the name and required components for the session:[GNOME Session] Name=Custom Session RequiredComponents=gnome-shell-classic;gnome-settings-daemon;
Note that any item that you specify inRequiredComponents
needs to have its corresponding.desktop
file in/usr/share/applications/
.
GDM
login screen.
14.3.4. Viewing User Session Logs
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
1000 - View the journal logs for the user ID determined above:
$
journalctl _UID=1000
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
.desktop
file for that application in the /etc/xdg/autostart/
directory.
Procedure 14.7. Adding an Autostart (Startup) Application for All Users
- Create a
.desktop
file in the/etc/xdg/autostart/
directory:[Desktop Entry] Type=Application Name=Files Exec=nautilus -n OnlyShowIn=GNOME; AutostartCondition=GSettings org.gnome.desktop.background show-desktop-icons
- 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
AutostartCondition
key 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
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
14.3.7. Configuring Automatic Logout
Warning
Procedure 14.8. Setting Automatic Logout for a Mains Powered Machine
- Create a
local
database 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
' - Override the user's setting and prevent the user from changing it in
/etc/dconf/db/local.d/locks/autologout
:# Lock automatic logout settings /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-timeout /org/gnome/settings-daemon/plugins/power/sleep-inactive-ac-type
- Update the system databases:
#
dconf update
- Users must log out and back in again before the system-wide settings take effect.
org.gnome.settings-daemon.plugins.power.sleep-inactive-ac-timeout
The 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-type
What should happen when the timeout has passed if the computer is running from AC power.org.gnome.settings-daemon.plugins.power.sleep-inactive-battery-timeout
The 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-type
What 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:
$
gsettings range org.gnome.settings-daemon.plugins.power sleep-inactive-ac-type
enum 'blank' 'suspend' 'shutdown' 'hibernate' 'interactive' 'nothing' 'logout'
14.3.8. Setting Screen Brightness and Idle Time
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
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
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
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
Procedure 14.9. Enabling the Screensaver and Locking the Screen
- Create a
local
database for system-wide settings in/etc/dconf/db/local.d/00-screensaver
:[org/gnome/desktop/session] # Set the lock time out to 180 seconds before the session is considered idle idle-delay=uint32
180
[org/gnome/desktop/screensaver] # Set this to true to lock the screen when the screensaver activates lock-enabled=true
# Set the lock timeout to 180 seconds after the screensaver has been activated lock-delay=uint32180
You must include theuint32
along 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/screensaver
file:# Lock desktop screensaver settings /org/gnome/desktop/session/idle-delay /org/gnome/desktop/screensaver/lock-enabled /org/gnome/desktop/screensaver/lock-delay
- Update the system databases:
#
dconf update
- Users must log out and back in again before the system-wide settings take effect.
14.3.10. Screencast Recording
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
~/Videos
folder where you can find the recorded video with a file name that starts withScreencast
and includes the date and time of the recording.