Vizible’s Blog

Active Screensaver

Posted in Bash by wearetherock on January 27, 2009
#!/bin/bash
dest=$1
ssh ${dest} "DISPLAY=:0 python " <<PROC
import dbus
session = dbus.SessionBus()
object = session.get_object("org.gnome.ScreenSaver", "/")
screen = dbus.Interface(object, "org.gnome.ScreenSaver")
screen.SetActive(True)
PROC
Advertisements
Tagged with: , , , ,

One Response

Subscribe to comments with RSS.

  1. wearetherock said, on January 27, 2009 at 12:58 pm

    Again, tomboy

    #!/bin/bash

    dest=$1
    ssh ${dest} “DISPLAY=:0” python <<PROC

    import dbus
    import time
    bus = dbus.SessionBus()
    object = bus.get_object(“org.gnome.Tomboy”, “/org/gnome/Tomboy/RemoteControl”)
    tomboy = dbus.Interface(object, “org.gnome.Tomboy.RemoteControl”)
    new_note = tomboy.CreateNote()
    tomboy.SetNoteContents(new_note, “What’s your name?”)
    #tomboy.NoteSaved(new_note)
    tomboy.DisplayNote(new_note)

    time.sleep(5)

    tomboy.SetNoteContents(new_note, “Java”)

    PROC


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: