Can you get the launcher name at runtime?

Post

Posted
Rating:
#1 (In Topic #927)
Guru
BruceSteers is in the usergroup ‘Guru’
 If my gambas application is run form a .desktop launcher file can i get the path/name of the launcher file?

Anyone ever done this?
tia
Online now: No Back to the top

Post

Posted
Rating:
#2
Guru
BruceSteers is in the usergroup ‘Guru’
So i found Env["GIO_LAUNCHED_DESKTOP_FILE"]
This it seems gets set when i launch from a .desktop file on my actual Desktop and the system menu but not from a launcher in the MATE panel :(

Could do with a way to get the launcher name if run from the mate-panel or any other launcher that doesn't set it in the env.

was wondering if there would be a way to backtrace the PIDs or something , maybe with Application.ParentHandle or something like that??
Online now: No Back to the top

Post

Posted
Rating:
#3
Avatar
Regular
thatbruce is in the usergroup ‘Regular’
 I had a bit of a look through what you can find in /proc that might help. Nada.
Maybe pstree or something, but I doubt it as the kernel couldn't give a "whatever" really about the desktop. IOW what happens in the desktop or better the WM is whatever and however each one feels like performing, in the "circus performer" sense, this month.
You may have to set something in the .desktop file that is visible to your application somehow. (Notice how I didn't use that atrocious "app" word there.)
Maybe there's something in the X utilities???

just thoughts
b

Online now: No Back to the top

Post

Posted
Rating:
#4
Guru
BruceSteers is in the usergroup ‘Guru’

thatbruce said

I had a bit of a look through what you can find in /proc that might help. Nada.
Maybe pstree or something, but I doubt it as the kernel couldn't give a "whatever" really about the desktop. IOW what happens in the desktop or better the WM is whatever and however each one feels like performing, in the "circus performer" sense, this month.
You may have to set something in the .desktop file that is visible to your application somehow. (Notice how I didn't use that atrocious "app" word there.)
Maybe there's something in the X utilities???

just thoughts
b

Yeah now I've thought about it more i doubt there's a way.
I realized MATE panel probably works just like my Desktop(ish) where it reads the .desktop file and launches the Exec command.
There was no way to know the .desktop file Desktop(ish) launched from it's internal Shell command but now i use something like this…

Shell MyDesktopFile.Exec With ["GIO_LAUNCHED_DESKTOP_FILE=" & MyDesktopFile.Path]

I'm reckoning the ONLY way to get the info from the MATE panel would be to get on their dev list and ask them to do the same.

Cheers anyway
Online now: No Back to the top
1 guest and 0 members have just viewed this.