Gedit as the default editor in crontab

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











up vote
3
down vote

favorite












How do I make gedit the default editor for crontab?



So far I've tried:



sudo update-alternatives --install /usr/bin/gnome-text-editor gnome-text-editor /usr/bin/gedit 100


and



sudo update-alternatives --install /usr/bin/editor editor /usr/bin/gedit 100


No luck so far. (maybe I just need to reboot?)










share|improve this question









New contributor




J Rosenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    3
    down vote

    favorite












    How do I make gedit the default editor for crontab?



    So far I've tried:



    sudo update-alternatives --install /usr/bin/gnome-text-editor gnome-text-editor /usr/bin/gedit 100


    and



    sudo update-alternatives --install /usr/bin/editor editor /usr/bin/gedit 100


    No luck so far. (maybe I just need to reboot?)










    share|improve this question









    New contributor




    J Rosenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      How do I make gedit the default editor for crontab?



      So far I've tried:



      sudo update-alternatives --install /usr/bin/gnome-text-editor gnome-text-editor /usr/bin/gedit 100


      and



      sudo update-alternatives --install /usr/bin/editor editor /usr/bin/gedit 100


      No luck so far. (maybe I just need to reboot?)










      share|improve this question









      New contributor




      J Rosenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      How do I make gedit the default editor for crontab?



      So far I've tried:



      sudo update-alternatives --install /usr/bin/gnome-text-editor gnome-text-editor /usr/bin/gedit 100


      and



      sudo update-alternatives --install /usr/bin/editor editor /usr/bin/gedit 100


      No luck so far. (maybe I just need to reboot?)







      command-line cron gedit default-programs editor






      share|improve this question









      New contributor




      J Rosenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      J Rosenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 1 hour ago









      Ravexina

      27.8k146594




      27.8k146594






      New contributor




      J Rosenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 3 hours ago









      J Rosenberg

      285




      285




      New contributor




      J Rosenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      J Rosenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      J Rosenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          3
          down vote



          accepted










          Open .profile file using your desired editor:



          gedit ~/.profile


          Add this line to the file and save it:



          export EDITOR=gedit


          Logout and re-login. Now when you use crontab -e it would open gedit.



          Remember that it's going to set gedit as default editors for other commands too, if you want it only for crontab then create an alias:



          alias crontab='EDITOR=gedit crontab -e'





          share|improve this answer






















          • For extra credit any idea why the other methods (mentioned above) didn't work?
            – J Rosenberg
            2 hours ago










          • Because crontab opens the config files using editor defined in EDITOR variable... like most of the other commands.
            – Ravexina
            2 hours ago










          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          J Rosenberg is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1075167%2fgedit-as-the-default-editor-in-crontab%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          3
          down vote



          accepted










          Open .profile file using your desired editor:



          gedit ~/.profile


          Add this line to the file and save it:



          export EDITOR=gedit


          Logout and re-login. Now when you use crontab -e it would open gedit.



          Remember that it's going to set gedit as default editors for other commands too, if you want it only for crontab then create an alias:



          alias crontab='EDITOR=gedit crontab -e'





          share|improve this answer






















          • For extra credit any idea why the other methods (mentioned above) didn't work?
            – J Rosenberg
            2 hours ago










          • Because crontab opens the config files using editor defined in EDITOR variable... like most of the other commands.
            – Ravexina
            2 hours ago














          up vote
          3
          down vote



          accepted










          Open .profile file using your desired editor:



          gedit ~/.profile


          Add this line to the file and save it:



          export EDITOR=gedit


          Logout and re-login. Now when you use crontab -e it would open gedit.



          Remember that it's going to set gedit as default editors for other commands too, if you want it only for crontab then create an alias:



          alias crontab='EDITOR=gedit crontab -e'





          share|improve this answer






















          • For extra credit any idea why the other methods (mentioned above) didn't work?
            – J Rosenberg
            2 hours ago










          • Because crontab opens the config files using editor defined in EDITOR variable... like most of the other commands.
            – Ravexina
            2 hours ago












          up vote
          3
          down vote



          accepted







          up vote
          3
          down vote



          accepted






          Open .profile file using your desired editor:



          gedit ~/.profile


          Add this line to the file and save it:



          export EDITOR=gedit


          Logout and re-login. Now when you use crontab -e it would open gedit.



          Remember that it's going to set gedit as default editors for other commands too, if you want it only for crontab then create an alias:



          alias crontab='EDITOR=gedit crontab -e'





          share|improve this answer














          Open .profile file using your desired editor:



          gedit ~/.profile


          Add this line to the file and save it:



          export EDITOR=gedit


          Logout and re-login. Now when you use crontab -e it would open gedit.



          Remember that it's going to set gedit as default editors for other commands too, if you want it only for crontab then create an alias:



          alias crontab='EDITOR=gedit crontab -e'






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited 2 hours ago

























          answered 2 hours ago









          Ravexina

          27.8k146594




          27.8k146594











          • For extra credit any idea why the other methods (mentioned above) didn't work?
            – J Rosenberg
            2 hours ago










          • Because crontab opens the config files using editor defined in EDITOR variable... like most of the other commands.
            – Ravexina
            2 hours ago
















          • For extra credit any idea why the other methods (mentioned above) didn't work?
            – J Rosenberg
            2 hours ago










          • Because crontab opens the config files using editor defined in EDITOR variable... like most of the other commands.
            – Ravexina
            2 hours ago















          For extra credit any idea why the other methods (mentioned above) didn't work?
          – J Rosenberg
          2 hours ago




          For extra credit any idea why the other methods (mentioned above) didn't work?
          – J Rosenberg
          2 hours ago












          Because crontab opens the config files using editor defined in EDITOR variable... like most of the other commands.
          – Ravexina
          2 hours ago




          Because crontab opens the config files using editor defined in EDITOR variable... like most of the other commands.
          – Ravexina
          2 hours ago










          J Rosenberg is a new contributor. Be nice, and check out our Code of Conduct.









           

          draft saved


          draft discarded


















          J Rosenberg is a new contributor. Be nice, and check out our Code of Conduct.












          J Rosenberg is a new contributor. Be nice, and check out our Code of Conduct.











          J Rosenberg is a new contributor. Be nice, and check out our Code of Conduct.













           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1075167%2fgedit-as-the-default-editor-in-crontab%23new-answer', 'question_page');

          );

          Post as a guest













































































          Comments

          Popular posts from this blog

          What does second last employer means? [closed]

          List of Gilmore Girls characters

          Confectionery