You are not logged in.


Hi,
on debian, as per the title, I'd like to activate an app window (atril) from a script, preferably using the app's process id.
I have a feeling I've done this before, maybe using one of the xwininfo family? ...
Sorry if this is an old question, or obvious, or impossible... I have searched.
Cheers,
bitrat
Offline


I'd like to activate an app window (atril) from a script, preferably using the app's process id.
Which means the application must already be running. You can use wmctrl to raise a minimized window, but it would use it's windowID:
wmctrl -i -a $(wmctrl -lvpx | grep -i atril | awk '{print $1}')Is this what you were thinking?
Mark solved threads as [SOLVED] to make it easier for others to find solutions.
--- How To Ask For Help | FAQ | Developer Wiki | Community | Contribute ---
Offline


Is this what you were thinking?
Yes, thank you!
Even better is that
wmctrl -lvpx | grep -i atrilgives me the process id as well as the window id, so I can triangulate with pstree.
As a side note, if the atril command is run with a file argument that's already open, it just activates the app, without changing the location in the document.
I was having an issue where it was activating but scrolling to the first page, hence my inquiry. I was going to use a long winded brute force workaround...
However, atril seems to have reverted to the original (correct) behaviour, so I don't need this fiddle now. However, I suspect I'll have other uses for it, since I run a number of graphics programs in headless mode (eg: libreoffice, inkscape, ...) and use apps like ristretto to view outputs.
Anyway, thanks again. 
Offline
[ Generated in 0.011 seconds, 7 queries executed - Memory usage: 526.96 KiB (Peak: 527.94 KiB) ]