Bug 355990 - kde4-kdm is ignored by /etc/init.d/xdm
Summary: kde4-kdm is ignored by /etc/init.d/xdm
Status: RESOLVED FIXED
: 356521 (view as bug list)
Alias: None
Product: openSUSE 10.3
Classification: openSUSE
Component: X.Org (show other bugs)
Version: Final
Hardware: i686 openSUSE 10.3
: P5 - None : Minor (vote)
Target Milestone: ---
Assignee: Stefan Dirsch
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-24 17:29 UTC by Eric Garreau
Modified: 2008-01-26 15:48 UTC (History)
2 users (show)

See Also:
Found By: Community of Practice
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
xdm.diff (714 bytes, patch)
2008-01-24 20:01 UTC, Stefan Dirsch
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Garreau 2008-01-24 17:29:57 UTC
Hi

although /usr/bin/kdm (KDE 4) has precedence over /opt/kde3/bin/kdm (KDE 3)
in the usual PATH, the Xorg startup file for "xdm" has a hard-coded 
reference to /opt/kde3/bin/kdm

I've searched too long, but all my (re)installations seem to provide the same
behaviour, whatever the order (xorg - KDE3 - KDE4)

I've added a KDE3->KDE4 precedence in /etc/init.d/xdm, allowing to have 
both all KDE 3 and 4 rpm files simultaneously on my host (I'll upgrade 
KDE4 every day), but only one of kde3-kdm or kde4-kdm in order to choose 
which KDE I'll start. (for convenience, I use KDE3 and /test/ KDE4...)




diff  -p  /etc/init.d/xdm  /etc/init.d/xdm.new
*** /etc/init.d/xdm     Wed Oct  3 12:42:21 2007
--- /etc/init.d/xdm.new Thu Jan 24 18:27:02 2008
*************** RELOADSIGNAL="-HUP"
*** 81,86 ****
--- 81,88 ----
  
  case "${DISPLAYMANAGER##*/}" in
      kdm|kde|KDM|KDE)   DISPLAYMANAGER=/opt/kde3/bin/kdm
+                        # hmmm, kde4 is under /usr/bin ;-)
+                        if [ ! -r "$DISPLAYMANAGER" ]; then DISPLAYMANAGER=/usr/bin/kdm; fi
                         PIDFILE="/var/run/kdm.pid"
                         ;;
      xdm)               DISPLAYMANAGER=$XDM_BIN
*************** case "${DISPLAYMANAGER##*/}" in
*** 94,103 ****
      console)           exit 0
                         ;;
      *)                         DISPLAYMANAGER=$XDM_BIN
                         if test -x /opt/kde3/bin/kdm; then
                                DISPLAYMANAGER=/opt/kde3/bin/kdm
                                PIDFILE="/var/run/kdm.pid"
!                        fi 
                         ;;
  esac
  test ! -x "$DISPLAYMANAGER" && DISPLAYMANAGER=$XDM_BIN
--- 96,109 ----
      console)           exit 0
                         ;;
      *)                         DISPLAYMANAGER=$XDM_BIN
+                        # keep KDE3 precedence over KDE4
                         if test -x /opt/kde3/bin/kdm; then
                                DISPLAYMANAGER=/opt/kde3/bin/kdm
                                PIDFILE="/var/run/kdm.pid"
!                        elif test -x /usr/bin/kdm; then
!                               DISPLAYMANAGER=/usr/bin/kdm; fi
!                               PIDFILE="/var/run/kdm.pid"
!                        fi
                         ;;
  esac
  test ! -x "$DISPLAYMANAGER" && DISPLAYMANAGER=$XDM_BIN
Comment 1 Stefan Dirsch 2008-01-24 18:11:27 UTC
Thanks for the patch. Coolo, which one should be preferred when both - KDE3 and KDE4 - are installed? With the current patch KDE3 is preferred.
Comment 2 Stephan Kulow 2008-01-24 18:30:21 UTC
I think KDE3 should stay preferred for now.
Comment 3 Stefan Dirsch 2008-01-24 20:01:58 UTC
Created attachment 191741 [details]
xdm.diff
Comment 4 Stefan Dirsch 2008-01-24 20:09:48 UTC
fixed for STABLE/Factory.
Comment 5 Stephan Binner 2008-01-26 15:48:37 UTC
*** Bug 356521 has been marked as a duplicate of this bug. ***