{April 29, 2008}   plasma and the screensaver

so, this summer I’m gonna be putting plasma widgets on the screensaver. oh god, what have I got myself into?!

it’s gonna be pretty awesome… it just might take a few rather ugly hacks to get past X weirdness.

let’s start by quoting the scenarios from my soc proposal:

Amy wants to take her laptop to her lectures to play nethack — uh, I mean, take notes. She gets to class, unhibernates her laptop – then discovers she forgot to pause her music. Her laptop has no hardware volume control and the screen is locked, but since she always has a volume control on her screensaver, she reaches the mute button before anyone gets too annoyed.

Amy leaves to find a bathroom, and while she’s gone Bob leans over to see what’s on her computer. The screen is locked, so he can’t do any damage, but he leaves a rude message on the Notes widget anyways. Amy comes back and rolls her eyes at Bob’s bad spelling.

It’s the weekend, and Amy is having a party. She has all her music on her computer, and wants her friends to be able to pick songs, but doesn’t want Bob putting up nasty images like he did on Cory’s computer. She loads up the ‘party’ widgets she saved before, with a music widget and a few other toys, then leaves the screen locked.

Amy and her friends decide to go out for dinner. A few minutes after they leave, Amy’s roommate Dan comes home to find the music still blaring. He hits the stop button on the music widget, then logs into his own account and starts playing his own music.

so, what we’re going to have is basically a three-layer screensaver: layer 1 is the actual screensaver – the pretty animation. layer 2 is plasma – the widgets. layer 3 is the lock process – the bit that quietly makes sure the screen stays locked, offers a dialog to unlock it, and does some other invisible tie-things-together stuff. layer 2 is the only new bit here, of course.

naturally, there are some security concerns about putting something interactive on a locked screen. since something like this will never be 100% foolproof, it’ll be opt-in, and I’ll be making it as secure as it can reasonably be. plasma, like screensavers, will run in a separate process in case it crashes. plasma will be locked and unconfigurable unless the user enters their password to go into edit-mode. widgets will be tweaked to be aware of security restrictions and reduce their functionality when on the screensaver, then put on a whitelist, so users can only add safe plasmoids from the gui.

all this security infrastructure should end up helping plasma in general, and kiosk mode: when I’m done there should be a nice simple way for plasmoids to check what sort of features they should offer, and stay out of trouble. of course, bugs will happen – but that’s always a risk in any software.

unfortunately, the security also makes my life more difficult: running plasma out-of-process means *pain* in terms of both display and input. display was going to be a pain anyways – it might end up requiring composite to show the screensaver at the same time as plasma – but input, eeew. just to complicate it even more, that “this session is locked” dialog will probably stick around, because it has some fancy plugin ability that I don’t think I’ll have time to investigate.

so… lots of work to do, and I’ll probably run into all sorts of evil X things I never wanted to know. but when it’s done I’ll finally have that volume control on my screensaver! ;) and clocks, and notes, and maybe a photo, and, and… somuchstuff! :)

Andreas says:

Widgets on the screensaver for limited but convenient access are a very, very good idea. Oh, and good luck with X11 :/

Ask says:

Good luck! If…. sorry, when you get this to work, it will be the coolest feature of KDE ever. X11 can be a tough mistress, but reading your blog, it seems like you like a challenge :)

bsander says:

When I read the title of this proposal on SoC I was skeptical about its use, but the cases you present here convinced me, I see a lot of potential for this now :) So good luck with your project!

cruzki says:

This may be a crazy idea, but what happend if you make the screensaver in a plasmoid?

Diederik says:

lol, have a screensaver containment :P

I really like the idea to make a Jukebox with the screensaver + plasma. It actually annoyed me I had to type my password to switch a song. This feature is more then welcome! :)

NJ Hewitt says:

Great ideas Chani! Fire me an email as soon as you have something testable if you want any feedback.

Kevin says:

This will be great! I never thought about it before but having plasma on the screensaver makes GREAT sense in all manner of ways. This could almost be the killer app of KDE4…

I really need the Notes thing: I hate my colleagues leaving paper on my desk.

I would love a slideshow screen saver with an invite to leave your name and email address in a little form for adding to mailing lists when I do exhibitions etc.

Hmmm. My grey cells are ticking. Good luck with the work!


tkjacobsen says:

This is a really great idea. It would be nice if the unlock dialog could get out of the way, e.g. in a small plasma widget in the corner of the screen.

Happy hacking.

Chani says:

:) it’s great to see people like this idea. using scenarios to get an idea across seems to work really well.

cruzki: there’s some X nastiness that prevents me from doing that. :(

well, it might not be 100% impossible, but it would probably be as much pain as the fucking systray. if someone else wants to hack on that, go right ahead. I have deadlines to keep to now. :/

tkjacobsen: that’s on my list of ‘optional extras’. :) it would indeed be nice, but there could be some compilcations wrt extra pluginny stuff I don’t yet understand, and I probably won’t have time for it in summer.

[…] plasma and the screensaver so, this summer I’m gonna be putting plasma widgets on the screensaver. oh god, what have I got myself […] […]

Level 1 says:

I was one of the first people interested in this idea. I actually volunteered to implement it but never had the time. Why don’t you let me help you out? (Is that outside the rules of SoC?)

Anyway, can’t wait to see this happen.

Chani says:

level 1: sorry, I think it *is* against the rules :(

but you can probably work on some of the extras I didn’t say I was going to do. like a plasmoid for taking messages, or making the unlock dialog into a plasmoid, or making appplets wander around the screen.

Sanity says:

I have no idea if this is going to cause problems by “helping you out”, but it seems like it would make more sense for the “unlocking” to be a Plasmoid itself. (If there’s any UI at all — I’m not saying it’s a good idea, but it would make sense to support things like thumbprint readers and smartcards without also requiring a password.)

This seems like a really good idea, although I’m probably still going to do it the old fashioned way — creating a separate, limited user account for people to play in, and wiping it when they’re done.

duns says:

although i might be the bad guy again, i would like to point out, that gnome already has a great integration for these use cases. as long as you have the problems with leaving notes and switching your music off in a nasty situation after resuming or a jukebox mode, these are things which can be done in the apps themselves instead of adding a toplayer of software to a screensaver. in gnome the notes thing is integrated in the lock dialog, which would make it available by default and without any overhead and without being able to see notes from others (composite?). the power applet refuses to suspend when a music player (in my case it was rhythmbox) is running, which avoids having any problems when resuming, and for the jukebox mode, amarok should offer a fool proof full-screen mode, which would put it in better control than a plasmoid and it has plasma integration already. this reduces the use cases for plasma-on-screensaver to some more exotic stuff and would make it easier to implement and put the solutions near to their problem. still plasma is the best desktop shell i have ever seen and can be a great feature. maybe instead of adding plasma to the screensaver layer, you could run plasma as the screensaver/lock app?
imho notes and warning-on-resuming-with-music-playing should be added by default in the apps (lockdialog and logout(suspend) dialog/kpowersave) and amarok should be a rocking jukebox app.


p.s.: the box here is too small
p.p.s.: i am the rich guy in germany who does not have to work during his studies, sleeps all day and gives stupid comments and blog posts about google being not a good guy. acutally i am not rich!, well i like sleeping though… you should not defend google, unless they pay you more than 4500$.

Chani says:

Sanity: yes, it would make sense, but I don’t think I’ll have time to port all that stuff to a plasmoid. I expect it will happen, eventuallly.

duns: I know gnome has a “leave a message” feature on its screensaver; that’s where I stole the idea from ;)

as for the system flat-out refusing to suspend if music is playing… er… I hope there’s an option to turn that off, or have it stop/mute the music players instead, ’cause that wouldn’t work so well for me. hmm, actually an option for mute-on-suspend might be the most useful thing… that almost sounds like something that *alsa* should be doing for me, not just some desktop program… :)

as for an amarok fullscreen mode… well, perhaps that would be useful for some people, but I’m taking a more general approach here. this isn’t just about putting amarok controls on the screensaver, or just a note-taking thing, or a clock. this is about opening up the screensaver so that all sorts of stuff can go on it with minimal effort, things I haven’t even thought of.

and yes, the textbox *is* too small.

Level1 says:

Can you make it so that plasma applets can accept keyboard input while in locked screen mode? Is that possible? Then I could just write a quick applet that listens for XF86AudioPlay and mute, and some other keys, and be happy. Thats all I want… thanks for your great contribution

Chani says:

Level1: yeah, that’s the idea :) putting plasma on the screensaver and then letting it take keyboard input there.

I really like the idea behind this project.
I think of it as a customized guest proof mode.

Well, if you leave your laptop at school with a music applet someone might start the music and turn up the volume :P

[…] even though IANAD, at first glance it looks like this may be useful once Chani’s GSoC project gets implemented. We could have a Konsole window showing very interesting output over […]

Comments are closed.

et cetera
%d bloggers like this: