Xfce Forum

Sub domains
 

You are not logged in.

#1 2023-12-09 14:46:40

xfce_user_1234
Member
Registered: 2023-12-09
Posts: 4

[SOLVED] Command to identify the running process - xfce4-taskmanager

Hi,

Is there a command to directly open the "identify running process"-function in the xfce4-taskmanager instead of opening the taskmanager first and clicking the cross icon? I want to be able to run this command in the terminal, so that I can immediately select a window of a running process and ideally get a text output with the name of the process.

Last edited by xfce_user_1234 (2023-12-10 11:11:57)

Offline

#2 2023-12-09 16:12:15

ToZ
Administrator
From: Canada
Registered: 2011-06-02
Posts: 11,143

Re: [SOLVED] Command to identify the running process - xfce4-taskmanager

Try using xdotool and either ps or top to accomplish this:

ps -fp $(xdotool selectwindow getwindowpid)

...or:

top -p $(xdotool selectwindow getwindowpid)

If you want to create a keyboard shortcut to run this, you'll need to display it in a terminal window, so use:

xfce4-terminal -T 'Inspect Process' -x COMMAND_FROM_ABOVE

Please remember to mark your thread [SOLVED] to make it easier for others to find
--- How To Ask For Help | FAQ | Developer Wiki  |  Community | Contribute ---

Offline

#3 2023-12-09 17:48:18

xfce_user_1234
Member
Registered: 2023-12-09
Posts: 4

Re: [SOLVED] Command to identify the running process - xfce4-taskmanager

This is what I was looking for, thanks!

By the way, to make the command run as a shortcut, I had to encapsulate it in

sh -c "COMMAND"

And instead of the terminal I used xmessage to display the output, so my final shortcut command is as follows

sh -c "ps -fp $(xdotool selectwindow getwindowpid) | xmessage -file -"

Offline

Board footer

Powered by FluxBB