how to set kde timeout
/usr/share/config/kdesktoprc:
[ScreenSaver][$i]
Saver=kAutoLogout.desktop
Timeout=86400 #seconds: 24hrs
Enabled=true
/usr/share/applnk/System/ScreenSavers/kAutoLogout.desktop:
[Desktop Action Setup]
Exec=kde_logout.kss -setup
Name=Display setup dialog
NoDisplay=true
kde_logout.kss: binary file compiled source:
#include "stdlib.h"
#include "stdio.h"
#include "unistd.h"
#include "sys/types.h"
#include "signal.h"
int main(void)
{
int buffersize=64;
int counter=0;
int string_still_valid=1;
char buffer[64]; /* large enough to hold a pid */
char buffer2[64];
buffer2[0];
char character=0;
FILE * pFile;
long int gdmPID=0;
int result=0;
printf("Real UID\t= %d\n", getuid());
printf("Effective UID\t= %d\n", geteuid());
printf("Real GID\t= %d\n", getgid());
printf("Effective GID\t= %d\n", getegid());
pFile = fopen ( "/var/run/gdm.pid" , "ro" );
if ( (long int) pFile < character="buffer[counter];"> 47 && character < string_still_valid ="="" string_still_valid="0;" gdmpid="atol(buffer2);"> 100)
{
printf ("Sending PID %d a HUP (%d) signal...\n",gdmPID,SIGHUP);
result=kill (gdmPID,SIGHUP);
printf ("Got result code %d from kill call\n",result);
}
else
{
printf ("Taking no action -- don't feel safe trying to kill a PI
D <>
[ScreenSaver][$i]
Saver=kAutoLogout.desktop
Timeout=86400 #seconds: 24hrs
Enabled=true
/usr/share/applnk/System/ScreenSavers/kAutoLogout.desktop:
[Desktop Action Setup]
Exec=kde_logout.kss -setup
Name=Display setup dialog
NoDisplay=true
kde_logout.kss: binary file compiled source:
#include "stdio.h"
#include "unistd.h"
#include "sys/types.h"
#include "signal.h"
int main(void)
{
int buffersize=64;
int counter=0;
int string_still_valid=1;
char buffer[64]; /* large enough to hold a pid */
char buffer2[64];
buffer2[0];
char character=0;
FILE * pFile;
long int gdmPID=0;
int result=0;
printf("Real UID\t= %d\n", getuid());
printf("Effective UID\t= %d\n", geteuid());
printf("Real GID\t= %d\n", getgid());
printf("Effective GID\t= %d\n", getegid());
pFile = fopen ( "/var/run/gdm.pid" , "ro" );
if ( (long int) pFile < character="buffer[counter];"> 47 && character < string_still_valid ="="" string_still_valid="0;" gdmpid="atol(buffer2);"> 100)
{
printf ("Sending PID %d a HUP (%d) signal...\n",gdmPID,SIGHUP);
result=kill (gdmPID,SIGHUP);
printf ("Got result code %d from kill call\n",result);
}
else
{
printf ("Taking no action -- don't feel safe trying to kill a PI
D <>
Labels: autologout, desktop, kde, RGS

0 Comments:
Post a Comment
<< Home