[kde-solaris] KDE under Sun RAY

LeBar, Russell J Russell.J.LeBar at erac.com
Fri Feb 16 00:23:50 CET 2007


> -----Original Message-----
> From: Roland Kaeser [mailto:roland.kaeser at math.unizh.ch] 

I'm using a self-compiled 3.2.2 here with Sun Rays (using mobile
sessions) and with MetaFrame for UNIX 1.2.

> First: How can we integrate the utx-lock and the SUN-Ray 
> mobile sessions into the kde environment? It works on JDS. 
> But we couldn't get it working on KDE after reading all 
> avialable docs and mailing list entries for that problem.

I don't use utxlock. Instead I run utdetach. Basically, I copy
$KDEDIR/bin/kdesktop_lock to kdesktop_lock.orig and then use a wrapper
script. Below is an untested trimmed down version (e.g. no ICA client

use strict; use warnings;
PAD= PPN=53482 LOC=1280x1024 at 0,0 MTU=1500"
LOC=1280x1024 at 0,0 MTU=1500"
#_SUN_SUNRAY_CONN_INFO:  no such atom on any window.
if( exists $ENV{SUN_SUNRAY_TOKEN} ) {
        my $xprop = `/usr/openwin/bin/xprop -root
        exit 0 if $xprop =~ /PN=-1 PAD= PPN=-1/; # Disconnected session
so no need for a screensaver
        exec '/opt/SUNWut/bin/utdetach' if( $ENV{SUN_SUNRAY_TOKEN} =~
/(^auth\.)|(^escape\.)/ );
# Okay then lets go ahead and run the real kdesktop_lock
exec "$ENV{KDEDIR}/bin/kdesktop_lock.orig --forcelock";

> Second: We have some problems getting the "normal" konsole 
> behaviour working on the KDE konsole. Specially the CTRL+C 
> key and colors in ls lists seems not to work correct.

Not having issues with this. Do you have pseudo color enabled? Here are
my default utxconfig settings:

# utxconfig -l -a

> Fourth: Just nice to have. Does somebody know how to activate 
> the icon smoothing? Currently the icons looks a bit pixeling.

Do you mean icons or fonts? If fonts then I think you need Solaris 9 or
higher for font smoothing.

> Third: Is there a good documentation for predefining kde user 
> settings for our productive environment such as the kde menu, 
> file associations, screensaver behaviour (utxlock), disabling 
> special features such as transparency. We tried already the 
> kiosk-tool but it seems that this was optimized for linux so 
> it doesn't lets us define the profiles correctly and often crashes.

We started using KDE back in the 1.x days so I use the old-style menu
system. But before going into that.....

KDE lets you provide multiple collections of settings to use via
$KDEDIRS (note the 'S'). In our environment a Sun Ray user would have
the following $KDEDIRS:  /erac/kde/screensaver:/erac/kde/all:$KDEDIR.
The /erac/kde part can be anything. The "screensaver" directory applies
our screensaver policy (kicks the screensaver off after 30 minutes which
as indicated above actually causes utdetach to run). The "all" directory
contains the settings all users get. And $KDEDIR is where KDE is
installed so this just adds the default settings to the list. Precedence
is left to right (just keep in mind that kiosk mode settings have higher
precedence then non-kiosk modes ones).

Here is what /erac/kde/screensavers looks like:

# find /erac/kde/screensaver -exec ls -AFd {} \;

# cat /erac/kde/screensaver/share/config/kdesktoprc

The [$i] makes that setting mandatory (kiosk mode in KDE is using [$i]
and [$e] or both).

So basically what you do is create a directory that you want to contain
your settings. You need to follow the same structure as $KDEDIR uses
which means you need a share directory and then create directories under
that as needed.

Using another real example, here is a snippet of what /erac/kde/all
looks like:

# find /erac/kde/all -exec ls -AFd {} \;
/erac/kde/all/share/applnk/Your Company Name Here/
/erac/kde/all/share/applnk/Your Company Name Here/Help/
/erac/kde/all/share/applnk/Your Company Name
/erac/kde/all/share/applnk/Your Company Name Here/Help/.directory
/erac/kde/all/share/applnk/Your Company Name Here/Help/pager.kdelnk
/erac/kde/all/share/applnk/Your Company Name Here/More Programs/
/erac/kde/all/share/applnk/Your Company Name Here/More
/erac/kde/all/share/applnk/Your Company Name Here/More
/erac/kde/all/share/applnk/Your Company Name Here/More
/erac/kde/all/share/applnk/Your Company Name Here/More
/erac/kde/all/share/applnk/Your Company Name Here/.directory
/erac/kde/all/share/applnk/Your Company Name Here/nms-proxy.kdelnk
/erac/kde/all/share/applnk/Your Company Name Here/netscout.kdelnk
/erac/kde/all/share/applnk/Your Company Name Here/vitalsuite.kdelnk

# cat /erac/kde/all/share/applnk/Your Company Name Here/More
[Desktop Entry]
Comment=Adjust your Sun Ray settings
Name=Sun Ray Settings

Back to your question about menus, anything under applnk will become a
new sub-menu in the KDE menu. 

You can also add other settings or override application files. For
example when users run kworldclock here
/erac/kde/all/share/apps/kworldclock/zone.tab is the file used for
Latitude/Longitude coordinates instead of the one under
$KDEDIR/share/config/apps/kworldclock (for the curious, I added St.
Louis to the file).

To get this to take effect I use a wrapper script for startkde. Here's
an untested trimmed down version (again, no ICA cleint settings). Note:
I have a lot of extra PATH and LD_LIBRARY_PATH stuff set up under tcsh
which is why I use it to launch KDE. You'll need to modify Xresources to
call the wrapper script instead of $KDEDIR/bin/startkde.

use strict; use warnings;
my @batch;

# Sun Ray Audio & Hotkeys
if( exists $ENV{SUN_SUNRAY_TOKEN}) {
    $ENV{AUDIODEV} = `/opt/SUNWut/bin/utaudio`; # Enable audio
    push @batch, '/opt/SUNWut/lib/utslaunch &'; # enable Run Ray hotkeys

# Initialize Environment Variables
$ENV{QTDIR}     = '/usr/local/qt-x11-free-3.3.1';
$ENV{KDEDIR}    = '/usr/local/kde322';
$ENV{KDEDIRS}   = "/erac/kde/all:$ENV{KDEDIR}";

# Take care of some special and normal user settings
my  $username = getpwuid $<;

# For the plasma screen in the NOC
if( $username eq 'plasma' ) {
    $ENV{KDEDIRS} = "/erac/kde/plasma:$ENV{KDEDIRS}";

# Force an idle timeout for normal users (as per management request)
if( ! exists $special_user{$username} ) {
    $ENV{KDEDIRS} = "/erac/kde/screensaver:$ENV{KDEDIRS}";

# Reconfigure X-windows font path
# push @batch, 'xset fp default';  # You may or may not want to do this
push @batch, "xset +fp $ENV{KDEDIR}/share/fonts";
push @batch, 'xset fp rehash';

# Create session management dir if it does not exist 
# (doing this so I can control the permissions on it)
# Note: Might also want to create a cronjob for this
if( ! -e '/tmp/.ICE-unix' ) {
    mkdir '/tmp/.ICE-unix';
    chmod 0777, '/tmp/.ICE-unix';

# Launch KDE
push @batch, "$ENV{KDEDIR}/bin/startkde";
my $cmd = join '; ', @batch;
print "$cmd\n" if exists $ENV{DEBUG};
exec "/usr/bin/tcsh -c \"$cmd\"";


Hope that helps and is not too confusing!!

-- Russ

More information about the kde-solaris mailing list