4

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.

Jeroen
  • 807

1 Answers1

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"...

Xen2050
  • 2,354
  • 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 Apr 01 '14 at 18:43