crontab not observing EDITOR or VISUAL

Bug #222830 reported by William Siddall
8
Affects Status Importance Assigned to Milestone
cron (Debian)
Fix Released
Undecided
Unassigned
cron (Ubuntu)
Fix Released
Wishlist
Dustin Kirkland 

Bug Description

Ubuntu 8.04
crontab -e uses nano editor even though EDITOR and VISUAL are set to /usr/bin/vi, as verified by echo's. Changing link from /usr/bin/editor to /usr/bin/vi (was linked to /bin/nano) causes crontab -e to work as expected.

Related branches

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

I believe that this is because crontab is using /usr/bin/editor, rather than /usr/bin/sensible-editor, as suggested by Debian policy, section 11.4 of:
http://www.debian.org/doc/debian-policy/ch-customized-programs.html

I have filed a bug and submitted a patch upstream as well:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=482284

In the mean time, I have test packages for Hardy in my PPA:
https://edge.launchpad.net/~kirkland/+archive

I will attach a patch in my next post for Intrepid.

:-Dustin

Changed in cron:
assignee: nobody → kamion
importance: Undecided → Wishlist
status: New → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Patch for Intrepid attached.

:-Dustin

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Specifically to answer the reporter's question, you should NOT modify the /usr/bin/editor symlink by hand.

Instead, use:

sudo update-alternatives --config editor

And choose from the available editors.

:-Dustin

Changed in cron:
assignee: kamion → kirkland
Changed in cron:
status: Unknown → New
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Patch updated to apply cleanly against cron version in Intrepid.

Requesting sponsorship...

:-Dustin

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package cron - 3.0pl1-104+ubuntu1

---------------
cron (3.0pl1-104+ubuntu1) intrepid; urgency=low

  * pathnames.h: Use the Debian sensible-editor (LP: #222830).
  * Modify Maintainer value to match the DebianMaintainerField
    specification.

 -- Dustin Kirkland <email address hidden> Mon, 09 Jun 2008 11:42:25 -0500

Changed in cron:
status: In Progress → Fix Released
Revision history for this message
Artur Rona (ari-tczew) wrote :

 cron (3.0pl1-107) unstable; urgency=low

   * debian/cron.pam: Use common-session-noninteractive in pam.d configuration
     instead of common-session so that libpam-ssh is not run. If libpam-ssh was
     installed the previous configuration resulted in cron spawning
     many ssh-agent processes (Closes: #572292)
   * debian/cron.init: Add Should-Start/Stop dependency to slapd so that cron
   * can start up tasks for users define in an LDAP (Closes: #557659, #546367)
   * Fix the use of perror so that the error message is correct when
     printing the reason why an operation failed. Thanks to
     Justin Pryzby for the patch. (Closes: 470587)
   * pathnames.h: Use /usr/bin/sensible-editor instead of /usr/bin/editor when
     calling crontab -e (Closes: #482284)
   * Fix debian/control description, thanks to Justin B Rye for the patch
     (Closes: #535227)
   * crontab.c: Produce a different warning message when root tries to setup a
     crontab for a user that is not allowed to do so, and do not log the
     action (Closes: #505288)
   * Only allow -i if -r has been specified previously (Closes: #513379)
   * Update debian/README.Debian to indicate that the package is
     being maintained at Alioth, thanks Tomas Pospisek for the patch
     (Closes: #511740)
   * crontab.c: Update the usage() call so that it refers to the use
     of -i when removing (-r)
   * crontab.1: Update the manpage:
      - Use the same option listing as in the crontab usage() call
      - Remove 'tweaked', explain what -u does in each context.
      - Remove V3, use 'Vixie Cron' instead
     (Closes: #572249)
      - Update the manpage years (Closes: #563296)
      - Describe the usage of the crontab group wrt /var/spool/cron/crontabs
     (Closes: #539182)
   * Use debhelper compatibility version 5
   * Include cross build support with patch to debian/rules provided by Neil
     Williams (Closes: #465077)
   * Change maintainer's email address

 -- Javier Fernandez-Sanguino Pen~a <email address hidden> Tue, 16 Mar 2010 22:55:26 +0100

Changed in cron (Debian):
importance: Unknown → Undecided
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.