7
Welcome to Ubuntu 11.04 (GNU/Linux 2.6.32-042stab037.1 x86_64)
user@server:~$ crontab -e
no crontab for user - using an empty one

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

Choose 1-4 [2]: 2
crontab: "/usr/bin/sensible-editor" killed; signal 9 (no core dumped)
Received SIGHUP or SIGTERM
Error writing /tmp/crontab.qcuMPr/crontab.save: No such file or directory
Buffer not written to /tmp/crontab.qcuMPr/crontab.save: No such file or directory

Why is this happening?

https://gist.github.com/1751927

2

1 Answer 1

4

/usr/bin/sensible-editor is just a wrapper to help you choose an editor.

What happens when you do this?

export EDITOR=nano
crontab -e

Does /usr/bin/nano exist?

5
  • 1
    When i use export EDITOR=nano everything is fine.
    – Sergey L
    Feb 6, 2012 at 13:33
  • 1
    Did sensible-editor create a file ~/.selected_editor ? That's just a shell script setting an environmental variable SELECTED_EDITOR.
    – cjc
    Feb 6, 2012 at 13:37
  • Yes, file do exists.
    – Sergey L
    Feb 6, 2012 at 14:53
  • ~$ ls -al | grep '.selected' -rw-r--r-- 1 user user 66 2012-02-06 14:42 .selected_editor ~$ cat .selected_editor # Generated by /usr/bin/select-editor SELECTED_EDITOR="/bin/nano"
    – Sergey L
    Feb 6, 2012 at 14:53
  • After I executeexport EDITOR=/usr/bin/vim.And execute crontab -e, and it display crontab: "/usr/bin/vi" exited with status 1.
    – fajin yu
    Feb 9, 2023 at 5:09

You must log in to answer this question.

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