Glenn Glazer wrote: > So, I think there is some unix flavor differences here. Following the > instructions on the first link: >> |$ xprop -id $WINDOWID | grep WM_NAME >> WM_NAME(STRING) = "this is my title" >> current_title=$(xprop -id $WINDOWID | grep WM_NAME | cut -d= -f2)| > Doesn't work because the $WINDOWID on Solaris is set to something other > than the id that xprop is expecting.
When you said "xterm", did you really mean "xterm" (as in the program '/usr/openwin/bin/xterm') or did you mean a generic terminal window? Your results here are what I'd expect to see with something like gnome-terminal where the terminal window is wrapped in a layer of other stuff (menu bar, tab bar) and the window whose name you're trying to find is the parent of the terminal window. Good ol' vanilla 'xterm' doesn't have that extra wrapper. Anyway, you should be able to get the information you're looking for by piping the output of 'xwininfo -children -id $WINDOWID' into an awk/perl/sed/whatever script that extracts the first quoted string at end-of-line from the output. Mike. -- mike.oliver at sun.com > E.g., xprop -id $WINDOWID returns null in a window of my current session > because >> [160] env | fgrep WINDOWID >> WINDOWID=7513444 >> [161] xprop -id $WINDOWID >> [162] xprop -id 0x72a55c | fgrep WM_NAME >> WM_NAME(STRING) = "launcher" >> _NET_WM_NAME(UTF8_STRING) = 0x6c, 0x61, 0x75, 0x6e, 0x63, 0x68, 0x65, >> 0x72 > Where I got the correct id from xwininfo. The problem with using > xwininfo to get the id is that it is an interactive application that > expects you to click the window of interest. There does not appear to > be a way to tell it "this window" without already knowing the id of the > current focus window. > Combined with the stuff on the other links, I think I'm in good shape if > I can find a scriptable way of getting the "real" id. > > Suggestions gratefully appreciated. > > Best, > > Glenn > > Glenn Glazer wrote: >> Thanks for the pointers, Alan. >> >> Much obliged, >> >> Glenn >> >> Alan Coopersmith wrote: >>> Glenn Glazer wrote: >>> >>>> Hi, all. >>>> >>>> I have two questions related xterms under JDS (Solaris 10). >>>> >>>> 1) Is there a way to set and query the xterm title from the CLI within >>>> the xterm? >>>> >>> >>> http://invisible-island.net/xterm/xterm.faq.html#how2_title >>> http://tldp.org/HOWTO/Xterm-Title.html >>> >>> >> >> -- >> ______ >> /_____/\ Glenn Glazer >> /____ \\ \ glenn.glazer at sun.com >> /_____\ \\ / Compute Resources >> /_____/ / \//\ x63073/(408) 992-9073 >> \_____\//\ / / Cell Phone: (562) 305-2920 >> \_____/ / /\ / >> \_____/ \\ \ Sun Microsystems, Inc. >> \_____\ \\ 324 North Mary Avenue >> \_____\/ Sunnyvale, CA 94085 >> >> 11.00100100001111110110... >> 3.243F6A8885A308D31319... >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> desktop-discuss mailing list >> desktop-discuss at opensolaris.org >> > > > ------------------------------------------------------------------------ > > _______________________________________________ > desktop-discuss mailing list > desktop-discuss at opensolaris.org
