issues in using KDE as window manager

Giorgos Petasis petasis "at" iit.demokritos.gr
Thu, 11 Mar 1999 07:15:41 +0000


--Boundary-=_MbrasQlHjZcHeLVQphzlGNMbemlr
Content-Type: text/plain
Content-Transfer-Encoding: 8bit

In Wed, 10 Mar  1999, Mike Miller wrote:
> On Wed, 10 Mar 1999, Giorgos Petasis wrote:
> 
> > I have been using KDE under Vnc on Solaris 2.6 for about 1 year, and
> > I can possible provide some help on this matter.
> > First of all, you said that you downloaded some packages for Solaris,
> > so I assume that you are using KDE 1.0. (I haven't heard about
> > packages for KDE 1.1. Currently, I am using KDE 1.1...)
> 
> I seem to have 1.1.  It looks like it just came out (3 weeks ago, maybe).
> I found the Solaris packages here:
> 
> ftp://ftp.kde.org/pub/kde/stable/1.1/distribution/pkg/
> 
> I'm using the Solaris 2.6 Sparc package.
Yes, indeed there exist packages for KDE 1.1.

> > My current vnc configuration is somewhat more complicated: When Vnc
> > starts, It displays a selection window (script implemented in tcl/tk)
> > from where the user can select what session to launch among KDE, CDE
> > and Openwindows. Then it succesfully starts the selected session.
> > Both KDE and CDE run without any problems under Vnc. The only problem
> > with the Openwindows session is the absence of Adobe Postscript
> > Display driver form the vnc Xserver (Xvnc) which prevents some
> > applications (notably the ones that treat documentation..) from
> > running. If anybody has a solution, or if anybody want any of these
> > scripts, I am glad to provide them.
> 
> That brings up an interesting question.  Wouldn't it be very easy to edit
> the vncserver script so that one might choose an xstartup file from one of
> several stored in the vncUserDir as follows
> 
> vncserver -xstartup xstartkde :7
> or
> vncserver -xstartup xstartcde :7
> 
> Having looked at the script, I think I could do it, but I'm afraid I'd
> make some kind of mistake.  I might try anyway, but if someone out there
> who is more confident could do it, all the better for everyone.
> 
> I'd like to have your tcl/tk script.  I have tcl/tk installed on my
> system, but I have never used it.  Changing the vncserver script as I
> recommended above would have the advantage that tcl/tk would not be
> needed.
I have attached two files:
1) StartSession: a ksh script that accepts 1 argument, the type of session to
    start. The arguments can be one of the following:
       failsafe FailSafe kde KDE Kde cde CDE Cde openwin openwindows OpenWin
       OpenWindows homesession HomeSession 
    When no argument, defaults to failsafe, and when anything else, defaults
    to an xterm and twm :) This script is very usefull except VNC and under
   KDM, which enable users to select the session of preference. Before using
   this script, edit it to change the variables KDEDIR, QTDIR and
   LD_LIBRARY_PATH to the proper values.

2) ChooseDesktop: a tcl/tk ( wish 4.1 or greater) script, which displays a
     window with 3 buttons, which start KDE, Open Windows or CDE. Internally,
     it calls StartSession with the proper argument. Edit this script, for
     removing (or changing) the additional font paths that are added to the
     Xserver font path and for changing the location of the StartSession
     script. Really, it is a very simple script and easy to modify...
 
> > One final question: In the KDE Solaris packages, are you able to open
> > *.tar.gz files with the window manager? I mean, if you click on
> > them, did you get the contents or just an empty window???
> 
> (I assume you mean the file manager.)  I hadn't tried it until now.  The
> answer is, the file manager window goes blank and no other window opens
> up.  When I click on a *.txt.gz file, a text editor window pops up and
> displays the text.  So it does automaticall gunzip on the fly but it
> doesn't automatically tar tf.  I don't really care that much, but it would
> be nice.  Is there anything I can do about it?

Yes, I mean in the file manager. The reason, as I discovered yesterday, is
that the file manager spans gzip or tar as external commands (originally I
thought that uzipping or untaring capabilities exist in the kfm itself...)
What I did, was replacing the Solaris tar command with GNU tar. Now kfm can
open *tar.gz files. Its an interesting approach, because if you click on a
tar or on a tar.gz file, kfm displays its contents as if they were actual
files in the disk. You can view, drag, copy and paste them to other windows,
or you can extract a single file. Impressing :)

Best Regards,
George.


--Boundary-=_MbrasQlHjZcHeLVQphzlGNMbemlr
Content-Type: application/x-shellscript;
  name="StartSession"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="StartSession"

#!/bin/ksh

# redirect errors to a file in user's home directory if we can
#for errfile in "$HOME/.xsession-errors" "${TMPDIR-/tmp}/xses-$USER" "/tmp/xses-$USER"
#do
#	if ( cp /dev/null "$errfile" 2> /dev/null )
#	then
#		chmod 600 "$errfile"
#		exec > "$errfile" 2>&1
#		break
#	fi
#done

windowmgr=${1-failsafe}

#start the respective window manager
case $windowmgr in
	failsafe|FailSafe)
	        XsessionCommand="/bin/ksh /usr/dt/config/Xfailsafe"
		;;
	kde|KDE|Kde) 
	        LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib:/usr/openwin/lib:/usr/local/lib:/disk2b/local/kde1.1/lib:/disk2b/local/lib:/disk2b/local/kde/lib:/disk2b/local/qt/lib:/usr/java/lib:/usr/dt/lib"
		export LD_LIBRARY_PATH
		KDEDIR=/disk2b/local/kde1.1
		export KDEDIR
		QTDIR=/disk2b/local/qt
		export QTDIR
		XsessionCommand="/disk2b/local/bin/StartKde"
		;;
	cde|CDE|Cde)
	        XsessionCommand="/usr/dt/bin/Xsession"
		;;
	openwin|openwindows|OpenWin|OpenWindows)
	        OPENWINHOME=/usr/openwin
		export OPENWINHOME
	        XsessionCommand="/bin/ksh /usr/dt/config/Xinitrc.ow"
	        ;;
	homesession|HomeSession)
	        XsessionCommand="$HOME/.xsession"
		;;
	*) 
		xterm -geometry 80x24-0-0 &
	        XsessionCommand="twm"
		;;
	
esac

#
# Laod resources
#

if [ -f $HOME/.Xmodmap ]; then
   xmodmap $HOME/.Xmodmap
fi

if [ -f $HOME/.Xdefaults ]; then
   xrdb -merge $HOME/.Xdefaults
fi

if [ -f $HOME/.Xresources ]; then
   xrdb -merge $HOME/.Xresources
fi

# Start the Selected Window Manager
exec $XsessionCommand

--Boundary-=_MbrasQlHjZcHeLVQphzlGNMbemlr
Content-Type: application/x-shellscript;
  name="ChooseDesktop"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="ChooseDesktop"

#!/bin/sh
# exec wish \
exec wish -f "$0" "$@"

## Edit this line to point to the location of the StartSession script
set StartSession /disk2b/local/bin/StartSession

# This function adds Additional fonts to the X server font path
proc AdditionalFonts { } {
  exec xset +fp /disk2b/local/kde/FontsGreek
  exec xset  fp rehash &
  exec xrdb -merge -nocpp /disk2b/local/kde/FontsGreek/GRMosaic &
}

proc CDE { } {
  AdditionalFonts
  exec $StartSession CDE &
  exit 0
}

proc KDE { } {
  AdditionalFonts
  exec $StartSession KDE &
  exit 0
}

proc OpenWin { } {
  AdditionalFonts
  exec $StartSession OpenWindows &
  exit 0
}

frame  .b
button .b.cde -text " Start  CDE \n ( Common Desktop Environment ) " \
       -command "CDE"
button .b.kde -text " Start  KDE \n ( K Desctop Enviroment ) " \
       -command "KDE"
button .b.op -text " Start  Openwindows \n ( Plain X Windows Desctop ) " \
       -command "OpenWin"
button .exit -text " Exit " -command "exit -1"
pack .b.op -side left -padx 20 -pady 20
pack .b.kde -side left -padx 20 -pady 20
pack .b.cde -side left -padx 20 -pady 20
pack .b -fill x
pack .exit -side bottom -padx 20 -pady 20
tkwait window .

--Boundary-=_MbrasQlHjZcHeLVQphzlGNMbemlr--

---------------------------------------------------------------------
The VNC mailing list - see http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------