LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 05-20-2016, 10:31 PM   #1
MarioMaster100
LQ Newbie
 
Registered: May 2016
Distribution: arch
Posts: 21

Rep: Reputation: Disabled
crontab not working on slackware current


I'm running slackware64 current. I ran crontab -e and added a script and when I was finished I got this error
Code:
<cron/crontab.3ApGl0" 1L, 46C written 
E828: Cannot open undo file for writing: /var/spool/cron/.crontab.
3ApGl0.un~
I had placed in crontab -e
Code:
0 * * * * /home/todd/scripts/feh_wallpaper.sh
and the script code
Code:
 feh --randomize --bg-scale /home/todd/images/wallpapers/*
 
Old 05-21-2016, 04:47 AM   #2
slacker1337
Member
 
Registered: Jun 2012
Location: Connecticut, USA
Distribution: Slackware
Posts: 148

Rep: Reputation: 40
Is the partition full? I've had similar problems when using crontab or sudoedit when my /var partition is full.
 
Old 05-21-2016, 06:10 AM   #3
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,068

Rep: Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145
hi MarioMaster100, welcome to LQ!

Quote:
Originally Posted by MarioMaster100 View Post
I'm running slackware64 current. I ran crontab -e and added a script and when I was finished I got this error
Code:
<cron/crontab.3ApGl0" 1L, 46C written 
E828: Cannot open undo file for writing: /var/spool/cron/.crontab.
3ApGl0.un~
that happens because you have changed your default /usr/bin/vi link making it point to /usr/bin/vim instead of /usr/bin/elvis: vim, by default, creates backup/undo files of the ones you edit and that confuses crontab, that uses "vi" as default editor.

you can either:

- instruct vim to not create backup/undo files via ~/.vimrc adding these two options to this file
Code:
set nobackup
set noundofile
this is what I personally have chosen because I find those files laying around in the filesystem annoying;

- launch crontab specifying a custom EDITOR variable, like
Code:
TERM=linux EDITOR=elvis crontab -e

Last edited by ponce; 05-21-2016 at 06:13 AM.
 
2 members found this post helpful.
Old 05-21-2016, 10:51 AM   #4
MarioMaster100
LQ Newbie
 
Registered: May 2016
Distribution: arch
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by slacker1337 View Post
Is the partition full? I've had similar problems when using crontab or sudoedit when my /var partition is full.
No it's not full.
Quote:
Originally Posted by ponce View Post
hi MarioMaster100, welcome to LQ!


that happens because you have changed your default /usr/bin/vi link making it point to /usr/bin/vim instead of /usr/bin/elvis: vim, by default, creates backup/undo files of the ones you edit and that confuses crontab, that uses "vi" as default editor.

you can either:

- instruct vim to not create backup/undo files via ~/.vimrc adding these two options to this file
Code:
set nobackup
set noundofile
this is what I personally have chosen because I find those files laying around in the filesystem annoying;

- launch crontab specifying a custom EDITOR variable, like
Code:
TERM=linux EDITOR=elvis crontab -e
Yeah I changed it to vim because the default of vi just hangs displaying this message
Code:
skipping 3 old session files
reading /var/spool/cron/crontab.ll216a
Read /var/spool/cron/crontab.ll216a, 2 lines, 54 chars
and not opening vi. I'll try nano or something else and see if that works.
 
Old 05-21-2016, 10:56 AM   #5
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,068

Rep: Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145
Quote:
Originally Posted by MarioMaster100 View Post
Yeah I changed it to vim because the default of vi just hangs displaying this message
Code:
skipping 3 old session files
reading /var/spool/cron/crontab.ll216a
Read /var/spool/cron/crontab.ll216a, 2 lines, 54 chars
and not opening vi.
maybe it wasn't hanged but it wasn't simply displaying anything on screen: that happens also when you got a custom TERM variable and elvis (the default vi) gets confused.
that's why in the example above I suggested you to still try with elvis but using a standard TERM=linux environment variable.
 
Old 05-21-2016, 11:03 AM   #6
MarioMaster100
LQ Newbie
 
Registered: May 2016
Distribution: arch
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by ponce View Post
maybe it wasn't hanged but it wasn't simply displaying anything on screen: that happens also when you got a custom TERM variable and elvis (the default vi) gets confused.
that's why in the example above I suggested you to still try with elvis but using a standard TERM=linux environment variable.
Ok, would it still work right with nano though? I didn't get any errors from using it with nano.
 
1 members found this post helpful.
Old 05-21-2016, 11:07 AM   #7
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,068

Rep: Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145Reputation: 4145
Quote:
Originally Posted by MarioMaster100 View Post
Ok, would it still work right with nano though? I didn't get any errors from using it with nano.
you can choose whatever you prefer as $EDITOR, you can also export the variable in your ~/.bash_profile so you don't have to specify it each time.
 
Old 05-21-2016, 11:32 AM   #8
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
Quote:
Originally Posted by MarioMaster100 View Post
Ok, would it still work right with nano though? I didn't get any errors from using it with nano.
Well anyway, unless you really want to change the link for important reasons it's not a very good practice...

In this case you should overwrite the EDITOR variable (or equivalent), either in your init script, or on the command line:

Code:
# EDITOR=nano crontab -e
PS/ I marked your comment as useful because I slipped when I tried to "Quote" your message, unfortunately I don't know how to undo it... No offence but it was not useful .
 
Old 05-21-2016, 12:20 PM   #9
MarioMaster100
LQ Newbie
 
Registered: May 2016
Distribution: arch
Posts: 21

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by NoStressHQ View Post
Well anyway, unless you really want to change the link for important reasons it's not a very good practice...

In this case you should overwrite the EDITOR variable (or equivalent), either in your init script, or on the command line:

Code:
# EDITOR=nano crontab -e
PS/ I marked your comment as useful because I slipped when I tried to "Quote" your message, unfortunately I don't know how to undo it... No offence but it was not useful .
Ok good to know.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Anyone got obs-studio working on slackware current? af7567 Slackware 7 05-16-2016 07:38 AM
[SOLVED] Slackware 14.2 (current ) some 64 bit programs not working waynelloydsmith Slackware - Installation 8 03-26-2016 04:44 PM
[SOLVED] Slackware current NetworkManager and DHCPv6 not working af7567 Slackware 2 03-08-2016 11:10 AM
Touchpad not working on X - Slackware Current DragonM15 Linux - Hardware 1 05-14-2010 10:34 AM
xorgsetup not working slackware current samac Slackware 7 03-24-2007 07:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration