I am trying to write a function
launchSystemFile
which works like windows ShellExecuteEx
from the command line or from C++.
If I ShellExecuteEx
a blah.txt
it opens it in the default editor.
If I ShellExecuteEx
a firefox.exe
it launches the executable.
I have been doing from C++ popen "xdg-open blah"
and it works great except for executables.
Is there anyway to make xdg-open
execute an executable? Such as Firefox at path /usr/lib/firefox/firefox
?
I tried xdg-open "/usr/lib/firefox/firefox"
but this fails with the error message:
> gvfs-open: /usr/lib/firefox/firefox: error opening location: No application is registered as handling this file
Asked by Noitidart
(307 rep)
Jan 27, 2017, 12:39 PM
Last activity: Jun 11, 2021, 09:56 AM
Last activity: Jun 11, 2021, 09:56 AM