LinuxQuestions.org
Visit Jeremy's Blog.
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 01-21-2007, 05:31 PM   #1
newbiesforever
Senior Member
 
Registered: Apr 2006
Distribution: not disclosing my distro
Posts: 2,223

Rep: Reputation: 98
one random wallpaper on startup?


In my distro, MEPIS, I see that KDE can make the desktop background a slideshow. That's nice, but is there any way it can give me one random background at startup, to remain in place until the next startup? If KDE can't do that by itself, is there any software out there that can?
 
Old 01-21-2007, 06:31 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 64
Been thinking about that trying a few things. So far most ideas fail. Now one idea I have and have not fully tried do to the fact I am terrible at things like sed and awk. The file that contains the background choice in is your home directory. ~/.kde/share/config/kdesktoprc. Now here is my idea.
If all the backgrounds were in a directory then with a script like this.
I would pull a list of the files with the ls command or maybe others and send the output to a txt file.
Then it will randomly select one of the files from that list. Of course I am sure it can select directly from the command and send to the correct location in one command sequence.
Now using awk and sed it knowing the correct line your wallpaper is, it would replace the one in ~/.kde/share/config/kdesktoprc file.

Now I think this needs to be run before KDE starts for the user. It can be run from the /etc/rc.local script.

It could be simliar to the scripts from the random theme script from here. http://www.kde-look.org/content/show.php?content=37061

Brian
 
Old 01-21-2007, 08:32 PM   #3
Sonneteer
Member
 
Registered: May 2006
Location: Canada
Distribution: Slackware 13.37; Ubuntu 12.04
Posts: 81
Blog Entries: 5

Rep: Reputation: 15
I think it would be easier if you used the DCOP calls that are available.
When the background is on slideshow, the command
Code:
dcop kdesktop KBackgroundIface changeWallpaper
will change it. So if you put your pictures in the slideshow set up, set that to random, and then set it to a large amount of time between changes, and have that dcop command in an executable file in ~/.kde/Autostart/. That's how I would do it anyway.
 
Old 01-22-2007, 04:17 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 64
I new there had to be a simply way. Never used dcop much so not familiar with it full potention. Will make a not of this. Let us now how well it works for you.

Brian
 
Old 05-30-2007, 01:11 PM   #5
javaunixsolaris
Member
 
Registered: Jan 2007
Location: Colorado
Distribution: Kubuntu
Posts: 48

Rep: Reputation: 15
Quote:
Originally Posted by Sonneteer
I think it would be easier if you used the DCOP calls that are available.
When the background is on slideshow, the command
Code:
dcop kdesktop KBackgroundIface changeWallpaper
will change it. So if you put your pictures in the slideshow set up, set that to random, and then set it to a large amount of time between changes, and have that dcop command in an executable file in ~/.kde/Autostart/. That's how I would do it anyway.
Thanks Sonneteer that's a suitable solution for my problem but I'm wondering how do I change the background when it's not on slideshow? I'm planning on writing a script that downloads a picture everyday and then sets my background to that picture; I don't really need slide show functionality, and I can't find the command to do it. (plus dcop doesn't have a man page).

Nevermind: http://www.linuxquestions.org/questi...50#post2768350

Last edited by javaunixsolaris; 05-30-2007 at 01:39 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to set wallpaper in fluxbox at startup? donJulio Linux - Software 8 08-20-2009 07:19 AM
Random sound error occurance at startup? cudmore Linux - Software 1 10-10-2006 06:40 AM
Random Wallpaper doublejoon Linux - General 2 01-11-2006 04:35 PM
random wallpaper changer for linux mlu Linux - Software 1 02-12-2005 12:12 AM
Random wallpaper for gnome?? fedorafreak Mandriva 1 09-07-2004 06:02 AM

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

All times are GMT -5. The time now is 09:19 AM.

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