LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 07-22-2023, 08:39 AM   #1
jr_bob_dobbs
Member
 
Registered: Mar 2009
Distribution: Bedrock, Devuan, Slackware, Linux From Scratch, Void
Posts: 705
Blog Entries: 166

Rep: Reputation: 242Reputation: 242Reputation: 242
list gui programs running in Xorg, from the command line


I was wondering if there is a way, in a terminal, to show what GUI programs are running in Xorg. It would be like Fvwm's FvwmIconMan or the Workspace List menu of Blackbox, except it would a command line program that prints a list of the running programs in the console. In other words, it would be like ps but only for GUI programs.

Thank you.
 
Old 07-22-2023, 08:55 AM   #2
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,985

Rep: Reputation: 2862Reputation: 2862Reputation: 2862Reputation: 2862Reputation: 2862Reputation: 2862Reputation: 2862Reputation: 2862Reputation: 2862Reputation: 2862Reputation: 2862

pstree outputs processes as a tree structure.

"pstree $(pgrep -o Xorg)" will change the root of the tree to the oldest process named "Xorg".

However, on a KDE Plasma system, GUI programs are under plasmashell process, i.e: "pstree $(pgrep -o plasmashell)" would be needed - other desktops may organize things differently.


Last edited by boughtonp; 07-22-2023 at 08:59 AM.
 
Old 07-25-2023, 06:09 PM   #3
goumba
Senior Member
 
Registered: Dec 2009
Location: New Jersey, USA
Distribution: Fedora, OpenSUSE, FreeBSD, OpenBSD, macOS (hack). Past: Debian, Arch, RedHat (pre-RHEL).
Posts: 1,335
Blog Entries: 7

Rep: Reputation: 402Reputation: 402Reputation: 402Reputation: 402Reputation: 402
If you're simply looking for a list of windows (which is similar to what you'd get from the mentioned programs), try:

Code:
wmctrl -l
 
Old 07-27-2023, 08:09 PM   #4
jayjwa
Senior Member
 
Registered: Jul 2003
Location: NY
Distribution: Slackware, Termux
Posts: 1,068

Rep: Reputation: 407Reputation: 407Reputation: 407Reputation: 407Reputation: 407
xlsclients

Code:
example.com  /usr/bin/emwm
example.com  LibreWolf
example.com  qemu-system-i386
example.com  qemu-system-i386
example.com  gkrellm
example.com  xnetload -i br0
example.com  xnetload -i eth0
example.com  xlogo -fg DarkOliveGreen -bg black
example.com  xnetload -i wlan0
example.com  xclock
example.com  urxvt -embed 25165834
example.com  /usr/bin/xterm -class UXTerm -u8 -fg OldLace -bg black -fn -xos4-terminus-medium-r-normal--14-140-72-72-c-80-iso10646-1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
"Type 'sudo' is not known on line 2 in source list /etc/apt/sources.list.d/signal-xenial.list" jameswilson0609 Linux - Newbie 3 05-29-2019 12:04 PM
E: Type 'sudo' is not known on line 1 in source list /etc/apt/sources.list.d/mono-official.list 221B Linux - Newbie 6 09-07-2017 12:14 PM
[SOLVED] Partial list with ls-l in bash script run in cron but full list run from command line redgshost Linux - General 29 01-16-2011 12:14 PM
'E:Malformed line 54 in source list /etc/apt/sources.list (dist parse), E:The list of vsssuccess@gmail.com Linux - Desktop 1 11-17-2010 08:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 07:02 PM.

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