LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 06-10-2007, 08:36 PM   #1
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Wink Where are all the x windows?


I apologize up front that this isn't strictly a programming question, but it is the sort of thing that programmers deal with so I'll ask it here (plus programmers are really smart and know a lot ).
So, when I run xlsclients, I see only those windows that were started by clients running on the local host. Any X client applications that get started on remote hosts do not have their windows listed. I believe it has to do with the SSH X tunnel that is created by logging into the remote host. Somewhere along the way, the SSH client must make a connection to the X server, as a sort of proxy for the remote application, and I suppose it is the nature of the SSH tunnel that conceals the windows, although the mechanism escapes me.
The reason I care about this is that I want to be able to take xwd snapshots of a running application, and I want to be able to do this on a periodic basis in a cron job. Any work-arounds that accomplish the goal are also welcome.
Thanks.
--- rod.
 
Old 06-11-2007, 04:15 PM   #2
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
Maybe you can try xlsclients with the -a flag, in not realy sure, but maybe it solve your problem.

Also, I see that xlsclients accept the -display flag, so, you can tell it to connect to a remote X server if you're inside the access list.

[]'s, FMC!
 
Old 06-11-2007, 05:21 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399

Original Poster
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Thanks for your reply. I have already tried the -a flag, and it doesn't help. I know about -display, but what to supply as the argument? The windows that are listed by xlsclients are on the display of interest. I am speculating that the display ID, if that is the correct terminology, is somehow being mangled or concealed by the SSH tunnel. I feel confident that my problem is solvable, since programs like the GIMP, Ksnapshot, and ImageMagick 'display' are capable of performing screen grabs. The problem with them is that they require an interactive session to select the window with a mouse. I need a screen grabber that I can specify by window ID, and therefore I need to be able to get the window ID. Thats what xlsclients almost does.

--- rod.
 
Old 06-11-2007, 07:16 PM   #4
FMC
Member
 
Registered: May 2007
Location: São Paulo
Distribution: Gentoo & Debian
Posts: 97

Rep: Reputation: 15
Have you tried -display <ip address>:<display>

When I need to connect to a remote X server that is what I do (export DISPLAY=<ip...>), so it may work for xlsclients as well!

I really dont knot it it works, I'm just trying to give some ideas based in what I know!

[]'s, FMC!
 
Old 06-11-2007, 09:26 PM   #5
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399

Original Poster
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Yes, I understand what you are saying. However, in this case, it isn't the server that is remote; it is the client(s). The server is on the localhost, server # ':0'. And it does report windows created by clients running on localhost, but not windows created by clients on remote hosts.
Thanks for your replies.
--- rod.
 
Old 06-11-2007, 11:23 PM   #6
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399

Original Poster
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Okay, I've solved my problem. I was using the wrong tool for the job. I found that xwininfo reports the ID of the window of interest, and that is all I need to provide as an argument to xwd. I can run xwininfo -root -tree, and get a list of all the windows on the display. From there, I can find the window of interest by searching for the window title included in the list, thus giving me the ID.
--- rod.
 
  


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
Replacing a Windows Domain Controller with a Linux:OpenLDAP importing from Windows AD mstevensfullarmor Linux - Enterprise 14 02-15-2012 06:05 PM
Dual boot -fedora core 4 and windows xp- problem booting from windows xp cd r_desu Linux - Newbie 4 06-17-2007 04:33 PM
linux/ windows dual boot. Windows XP is in portable HDD (already installed) izquierdista Linux - General 1 02-03-2006 10:23 AM
Red Hat Linux 9 + Windows Server 2003 + Windows XP + Fedora in same domain wolfy339 Linux - Networking 5 03-02-2005 06:03 AM
SuSE 9.1 and Windows Xp refuse to live in harmony: error loading windows through GRUB sanctumtacete Linux - Newbie 3 10-19-2004 07:47 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

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