473,398 Members | 2,389 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Starting a GUI application out of an console application

Hello!

I am currently working on an alternative for the gnome-volume-manager
for multiseat systems based on HAL and DBus. Whenever the signal
'DeviceAdded' is received I would like to start a GUI-Interface where
the user can choose from different options. But now I am wondering how I
should start this interface since this GUI must be started by a console
daemon. What is the most common way to do that?

Usually, I start a PyQt application that way:

app = QApplication(sys.argv)
ui = Dialog()
app.setMainWidget(ui)
ui.show()
app.exec_loop()

If I start it that way, I am not quite sure whether this will work since
I have got two main loops then (the one of console daemon [implemented
by using gobject.MainLoop().run()] and the Qt one). Moreover, once the
Qt application is started, it should run independently of the console
daemon.

Unfortunately, I can't think of any possibility to achieve this aim. Do
you have any suggestions?
Jul 17 '06 #1
1 1802
put your gui application in another script and start it the same way
you'd start any other application whose exit status you didn't need:
os.popen* or subprocess.Popen.
or, use the threading module to give your qt application another
thread.
Fabian Steiner wrote:
Hello!

I am currently working on an alternative for the gnome-volume-manager
for multiseat systems based on HAL and DBus. Whenever the signal
'DeviceAdded' is received I would like to start a GUI-Interface where
the user can choose from different options. But now I am wondering how I
should start this interface since this GUI must be started by a console
daemon. What is the most common way to do that?

Usually, I start a PyQt application that way:

app = QApplication(sys.argv)
ui = Dialog()
app.setMainWidget(ui)
ui.show()
app.exec_loop()

If I start it that way, I am not quite sure whether this will work since
I have got two main loops then (the one of console daemon [implemented
by using gobject.MainLoop().run()] and the Qt one). Moreover, once the
Qt application is started, it should run independently of the console
daemon.

Unfortunately, I can't think of any possibility to achieve this aim. Do
you have any suggestions?
Jul 17 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: serge calderara | last post by:
Dear all, I have an application which is suppose to start another executable process. As soon as that process is running, I need to retrive its handle. The problem of the particular process I am...
3
by: Just close your eyes and see | last post by:
i am trying to run a process through that code Process.Start("myApllication.exe"); but the command prompet window opens while starting of the process i want to delete this effect how ? thx all
1
by: Sam | last post by:
I have an application that sits in the traybar that calls a msde sp3a database to verify that the connection to the sql server instance exists. If the sql server is up obviously the application...
5
by: Sjaakie Helderhorst | last post by:
Hi! I use an ISDN monitor which displays caller ID. In stead of entering all numbers manually, I wish to query a national phonenumber database, which I obtained as a MySQL database. The only way...
0
by: aurora | last post by:
I have a question regarding code examples in the msdn cd. For example I will refer to the help page titled "Using TCP Services" As we can see, the code below is supposed to be for a console...
4
by: Phil Mc | last post by:
Say for example you have a application running on a windows 2003 server (that is on server, not from). This application needs to start child applications (must be stand alone console applications),...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
6
by: tatamata | last post by:
Hello. How can I run some Python script within C# program? Thanks, Zlatko
7
by: | last post by:
Hi to everyone! I have an Apache Webserver running on Win2000. I try to start a console application an the server though PHP, with the functions exec() or passthru() but it doesn't work. The...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.