summaryrefslogtreecommitdiffstats
path: root/gnome2-system-admin-guide/C/sessions.xml
blob: 01b19eb5d26a3d9a0dd2dbec51698f729f150ac7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
<?xml version="1.0" encoding="utf-8"?>
<chapter id="sessions-0">
  <title>Session Management</title>
  <highlights>
    <para>This chapter introduces session management, and describes
how to set session defaults. The chapter also contains information on sessions
and login scripts.</para>
  </highlights>
  <sect1 id="sessions-1">
    <title>Introduction</title>
    <indexterm>
      <primary>sessions</primary>
      <secondary>introduction</secondary>
    </indexterm>
    <para>A GNOME desktop session occurs between the time that a user
logs in to the GNOME desktop and the time that the user logs out. The session
manager starts after the <application>Login Manager</application> authenticates
the user. The session manager enables the user to manage the session. For
example, a user can save the state of a session and return to that session
the next time that the user logs in. </para>
    <para>At a minimum, the following applications run in a session:</para>
    <itemizedlist>
      <listitem>
        <para>The session manager, <command>gnome-session</command>.</para>
      </listitem>
      <listitem>
        <para>The <application>GConf</application> X settings daemon, <command>gnome-settings-daemon</command>.</para>
      </listitem>
      <listitem>
        <para>The <application>gnome-panel</application> application, which
runs the panels on the GNOME desktop.</para>
      </listitem>
      <listitem>
        <para>The <application>Metacity</application> window manager.</para>
      </listitem>
    </itemizedlist>
  </sect1>
  <sect1 id="sessions-3">
    <title>Setting Session Defaults</title>
    <indexterm>
      <primary>sessions</primary>
      <secondary>setting defaults</secondary>
    </indexterm>
    <para>The following table lists the files that contain default
session information:</para>
    <informaltable frame="topbot">
      <tgroup cols="2" colsep="0" rowsep="0">
        <colspec colwidth="51.80*"/>
        <colspec colwidth="48.20*"/>
        <thead>
          <row rowsep="1">
            <entry valign="top">
              <para>File</para>
            </entry>
            <entry valign="top">
              <para>Description</para>
            </entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry valign="top">
              <para>
                <filename>/usr/share/gnome/default.session</filename>
              </para>
            </entry>
            <entry valign="top">
              <para>Default session file.
Default session details are stored in this file.</para>
            </entry>
          </row>
          <row>
            <entry valign="top">
              <para>
                <filename>$HOME/.gnome2/session</filename>
              </para>
            </entry>
            <entry valign="top">
              <para>User session file. When a user modifies the session,
the details are stored in this file.</para>
            </entry>
          </row>
        </tbody>
      </tgroup>
    </informaltable>
    <para>To set default session details for all users, modify the default session
file. </para>
    <para>To restore the default session settings for a user, delete the session
file from the home directory of the user. If no user session file is present,
the default settings in <filename>/usr/share/gnome/default.session</filename>
are used. </para>
    <para>To save the current session as the default session, users can run the <command>gnome-session-save</command> command. </para>
  </sect1>
  <sect1 id="sessions-2">
    <title>Login Scripts</title>
    <indexterm>
      <primary>sessions</primary>
      <secondary>login scripts</secondary>
    </indexterm>
    <para>The GNOME desktop does not support system-wide login scripts
or logout scripts. The session manager only allows users to configure user
sessions. Users can configure non-session-managed startup applications with
the <application>Sessions</application> preference tool.</para>
    <tip>
      <para>You can work around the lack of support for system-wide login scripts.
To create a system-wide login script, create the script in the <filename>/usr/dt/config/Xsession.d</filename> directory. Name the script as follows:</para>
      <para>
        <filename><replaceable>number_greater_than_1000</replaceable>.<replaceable>name</replaceable></filename>
      </para>
      <para>For example, name the script <filename>1050.login</filename>. For more
information on the <filename>/usr/dt/config/Xsession.d</filename> file, see <citetitle>The XSession File</citetitle> in the <citerefentry><refentrytitle>dtlogin</refentrytitle><manvolnum>1</manvolnum></citerefentry> man page.</para>
    </tip>
  </sect1>
</chapter>