[kde-solaris] Same KDE 3.1 Screen lock problem

LeBar, Russell J Russell.J.LeBar at erac.com
Wed Oct 29 10:37:05 CET 2003


The lock icon on kicker the desktop pop-up menu lock item both call $KDEDIR/bin/kdesktop_lock. So you can replace kdesktop_lock with your own wrapper script to do whatever you want (such as dealing with Sun Ray Mobile Users).

You can also create an xlock screensaver or even a fake one that runs e.g. utdetach (disconnects Sun Ray Mobile Sessions). 

Examples follow....


Replacement kdesktop_lock (originally written because kdesktop_lock would hang if the Sun Ray Mobile Session was already disconnected):

-----8<------------------------------------------------------------------------------
#!/usr/local/bin/perl
use strict; use warnings;

# Since all of our ICA clients are runnig under some other OS/desktop
# what is the point of running a screensaver in an ICA session!?!
exit 0 if exists $ENV{CITRIX_SESSION_ID};

#_SUN_SUNRAY_CONN_INFO(STRING) = "IX=0 AD=10.1.40.68 PN=53482 PAD=10.1.40.68 PPN=53482 LOC=1280x1024 at 0,0 MTU=1500"
#_SUN_SUNRAY_CONN_INFO(STRING) = "IX=0 AD= PN=-1 PAD= PPN=-1 LOC=1280x1024 at 0,0 MTU=1500"
if( exists $ENV{SUN_SUNRAY_TOKEN} ) {
        my $xprop = `/usr/openwin/bin/xprop -root _SUN_SUNRAY_CONN_INFO`;
        exit 0 if $xprop =~ /PN=-1 PAD= PPN=-1/; # Disconnected session so no need for a screensaver
        # Remove the next line to allow all Sun Ray session types to have screensavers
        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";
-----8<------------------------------------------------------------------------------




Creating your own screensaver: 

-----8<------------------------------------------------------------------------------
# cd $KDEDIR/share/applnk/System/ScreenSavers
# cat utdetach.desktop
[Desktop Entry]
Encoding=UTF-8
Exec=/opt/SUNWut/bin/utdetach
Icon=kscreensaver
Type=Application
Actions=Setup;InWindow;Root
Name=Sun Ray Mobile Session


[Desktop Action Setup]
Exec=/usr/bin/cat /dev/null
Name=Setup...
Icon=kscreensaver

[Desktop Action InWindow]
Exec=/usr/bin/cat /dev/null
NoDisplay=true

[Desktop Action Root]
Exec=/opt/SUNWut/bin/utdetach
Name=Display in root window
NoDisplay=true
-----8<------------------------------------------------------------------------------
 	
  _____  

Russ LeBar	
Enterprise Rent-A-Car	   	 Phone:	 314-512-3355	
Network Management System Administration	   	 Fax:	 314-512-6002	
UNIX System Administrator	   	 Pager:	 314-841-7565	
 	


> -----Original Message-----
> From: kde-solaris-bounces-+russell.j.lebar=erac.com at mail.kde.org
> [mailto:kde-solaris-bounces-+russell.j.lebar=erac.com at mail.kde.org]On
> Behalf Of Gene Siepka
> Sent: Wednesday, October 29, 2003 08:44
> To: kde-solaris at mail.kde.org
> Subject: Re: [kde-solaris] Same KDE 3.1 Screen lock problem
> 
> 
> Well that sucks... Especially since this came on a CD, in the 
> latest Solaris 9 
> bundle. I didn't compile anything, just ran the installer 
> from the CD. 
> 
> I tried turning off the setuid bit for kcheckpass, still no dice. 
> I also copied over the kcheckpass binary from an older 
> version of KDE (2.2 I 
> think, it came with the first Solaris 9 release) still nothing...
> 
> What does work, is removing the screen lock icon from the 
> kicker bar... 
> Creating your own icon, and pointing it to 
> /usr/openwin/bin/xlock   :) 
> Kind of a crappy work around, but better than every time you 
> lock your 
> desktop, having to ssh in from you pc and killing the 
> kdesktop-lock process.
> 
> -Gene
> 
> On Friday 24 October 2003 05:11 pm, Aaron Williams wrote:
> > I found several problems when I attempted to use kcheckpass 
> on Solaris.
> >
> > 1. I had to compile with PAM disabled.
> > 2. I had to turn off the setuid bit for kcheckpass (chmod 
> -s kcheckpass)
> >
> > This solved the problem in our environment, which uses NIS 
> for passwords.
> >
> > -Aaron
> >
> > Gene Siepka wrote:
> > >Hey kids... I just installed KDE from the Software 
> Companion CD that came
> > > in the Sol 9 08/03 dist.   Same thing is happening to me.
> > >
> > >I've been looking this up for the past 2 hours... I've 
> seen posts about
> > >differences between NIS domainnames and DNS domainnames...
> > >Ours are the same   tsg.cbot.com...
> > >
> > >One thing I saw recommended trying to run kcheckpass from the shell
> > > prompt. To see what happens...
> > >When I do, it prompts me for my password,<clickety click click>
> > >128 (/home/gsie44) shasta :]> kcheckpass
> > >Password:
> > >authentication failure for user gsie44 [uid 2358]
> > >
> > >I hope someone can figure this out... I'd be happy to try 
> something if any
> > > of you fruitcakes have any ideas!
> > >
> > >:)
> > >
> > >Thanks
> > >Gene R. Siepka


More information about the kde-solaris mailing list