Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 24 May 2015, 09:44
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
shell .sh script to pipe xwininfo
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message

Joined: 24 Feb 2009
Posts: 215

PostPosted: Sun 04 Apr 2010, 02:05    Post_subject:  shell .sh script to pipe xwininfo
Sub_title: xscreensaver desktop on startup

I need to pass the Desktop window ID to xscreensaver in order have it autostart.

Unfortunately the output of xwininfo is more than just the id so i cannot use ../xscreensaver/xxx -window-id $(`xwininfo -name Desktop'):

xwininfo: Window id: 0x1400003 "Desktop"

Absolute upper-left X: 0
Absolute upper-left Y: 0
Relative upper-left X: 0
Relative upper-left Y: 0
Width: 1280
Height: 1024
Depth: 24
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x20 (installed)
Bit Gravity State: NorthWestGravity
Window Gravity State: NorthWestGravity
Backing Store State: NotUseful
Save Under State: no
Map State: IsViewable
Override Redirect State: no
Corners: +0+0 -0+0 -0-0 +0-0
-geometry 1280x1024+0+0

Is there a way of taking just the window id "0x1400003" and passing it on to xscreensaver's command?
Back to top
View user's profile Send_private_message 

Joined: 11 Oct 2008
Posts: 7937
Location: qld

PostPosted: Sun 04 Apr 2010, 02:48    Post_subject:  

I suspect you aren't using rox-desktop because "Desktop" fails for me, but if I use "ROX-Filer" it works. The principle is the same.

2 ways I know of
xwininfo -name ROX-Filer | grep "ROX-Filer" | awk '{print $4}'
xwininfo -name ROX-Filer | grep "ROX-Filer" | cut -d ' ' -f4



Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 

Joined: 24 Feb 2009
Posts: 215

PostPosted: Wed 07 Apr 2010, 01:16    Post_subject:  

Thanks micko,

i used xscreensaver/preferredScreensaver window-id $(xwininfo -name Desktop | awk '/Window id/ {print $4}')

this works also
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot attach files in this forum
You can download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0404s ][ Queries: 11 (0.0030s) ][ GZIP on ]