How to start an application as GNOME would by command line?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP












1















How would I start an application (by launcher) the exact same way as GNOME would, in a command line interface? I want to set some environment variables.



I know I can check the launcher file for the 'EXEC' command but for some reason that command makes my application crash; while when it's launched through GNOME it works fine.










share|improve this question






















  • Running a .desktop file in the terminal. I would use the Python solution.

    – slm
    Apr 1 '14 at 22:25












  • @slm But that just runs the Exec command, which I've tried and doesn't work.

    – Jeroen Bollen
    Apr 2 '14 at 5:22











  • Are you looking for gnome-open binary ?

    – SHW
    Apr 2 '14 at 7:30











  • @SHW That'll open a document, I want to open a .desktop-file.

    – Jeroen Bollen
    Apr 2 '14 at 11:45






  • 1





    You can do that via gapplication provided that your application supports (or has been ported to) gapplication.

    – don_crissti
    Nov 22 '15 at 14:33















1















How would I start an application (by launcher) the exact same way as GNOME would, in a command line interface? I want to set some environment variables.



I know I can check the launcher file for the 'EXEC' command but for some reason that command makes my application crash; while when it's launched through GNOME it works fine.










share|improve this question






















  • Running a .desktop file in the terminal. I would use the Python solution.

    – slm
    Apr 1 '14 at 22:25












  • @slm But that just runs the Exec command, which I've tried and doesn't work.

    – Jeroen Bollen
    Apr 2 '14 at 5:22











  • Are you looking for gnome-open binary ?

    – SHW
    Apr 2 '14 at 7:30











  • @SHW That'll open a document, I want to open a .desktop-file.

    – Jeroen Bollen
    Apr 2 '14 at 11:45






  • 1





    You can do that via gapplication provided that your application supports (or has been ported to) gapplication.

    – don_crissti
    Nov 22 '15 at 14:33













1












1








1








How would I start an application (by launcher) the exact same way as GNOME would, in a command line interface? I want to set some environment variables.



I know I can check the launcher file for the 'EXEC' command but for some reason that command makes my application crash; while when it's launched through GNOME it works fine.










share|improve this question














How would I start an application (by launcher) the exact same way as GNOME would, in a command line interface? I want to set some environment variables.



I know I can check the launcher file for the 'EXEC' command but for some reason that command makes my application crash; while when it's launched through GNOME it works fine.







gnome3 command






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Apr 1 '14 at 16:59









Jeroen BollenJeroen Bollen

3421723




3421723












  • Running a .desktop file in the terminal. I would use the Python solution.

    – slm
    Apr 1 '14 at 22:25












  • @slm But that just runs the Exec command, which I've tried and doesn't work.

    – Jeroen Bollen
    Apr 2 '14 at 5:22











  • Are you looking for gnome-open binary ?

    – SHW
    Apr 2 '14 at 7:30











  • @SHW That'll open a document, I want to open a .desktop-file.

    – Jeroen Bollen
    Apr 2 '14 at 11:45






  • 1





    You can do that via gapplication provided that your application supports (or has been ported to) gapplication.

    – don_crissti
    Nov 22 '15 at 14:33

















  • Running a .desktop file in the terminal. I would use the Python solution.

    – slm
    Apr 1 '14 at 22:25












  • @slm But that just runs the Exec command, which I've tried and doesn't work.

    – Jeroen Bollen
    Apr 2 '14 at 5:22











  • Are you looking for gnome-open binary ?

    – SHW
    Apr 2 '14 at 7:30











  • @SHW That'll open a document, I want to open a .desktop-file.

    – Jeroen Bollen
    Apr 2 '14 at 11:45






  • 1





    You can do that via gapplication provided that your application supports (or has been ported to) gapplication.

    – don_crissti
    Nov 22 '15 at 14:33
















Running a .desktop file in the terminal. I would use the Python solution.

– slm
Apr 1 '14 at 22:25






Running a .desktop file in the terminal. I would use the Python solution.

– slm
Apr 1 '14 at 22:25














@slm But that just runs the Exec command, which I've tried and doesn't work.

– Jeroen Bollen
Apr 2 '14 at 5:22





@slm But that just runs the Exec command, which I've tried and doesn't work.

– Jeroen Bollen
Apr 2 '14 at 5:22













Are you looking for gnome-open binary ?

– SHW
Apr 2 '14 at 7:30





Are you looking for gnome-open binary ?

– SHW
Apr 2 '14 at 7:30













@SHW That'll open a document, I want to open a .desktop-file.

– Jeroen Bollen
Apr 2 '14 at 11:45





@SHW That'll open a document, I want to open a .desktop-file.

– Jeroen Bollen
Apr 2 '14 at 11:45




1




1





You can do that via gapplication provided that your application supports (or has been ported to) gapplication.

– don_crissti
Nov 22 '15 at 14:33





You can do that via gapplication provided that your application supports (or has been ported to) gapplication.

– don_crissti
Nov 22 '15 at 14:33










1 Answer
1






active

oldest

votes


















0














I haven't used gnome for a few years, but this is generally how gnome/MATE/XFCE desktops go...



First you have to find the command that launches the program, looking in the desktop's program menu's or config files should find it, or if the menu has an "add shortcut to desktop" that might give you a file to look at that's easier to find.



If you find the command line and run it in a terminal or the "ALT-F2 Run Command" dialog, then the program should start up. If your program needs arguments maybe they need some quoting to get the program to read them correctly. Depending on the program you might have to cd into the right directory, which could be specified in the shortcut launcher file somewhere, or else it might not know where to look for it's config files & would quit.



Definitely find the right command & try it out in a terminal window. If you're in bash and it does run, then the terminal would probably be kept open while the program runs on the desktop. You can usually get the terminal to close and keep your program running, if the terminal's job control is set up such that it's shopt checkjobs option is not set, or if you first run the program in the background (with CTRL-Z and bg and disown, or run it as commandline & then bg then disown) then you caon close the terminal with the program still running. dash (often sh) has job control too, but may not have a disown command, but it's rarely used as an interactive terminal AFAIK.



A program shouldn't segfault just because it's run from the wrong directory or can't find it's config file, that would be considered a bug, but quitting right away could look like a "crash"...






share|improve this answer























  • It doesn't actually crash right away, it crashes because it couldn't fix an error. The launcher file contains no parameters or anything.

    – Jeroen Bollen
    Apr 1 '14 at 18:43










Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f122593%2fhow-to-start-an-application-as-gnome-would-by-command-line%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














I haven't used gnome for a few years, but this is generally how gnome/MATE/XFCE desktops go...



First you have to find the command that launches the program, looking in the desktop's program menu's or config files should find it, or if the menu has an "add shortcut to desktop" that might give you a file to look at that's easier to find.



If you find the command line and run it in a terminal or the "ALT-F2 Run Command" dialog, then the program should start up. If your program needs arguments maybe they need some quoting to get the program to read them correctly. Depending on the program you might have to cd into the right directory, which could be specified in the shortcut launcher file somewhere, or else it might not know where to look for it's config files & would quit.



Definitely find the right command & try it out in a terminal window. If you're in bash and it does run, then the terminal would probably be kept open while the program runs on the desktop. You can usually get the terminal to close and keep your program running, if the terminal's job control is set up such that it's shopt checkjobs option is not set, or if you first run the program in the background (with CTRL-Z and bg and disown, or run it as commandline & then bg then disown) then you caon close the terminal with the program still running. dash (often sh) has job control too, but may not have a disown command, but it's rarely used as an interactive terminal AFAIK.



A program shouldn't segfault just because it's run from the wrong directory or can't find it's config file, that would be considered a bug, but quitting right away could look like a "crash"...






share|improve this answer























  • It doesn't actually crash right away, it crashes because it couldn't fix an error. The launcher file contains no parameters or anything.

    – Jeroen Bollen
    Apr 1 '14 at 18:43















0














I haven't used gnome for a few years, but this is generally how gnome/MATE/XFCE desktops go...



First you have to find the command that launches the program, looking in the desktop's program menu's or config files should find it, or if the menu has an "add shortcut to desktop" that might give you a file to look at that's easier to find.



If you find the command line and run it in a terminal or the "ALT-F2 Run Command" dialog, then the program should start up. If your program needs arguments maybe they need some quoting to get the program to read them correctly. Depending on the program you might have to cd into the right directory, which could be specified in the shortcut launcher file somewhere, or else it might not know where to look for it's config files & would quit.



Definitely find the right command & try it out in a terminal window. If you're in bash and it does run, then the terminal would probably be kept open while the program runs on the desktop. You can usually get the terminal to close and keep your program running, if the terminal's job control is set up such that it's shopt checkjobs option is not set, or if you first run the program in the background (with CTRL-Z and bg and disown, or run it as commandline & then bg then disown) then you caon close the terminal with the program still running. dash (often sh) has job control too, but may not have a disown command, but it's rarely used as an interactive terminal AFAIK.



A program shouldn't segfault just because it's run from the wrong directory or can't find it's config file, that would be considered a bug, but quitting right away could look like a "crash"...






share|improve this answer























  • It doesn't actually crash right away, it crashes because it couldn't fix an error. The launcher file contains no parameters or anything.

    – Jeroen Bollen
    Apr 1 '14 at 18:43













0












0








0







I haven't used gnome for a few years, but this is generally how gnome/MATE/XFCE desktops go...



First you have to find the command that launches the program, looking in the desktop's program menu's or config files should find it, or if the menu has an "add shortcut to desktop" that might give you a file to look at that's easier to find.



If you find the command line and run it in a terminal or the "ALT-F2 Run Command" dialog, then the program should start up. If your program needs arguments maybe they need some quoting to get the program to read them correctly. Depending on the program you might have to cd into the right directory, which could be specified in the shortcut launcher file somewhere, or else it might not know where to look for it's config files & would quit.



Definitely find the right command & try it out in a terminal window. If you're in bash and it does run, then the terminal would probably be kept open while the program runs on the desktop. You can usually get the terminal to close and keep your program running, if the terminal's job control is set up such that it's shopt checkjobs option is not set, or if you first run the program in the background (with CTRL-Z and bg and disown, or run it as commandline & then bg then disown) then you caon close the terminal with the program still running. dash (often sh) has job control too, but may not have a disown command, but it's rarely used as an interactive terminal AFAIK.



A program shouldn't segfault just because it's run from the wrong directory or can't find it's config file, that would be considered a bug, but quitting right away could look like a "crash"...






share|improve this answer













I haven't used gnome for a few years, but this is generally how gnome/MATE/XFCE desktops go...



First you have to find the command that launches the program, looking in the desktop's program menu's or config files should find it, or if the menu has an "add shortcut to desktop" that might give you a file to look at that's easier to find.



If you find the command line and run it in a terminal or the "ALT-F2 Run Command" dialog, then the program should start up. If your program needs arguments maybe they need some quoting to get the program to read them correctly. Depending on the program you might have to cd into the right directory, which could be specified in the shortcut launcher file somewhere, or else it might not know where to look for it's config files & would quit.



Definitely find the right command & try it out in a terminal window. If you're in bash and it does run, then the terminal would probably be kept open while the program runs on the desktop. You can usually get the terminal to close and keep your program running, if the terminal's job control is set up such that it's shopt checkjobs option is not set, or if you first run the program in the background (with CTRL-Z and bg and disown, or run it as commandline & then bg then disown) then you caon close the terminal with the program still running. dash (often sh) has job control too, but may not have a disown command, but it's rarely used as an interactive terminal AFAIK.



A program shouldn't segfault just because it's run from the wrong directory or can't find it's config file, that would be considered a bug, but quitting right away could look like a "crash"...







share|improve this answer












share|improve this answer



share|improve this answer










answered Apr 1 '14 at 17:55









Xen2050Xen2050

1,289813




1,289813












  • It doesn't actually crash right away, it crashes because it couldn't fix an error. The launcher file contains no parameters or anything.

    – Jeroen Bollen
    Apr 1 '14 at 18:43

















  • It doesn't actually crash right away, it crashes because it couldn't fix an error. The launcher file contains no parameters or anything.

    – Jeroen Bollen
    Apr 1 '14 at 18:43
















It doesn't actually crash right away, it crashes because it couldn't fix an error. The launcher file contains no parameters or anything.

– Jeroen Bollen
Apr 1 '14 at 18:43





It doesn't actually crash right away, it crashes because it couldn't fix an error. The launcher file contains no parameters or anything.

– Jeroen Bollen
Apr 1 '14 at 18:43

















draft saved

draft discarded
















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f122593%2fhow-to-start-an-application-as-gnome-would-by-command-line%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown






Popular posts from this blog

How to check contact read email or not when send email to Individual?

Displaying single band from multi-band raster using QGIS

How many registers does an x86_64 CPU actually have?