After testing the beta of CentOS 5, i was a little surprised to notice that the display manager part of the prefdm file in /etc/X11 was exactly like in CentOS 4 / RHEL4 and previous versions including RH9.
it reads like this (added line numbers for reference):
14 # Run preferred X display manager 15 preferred= 16 if [ -f /etc/sysconfig/desktop ]; then 17 . /etc/sysconfig/desktop 18 if [ "$DISPLAYMANAGER" = GNOME ]; then 19 preferred=gdm 20 elif [ "$DISPLAYMANAGER" = KDE ]; then 21 preferred=kdm 22 elif [ "$DISPLAYMANAGER" = XDM ]; then 23 preferred=xdm 24 fi 25 fi
Line 17 is no functional command i know of, therefor the choice of which displaymanager (login-screen) to use is decided by the fallback lines later in the script (that starts with gdm). If you're ok with gdm, than there's no need for this to change.
Still, it would seem that something is missing there. My best guess for what was supposed to be there:
# Run preferred X display manager preferred= if [ -f /etc/sysconfig/desktop ]; then DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DESKTOP | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GNOME ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDE ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi fi
This would make kdm your display manager when using kde as default desktop and gdm when using gnome. Although the grep part is not necessary, i added it in case someone decides to add lines to the desktop file someday...
I've come across one forum post in which someone suggested to add the line DISPLAYMANAGER="KDM" to the desktop file in order to achieve the same result. For this to work the prefdm file should be altered like this:
# Run preferred X display manager preferred= if [ -f /etc/sysconfig/desktop ]; then if [ -n "$(cat /etc/sysconfig/desktop | grep DISPLAYMANAGER | cut -d '"' -f2)" ];then DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DISPLAYMANAGER | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GDM ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDM ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi else DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DESKTOP | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GNOME ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDE ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi fi fi
It all seems basic scripting to me so i wonder if no-one simply never noticed or never cared to finish this one.
Rody
After testing the beta of CentOS 5, i was a little surprised to notice that the display manager part of the prefdm file in /etc/X11 was exactly like in CentOS 4 / RHEL4 and previous versions including RH9.
it reads like this (added line numbers for reference):
14 # Run preferred X display manager 15 preferred= 16 if [ -f /etc/sysconfig/desktop ]; then 17 . /etc/sysconfig/desktop 18 if [ "$DISPLAYMANAGER" = GNOME ]; then 19 preferred=gdm 20 elif [ "$DISPLAYMANAGER" = KDE ]; then 21 preferred=kdm 22 elif [ "$DISPLAYMANAGER" = XDM ]; then 23 preferred=xdm 24 fi 25 fi
Line 17 is no functional command i know of, therefor the choice of which displaymanager (login-screen) to use is decided by the fallback lines later in the script (that starts with gdm). If you're ok with gdm, than there's no need for this to change.
Hi,
I believe that in bash and sh placing . (dot) followed by a space and then a file will source that file, and in so doing source the DESKTOP="BLAH" into the current environment.
A.
Still, it would seem that something is missing there. My best guess for what was supposed to be there:
# Run preferred X display manager preferred= if [ -f /etc/sysconfig/desktop ]; then DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DESKTOP | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GNOME ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDE ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi fi
This would make kdm your display manager when using kde as default desktop and gdm when using gnome. Although the grep part is not necessary, i added it in case someone decides to add lines to the desktop file someday...
I've come across one forum post in which someone suggested to add the line DISPLAYMANAGER="KDM" to the desktop file in order to achieve the same result. For this to work the prefdm file should be altered like this:
# Run preferred X display manager preferred= if [ -f /etc/sysconfig/desktop ]; then if [ -n "$(cat /etc/sysconfig/desktop | grep DISPLAYMANAGER | cut -d '"' -f2)" ];then DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DISPLAYMANAGER | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GDM ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDM ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi else DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DESKTOP | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GNOME ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDE ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi fi fi
It all seems basic scripting to me so i wonder if no-one simply never noticed or never cared to finish this one.
Rody
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
After testing the beta of CentOS 5, i was a little surprised to notice that the display manager part of the prefdm file in /etc/X11 was exactly like in CentOS 4 / RHEL4 and previous versions including RH9.
it reads like this (added line numbers for reference):
14 # Run preferred X display manager 15 preferred= 16 if [ -f /etc/sysconfig/desktop ]; then 17 . /etc/sysconfig/desktop 18 if [ "$DISPLAYMANAGER" = GNOME ]; then 19 preferred=gdm 20 elif [ "$DISPLAYMANAGER" = KDE ]; then 21 preferred=kdm 22 elif [ "$DISPLAYMANAGER" = XDM ]; then 23 preferred=xdm 24 fi 25 fi
Line 17 is no functional command i know of, therefor the choice of which displaymanager (login-screen) to use is decided by the fallback lines later in the script (that starts with gdm). If you're ok with gdm, than there's no need for this to change.
Hi,
I believe that in bash and sh placing . (dot) followed by a space and then a file will source that file, and in so doing source the DESKTOP="BLAH" into the current environment.
A.
Typo there I meant: DISPLAYMANAGER="BLAH"
A.
Still, it would seem that something is missing there. My best guess for what was supposed to be there:
# Run preferred X display manager preferred= if [ -f /etc/sysconfig/desktop ]; then DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DESKTOP | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GNOME ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDE ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi fi
This would make kdm your display manager when using kde as default desktop and gdm when using gnome. Although the grep part is not necessary, i added it in case someone decides to add lines to the desktop file someday...
I've come across one forum post in which someone suggested to add the line DISPLAYMANAGER="KDM" to the desktop file in order to achieve the same result. For this to work the prefdm file should be altered like this:
# Run preferred X display manager preferred= if [ -f /etc/sysconfig/desktop ]; then if [ -n "$(cat /etc/sysconfig/desktop | grep DISPLAYMANAGER | cut -d '"' -f2)" ];then DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DISPLAYMANAGER | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GDM ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDM ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi else DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DESKTOP | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GNOME ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDE ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi fi fi
It all seems basic scripting to me so i wonder if no-one simply never noticed or never cared to finish this one.
Rody
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Op vrijdag 16 maart 2007 23:04, schreef Andrew Bogecho:
After testing the beta of CentOS 5, i was a little surprised to notice that the display manager part of the prefdm file in /etc/X11 was exactly like in CentOS 4 / RHEL4 and previous versions including RH9.
it reads like this (added line numbers for reference):
14 # Run preferred X display manager 15 preferred= 16 if [ -f /etc/sysconfig/desktop ]; then 17 . /etc/sysconfig/desktop 18 if [ "$DISPLAYMANAGER" = GNOME ]; then 19 preferred=gdm 20 elif [ "$DISPLAYMANAGER" = KDE ]; then 21 preferred=kdm 22 elif [ "$DISPLAYMANAGER" = XDM ]; then 23 preferred=xdm 24 fi 25 fi
Line 17 is no functional command i know of, therefor the choice of which displaymanager (login-screen) to use is decided by the fallback lines later in the script (that starts with gdm). If you're ok with gdm, than there's no need for this to change.
Hi,
I believe that in bash and sh placing . (dot) followed by a space and then a file will source that file, and in so doing source the DESKTOP="BLAH" into the current environment.
If tried (tested) that but if you have DESKTOP="KDE" in /etc/sysconfig/desktop and the original prefdm, than the loginscreen will be gdm and not kdm. I wouldn't be surprised if the feature you mention existed, but it doesn't work like that on the redhat-pc's i've seen...
Rody
A.
Typo there I meant: DISPLAYMANAGER="BLAH"
A.
Still, it would seem that something is missing there. My best guess for what was supposed to be there:
# Run preferred X display manager preferred= if [ -f /etc/sysconfig/desktop ]; then DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DESKTOP | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GNOME ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDE ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi fi
This would make kdm your display manager when using kde as default desktop and gdm when using gnome. Although the grep part is not necessary, i added it in case someone decides to add lines to the desktop file someday...
I've come across one forum post in which someone suggested to add the line DISPLAYMANAGER="KDM" to the desktop file in order to achieve the same result. For this to work the prefdm file should be altered like this:
# Run preferred X display manager preferred= if [ -f /etc/sysconfig/desktop ]; then if [ -n "$(cat /etc/sysconfig/desktop | grep DISPLAYMANAGER | cut -d '"' -f2)" ];then DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DISPLAYMANAGER | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GDM ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDM ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi else DISPLAYMANAGER=$(cat /etc/sysconfig/desktop | grep DESKTOP | cut -d '"' -f2) if [ "$DISPLAYMANAGER" = GNOME ]; then preferred=gdm elif [ "$DISPLAYMANAGER" = KDE ]; then preferred=kdm elif [ "$DISPLAYMANAGER" = XDM ]; then preferred=xdm fi fi fi
It all seems basic scripting to me so i wonder if no-one simply never noticed or never cared to finish this one.
Rody
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Fri, Mar 16, 2007 at 11:21:02PM +0100, Rody wrote:
Op vrijdag 16 maart 2007 23:04, schreef Andrew Bogecho:
After testing the beta of CentOS 5, i was a little surprised to notice that the display manager part of the prefdm file in /etc/X11 was exactly like in CentOS 4 / RHEL4 and previous versions including RH9.
17 . /etc/sysconfig/desktop
Line 17 is no functional command i know of, therefor the choice of
I believe that in bash and sh placing . (dot) followed by a space and
If tried (tested) that but if you have DESKTOP="KDE" in /etc/sysconfig/desktop and the original prefdm, than the loginscreen will be gdm and not kdm.
You have to do it exactly correct. "./xxx" won't work; "/xxx" won't work, it has to be exactly " . /xxx"
I wouldn't be surprised if the feature you mention existed, but it doesn't work like that on the redhat-pc's i've seen...
It's existed on Unix for many decades.
Here's an example from a 4.4 system showing how it works.
bash-3.00$ cat x VAR=changed bash-3.00$ echo $VAR
bash-3.00$ VAR=original bash-3.00$ echo $VAR original bash-3.00$ . x bash-3.00$ echo $VAR changed bash-3.00$ cat /etc/redhat-release CentOS release 4.4 (Final) bash-3.00$
So basically in the original, /etc/sysconfig/desktop consists of a line like DISPLAYMANAGER=KDE and the system works as expected.
Op vrijdag 16 maart 2007 23:51, schreef Stephen Harris:
On Fri, Mar 16, 2007 at 11:21:02PM +0100, Rody wrote:
Op vrijdag 16 maart 2007 23:04, schreef Andrew Bogecho:
After testing the beta of CentOS 5, i was a little surprised to notice that the display manager part of the prefdm file in /etc/X11 was exactly like in CentOS 4 / RHEL4 and previous versions including RH9.
17 . /etc/sysconfig/desktop
Line 17 is no functional command i know of, therefor the choice of
I believe that in bash and sh placing . (dot) followed by a space and
If tried (tested) that but if you have DESKTOP="KDE" in /etc/sysconfig/desktop and the original prefdm, than the loginscreen will be gdm and not kdm.
You have to do it exactly correct. "./xxx" won't work; "/xxx" won't work, it has to be exactly " . /xxx"
I wouldn't be surprised if the feature you mention existed, but it doesn't work like that on the redhat-pc's i've seen...
It's existed on Unix for many decades.
Here's an example from a 4.4 system showing how it works.
bash-3.00$ cat x VAR=changed bash-3.00$ echo $VAR
bash-3.00$ VAR=original bash-3.00$ echo $VAR original bash-3.00$ . x bash-3.00$ echo $VAR changed bash-3.00$ cat /etc/redhat-release CentOS release 4.4 (Final) bash-3.00$
So basically in the original, /etc/sysconfig/desktop consists of a line like DISPLAYMANAGER=KDE and the system works as expected.
Thanks for the extra info, it would seem that i was sortof misguided by incorrect use of the /etc/sysconfig/desktop file. I once tried DISPLAYMANAGER="KDM", but i realize now why that didn't work. ..
Regards,
Rody
On Sat, Mar 17, 2007 at 12:39:40AM +0100, Rody wrote:
Thanks for the extra info, it would seem that i was sortof misguided by incorrect use of the /etc/sysconfig/desktop file. I once tried DISPLAYMANAGER="KDM", but i realize now why that didn't work.
One downside of the current scheme is that there's no error checking for invalid values. If you've put something that isn't valid, it just fails without explaining.
Matthew Miller wrote:
On Sat, Mar 17, 2007 at 12:39:40AM +0100, Rody wrote:
Thanks for the extra info, it would seem that i was sortof misguided by incorrect use of the /etc/sysconfig/desktop file. I once tried DISPLAYMANAGER="KDM", but i realize now why that didn't work.
One downside of the current scheme is that there's no error checking for invalid values. If you've put something that isn't valid, it just fails without explaining.
This is the error checking in Nahant. Those are line numbers.
31 # Fallbacks, in order 32 exec gdm $* >/dev/null 2>&1 33 exec kdm $* >/dev/null 2>&1 34 exec xdm $* >/dev/null 2>&1 35
If none of those takes, you aren't going to get a GUI login.
On Sun, Mar 18, 2007 at 02:28:37PM +0900, John Summerfield wrote:
One downside of the current scheme is that there's no error checking for invalid values. If you've put something that isn't valid, it just fails without explaining.
This is the error checking in Nahant. Those are line numbers.
31 # Fallbacks, in order 32 exec gdm $* >/dev/null 2>&1 33 exec kdm $* >/dev/null 2>&1 34 exec xdm $* >/dev/null 2>&1 35
If none of those takes, you aren't going to get a GUI login.
Right, that's not checking for invalid values. It's just providing a fallback and crossing fingers.