Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » GTK+
  • » [gtk-list] How can I find out if a program is already running [RSS Feed]

#1 Dec. 9, 2005 14:38:02

m.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[gtk-list] How can I find out if a program is already running


Hi

On Fri, 09 Dec 2005 14:54:18 +0100
Zoltan Boszormenyi <> wrote:
>I need to find out whether an instance of a program is already running
>and possibly unminimize it or bring it above any other windows, so
>I can prevent an application started again.
>Is is possible using GTK-1.2, or GTK-2.x, and how?

I'm afraid gtk does not have support for that.
I think it's role of task manager for desktop
(possibly you want to know whether the program
is running on same desktop - not on same computer,
and reordering of window is the role of desktop
manager, not GUI toolkit like GTK).
Thus, there might be something helpful in GNOME.
However, I don't know you want to use GNOME or
anything else.

Regards,
mpsuzuki
_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

#2 Dec. 9, 2005 14:52:46

Yash K.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[gtk-list] How can I find out if a program is already running


This is possible using the Xlibrary , that is to say, we need to get the registered handle of any application (if already running) from the X server and if it is not available, we need to register the same so that future instances can find it out by querying X server.Most of the GUI applications on linux use this mechanism to get the already running instance of the same application so that any future instance can connect to it and present the window again to the user. -Yash On 12/9/05,<> wrote:HiOn Fri, 09 Dec 2005 14:54:18 +0100Zoltan Boszormenyi <> wrote:>I need to find out whether an instance of a program is already running>and possibly unminimize it or bring it above any other windows, so>I can prevent an application started again.>Is is possible using GTK-1.2, or GTK-2.x, and how?I'm afraid gtk does not have support for that.I think it's role of task manager for desktop(possibly you want to know whether the programis running on same desktop - not on same computer,and reordering of window is the role of desktopmanager, not GUI toolkit like GTK).Thus, there might be something helpful in GNOME.However, I don't know you want to use GNOME oranything else.Regards,mpsuzuki_______________________________________________gtk-list mailing listgtk-l***@*nome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

#3 Dec. 9, 2005 15:21:24

Zoltan B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

[gtk-list] How can I find out if a program is already running


Hi,

írta:Hi

On Fri, 09 Dec 2005 14:54:18 +0100
Zoltan Boszormenyi <> wrote:I need to find out whether an instance of a program is already running
and possibly unminimize it or bring it above any other windows, so
I can prevent an application started again.
Is is possible using GTK-1.2, or GTK-2.x, and how?I'm afraid gtk does not have support for that.
I think it's role of task manager for desktop
(possibly you want to know whether the program
is running on same desktop - not on same computer,
and reordering of window is the role of desktop
manager, not GUI toolkit like GTK).Yes, I would like to know whether a program is started on the same Xdisplay.Thus, there might be something helpful in GNOME.
However, I don't know you want to use GNOME or
anything else.And yes again, the program I would like to modify uses the gnome 1.xlibrariesand was created with Glade 0.6.x. The program's main window is a GnomeApp,
and there are two properties (WM Class and WM Name) that I can set in Glade.I guess these could be used to find out whether a window is registered(still running)on the X display I try to run the second instance. The question is how?

Best regards,
Zoltán Böszörményi

_______________________________________________
gtk-list mailing list
gtk-list@gnome.orghttp://mail.gnome.org/mailman/listinfo/gtk-list

Offline

  • Root
  • » GTK+
  • » [gtk-list] How can I find out if a program is already running [RSS Feed]

Board footer

Moderator control

Enjoy the 24th of April
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support