1,105,556 Community Members

ubuntu Launcher

Member Avatar
Kruptein
Posting Whiz in Training
258 posts since Sep 2009
Reputation Points: 15 [?]
Q&As Helped to Solve: 11 [?]
Skill Endorsements: 0 [?]
 
0
 

How can I start a launcher from python?
if I do: os.system("~/localhost") it just returns a number (probably a process id or something)

if this is not possible, how can I start from python a terminal window
and execute a code in that terminal?
(without closing the python script)

Thanks in advance =)

Member Avatar
Kruptein
Posting Whiz in Training
258 posts since Sep 2009
Reputation Points: 15 [?]
Q&As Helped to Solve: 11 [?]
Skill Endorsements: 0 [?]
 
0
 

I found out the launcher is actually called: localhost.desktop
but if I do: os.system("~/localhost.desktop") it just starts my standard editor and shows the script...

Member Avatar
Gribouillis
Posting Maven
3,457 posts since Jul 2008
Reputation Points: 1,140 [?]
Q&As Helped to Solve: 884 [?]
Skill Endorsements: 18 [?]
Moderator
 
0
 

I found out the launcher is actually called: localhost.desktop
but if I do: os.system("~/localhost.desktop") it just starts my standard editor and shows the script...

I don't know ubuntu very well, but if your launcher is related to a bash script, the script must be somewhere in the filesystem, so locate the script and call os.system(path_to_script) or subprocess.Popen(["bash", path_to_script]) .

Member Avatar
Kruptein
Posting Whiz in Training
258 posts since Sep 2009
Reputation Points: 15 [?]
Q&As Helped to Solve: 11 [?]
Skill Endorsements: 0 [?]
 
1
 

well I found out,
it had to be: os.system("xterm ~/localhost.desktop")

Question Answered as of 4 Years Ago by Gribouillis
You
This question has already been solved: Start a new discussion instead
Post:
Start New Discussion
View similar articles that have also been tagged: