Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » Linux "start" equivalent (Need to launch an executable?)
Re: Linux "start" equivalent [message #44108 is a reply to message #44097] Thu, 25 December 2014 14:08 Go to previous messageGo to previous message
rainbowsally is currently offline  rainbowsally
Messages: 29
Registered: December 2014
Promising Member
Hi koldo.

koldo wrote on Wed, 24 December 2014 13:45
Hello rainbowsally

You can make me a favor Smile : please tell me the way to identify your desktop system and the best way to launch a program in your system. I mean:

- The way to identify your system
For example: environment variables (GNOME_DESKTOP_SESSION_ID in gnome, KDE_FULL_SESSION in KDE) or some text in xprop output.

- The best way to launch a program in your system
For example:
    system("kfmclient exec \"" + String(file) + "\" &"); 
    system("xdg-open \"" + String(file) + "\"");



The best way is just as you wrote above. At least for KDE. The environment variables generally have some clue as to the desktop being used.

But you may not realize this but both of the commands above do the same thing. That is kfmclient and xdg-open will both launch the same file but the xdg-open is "generic". Probably works on your Ubuntu, no?

If you like you can take a look at xdg-open. It's a script so you can pretty much tell the extents it goes to in order to figure out everything.

If Ubuntu has xdg-open, so does Mint and so does open[sic]suse.

I may also have the sources for kfmclient for kde 4.6, if you're curious about that one.

PS. xprop is for reading the "atoms" (flags and misc stuff) and icon bitmaps and things like that found in running applications. Very cool, but not much help here.

Also, if this remains important to you, let me know. I THINK we can scan the environment variables for strings containing "DE" at the end of a key OR a value (in a key-value pair) to find, or at the very least to get strong clues, about a user's current desktop environment.

I'm willing to do you a favor. Smile It just might not be necessary. Let me know.

[Updated on: Thu, 25 December 2014 14:18]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problems with OfficeAutomation (Solved)
Next Topic: Docking files in bazaar and uppsrc differ
Goto Forum:
  


Current Time: Sat Aug 09 15:39:39 CEST 2025

Total time taken to generate the page: 0.03277 seconds