LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-02-2020, 06:37 AM   #1
Pastychomper
Member
 
Registered: Sep 2011
Location: Scotland
Distribution: Slackware, Devuan, Android
Posts: 132

Rep: Reputation: 243Reputation: 243Reputation: 243
Xscreensaver hack: Root window, two heads


Greetings all

I'm running Fluxbox with an XScreensaver hack as a wallpaper. Recently I added a second monitor, and now whichever hack I'm running gets stretched across both monitors. For some hacks that's OK, but for most it makes them look crummy.

When Xscreensaver activates (as an actual screensaver), it treats the two monitors separately and puts a separate (and different) hack in each one. A quick search tells me that was a deliberate choice since JWZ rightly believes it looks better that way. Is there a not-too-hard way to get an individual hack to behave in the same way when I start it on its own with the -root extension?
 
Old 10-23-2020, 07:25 AM   #2
Pastychomper
Member
 
Registered: Sep 2011
Location: Scotland
Distribution: Slackware, Devuan, Android
Posts: 132

Original Poster
Rep: Reputation: 243Reputation: 243Reputation: 243
I found a partial answer today. It looks like the daemon creates a separate virtual root window for each screen, then uses either XSCREENSAVER_WINDOW or the -window-id option to tell each hack which window to use. That's handy since -window-id is missing from some of the man pages, but it also suggests there's no easy way to get a per-window hack in the wallpaper, other than opening a couple of big windows and setting them to "always on bottom". Unless...

Anyone know a desktop manager that can create separate virtual root windows?
 
Old 10-23-2020, 06:24 PM   #3
Pastychomper
Member
 
Registered: Sep 2011
Location: Scotland
Distribution: Slackware, Devuan, Android
Posts: 132

Original Poster
Rep: Reputation: 243Reputation: 243Reputation: 243
Found it.

pcmanfm --desktop does what I want - two separate virtual root windows, one per physical screen. As a bonus(?) it doesn't do much with one of the screens, unless I'm missing something.

A few DDGs and manpages later I came up with this:
Code:
/usr/lib/xscreensaver/starwars -window-id $(xwininfo -root -tree |grep pcmanfm.*1920x1080|cut -f 1 -d \")
(For my fellow non-gurus, it gets a list of open windows, chooses one named "pcmanfm" with the appropriate size, and passes its ID to the starwars hack, which then draws on the window.)
 
1 members found this post helpful.
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chbg as xscreensaver hack Toadman Linux - Software 0 05-15-2009 08:03 PM
Write xscreensaver photo hack? pwc101 Programming 1 10-30-2007 06:14 AM
Two heads, to keyboards, two mice, two users on one machine? PsychosisNode Linux - General 5 07-23-2006 07:42 PM
Xscreensaver not using .xscreensaver psychobyte Fedora 4 04-07-2006 10:02 AM
xscreensaver installed, but no xscreensaver-demo command? dalesan Linux - Software 7 09-01-2004 01:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:27 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