Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

When I was using Windows I have some times made a good use of WinSpy++ which allowed to point to a window or a control (a widget, a window element) to see details about it (including the values of the fields of the structure/class describing this particular instance), send window manager messages to it etc. One of usual trivial tasks I have been using it for was to copy text from a non-selectable widget (like a label, which does not allow to select and copy text from it the way a text field does). Is there an analogous tool I can use with GNU/Linux GUI applications?

share|improve this question

2 Answers 2

up vote 2 down vote accepted

You can't expect a 1:1 mapping here. I don't know WinSpy++, but it's likely that what it can do is spread over several different tools, some of its features simply don't make sense under X, and conversely the X tools have additional features that don't make sense under Windows.

The basic X11 distribution comes with a number of simple tools. The ones that are most likely to be relevant here are:

  • xclients to list the programs that have a connection to a display
  • xprop to display window properties
  • xwininfo to display technical information about a window (position, visuals, …)

There are also tools to manipulate X resources: appres, editres (for those few applications that implement it), listres, xrdb.

Two third-party utilities that are often useful to get information and act on windows are wmctrl (perform window manager actions from the command line) and xdotool (send events to a window).

share|improve this answer

Basically, not really.

To get information about a window, you can use the

xwininfo

command. However, unsurprisingly because X11 is different to Windows, it doesn't print the same information. I don't know of any way to copy text out of non-selectable controls, though perhaps these may be less common than they are under Windows.

As for sending window manager messages, I'm not sure about that. You might be able to use a tool based on the XRECORD extension, for example Xnee. However, I've never tried this.

share|improve this answer
    
for copy text out of non-selectable control/window, I guess it should be part of the accessibility (of program/toolkit). (but afaik, the standard on this is far from mature.) –  yuyichao Feb 12 '12 at 23:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.