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 #44077 is a reply to message #44062] Mon, 22 December 2014 21:06 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3443
Registered: August 2008
Senior Veteran
Hello rainbowsally

This is the implementation of LaunchFile() in Functions4U:

bool LaunchFile(const char *_file) {
	String file = UnixPath(_file);
	int ret;
	if (GetDesktopManagerNew() == "gnome") 
		ret = system("gnome-open \"" + String(file) + "\"");
	else if (GetDesktopManagerNew() == "kde") 
		ret = system("kfmclient exec \"" + String(file) + "\" &"); 
	else if (GetDesktopManagerNew() == "enlightenment") {
		String mime = GetExtExecutable(GetFileExt(file));
		String program = mime.Left(mime.Find("."));		// Left side of mime executable is the program to run
		ret = system(program + " \"" + String(file) + "\" &"); 
	} else 
		ret = system("xdg-open \"" + String(file) + "\"");
	return (ret >= 0);
}


Please post the details of the system where you find the problems.


Best regards
IƱaki
 
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 19:55:24 CEST 2025

Total time taken to generate the page: 0.03869 seconds