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

Re: How to keep KDE at 3.5 in Sid installations.



On Sunday 24 May 2009 20:24:43 Alejandro Exojo wrote:
> El Miércoles, 20 de Mayo de 2009, David Baron escribió:
> > I am running Sid-installed kde4 and compiled kde3.5 with out a hitch. The
> > appropriate startkde scripts set env variables and /etc/profile sets
> > PATHs appropriately.
>
> Can you please give some information about how you did that? I know how to
> compile from source to a safe directory (I prefer $HOME/local), and then I
> can start apps and even the whole desktop, but only after manual tweaking
> of environment variables.
>
> How do you do to start a KDE 3 session from KDE 4's kdm?
>
> Thanks.
>
> --
> Alex

I modify the startkde script for the kde3 to set initial paths for the kde3 
and also an environmental variable. Here is a snippet, placed after testing 
for preexisting session:

# SET UP PATHS FOR KDE3.5:
export KDEDIR=/opt/kde3.5
export QTDIR=$KDEDIR
export 
PATH="/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/games"
export PATH=$KDEDIR/bin:$PATH
export LD_LIBRARY_PATH="/lib:/usr/lib:/usr/local/lib"
export LD_LIBRARY_PATH=$KDEDIR/lib:$LD_LIBRARY_PATH
export KDEHOME=$HOME/.kde3
export DESKTOP_SESSION=kde3


The kde4 startke sets DESKTOP_SESSION=kde4

Something like this use to be there in the distributed version, a while back.

/etc/profile tests that variable and sets paths accordingly so that kde3 
binary and library paths are ahead of the normal ones.

If this variable is not set, place them after the normal ones because I can 
still run many kde3 apps under kde4.

Here is the profile snippet:
if [ $DESKTOP_SESSION == "kde3" ]; then

#echo "KDE3.5 Session"

# SET UP PATHS FOR KDE3.5:
export KDEDIR=/opt/kde3.5
export KDEDIRS=$KDEDIR
export QTDIR=$KDEDIR
export PATH=$KDEDIR/bin:$PATH
export LD_LIBRARY_PATH=$KDEDIR/lib:$LD_LIBRARY_PATH
export KDEHOME=$HOME/.kde3

else

#echo "KDE4 Session"

# SET UP PATHS FOR KDE4:
export KDEDIR=/usr
export KDEDIRS=$KDEDIR:/usr/local
export QTDIR=/usr/lib/qt4
export PATH=$PATH:/opt/kde3.5/bin
export 
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/kde4:/usr/local/lib/kde4:/opt/kde3.5/lib
export KDEHOME=$HOME/.kde

fi

This is not perfect. If the DESKTOP_SESSION is not set at all, I get an error 
message from bash but it effects nothing.


The session lists for kdm will contain .desktop entries for both kde versions 
calling the appropriate startkde so I simply choose from the usual dropdown 
menu. The relevant entries are "Name" and any translations you want and "Exec" 
and "TryExec" which point to the desired startkde. Voile.

(Note that conforming to the packaged kde4 which now will use .kde, I moved 
the kde3 stuff to .kde3.)



Reply to: