Re: Question and project



Hi Pedro,

pedro noticioso wrote:
After a little more thought, Ive seen that it would be
more appropiate to asign system user names to
different groups all within gdm.conf in sake of
simplicity

I found a way you could try that would let you do what you want without having to change anything in gdm (and on top of that, I would really say
this is the right way to do it as doing it in gdm would be really overkill)

What I did is change all my session scripts by a copy of the little shell script attached ( I did not do a link because I am scared that
gdm might have something against symbolic links).

What the script does is try to match the id of the session user with
an executable file located in

/usr/X11/gdm/Session/group/{gid}/{sessionname}

where {gid} is the group of user of the Session
and {sessionname} the name of the Session in the directory (e.g. Gnome, KDE, default)
If it cannot find something to execute there, it will try to execute
the default in  /usr/X11/gdm/Session/nogroup/{sessionname}

The script tries each id listed in 'id -G' and picks up the first one.
Up to you to provide corresponding sessions for the correct groups and
supply the directories & files (with +x bit set) in the directory /usr/X11/gdm/Session/group/ and nogroup for people without specific
profiles.

I believe this is the right approach for your problem.
If you need something more complicated, then it will be easier to
use a kind of database instead but you should try to see if this approach would not fit what you want.

I don't think changing GDM will gain you anything (George?)

cheers,

Guillaume
#!/bin/bash

current=`dirname $0`
sessionname=`basename $0`
result=''

for i in `id -G`; do
   newsession="$current/group/$i/$sessionname"
   if [ -x $newsession ]; then
      result=$newsession
      break
   fi 
done

if [ -x $result ]; then
    $result;
else
    $current/nogroup/$sessionname;
fi



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]