LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-30-2006, 06:09 PM   #1
Kanaflloric
Member
 
Registered: Jun 2004
Location: Canada
Distribution: Slackware 10.0
Posts: 80

Rep: Reputation: 15
starting xscreensaver daemon auto


Hi.

I want xscreensaver to start automatically when KDE starts. I tried $xscreensaver -no-spalsh & in .xinitrc, but it seems to be a bad idea, because the screensaver don't start.

Is there something somewhere to tell KDE to start it automatically ?

thanks
 
Old 07-30-2006, 07:11 PM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: OpenBSD, Debian, FreeBSD
Posts: 1,450

Rep: Reputation: 48
Well, first, did you have the $ in front of xscreensaver? Because that will make it a null command and it won't do anything. Actually, it will tell the shell to see xscreensaver as a variable and execute the command in it... since there is no command it will be nothing at all and try to execute the arguments which isn't a valid command. Needless to say, this isn't what you intended.

But second, are you sure kdm is processing your .xinitrc (or .xsession) file? I've found in the past that it's often not the case.

Put the following:
Code:
#!/bin/sh
xscreensaver -no-splash &
in ~/.kde/Autostart/screensaver (don't worry if the file doesn't exist... you're going to create it) and then do
Code:
chmod +x ~/.kde/Autostart/screensaver
And you should be set.

Edit: As an explanation, kde looks for scripts in $HOME/.kde/Autostart/ when it loads and if it finds any, it executes them. So we just created a simple script to fire off your screensaver when you log in. You can use the same method to start other programs you want running in the background or even ones which spawn windows (like firefox) although I think there should already be an option for those sorts of programs when you edit the menus.

Last edited by frob23; 07-30-2006 at 07:15 PM.
 
1 members found this post helpful.
Old 07-31-2006, 04:32 PM   #3
Kanaflloric
Member
 
Registered: Jun 2004
Location: Canada
Distribution: Slackware 10.0
Posts: 80

Original Poster
Rep: Reputation: 15
Great ! it works.

Thanks
 
Old 01-24-2011, 05:15 PM   #4
landonmkelsey
Member
 
Registered: Jul 2001
Location: Texas
Distribution: Fedora 16
Posts: 323

Rep: Reputation: 37
suddenly as of Fedora 14 kde screensaver not starting

in

/etc/xdg/xfce4/xinitrc

the following exists:

# Launch xscreensaver (if available), but only as non-root user
if test $UID -gt 0 -a -z "$VNCSESSION"; then
if test x"`which xscreensaver 2>/dev/null`" != x""; then
xscreensaver -no-splash &
elif test x"`which gnome-screensaver 2>/dev/null`" != x""; then
gnome-screensaver &
fi
fi

Maybe I need a
elif test x"`which kde=xscreensaver 2>/dev/null`" != x""; then
kde-xscreensaver -no-splash &

How does one tell which screensaver one has?

ps -ef|grep -i screensav
qt4 3271 1 0 16:01 ? 00:00:07 xscreensaver -nosplash
qt4 6901 2944 0 17:16 pts/2 00:00:00 grep --color=auto -i screensav

screen saver is running correctly having started it when I get the error message that the screensaver is not running

Last edited by landonmkelsey; 01-24-2011 at 05:18 PM.
 
1 members found this post helpful.
  


Reply

Tags
autostart, kde, xscreensaver



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xscreensaver daemon stops doralsoral Linux - Software 1 12-25-2006 12:16 PM
Xscreensaver daemon 4.21 - will not start spaceballs Slackware 6 04-08-2005 08:56 AM
Where to put xscreensaver to launch as daemon chrisk5527 Linux - General 2 05-18-2004 11:01 PM
xscreensaver: how do I stop it from starting PionexUser Linux - General 9 09-14-2003 11:00 PM
help starting xscreensaver at bootup rose_bud4201 Linux - Software 2 01-10-2003 06:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration