Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 5243  / 1 Year ago, mon, february 20, 2023, 2:50:40

I have a python gtk app I need to run when a user logs in. I can't get upstart to launch any gui app, even if x is running.



When I'm signed into X, and I emit the event from the upstart script below



guitest


with initctl, I get



initctl: Event failed


Here is an example of my script, except I've replaced gedit with my app. How can I modify this script so gedit or my python gtk app will launch?



task

start on desktop-session-start or guitest

script
gedit
end script

More From » upstart

 Answers
2

I've found a workaround. If anyone else know 'the right way', please let me know.



The upstart script needs to write a flag file. Another process that is started by the user will be constantly looking for this flag file to be created. The upstart script can leave any relevant information in the flag file. A regular user of course or root has not problem running gui apps. Why upstart does have a problem, remains to be answered.


[#40188] Wednesday, February 22, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
arkcker

Total Points: 296
Total Questions: 111
Total Answers: 104

Location: Nepal
Member since Tue, Sep 8, 2020
4 Years ago
arkcker questions
Tue, Aug 17, 21, 00:08, 3 Years ago
Sun, May 14, 23, 01:04, 1 Year ago
Wed, Nov 16, 22, 03:12, 1 Year ago
Tue, Jun 1, 21, 01:29, 3 Years ago
;