Re: gdm question



Ok, lets see how I did this. Keep in mind I might not have gotten
everuthing the Mandrake-way, but it works for me.

Runlevel 5 starts /etc/X11/prefdm which reads /etc/sysconfig/desktop.
This config file tells prefdm the display-manager you would like to use.
I needed to modify prefdm in order for it to accept a new option (gdm2)
in the 'desktop'-file.

This is the diff for prefdm :

--- prefdm.rpmnew	Fri Mar 15 17:46:41 2002
+++ prefdm	Tue May  7 22:57:51 2002
@@ -41,6 +41,8 @@
 	[ -z "$DISPLAYMANAGER" ] && DISPLAYMANAGER=$DESKTOP
 	if [ "$DISPLAYMANAGER" = "GDM" -o "$DISPLAYMANAGER" = "gdm" -o
"$DISPLAYMANAGER" = "GNOME" -o "$DISPLAYMANAGER" = "gnome" -o
"$DISPLAYMANAGER" = "Gnome" ]; then
 		preferred=gdm
+	elif [ "$DISPLAYMANAGER" = "GDM2" -o "$DISPLAYMANAGER" = "gdm2" -o
"$DISPLAYMANAGER" = "GNOME2" -o "$DISPLAYMANAGER" = "gnome2" -o
"$DISPLAYMANAGER" = "Gnome2" ]; then
+		preferred=/opt/garnome/bin/start-gdm
 	elif [ "$DISPLAYMANAGER" = "KDM" -o "$DISPLAYMANAGER" = "kdm" -o
"$DISPLAYMANAGER" = "KDE" -o "$DISPLAYMANAGER" = "kde" ]; then
 		preferred=kdm
 	elif [ "$DISPLAYMANAGER" = "XDM" -o "$DISPLAYMANAGER" = "xdm" ] ; then


As you can see a variable 'preferred' is used for launching the
display-manager in the end of the script. I need to set the full path to
a start-gdm script, because my gnome2 installation is not in the default
path.

I didn't call gdm directly because I did want to have anti-aliasing and
so on. So I created the following script called 'gdm-start'

#!/bin/sh
export PATH=/opt/garnome/bin:/opt/garnome/sbin:$PATH
export LD_LIBRARY_PATH=/opt/garnome/lib:$LD_LIBRARY_PATH
export GDK_USE_XFT=1
exec /opt/garnome/bin/gdm -nodeamon

As you can see it start gdm. Now you are almost fully operational. But
off course you want to have gdm list all sessions Mandrake knows about.
For this I modified the gdm configuration (for me in
/opt/garnome/etc/gdm/gdm.conf) to point to the normal session
directories.

Here the config lines I changed :

[daemon]
PostSessionScriptDir=/etc/X11/gdm/PostSession/
PreSessionScriptDir=/etc/X11/gdm/PreSession/
SessionDir=/etc/X11/gdm/Sessions/

(I am not sure if more changes were need like rootpath etc.)
Next step is to make Gnome2 show up as an option in the session-list

For this I first add a file called 'Gnome2' to /etc/X11/gdm/Sessions/
with the following content :

#!/bin/sh
exec /etc/X11/xdm/Xsession Gnome2


This is the same way other sessions are started, and luckily no
modification are needed to the Xsession-script as is actually expected
to easily add new Sessions.
This script uses a script called /usr/sbin/chksession to do the session
specific startup. This script looks in /etc/X11/wmsession.d.
In this 'wmsession.d' directory I add a file called '01Gnome2'. You can
give it another number if you like, but have it at number one makes it
the default session.
The '01Gnome2' file looks like this:

NAME=Gnome2
ICON=gnome-logo-icon-transparent.xpm
DESC=Gnome2 Environment
EXEC=/usr/bin/startgnome2
SCRIPT:
exec /usr/bin/startgnome2


As you see it starts Gnome2 through a 'startgnome2' script. I didn't
create this script anew, instead I just copied the orginal 'startgnome'
script and made some modifications to it.
Here a diff of the modifications :

@@ -45,4 +45,8 @@
   echo $MDKVERSION > $HOME/.gnome/mdkversion
 fi
 
-exec /usr/bin/gnome-session
+export PATH=/opt/garnome/bin:/opt/garnome/sbin:$PATH
+export LD_LIBRARY_PATH=/opt/garnome/lib:$LD_LIBRARY_PATH 
+export GDK_USE_XFT=1
+
+exec /opt/garnome/bin/gnome-session


As you can see it starts gnome-session and sets the correct
env-variables so I do have smooth anti-aliasing and so.

After all this you should have a nice anti-aliased gdm2 listing a gnome2
session, which also starts with anti-aliasing enabled.

Have fun,

-A.

ma, 02-09-2002 kello 00:55, Jason Trickett kirjoitti:
> Hi. I still haven't got it working yet. I would be great if you could
> walk me thru it "the Mandrake way". 
> 
> - J
> 
> 
> On Sun, 2002-09-01 at 15:56, Aschwin van der Woude wrote:
> 
>     Have you got it working already?
>     
>     I have it working here, the Mandrake-way I believe :-)
>     But it is a while ago I set this up, so I would need to dig into it
>     again as well.
>     
>     But I can do the digging if you still need it.
>     
>     -A.
>     
>     su, 01-09-2002 kello 11:37, Jason Trickett kirjoitti:
>     > 
>     > 
>     > Jeff Waugh wrote:
>     > 
>     > ><quote who="Jason Trickett">
>     > >
>     > >  
>     > >
>     > >>Thanks for answering! I looked in /etc/init.d/ and there was not a file
>     > >>named gdm to edit on my system (mandrake 8.1).
>     > >>    
>     > >>
>     > >
>     > >Okay, as a warning, Mandrake does some really odd stuff with its X and *DM
>     > >startup scripts...
>     > >
>     > >  
>     > >
>     > >>Anyhoo, in /etc/X11/prefdm i noticed some code that looks like this:
>     > >>    
>     > >>
>     > >
>     > >  
>     > >
>     > >>if [ -f /etc/sysconfig/desktop ]; then
>     > >>    
>     > >>
>     > >
>     > >  
>     > >
>     > >>Could I edit 'preferred-gdm' to 'preferred=/home/jason/garnome/gdm' ?
>     > >>    
>     > >>
>     > >
>     > >No, it sounds like you want to edit environment variables set in
>     > >/etc/sysconfig/desktop. Or, you could just change /etc/inittab, but I'd
>     > >recommend attempting to do it 'The Mandrake Way' to begin with.
>     > >
>     > >- Jeff
>     > >
>     > Wow, this is getting weird! The only contents in my 
>     > /etc/sysconfig/desktop file is:
>     > 
>     > DESKTOP="Gnome"
>     > 
>     > Isn't this where my default desktop choice is stored? Also, in 
>     > /etc/inittab the last few lines are:
>     > 
>     > # Run xdm in runlevel 5
>     > # xdm is now a separate service
>     > x:5:respawn:/etc/X11/prefdm -nodaemon
>     > 
>     > Isn't this just pointing back to the 'prefdm' file I mentioned before? 
>     > All this jumping around is making my head spin
>     > 
>     > :)
>     > 
>     > - Jason
>     > 
>     > -- 
>     > garnome-list mailing list
>     > garnome-list gnome org
>     > http://mail.gnome.org/mailman/listinfo/garnome-list
>     -- 
>     Aschwin van der Woude
>     Open Source Specialist / Project manager
>     Creanor Oy (www.creanor.com/movial)
>     
>     Mob. +358 50 5676665
>     Tel. +358 9 8567 6400
>     
>        "Good management with crappy products will beat
>         crappy management with good products every time"
>                                               -- Bob Young
>     
>     PGP Fingerprint:     55AB 3F70 6C6F C345 A3AC  D7A1 F2FF C586 EB04 ABDE
>     Public key ID:       1024D/EB04ABDE
>     
-- 
Aschwin van der Woude
Open Source Specialist / Project manager
Creanor Oy (www.creanor.com/movial)

Mob. +358 50 5676665
Tel. +358 9 8567 6400

   "Good management with crappy products will beat
    crappy management with good products every time"
                                          -- Bob Young

PGP Fingerprint:     55AB 3F70 6C6F C345 A3AC  D7A1 F2FF C586 EB04 ABDE
Public key ID:       1024D/EB04ABDE

Attachment: signature.asc
Description: PGP signature



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