1

I am really not familiar with linux, and only started using it recently, so be patient with me. I am trying to control a camera on regular intervals through a script that is called upon in the crontab. When I start up the computer, I can open crontab, edit and save, and everything is executed correctly. However, I can never open crontab a second time, unless I restart the computer first. If I type crontab -e, I get a blank page, located in the /tmp directory. I can enter my commands in there, but cannot save it.

I don't know if this is relevant, but when I try sudo crontab -e, I get something like "no cron installed for root".

Any help is really appreciated!

Sarah

[edit] Problem solved: the problem was the editor (gedit), when using nano as editor, I can access crontab, edit and save without problems!

2
  • 1
    welcome to askubuntu! please post your solution as an answer below - it's okay to answer your own questions here. Nov 22, 2012 at 18:08
  • Problem solved: the problem was the editor (gedit), when using nano as editor, I can access crontab, edit and save without problems!
    – Sarah
    Nov 27, 2012 at 15:33

1 Answer 1

0

The crontab -e command will check the environment variables $EDITOR and $VISUAL for an override of the default text editor, so...
Two of the many other possible ways can be applied:

1. Either: Run select-editor command on terminal (you can get a terminal by pressing Ctrl+Alt+T) as below

$ select-editor 

Select an editor.  To change later, run 'select-editor'.
  1. /bin/ed
  2. /bin/nano        <---- easiest
  3. /usr/bin/vim.basic
  4. /usr/bin/vim.tiny

Choose 1-4 [2]: 

The default here is chosen as 2 mentioned in the square bracket. Your answer will take the default to run with crontab -e when run independently.

2. OR: (This is my personal fav.) Choose one of the following to override default editor:

$ export EDITOR=nano

or

$ export VISUAL=nano  

Of course, this #2 choice you can make permanent by putting it on your .bashrc or .bash_profile.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .