LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-26-2009, 05:26 PM   #1
veverica
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0
Smile Getting the list of running programs


I am trying to make a simple panel ( like bmpanel for example ) and I need a way to get the list of running applications.
I am working with qt4, and I know a little bit of xlib. It would be great if someone could point me to some tutorial or documentation...

It would be also great to know how to minimize and maximize windows, how to kill them, and other tasks that a normal panel does
 
Old 05-26-2009, 05:43 PM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
You can get everything you want from doing a simple read (as in "fgets()", for example) from /dev/proc:

http://www.linuxforums.org/misc/unde...ng_proc_3.html

'Hope that helps .. PSM
 
Old 05-27-2009, 07:12 AM   #3
veverica
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
thanks for the help, but i dont know how to find the info about the state of application( minimized or maximized ) and the name of the window...

i think i should use some xlib function( atoms maybe ), but i didnt find anything useful , i just have the source code of bmpanel but its worth nothing without a good documentation ... can someone please point me to one... ( maybe there is some function in qt4.5 that can help me ? )
 
Old 05-27-2009, 11:02 PM   #4
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
I think paulsm4’s advice applice more to individual processes than X11 applications.

In order to do what you want, your window manager must implement the EWMH standard. From here use the X11 protocol to accomplish what you are trying to do. Otherwise, you will have to write into specific hooks provided by whatever window manager you use.

Since the standard is somewhat terse, here is a minimal, commented example of a similar use. I suggest you look at the sourcecode of other utilities such as xprop, xwininfo, and wmctrl to get started.
 
  


Reply



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
List installed programs introuble Debian 2 11-18-2006 05:30 AM
apt-get list of programs hraposo Debian 5 10-20-2004 07:51 AM
list of graphics programs? ScislaC Linux - Software 3 08-09-2004 08:38 AM
How to get newly installed programs in programs list Brosky Linux - Software 5 02-06-2004 03:45 PM
list of programs I have ole Linux - Newbie 5 03-17-2003 08:20 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:35 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