<chapter id="gosgetstarted-1">
  <title>Desktop Sessions</title>
  <highlights>
    <para>This chapter provides the information you need to start,
manage, and end a desktop session.</para>
  </highlights>
  <sect1 id="gosgetstarted-69">
    <title>Starting a Desktop Session</title>
    <indexterm>
      <primary>sessions</primary>
      <secondary>starting</secondary>
    </indexterm>
    <para>A desktop session occurs between the time that you log in to the desktop
 and the time that you log out. The login screen, displayed by the <application>Login Manager</application>, is your gateway to the desktop. The login screen
provides fields for you to enter your username and password. The <guimenu>Options</guimenu> menu on the login screen lists your login options, for example
you can select the language of your session. </para>
    <para>You start a session when you log in. The session manager starts after
the <application>Login Manager</application> authenticates your username and
password. The session manager enables you to manage the session. For example,
you can save the state of your most recent session and return to that session
the next time that you log in. The session manager saves and restores the
following: </para>
    <itemizedlist>
      <listitem>
        <para>The appearance and behavior settings, for example fonts, colors,
and mouse settings. </para>
      </listitem>
      <listitem>
        <para>The applications that you were running, for example file manager
and text editor windows. You cannot save and restore applications that the
session manager does not manage. For example, if you start the <application>vi</application> editor from the command line in a terminal window, session
manager cannot restore your editing session. </para>
      </listitem>
    </itemizedlist>
    <sect2 id="gosgetstarted-65">
      <title>To Log in to a Desktop Session</title>
      <indexterm>
        <primary>sessions</primary>
        <secondary>logging in</secondary>
      </indexterm>
      <indexterm>
        <primary>logging in</primary>
      </indexterm>
      <para>To log in to a session,
perform the following actions.</para>
      <orderedlist>
        <listitem>
          <para>Choose <menuchoice><guimenu>Options</guimenu><guimenuitem>Session</guimenuitem></menuchoice>. Choose the GNOME desktop from the list
of available desktop environments.</para>
        </listitem>
        <listitem>
          <para>Enter your login name in the field on the <guilabel>Login
Manager</guilabel> dialog, then click <guibutton>OK</guibutton>. </para>
        </listitem>
        <listitem>
          <para>Enter your password in the field on the <guilabel>Login Manager</guilabel> dialog, then click <guibutton>OK</guibutton>. </para>
        </listitem>
      </orderedlist>
      <para>When you log in successfully, the session manager starts a session.
If this is the first time you log in, then the session manager starts a new
session. If you have logged in before, then the session manager restores your
previous session.</para>
    </sect2>
    <sect2 id="gosgetstarted-66">
      <title>To Start a Session in a Different Language</title>
      <indexterm>
        <primary>sessions</primary>
        <secondary>different language, starting
in</secondary>
      </indexterm>
      <indexterm>
        <primary>language, starting session in
different</primary>
      </indexterm>
      <para>To start a session in a different language,
perform the following actions.</para>
      <orderedlist>
        <listitem>
          <para>On the login dialog, choose <menuchoice><guimenu>Options</guimenu><guimenuitem>Session</guimenuitem></menuchoice>. Choose the GNOME
desktop from the list of available desktop environments.</para>
        </listitem>
        <listitem>
          <para>On the login dialog, choose <menuchoice><guimenu>Options</guimenu><guimenuitem>Language</guimenuitem></menuchoice>. </para>
        </listitem>
        <listitem>
          <para>Choose the language group that includes the language that
you want.</para>
        </listitem>
        <listitem>
          <para>Choose a language.</para>
        </listitem>
        <listitem>
          <para>Log in.</para>
        </listitem>
      </orderedlist>
      <para>Your system administrator sets the default language for your system.
The <guimenu>Options</guimenu> menu on the <guilabel>Login Manager</guilabel>
dialog enables you to access other languages. When you choose a language in
the <guimenu>Options</guimenu> menu, your system sets the LANG variable for
your session. The system restores the default language at the end of the session.</para>
    </sect2>
  </sect1>
  <sect1 id="gosstartsession-1">
    <title>To Lock Your Screen</title>
    <screenshot>
      <mediaobject>
        <imageobject>
          <imagedata fileref="figures/lockscreen_icon.png" format="PNG"/>
        </imageobject>
        <textobject>
          <phrase>Image shows a lock icon that represents the Lock Screen function.</phrase>
        </textobject>
      </mediaobject>
    </screenshot>
    <indexterm>
      <primary>sessions</primary>
      <secondary>locking screen</secondary>
    </indexterm>
    <indexterm>
      <primary>locking screen</primary>
    </indexterm>
    <indexterm>
      <primary>Lock button</primary>
    </indexterm>
    <para>To lock the screen, perform
one of the following actions:</para>
    <itemizedlist>
      <listitem>
        <para>Choose <menuchoice><guimenu>Actions</guimenu><guimenuitem>Lock Screen</guimenuitem></menuchoice>.</para>
      </listitem>
      <listitem>
        <para>If the <guibutton>Lock</guibutton> button is present on a
panel, click on the <guibutton>Lock</guibutton> button. </para>
        <para>To add the <guibutton>Lock</guibutton> button to a panel, right-click
on the panel. Choose <menuchoice><guimenu>Add to Panel</guimenu><guimenuitem>Lock button</guimenuitem></menuchoice>.</para>
      </listitem>
    </itemizedlist>
    <para>When you lock your screen, the screensaver starts. To unlock the screen,
move your mouse to display the locked screen dialog. Enter your username and
password in the locked screen dialog, then press <keycap>Return</keycap>.</para>
    <note>
      <para>To lock your screen correctly, you must have a screensaver enabled.</para>
    </note>
  </sect1>
  <sect1 id="gosstartsession-2">
    <title>Managing the Session</title>
    <indexterm>
      <primary>preference tools</primary>
      <secondary>Sessions</secondary>
    </indexterm>
    <indexterm>
      <primary>sessions</primary>
      <secondary>managing</secondary>
    </indexterm>
    <para>To configure the session management of the desktop, choose <menuchoice><guimenu>Applications</guimenu><guisubmenu>Desktop Preferences</guisubmenu><guisubmenu>Advanced</guisubmenu><guimenuitem>Sessions</guimenuitem></menuchoice>. The <application>Sessions</application> preference
tool recognizes the following types of application: </para>
    <itemizedlist>
      <listitem>
        <indexterm>
          <primary>startup applications</primary>
          <secondary>session-managed</secondary>
        </indexterm>
        <para>Applications that are session-managed. When
you save the settings for your session, the session manager saves all of the
session-managed applications. If you log out, then log in again, the session
manager automatically starts the session-managed applications. </para>
      </listitem>
      <listitem>
        <para>Applications that are not session-managed. When you save the
settings for your session, the session manager does not save any applications
that are not session-managed. If you log out, then log in again, the session
manager does not start non-session-managed applications. You must start the
application manually. Alternatively, you can use the <application>Sessions</application> preference tool to specify non-session-managed applications
that you want to automatically start. </para>
      </listitem>
    </itemizedlist>
    <sect2 id="gosstartsession-9">
      <title>Defining Session Behavior When You Log In and Log Out</title>
      <indexterm>
        <primary>sessions</primary>
        <secondary>login behavior</secondary>
      </indexterm>
      <indexterm>
        <primary>sessions</primary>
        <secondary>logout behavior</secondary>
      </indexterm>
      <para>To set how a session behaves when you log in
and log out, choose <menuchoice><guimenu>Applications</guimenu><guisubmenu>Desktop Preferences</guisubmenu><guisubmenu>Advanced</guisubmenu><guimenuitem>Sessions</guimenuitem></menuchoice>. Make the changes you require
in the <guilabel>Session Options</guilabel> tabbed section. For example, you
can select to display a splash screen when you log in. </para>
    </sect2>
    <sect2 id="gosstartsession-6">
      <title>To Use Startup Applications</title>
      <indexterm>
        <primary>startup programs</primary>
        <see>startup applications</see>
      </indexterm>
      <indexterm>
        <primary>sessions</primary>
        <secondary>using startup
applications</secondary>
      </indexterm>
      <indexterm>
        <primary>startup applications</primary>
        <secondary>non-session-managed</secondary>
      </indexterm>
      <para>You
can configure your sessions to start with applications that are not session-managed.
To configure non-session-managed startup applications, choose <menuchoice><guimenu>Applications</guimenu><guisubmenu>Desktop Preferences</guisubmenu><guisubmenu>Advanced</guisubmenu><guimenuitem>Sessions</guimenuitem></menuchoice>. Use the <guilabel>Startup Programs</guilabel>
tabbed section to add, edit, and delete applications. If you save your settings
and log out, the next time that you log in, the startup applications start
automatically. </para>
    </sect2>
    <sect2 id="gosstartsession-10">
      <title>To Browse Applications in the Current Session</title>
      <indexterm>
        <primary>sessions</primary>
        <secondary>browsing applications</secondary>
      </indexterm>
      <para>To browse the applications in the current session, choose <menuchoice><guimenu>Applications</guimenu><guisubmenu>Desktop Preferences</guisubmenu><guisubmenu>Advanced</guisubmenu><guimenuitem>Sessions</guimenuitem></menuchoice>. The <guilabel>Current Session</guilabel> tabbed
section lists the following:</para>
      <itemizedlist>
        <listitem>
          <para>All GNOME applications that are currently running, that can
connect to the session manager, and that can save the state of the application.</para>
        </listitem>
        <listitem>
          <para>All desktop preference tools that can connect to the session
manager, and that can save the state of the tool.</para>
        </listitem>
      </itemizedlist>
      <para>You can use the <guilabel>Current Session</guilabel> tabbed section
to perform a limited number of actions on the session properties of an application
or preference tool. For example, you can edit the startup order, and restart
style of any GNOME application or desktop preference tool that is in the list. </para>
    </sect2>
    <sect2 id="gosgetstarted-74">
      <title>To Save Session Settings</title>
      <indexterm>
        <primary>sessions</primary>
        <secondary>saving settings</secondary>
      </indexterm>
      <para>To save your session settings, perform the following steps: </para>
      <orderedlist>
        <listitem>
          <para>Configure your session to automatically save settings when
you end the session. To configure your session, choose <menuchoice><guimenu>Applications</guimenu><guisubmenu>Desktop Preferences</guisubmenu><guisubmenu>Advanced</guisubmenu><guimenuitem>Sessions</guimenuitem></menuchoice>. The <application>Sessions</application> preference tool starts.
Select the <guilabel>Automatically save changes to session</guilabel> option
on the <guilabel>Session Options</guilabel> tabbed section.</para>
        </listitem>
        <listitem>
          <para>End your session. </para>
        </listitem>
      </orderedlist>
      <para>If you do not select the <guilabel>Automatically save changes to session</guilabel> option, when you log out, a dialog asks if you want to save your
current settings. To save your settings, select the option, then continue
to log out.</para>
    </sect2>
  </sect1>
  <sect1 id="gosgetstarted-73">
    <title>Ending a Session</title>
    <indexterm>
      <primary>sessions</primary>
      <secondary>ending</secondary>
    </indexterm>
    <indexterm>
      <primary>sessions</primary>
      <secondary>logging out</secondary>
    </indexterm>
    <indexterm>
      <primary>logging out</primary>
    </indexterm>
    <screenshot>
      <mediaobject>
        <imageobject>
          <imagedata fileref="figures/logout_icon.png" format="PNG"/>
        </imageobject>
        <textobject>
          <phrase>Log Out icon.</phrase>
        </textobject>
      </mediaobject>
    </screenshot>
    <para>To end your session, close all your currently active processes, then
perform one of the following actions:</para>
    <itemizedlist>
      <listitem>
        <para>Click on the <guibutton>Log Out</guibutton> button.</para>
      </listitem>
      <listitem>
        <para>Choose <menuchoice><guimenu>Actions</guimenu><guimenuitem>Log Out</guimenuitem></menuchoice>.</para>
      </listitem>
      <listitem>
        <para>Open the <guimenu>GNOME Menu</guimenu>, then choose <guimenuitem>Log Out</guimenuitem>.</para>
      </listitem>
    </itemizedlist>
    <para>Before you end a session, you might want to save your current settings
so that you can restore the session later. During the logout process, a dialog
asks if you want to save your current settings. In the <application>Sessions</application> preference tool, you can select an option to automatically
save your current settings.</para>
  </sect1>
</chapter>
