<?xml version="1.0" encoding="utf-8"?>
<?db.chunk.max_depth 3?>
<chapter xmlns="http://docbook.org/ns/docbook" xmlns:db="http://docbook.org/ns/docbook" version="5.0" xml:id="sessions" xml:lang="ar">
    <info><title xml:lang="en">Desktop Sessions</title></info>
  
  <!-- Maintained for 2.8 compatibility -->
  <anchor xml:id="gosgetstarted-1"/>

  <highlights>
    <para xml:lang="en">This chapter provides the information you need to log in to and shut down MATE, and to start, manage, and end a desktop session.</para>
  </highlights>

  <section xml:id="gosgetstarted-69"><info><title xml:lang="en">Starting a Session</title></info>
    <indexterm xml:lang="en">
      <primary>sessions</primary>
      <secondary>starting</secondary>
    </indexterm>
    <para xml:lang="en">A <firstterm>session</firstterm> is the period you spend using MATE, between logging in and logging out. During a session, you use your applications, print, browse the web, and so on.</para>
    <para xml:lang="en">Logging in to MATE begins your session. The login screen is your gateway to the MATE Desktop: it is where you enter your username and password and select options such as the language you want MATE to use for your session.</para>
    <tip><para xml:lang="en">
    Normally, logging out ends the session, but you can choose to save the state of your session and restore it next time you use MATE: see <xref linkend="gosstartsession-2"/>.</para></tip>
    
    <!--
    2.14 has moved all this out of the standard dialogs.
    
    The session manager saves and restores the following: 
    <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>
    -->
    
    
    <section xml:id="gosstartsession-85"><info><title xml:lang="en">Logging in to MATE</title></info>
      <indexterm xml:lang="en">
        <primary>sessions</primary>
        <secondary>logging in</secondary>
      </indexterm>
      <indexterm xml:lang="en">
        <primary>logging in</primary>
        <secondary>to session</secondary>
      </indexterm>
      <indexterm xml:lang="en">
        <primary>start session</primary>
      </indexterm>
      <para xml:lang="en">To log in to a session, perform the following steps:</para>
      <orderedlist>
        <listitem>
          <para xml:lang="en">On the login screen, click on the <guilabel>Session</guilabel>
icon. Choose the MATE Desktop from the list of available desktop environments. 
Most users will not need to perform this step, as MATE is usually the default 
desktop environment already.</para>
        </listitem>
        <listitem>
          <para xml:lang="en">Enter your username in the <guilabel>Username</guilabel> field
on the login screen, then press <keycap>Return</keycap>.</para>
        </listitem>
        <listitem>
          <para xml:lang="en">Enter your password in the <guilabel>Password</guilabel> field
on the login screen, then press <keycap>Return</keycap>.</para>
        </listitem>
      </orderedlist>
      <para xml:lang="en">When you log in successfully, MATE will take a short amount of time to start up. When it is ready, you will see the Desktop and you can begin using your computer.</para>
      <para xml:lang="en">The first time you log in, the session manager starts a new
session. If you have logged in before and saved the settings for the previous 
session when you logged out, then the session manager restores your
previous session.</para>
      <para xml:lang="en">If you want to shut down or restart the system before you log in, click
on the <guilabel>System</guilabel> icon on the login screen. A dialog is displayed.
Select the option that you require, then click <guibutton>OK</guibutton>.</para>
      <para xml:lang="en">Your system distributor or vendor may have altered the login screen 
      so that it no longer has a <guilabel>System</guilabel> icon. In this case, 
      the option to shut down the computer may be found by clicking the 
      <guilabel>Other</guilabel> icon, or by clicking a separate 
      <guibutton>Shut Down</guibutton> button.</para>
<!--What about failsafe mate?-->
    </section>

    <section xml:id="gosstartsession-86"><info><title xml:lang="en">Using a Different Language</title></info>
      <indexterm xml:lang="en">
        <primary>sessions</primary>
        <secondary>different language, logging
in</secondary>
      </indexterm>
      <indexterm xml:lang="en">
        <primary>language, logging in in different</primary>
      </indexterm>
      <indexterm xml:lang="en">
        <primary>logging in</primary>
        <secondary>to session in different language</secondary>
      </indexterm>
      <para xml:lang="en">To log in to
a session in a different language, perform the following actions.</para>
      <orderedlist>
        <listitem>
          <para xml:lang="en">On the login screen, click on the <guilabel>Language</guilabel>
icon. Choose the language you require from the list of available languages.</para>
        </listitem>
        <listitem>
          <para xml:lang="en">Enter your username in the <guilabel>Username</guilabel> field
on the login screen, then press <keycap>Return</keycap>.</para>
        </listitem>
        <listitem>
          <para xml:lang="en">Enter your password in the <guilabel>Password</guilabel> field
on the login screen, then press <keycap>Return</keycap>.</para>
        </listitem>
      </orderedlist>
      <note>
        <para xml:lang="en">When you log in to a session in a different language, you are changing 
the language for the user interface but are not changing the keyboard layout. 
To choose a different keyboard layout, use the 
<application>Keyboard Indicator</application> applet.</para>
      </note>
      <tip>
        <para xml:lang="en">Your system distributor or vendor may have altered the login 
        screen so that it no longer has a <guilabel>Language</guilabel> icon. 
        In this case, the option to change the session's language may be found by clicking the <guilabel>Other</guilabel> icon.</para>
      </tip>
    </section>
  </section>

  <section xml:id="lock-screen"><info><title xml:lang="en">Locking Your Screen</title></info>
    <!-- preserve id for backwards compatibility: 2.12 -->
    <anchor xml:id="gosstartsession-1"/>        
    <screenshot>
      <mediaobject xml:lang="en">
        <imageobject>
          <imagedata fileref="figures/lockscreen_icon.png" format="PNG"/>
        </imageobject>
        <textobject>
          <phrase>Lock screen icon.</phrase>
        </textobject>
      </mediaobject>
    </screenshot>
    <indexterm xml:lang="en">
      <primary>sessions</primary>
      <secondary>locking screen</secondary>
    </indexterm>
    <indexterm xml:lang="en">
      <primary>locking screen</primary>
    </indexterm>
    <indexterm xml:lang="en">
      <primary>Lock button</primary>
    </indexterm>
    <para xml:lang="en">Locking your screen prevents access to your applications and information, allowing you to leave your computer unattended. While your screen is locked, the screensaver runs.</para>
    
    <para xml:lang="en">To lock the screen, perform
one of the following actions:</para>
    <itemizedlist>
      <listitem>
        <para xml:lang="en">Choose <menuchoice><guimenu>System</guimenu><guimenuitem>Lock Screen</guimenuitem></menuchoice>.</para>
      </listitem>
      <listitem>
        <para xml:lang="en">If the <guibutton>Lock Screen</guibutton> button is present on a
panel, click on the <guibutton>Lock Screen</guibutton> button.</para>
        <note><para xml:lang="en">The <guibutton>Lock Screen</guibutton> button is not present on the panels by default. To add it, see <xref linkend="panels-addobject"/>.</para></note>
      </listitem>
    </itemizedlist>
    <para xml:lang="en">To unlock the screen, move your mouse or press any key, enter your password in the locked screen dialog, then press <keycap>Return</keycap>.</para>
    <para xml:lang="en">If another user wants to use the computer while it is locked, they can move the mouse or press a key and then click <guibutton>Switch User</guibutton>. The login screen will be displayed, and they can log in using their user account. They will not be able to access any of your applications or information. When they log out, the screen will be locked again and you can access your session by unlocking the screen.</para>
  <para xml:lang="en">You can leave a message for a user who has locked their screen. Move the mouse or press any key and then click <guibutton>Leave Message</guibutton>. Type your message into the box and press <guibutton>Save</guibutton>. Your message will be displayed when the user unlocks their screen.</para>
  </section>

  <section xml:id="gosstartsession-2"><info><title xml:lang="en">Setting Programs to Start Automatically When You Log In</title></info>
    <indexterm xml:lang="en">
      <primary>preference tools</primary>
      <secondary>Sessions</secondary>
    </indexterm>
    <indexterm xml:lang="en">
      <primary>sessions</primary>
      <secondary>startup</secondary>
    </indexterm>
  <para xml:lang="en">You can choose for certain programs to be started automatically when 
  you log in to a session. For example, you might want a web browser to be started 
  as soon as you log in. Programs which start automatically when you log in are 
  called <firstterm>startup programs</firstterm>. Startup programs are 
  automatically saved and safely closed by the session manager when you log 
  out, and are restarted when you log in.</para>
  <para xml:lang="en">The <application>Sessions</application> preference tool allows you to 
  define which programs are started automatically when you log in. It has two 
  tabs, the <guilabel>Startup Programs</guilabel> tab and the 
  <guilabel>Options</guilabel> tab.</para>

    <section xml:id="gosstartsession-21"><info><title xml:lang="en">Startup Programs Tab</title></info>
        <!-- Preserve IDs for backwards compatibility -->
        <anchor xml:id="gosstartsession-6"/>
        <anchor xml:id="gosstartsession-10"/>
      <para xml:lang="en">You can use the Startup Programs tab to add, modify, and 
      remove startup programs.</para>
      <para xml:lang="en">A list of startup programs is displayed on this tab. The list shows 
      a short description of each program, along with a checkbox which denotes 
      whether the startup program is enabled or not. Programs which are not 
      enabled will not be started automatically when you log in.</para>

      <section xml:id="gosstartsession-211"><info><title xml:lang="en">Enabling/Disabling Startup Programs</title></info>
       <para xml:lang="en">To enable a program to start up automatically, check the checkbox 
       corresponding to that program.</para>
       <para xml:lang="en">To disable a program from starting automatically, uncheck the 
       checkbox.</para>
      </section>

      <section xml:id="gosstartsession-212"><info><title xml:lang="en">Adding A New Startup Program</title></info>
       <para xml:lang="en">To add a new startup program, perform the following steps:</para>
       <procedure>
        <step>
         <para xml:lang="en">Click <guibutton>Add</guibutton>. This will open the 
         <application>Add Startup Program</application> dialog box.</para>
        </step>
        <step>
         <para xml:lang="en">Use the <guilabel>Name</guilabel> text box to specify a name for 
         the new startup program.</para>
        </step>
        <step>
         <para xml:lang="en">Use the <guilabel>Command</guilabel> text box to specify the 
         command which will invoke the application. For example, the command 
         <userinput>pluma</userinput> will start the <application>Pluma Text 
         Editor</application>. If you do not know the exact command, click 
         <guibutton>Browse</guibutton> to choose the path of the command.</para>
        </step>
        <step>
         <para xml:lang="en">Enter a description of the application in the 
         <guilabel>Comments</guilabel> text box. You will see this as the 
         description of the program in the list of startup programs.</para>
        </step>
        <step>
         <para xml:lang="en">Click <guibutton>Add</guibutton>. The application will be added 
         to the list of startup programs with its checkbox in the checked 
         (enabled) state.</para>
        </step>
       </procedure>
      </section>

      <section xml:id="gosstartsession-213"><info><title xml:lang="en">Removing A Startup Program</title></info>
       <para xml:lang="en">To remove a startup program, select it from the list of startup 
       programs and click <guibutton>Remove</guibutton>.</para>
      </section>

      <section xml:id="gosstartsession-214"><info><title xml:lang="en">Editing A Startup Program</title></info>
       <para xml:lang="en">To edit an existing startup program, select it from the list of 
       startup programs and click <guibutton>Edit</guibutton>. A dialog will 
       appear which allows you to edit the properties of the program. See 
       <xref linkend="gosstartsession-212"/> for more information on the 
       options available in this dialog.</para>
      </section>
    </section>
    
    <section xml:id="gosstartsession-22"><info><title xml:lang="en">Session Options Tab</title></info>
      <!-- Preserve IDs for backwards compatibility -->
      <anchor xml:id="gosstartsession-9"/>
      <anchor xml:id="gosgetstarted-74"/>
      <para xml:lang="en">The session manager can remember which applications you have 
      running when you log out and can automatically restart them when you log 
      in again. If you would like this to happen every time you log out, check 
      <guilabel>Automatically remember running applications when 
      logging out</guilabel>. If you would like this to happen only once, click 
      <guibutton>Remember Currently Running Application</guibutton> before 
      logging out.</para>
    </section>
  </section>
  
  <section xml:id="shutdown"><info><title xml:lang="en">Ending a Session</title></info>
    <!-- preserve id for backwards compatibility: 2.12 -->
    <anchor xml:id="gosgetstarted-73"/>        
    <indexterm xml:lang="en">
      <primary>sessions</primary>
      <secondary>ending</secondary>
    </indexterm>
    <indexterm xml:lang="en">
      <primary>sessions</primary>
      <secondary>logging out</secondary>
    </indexterm>
    <indexterm xml:lang="en">
      <primary>logging out</primary>
    </indexterm>
    <indexterm xml:lang="en">
      <primary>quit</primary>
    </indexterm>
    <indexterm xml:lang="en">
      <primary>shutdown</primary>
    </indexterm>  
    <!--  
    commenting this out for now. A shot of the shutdown button would be good too.
    <screenshot>
      <mediaobject>
        <imageobject>
          <imagedata fileref="figures/logout_icon.png" format="PNG"/>
        </imageobject>
        <textobject>
          <phrase>Log Out icon.</phrase>
        </textobject>
      </mediaobject>
    </screenshot>
    -->
    <para xml:lang="en">When you have finished using your computer, you can choose to do one of the following:</para>
    <itemizedlist>
      <listitem>
        <para xml:lang="en">Log out, leaving the computer ready for another user to begin working with it. To log out of MATE, choose <menuchoice><guimenu>System</guimenu><guimenuitem>Log Out <replaceable>username</replaceable></guimenuitem></menuchoice> <!-- Translators: your locale might only have a "Log Out" label in the menu if "Log Out username" is not valid. In this case, remove "<replaceable>username</replaceable>". -->.</para>
      </listitem>
      <listitem>
        <para xml:lang="en">Shut down your computer and switch off the power. To shut down, choose <menuchoice><guimenu>System</guimenu><guimenuitem>Shut Down</guimenuitem></menuchoice> and click <guibutton>Shut Down</guibutton> on the dialog that appears.</para>
      </listitem>
      <listitem>
        <para xml:lang="en">Depending on your computer's configuration, you can also <firstterm>Hibernate</firstterm> your computer. During hibernation, less power is used, but all the applications and documents that you have open are preserved and will still be open when you resume from hibernation. You can resume from hibernation by moving your mouse or pressing a key.</para>
      </listitem>
    </itemizedlist>
    
    <note>
        <para xml:lang="en">Some vendors and distributors allow you to hibernate your computer in two ways, often called Hibernate and <firstterm>Suspend</firstterm>. Both of these will preserve your open files and applications, but one will switch off the power to your computer while the other will leave the computer running in a state that uses less power.</para>
    </note>
       
    <para xml:lang="en">When you end a session, applications with unsaved work will warn you. You can choose to save your work, or cancel the command to log out or shut down.</para>

    <para xml:lang="en">Before you end a session, you might want to save your current
settings so that you can restore the session later. In the <xref linkend="prefs-sessions"/> tool, you can select an option to automatically
save your current settings.</para>
  </section>
</chapter>
