mondorest.blogg.se

Xscreensaver nosplash
Xscreensaver nosplash






xscreensaver nosplash
  1. #XSCREENSAVER NOSPLASH HOW TO#
  2. #XSCREENSAVER NOSPLASH MOVIE#
  3. #XSCREENSAVER NOSPLASH INSTALL#
  4. #XSCREENSAVER NOSPLASH CODE#

Several people have written such things Google it.

#XSCREENSAVER NOSPLASH MOVIE#

Would pick a movie file at random from a directory and play that. It's also possible to encapsulate the above into a single shell script which "My Movie" mpv -really-quiet -no-audio -fs -loop=inf \ĭuplicate those lines for each other movie you would like to play.

#XSCREENSAVER NOSPLASH INSTALL#

Install mpv and add something like the following to the `programs' preference

xscreensaver nosplash xscreensaver nosplash

To play MP4, MPEG, QuickTime, FLV and AVI videos: I got the xscreensaver configuration idea from this url, particularly this section of the docs: (Sorry, I don’t remember what’s installed by default, and what I’ve installed with apt-get.) Hopefully the errors will show up on your screen and you can debug them. If it doesn’t show up, you may need to install things like Python and GTK libraries. Then go into the screensaver preferences, chose this screensaver from the list, click Preview, and you should see this screensaver show up. $ pkill xscreensaver & xscreensaver -nosplash & Xdaliclock -builtin2 -fullscreen -root \n\ To be clear, the last ten lines or so in the “programs” section of my. xscreensaver file, which is in your home directory (assuming that you’re already using xscreensaver): Then add this line to the end of the “programs” section in your.

#XSCREENSAVER NOSPLASH CODE#

There may be excessive/redundant code in there I haven’t figured that out yet.) (The code from the two URLs I linked to don’t work on their own this code is a combination of those two. Window.modify_bg(gtk.STATE_NORMAL, gdk.color_parse("black"))Īs I briefly note in the code, the secret sauce of this code is to get the $XSCREENSAVER_WINDOW id from xscreensaver when xscreensaver calls your program. #_filter(lambda *args: self.filter_event(args)) (gdk.EXPOSURE_MASK | gdk.STRUCTURE_MASK), Self.window = gdk.Window(None, 1024, 768, gdk.WINDOW_TOPLEVEL, _events (gdk.EXPOSURE_MASK | gdk.STRUCTURE_MASK) Self.window = _foreign_new(int(ident, 16)) Ident = os.environ.get('XSCREENSAVER_WINDOW') # the secret sauce is to get the "window id" out of $XSCREENSAVER_WINDOW I’ll assume that you’ve saved it to /home/al/hello.py: To try this on your own Linux system running xscreensaver, first save the following source code somewhere.

xscreensaver nosplash

#XSCREENSAVER NOSPLASH HOW TO#

Well, calling it a screensaver is a stretch, because what it will really do is burn the characters “Hello, world” into your monitor but at least I cracked the code on how to get this started. Process.I know remarkably little about Python and GTK, but from the two URLs shown in the source code below I was able to piece together a working, “Hello, world” Linux screensaver. Private Button button2 = new Button.with_label("Turn On") īutton1.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION) ī(off_button_clicked) īutton2.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION) ī(on_button_clicked) Private Button button1 = new Button.with_label("Turn Off") Process.spawn_command_line_async ("xscreensaver -nosplash") īut I would like to end up with something like this (mockup created in ):Īfter two afternoons of thinking im out of ideas as an hobbyist how to achieve this layout. Private void on_button_clicked(Button button) Process.spawn_command_line_async ("xscreensaver-command -exit") Non blocking - does not wait for process to finish Private void off_button_clicked(Button button) Vertical box container for two horizontal boxes Var hbox2 = new Box(, 20) īutton.get_style_context ().add_class (Gtk.STYLE_CLASS_DESTRUCTIVE_ACTION) ī(off_button_clicked) īutton.get_style_context ().add_class (Gtk.STYLE_CLASS_SUGGESTED_ACTION) ī(on_button_clicked) t_markup("What do you want to do with XScreensaver?") Var image = new _icon_name ("dialog-question", ) Box with icon and text in horizontal layout Public class XScreensaverControl : Window * The Button widget is commonly found in programs and used to launch processes For the last two days I'm trying to figure out how to achieve a standard dialogbox layout with icon on the left, a text on the right and two buttons below in Vala on linux (elementaryOS JUNO).Ĭouldn't also find any template for this.








Xscreensaver nosplash