On Thu, July 20, 2006 5:27 am, Abri le Roux wrote:
> Hi there,
>
> I'm really confused at the moment about how scripts in
> /etc/X11/Xsession.d/ get handled by LTSP (if at all..)
>
> There are a few scripts which need to be launched when a user logs in
> (such as im-switch, and sabayon), but do they even execute,
> considering that the real X-server is running on the client, and not
> on the LTSP server?

You didn't say what distro you are using, and which display manager.

I can tell you how it works on Ubuntu dapper.

You can see how the Xsession.d scripts get executed, if you follow the
chain of scripts, starting with the gdm config file '/etc/gdm/gdm.conf'.
If you look around line 130, you should see an entry like this:

    BaseXsession=/etc/gdm/Xsession

Taking a look at that file, you can see around line 97, the SYSSESSIONDIR
variable is being set:

    SYSSESSIONDIR=/etc/X11/Xsession.d

Searching further in the script for 'SYSSESSIONDIR', you should find
around line 211, a construct that looks like this:

    SESSIONFILES=$(run_parts $SYSSESSIONDIR)
    if [ -n "$SESSIONFILES" ]; then
      for SESSIONFILE in $SESSIONFILES; do
        . $SESSIONFILE
      done
    fi

That will iterate through all of the files in /etc/X11/Xsession.d

If you are not convinced whether a script is running, then try adding a
few lines of debugging code to one of the scripts.

For instance, in my system, there's a file called '99xorg-config_start'. 
at the top of that file, I added an 'echo' statement, to tell me what it's
doing:

    # $Id: 99xfree86-common_start 1327 2004-04-28 15:46:17Z branden $

    # This file is sourced by Xsession(5), not executed.

    date                                             >>/tmp/debug.out
    echo "Hello, I made it into 99xorg-common_start" >>/tmp/debug.out

    exec $STARTUP

    # vim:set ai et sts=2 sw=2 tw=80:

Notice the 'date' line and the 'echo "hello.......' line that I put in,
ABOVE the 'exec' line.

It's VERY important to put any debugging info you have BEFORE an exec
statement.  exec NEVER returns back to the calling shell script.

Once the above change is made, then try logging into a terminal.  After
logging in, go take a look at /tmp/debug.out, to see if you see your
message there.

Be careful making changes to existing Xsession scripts.  A wrong move can
make the script die, causing the session to be restarted by the display
manager.  If that happens, you'll need to ssh into the box from another
machine, or switch the console to vt1 and log in at the text screen, and
undo your changes.

Hope that helps,

Jim McQuillan
[EMAIL PROTECTED]





>
> Cheers,
> Abri
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _____________________________________________________________________
> Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
>       https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
> For additional LTSP help,   try #ltsp channel on irc.freenode.net
>



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to