Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: How do I change the default editor for crontab -e ?

  1. #11
    Join Date
    Jun 2007
    Beans
    Hidden!
    Distro
    Ubuntu 7.10 Gutsy Gibbon

    Re: How do I change the default editor for crontab -e ?

    Quote Originally Posted by PGScooter View Post
    Make sure you open the file with sudo...
    Are you sure? Sudo in your home dir?
    There is always a presumption of innocence until proven guilty.

  2. #12
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: How do I change the default editor for crontab -e ?

    Quote Originally Posted by macey View Post
    No errors, perhaps I should have explained, I am not trying to edit 'my' crontab, but the system one via 'sudo crontab -e'. Thats when the system uses vi(m) instead of gedit. OOPS!
    okay then> sudo export VISUAL=gedit `sudo crontab -e`

    post those errors.

  3. #13
    Join Date
    Oct 2007
    Beans
    94

    Re: How do I change the default editor for crontab -e ?

    Quote Originally Posted by kerry_s View Post
    okay then> sudo export VISUAL=gedit `sudo crontab -e`

    post those errors.
    Ok Thanks, here it is:-

    richard@kagyu-laptop:~$ sudo export VISUAL=gedit `sudo crontab -e`
    [sudo] password for richard:
    Vim: Warning: Output is not to a terminal

    Terminal does not the respond, Cntl D, C etc......

  4. #14
    Join Date
    Jul 2006
    Location
    Here
    Beans
    11,187

    Re: How do I change the default editor for crontab -e ?

    Quote Originally Posted by macey View Post
    Ok Thanks, here it is:-

    richard@kagyu-laptop:~$ sudo export VISUAL=gedit `sudo crontab -e`
    [sudo] password for richard:
    Vim: Warning: Output is not to a terminal

    Terminal does not the respond, Cntl D, C etc......
    ouch, it looks like it don't want you to run console executed gui's as root.

    try putting the> export VISUAL=gedit < in /etc/environment
    logout or reboot, then try the "sudo crontab -e"
    other than that i don't know, maybe learn vi.

  5. #15
    Join Date
    Aug 2007
    Beans
    2

    Talking Re: How do I change the default editor for crontab -e ?

    Quote Originally Posted by Locutus_of_Borg View Post
    in /etc/profile:
    export EDITOR="/usr/bin/nano"
    export VISUAL="/usr/bin/nano"


    thats what i had to do for slackware at least
    Thanks a bunch for this. Worked for me! (Slackware 13.1 64-bit)

  6. #16
    Join Date
    Jul 2009
    Beans
    571
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How do I change the default editor for crontab -e ?

    Hi, but mine still doesn't work. I regularly use:

    Code:
    sudo crontab -e
    But my editor is only nano, how can I change it so I can use gedit?

    I'm using Ubuntu Lucid Lynx. Thanks.
    It's OK, everything we know will become obsolete at some time.

  7. #17
    Join Date
    Jul 2009
    Location
    Dayton Ohio USA
    Beans
    1,069
    Distro
    Ubuntu 13.04 Raring Ringtail

    Re: How do I change the default editor for crontab -e ?

    Try this in terminal.
    Code:
    export EDITOR=gedit
    It's okay, I'm a limo driver

  8. #18
    Join Date
    Jul 2009
    Beans
    571
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How do I change the default editor for crontab -e ?

    Hi MooPi - thanks but I switch from

    Code:
    sudo crontab -e
    to

    Code:
    sudo gedit /etc/crontab
    They're really the same. Just indicate who's the user that will execute the command.

    Problem solved. Thanks.
    It's OK, everything we know will become obsolete at some time.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •