LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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 11-23-2005, 08:09 PM   #1
Corporal
LQ Newbie
 
Registered: Oct 2005
Location: Canada
Distribution: A Highly Modded Version of Mepis
Posts: 9

Rep: Reputation: 0
An animated KDE background


Is it possible to create an animated background in KDE, from perhaps a screensaver or something else? I know that it is possible to run the old X screensavers on the root window, but kdesktop covers that up, making it very impractical to use. So, I'm wondering, is there any way to make the actual KDE desktop animated (and look pretty at the same time)?
 
Old 11-23-2005, 08:43 PM   #2
Brian1
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: 61
I have seen something like this before. I cannot for the life of me find it. If I remember correctly it talked about using mplayer to put the video on the background layer. I tried it but never could get it to work. The default background needs to be a blank screen and I guess it means a solid color. From your post it sounds about the same. I would like to be able to do it myself. If you figure it out or find the post I am talking about please post a link here to it. The article steps says kde as the gui. I think the video played because I heard sound but never seen video. It seemed to be behind the background which was a plain color at the time. Just could not figure out how to get rid of the background. There might be so documention in mplayer about the available switches it uses.

I would be curious to know how the old Xscreensaver can run on the root window. Is there a website with info on it and if so where?

Hope this helps.
Brian
 
Old 11-23-2005, 09:14 PM   #3
Corporal
LQ Newbie
 
Registered: Oct 2005
Location: Canada
Distribution: A Highly Modded Version of Mepis
Posts: 9

Original Poster
Rep: Reputation: 0
Well, to run a Xscreensaver in the root window, all you have to do is start the xscreensaver daemon (if you don't have it running already), go to /usr/lib/xscreensaver/ , and run <name of screensaver> with the "-root" switch. Doing that puts it in the root window. However, as mentioned above, Kdesktop covers up the root window, so if you've got that running, trying to do this will be pointless. I don't think there is a single website for info on it; I got the idea from reading up on some really old (as in before Kdesktop was even implemented) KDE FAQ. Here's the URL: http://sunsite.bilkent.edu.tr/pub/li.../kdefaq-6.html

Some bad news, though: According to a KDE developer, 'linking' a screensaver to the desktop is not coded into KDE yet, nor "will we see such a feature for a long time." But, fortunately, KDE is open-source, so it wouldn't be hard to write a program to do this. I'm not much of a Linux programmer myself, yet, but if someone does take this more-or-less daunting task upon themself, please do let us know!

And, hey, didn't the Linux kernel start off simply because the developers weren't listening...?
 
Old 11-24-2005, 04:56 PM   #4
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
You can have a vid as your root desktop, all you need is Mplayer.
(Sort of)

A command could be:

mplayer -zoom -fs -nosound /home/foo/video.avi -rootwin

You could replace the video with a TV capture or
an internet stream.

This is a generic setup for plain X.
Of course we all run window managers and desktop environments
and what not and they tend to get in the way of the root window.

So far I have only gotten this working with KDE, and it's
not yet perfect.

For KDE:

Right click on the desktop and select "Configure Desktop".
On the left, select "Behavior".
Make sure you check "Allow programs in desktop window", then
uncheck "Show icons on desktop".

http://pg.photos.yahoo.com/ph/johnve...e2.jpg&.src=ph

You will not have Icons on your desktop with this setup, so
put everything you want in the kicker.

Now on the left, select "Background".
For your background select "No picture".

http://pg.photos.yahoo.com/ph/johnve...e2.jpg&.src=ph

On the right (under the picture of a monitor) select
"Advanced Options"

From here, check "Use the following program for drawing the
background".

http://pg.photos.yahoo.com/ph/johnve...e2.jpg&.src=ph

On the right, select "Add".
Here you can give the thing a name, a command, the executable,
and set the refresh time.

http://pg.photos.yahoo.com/ph/johnve...e2.jpg&.src=ph

select a couple "OK"'s, an "Apply", restart X and you're golden.

I mentioned before that this is not perfect. The problem
is the "Refresh time".
It can be set from 5min to 60min, in 5min increments.
Whenever the desktop refreshes though, Mplayer gets all
mucked up. It seems to be restarting the stream without
stopping the previous.
I don't think you can tell Mplayer to play for an amount
of time. (00:59:59 for example)
I also don't know if it can be set to allow only one instance.
Perhaps I need to write a script using some scheduler or
another to time Mplayer, then put it as the "command" in
the "Configure Background Program" dialog.

Of course I'm just some "shmooze" and not real handy at writing scripts,
so if anyone has a better idea, feel free to give your two cents!

Here's a screenie of it in action:

http://pg.photos.yahoo.com/ph/johnve...e2.jpg&.src=ph

You will recognize the movie as the great hero epic -

"Santa Clause Conquers the Martians" !

Perhaps some of this info will help you get a screensaver going
as the root window. Fireworks would be nice!

EDIT...EDIT...EDIT...

I have this working well on my machine!!!
See below !!!

Last edited by auditek747; 11-25-2005 at 02:04 AM.
 
Old 11-25-2005, 01:53 AM   #5
auditek747
Member
 
Registered: Feb 2004
Location: Ohio, USA
Distribution: Arch Linux
Posts: 464

Rep: Reputation: 30
Well, time to show my true Shmooze colors!

I wrote a simple script to stop mplayer two seconds before
the desktop background program refreshed.
(with refresh set to 5min)

Code:
#!bin/sh
mplayer -zoom -fs tv://46 -tv driver=bsdbt848:noaudio:input=1:norm=ntsc:chanlist=us-cable:width=320:height=240 -rootwin &
sleep 298
killall mplayer
Mplayer would stop after 298 seconds, but sometimes it would start up
two seconds later and sometimes it would'nt.
Sometimes it would restart and cpu usage would jump to 100% and
stay there.

It turns out I was making things harder than they needed to be.
The whole part about going to the "Advanced" section and using a
program to draw the background is not necessary.

This is the revised setup I'm using to get Mplayer in the root window
of my KDE box.

Right click on the desktop and select "Configure Desktop".
On the left, select "Behavior".
Make sure you check "Allow programs in desktop window", then
uncheck "Show icons on desktop".

http://pg.photos.yahoo.com/ph/johnve...e2.jpg&.src=ph

You will not have Icons on your desktop with this setup, so
put everything you want in the kicker.

Now on the left, select "Background".
For your background select "No picture".
In the "Options" dialog, for "Colors", select "Single Color".

http://pg.photos.yahoo.com/ph/johnve...e2.jpg&.src=ph

That should be all there is to it.
You can now start mplayer with the options you wish, with
-rootwin at the end.
Here's mine for TV channel 46:

Code:
mplayer -zoom -fs tv://46 -tv driver=bsdbt848:noaudio:input=1:norm=ntsc:chanlist=us-cable:width=320:height=240 -rootwin
You could also play a vid using the "-loop" option.

Code:
mplayer -zoom -fs -nosound -loop 0 /home/foo/vid.avi -rootwin
I think would be right.


You can't separate it from your term by using "&", so to keep from having
an unusable term open all the time I'm using the KDE "Run" dialog from the Kmenu.

I know this doesn't get you a screensaver on the desktop, but
maybe the info will be of use.

It taught me that TV or a movie on as the desktop is boring
without sound and anoying with sound.

I need to find a long video or a live stream of snow falling in the
country, a fishtank, or girls on the beach. You know, something soothing.
 
Old 11-27-2005, 01:36 AM   #6
Corporal
LQ Newbie
 
Registered: Oct 2005
Location: Canada
Distribution: A Highly Modded Version of Mepis
Posts: 9

Original Poster
Rep: Reputation: 0
Thanks for the info! I suppose if, somehow, the screensaver was running constantly and was being streamed from another computer (or loopbacked somehow...), then I this would work perfectly! Although writing a hack for Kdesktop that just redirects graphics from the root window would be simpler, I'm not skilled enough to do it. But still, thanks for the help!
 
Old 11-28-2005, 06:06 PM   #7
Brian1
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: 61
Great reading, when I have time I will give it a try.

Brian1
 
Old 01-15-2008, 01:10 AM   #8
Blackhawkckc
Member
 
Registered: Oct 2004
Location: Grand Rapids, Mi
Distribution: Mandriva 2009 beta
Posts: 88

Rep: Reputation: 15
Its been a LONG time since this was posted, but hey.. why not

You can run a video background, complete with icons on your screen.

This is easily possible if you have xwinwrap and mplayer installed. Try running "xwinwrap -ni -o 0.3 -fs -s -st -sp -b -nf -- mplayer -wid WID -quiet -vo gl2 -ao alsa '/path/to/mpeg.mpg' -loop 0"

Set your background so its black (or white) before you run that. It looks a lot better, otherwise the mpeg runs on top of your default background image.
 
Old 01-15-2008, 01:39 PM   #9
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 292Reputation: 292Reputation: 292
If you xscreensaver installed you can get a screensaver background by e.g.

'/usr/libexec/xscreensaver/glmatrix -root'
 
  


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
KDE Autologin Background tonhou Mandriva 3 10-10-2005 10:09 PM
lilo animated boot screen background longnam Slackware 2 04-15-2005 05:56 AM
In KDE, aterm uses GNOME background rather than KDE background for transparent backgr cpbl Linux - Software 4 01-01-2005 10:26 PM
Animated JIF's to animated MNG's WarlockofVirgo Linux - General 1 08-16-2004 09:39 PM
Setting up an animated .gif background in X/blackbox DEADh Linux - Newbie 2 08-13-2003 08:56 AM


All times are GMT -5. The time now is 03:54 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration