Setting the working directoryCreating a .desktop for Unigine Heaven 4.0How can I change the working directory...

If a character with the Alert feat rolls a crit fail on their Perception check, are they surprised?

Visiting the UK as unmarried couple

Is XSS in canonical link possible?

Folder comparison

What (else) happened July 1st 1858 in London?

Can I rely on this github repository files?

How do you respond to a colleague from another team when they're wrongly expecting that you'll help them?

Divine apple island

Customize circled numbers

Proof of Lemma: Every nonzero integer can be written as a product of primes

What does the Rambam mean when he says that the planets have souls?

Transformation of random variables and joint distributions

Fly on a jet pack vs fly with a jet pack?

Is there a conventional notation or name for the slip angle?

Sampling Theorem and reconstruction

Did US corporations pay demonstrators in the German demonstrations against article 13?

Why does the integral domain "being trapped between a finite field extension" implies that it is a field?

Should I install hardwood flooring or cabinets first?

Why has "pence" been used in this sentence, not "pences"?

Global amount of publications over time

Why did the EU agree to delay the Brexit deadline?

Indicating multiple different modes of speech (fantasy language or telepathy)

Can someone explain how this makes sense electrically?

How do I repair my stair bannister?



Setting the working directory


Creating a .desktop for Unigine Heaven 4.0How can I change the working directory in a launcher on MATE 16.04?Uninstalling MATLAB from laptop, how to get rid of launcher icon?Installing MATLAB and its launcher iconHow to add Minecraft to the Unity launcher?Adding a custom launcher to the Unity LauncherCustom VirtualBox Launcher in GNOME 3java file will not launch from .desktop file - Ubuntu 12.04 LTSUnity launcher for Intellij duplicate after application loadingQmlscene from Launcher IconHow can I give a script its own icon in the Unity launcher?Opening a package (Matlab) from the home directory (or from a launcher) without navigating to the installation directory & without root permission?













12















I want to create a quick launch icon for MATLAB, but it won't start if the working directory is not the same as the directory where the executable is. Can I specify the working directory in the 'Custom Application Launcher'?



Custom launcher










share|improve this question



























    12















    I want to create a quick launch icon for MATLAB, but it won't start if the working directory is not the same as the directory where the executable is. Can I specify the working directory in the 'Custom Application Launcher'?



    Custom launcher










    share|improve this question

























      12












      12








      12








      I want to create a quick launch icon for MATLAB, but it won't start if the working directory is not the same as the directory where the executable is. Can I specify the working directory in the 'Custom Application Launcher'?



      Custom launcher










      share|improve this question














      I want to create a quick launch icon for MATLAB, but it won't start if the working directory is not the same as the directory where the executable is. Can I specify the working directory in the 'Custom Application Launcher'?



      Custom launcher







      launcher






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jun 22 '11 at 18:15









      sashoalmsashoalm

      2,296143969




      2,296143969






















          2 Answers
          2






          active

          oldest

          votes


















          16














          You can set the working directory natively, but for some reason it's not supported in the user interface. The underlying .desktop file itself supports a Path key for "the working directory to run the program in" (see the spec) as long as your launcher is an "Application" type.



          So just open the .desktop file in a text editor (if you're having trouble finding it, you can create the launcher on your desktop and find it in ~/Desktop, then move it later), and add a line at the end that says Path=YOUR_PATH.






          share|improve this answer


























          • Amazing. I can't believe Gnome is missing this in the UI. Any idea if it's visible in latest gnome versions?

            – user1338062
            Feb 20 '13 at 17:26






          • 1





            I don't think it's been added, and in fact I think recent versions of gnome dropped the "Create Application Launcher" option. I recommend github.com/MicahCarrick/desktop-entry-editor as a replacement.

            – Mu Mind
            Feb 21 '13 at 5:37



















          8














          Change the Command to this (substituting the correct paths of course):



          bash -c "cd /path/to/directory && /path/to/directory/executable"





          share|improve this answer


























          • This sort of worked, but only after I set Type to 'Application in Terminal'. For some reason it doesn't work if it's just Application.

            – sashoalm
            Jun 22 '11 at 18:41











          • @satuon Strange, maybe that's a MATLAB specific thing.

            – Isaiah
            Jun 22 '11 at 19:03











          • @satuon: could you try using /bin/sh instead of sh? Perhaps it works then

            – Lekensteyn
            Jun 22 '11 at 19:27











          • @sashoalm (better late than never) you need to specify the option -desktop if you dont want to run it from terminal. mathworks.com/help/matlab/ref/matlablinux.html

            – aiao
            Apr 26 '15 at 18:20













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          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: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          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%2faskubuntu.com%2fquestions%2f50085%2fsetting-the-working-directory%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          2 Answers
          2






          active

          oldest

          votes








          2 Answers
          2






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          16














          You can set the working directory natively, but for some reason it's not supported in the user interface. The underlying .desktop file itself supports a Path key for "the working directory to run the program in" (see the spec) as long as your launcher is an "Application" type.



          So just open the .desktop file in a text editor (if you're having trouble finding it, you can create the launcher on your desktop and find it in ~/Desktop, then move it later), and add a line at the end that says Path=YOUR_PATH.






          share|improve this answer


























          • Amazing. I can't believe Gnome is missing this in the UI. Any idea if it's visible in latest gnome versions?

            – user1338062
            Feb 20 '13 at 17:26






          • 1





            I don't think it's been added, and in fact I think recent versions of gnome dropped the "Create Application Launcher" option. I recommend github.com/MicahCarrick/desktop-entry-editor as a replacement.

            – Mu Mind
            Feb 21 '13 at 5:37
















          16














          You can set the working directory natively, but for some reason it's not supported in the user interface. The underlying .desktop file itself supports a Path key for "the working directory to run the program in" (see the spec) as long as your launcher is an "Application" type.



          So just open the .desktop file in a text editor (if you're having trouble finding it, you can create the launcher on your desktop and find it in ~/Desktop, then move it later), and add a line at the end that says Path=YOUR_PATH.






          share|improve this answer


























          • Amazing. I can't believe Gnome is missing this in the UI. Any idea if it's visible in latest gnome versions?

            – user1338062
            Feb 20 '13 at 17:26






          • 1





            I don't think it's been added, and in fact I think recent versions of gnome dropped the "Create Application Launcher" option. I recommend github.com/MicahCarrick/desktop-entry-editor as a replacement.

            – Mu Mind
            Feb 21 '13 at 5:37














          16












          16








          16







          You can set the working directory natively, but for some reason it's not supported in the user interface. The underlying .desktop file itself supports a Path key for "the working directory to run the program in" (see the spec) as long as your launcher is an "Application" type.



          So just open the .desktop file in a text editor (if you're having trouble finding it, you can create the launcher on your desktop and find it in ~/Desktop, then move it later), and add a line at the end that says Path=YOUR_PATH.






          share|improve this answer















          You can set the working directory natively, but for some reason it's not supported in the user interface. The underlying .desktop file itself supports a Path key for "the working directory to run the program in" (see the spec) as long as your launcher is an "Application" type.



          So just open the .desktop file in a text editor (if you're having trouble finding it, you can create the launcher on your desktop and find it in ~/Desktop, then move it later), and add a line at the end that says Path=YOUR_PATH.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 8 mins ago









          heinrichmartin

          32




          32










          answered Sep 3 '12 at 16:31









          Mu MindMu Mind

          28539




          28539













          • Amazing. I can't believe Gnome is missing this in the UI. Any idea if it's visible in latest gnome versions?

            – user1338062
            Feb 20 '13 at 17:26






          • 1





            I don't think it's been added, and in fact I think recent versions of gnome dropped the "Create Application Launcher" option. I recommend github.com/MicahCarrick/desktop-entry-editor as a replacement.

            – Mu Mind
            Feb 21 '13 at 5:37



















          • Amazing. I can't believe Gnome is missing this in the UI. Any idea if it's visible in latest gnome versions?

            – user1338062
            Feb 20 '13 at 17:26






          • 1





            I don't think it's been added, and in fact I think recent versions of gnome dropped the "Create Application Launcher" option. I recommend github.com/MicahCarrick/desktop-entry-editor as a replacement.

            – Mu Mind
            Feb 21 '13 at 5:37

















          Amazing. I can't believe Gnome is missing this in the UI. Any idea if it's visible in latest gnome versions?

          – user1338062
          Feb 20 '13 at 17:26





          Amazing. I can't believe Gnome is missing this in the UI. Any idea if it's visible in latest gnome versions?

          – user1338062
          Feb 20 '13 at 17:26




          1




          1





          I don't think it's been added, and in fact I think recent versions of gnome dropped the "Create Application Launcher" option. I recommend github.com/MicahCarrick/desktop-entry-editor as a replacement.

          – Mu Mind
          Feb 21 '13 at 5:37





          I don't think it's been added, and in fact I think recent versions of gnome dropped the "Create Application Launcher" option. I recommend github.com/MicahCarrick/desktop-entry-editor as a replacement.

          – Mu Mind
          Feb 21 '13 at 5:37













          8














          Change the Command to this (substituting the correct paths of course):



          bash -c "cd /path/to/directory && /path/to/directory/executable"





          share|improve this answer


























          • This sort of worked, but only after I set Type to 'Application in Terminal'. For some reason it doesn't work if it's just Application.

            – sashoalm
            Jun 22 '11 at 18:41











          • @satuon Strange, maybe that's a MATLAB specific thing.

            – Isaiah
            Jun 22 '11 at 19:03











          • @satuon: could you try using /bin/sh instead of sh? Perhaps it works then

            – Lekensteyn
            Jun 22 '11 at 19:27











          • @sashoalm (better late than never) you need to specify the option -desktop if you dont want to run it from terminal. mathworks.com/help/matlab/ref/matlablinux.html

            – aiao
            Apr 26 '15 at 18:20


















          8














          Change the Command to this (substituting the correct paths of course):



          bash -c "cd /path/to/directory && /path/to/directory/executable"





          share|improve this answer


























          • This sort of worked, but only after I set Type to 'Application in Terminal'. For some reason it doesn't work if it's just Application.

            – sashoalm
            Jun 22 '11 at 18:41











          • @satuon Strange, maybe that's a MATLAB specific thing.

            – Isaiah
            Jun 22 '11 at 19:03











          • @satuon: could you try using /bin/sh instead of sh? Perhaps it works then

            – Lekensteyn
            Jun 22 '11 at 19:27











          • @sashoalm (better late than never) you need to specify the option -desktop if you dont want to run it from terminal. mathworks.com/help/matlab/ref/matlablinux.html

            – aiao
            Apr 26 '15 at 18:20
















          8












          8








          8







          Change the Command to this (substituting the correct paths of course):



          bash -c "cd /path/to/directory && /path/to/directory/executable"





          share|improve this answer















          Change the Command to this (substituting the correct paths of course):



          bash -c "cd /path/to/directory && /path/to/directory/executable"






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jun 22 '11 at 18:29

























          answered Jun 22 '11 at 18:22









          IsaiahIsaiah

          43.7k21119138




          43.7k21119138













          • This sort of worked, but only after I set Type to 'Application in Terminal'. For some reason it doesn't work if it's just Application.

            – sashoalm
            Jun 22 '11 at 18:41











          • @satuon Strange, maybe that's a MATLAB specific thing.

            – Isaiah
            Jun 22 '11 at 19:03











          • @satuon: could you try using /bin/sh instead of sh? Perhaps it works then

            – Lekensteyn
            Jun 22 '11 at 19:27











          • @sashoalm (better late than never) you need to specify the option -desktop if you dont want to run it from terminal. mathworks.com/help/matlab/ref/matlablinux.html

            – aiao
            Apr 26 '15 at 18:20





















          • This sort of worked, but only after I set Type to 'Application in Terminal'. For some reason it doesn't work if it's just Application.

            – sashoalm
            Jun 22 '11 at 18:41











          • @satuon Strange, maybe that's a MATLAB specific thing.

            – Isaiah
            Jun 22 '11 at 19:03











          • @satuon: could you try using /bin/sh instead of sh? Perhaps it works then

            – Lekensteyn
            Jun 22 '11 at 19:27











          • @sashoalm (better late than never) you need to specify the option -desktop if you dont want to run it from terminal. mathworks.com/help/matlab/ref/matlablinux.html

            – aiao
            Apr 26 '15 at 18:20



















          This sort of worked, but only after I set Type to 'Application in Terminal'. For some reason it doesn't work if it's just Application.

          – sashoalm
          Jun 22 '11 at 18:41





          This sort of worked, but only after I set Type to 'Application in Terminal'. For some reason it doesn't work if it's just Application.

          – sashoalm
          Jun 22 '11 at 18:41













          @satuon Strange, maybe that's a MATLAB specific thing.

          – Isaiah
          Jun 22 '11 at 19:03





          @satuon Strange, maybe that's a MATLAB specific thing.

          – Isaiah
          Jun 22 '11 at 19:03













          @satuon: could you try using /bin/sh instead of sh? Perhaps it works then

          – Lekensteyn
          Jun 22 '11 at 19:27





          @satuon: could you try using /bin/sh instead of sh? Perhaps it works then

          – Lekensteyn
          Jun 22 '11 at 19:27













          @sashoalm (better late than never) you need to specify the option -desktop if you dont want to run it from terminal. mathworks.com/help/matlab/ref/matlablinux.html

          – aiao
          Apr 26 '15 at 18:20







          @sashoalm (better late than never) you need to specify the option -desktop if you dont want to run it from terminal. mathworks.com/help/matlab/ref/matlablinux.html

          – aiao
          Apr 26 '15 at 18:20




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Ask Ubuntu!


          • 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%2faskubuntu.com%2fquestions%2f50085%2fsetting-the-working-directory%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

          Why do type traits not work with types in namespace scope?What are POD types in C++?Why can templates only be...

          Will tsunami waves travel forever if there was no land?Why do tsunami waves begin with the water flowing away...

          Simple Scan not detecting my scanner (Brother DCP-7055W)Brother MFC-L2700DW printer can print, can't...