LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-03-2009, 03:59 AM   #1
shlomi.s
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Rep: Reputation: 0
Cron tab error: No entry for terminal type "unknown"; sing dumb terminal settings.


hi everybody.

first of all, i want you to know that i tried to Google my problem couple of hours but i didn't found any GOOD answer, can you please try to explain me what is the problem?

here it is:

i running this cron-tab:
"
cd /MY_PATH/www/; sudo php -f cron.MY_CROM.php
"

MY_PATH and MY_CRON are fake names - off course.. :-)

please note that the user that run this cron is sudoer.

here is the configurations for this user in 'visudo' file:
"
my_user ALL=(ALL) NOPASSWD: NOPASSWD: ALL
"

this cron is run about a month and everything was fine till couple of days, then it's started to prompt me this notice:
"
No entry for terminal type "unknown";
using dumb terminal settings.
"

did someone can explain me what i the problem?


thanks in advance.

Shlomi.
 
Old 12-03-2009, 04:14 AM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Welcome to LQ

Which distribution are you using ?
Seems to me xterm is missing.
 
Old 12-03-2009, 04:37 AM   #3
shlomi.s
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Original Poster
Rep: Reputation: 0
i'm using Fedora 11
 
Old 12-03-2009, 04:38 AM   #4
shlomi.s
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Original Poster
Rep: Reputation: 0
i did 'yum install xterm' it's found and install it.. let's see what will happened..
 
Old 12-03-2009, 05:21 AM   #5
shlomi.s
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Original Poster
Rep: Reputation: 0
hi

even i installed the xterm i stil getting the message:
"
No entry for terminal type "unknown";
using dumb terminal settings.
"

any other idea?
 
Old 12-03-2009, 10:44 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Cron : use full path.
Cron does not understand anything but a full path for a command.

sudo /usr/bin/php -f <full-path-to>/cron.MY_CROM.php

.. will probably work.

.....
 
Old 12-03-2009, 06:48 PM   #7
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,358

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
<full-path-to-sudo>/sudo as well
 
Old 12-04-2009, 01:11 AM   #8
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Jobs run from cron do not have a terminal. Does the message imply that the /usr/bin/php -f <full-path-to>/cron.MY_CROM.php command is trying to use a terminal -- in which case it cannot work?

If my musing is on the right lines, how come "this cron is run about a month and everything was fine till couple of days". Perhaps cron.MY_CROM.php has been changed, introducing the need for a terminal or, less likely, /usr/bin/php.
 
Old 12-04-2009, 01:24 AM   #9
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by knudfl View Post
Cron : use full path.
Cron does not understand anything but a full path for a command.

sudo /usr/bin/php -f <full-path-to>/cron.MY_CROM.php

.. will probably work.

.....
In my experience cron has PATH=/bin:/usr/bin, so full path for the commands shouldn't be a problem.
In any case it's looks like error message came from the php script, i.e
cron was able to run it.

But TREM environment variable in cron likely tobe empty (or 'unknown')
and I think it's a reason why php script complains.

Also I wonder, why script designed to run without user interaction
care what terminal it run in ?
 
Old 12-05-2009, 02:35 PM   #10
shlomi.s
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Original Poster
Rep: Reputation: 0
still error.. please help...

Quote:
Originally Posted by Valery Reznic View Post
In my experience cron has PATH=/bin:/usr/bin, so full path for the commands shouldn't be a problem.
In any case it's looks like error message came from the php script, i.e
cron was able to run it.

But TREM environment variable in cron likely tobe empty (or 'unknown')
and I think it's a reason why php script complains.

Also I wonder, why script designed to run without user interaction
care what terminal it run in ?

hi Helpers.. thanks for your concern..


i tried to change the cron to full path as Catkin suggestion but still pormpting the message. the new cron is:
" sudo /usr/bin/php -f /home/MY_PATH/cron.MY_CRON.php "

but i have coule of questions for 'chrism01' and for 'Valery Reznic'

my question for 'chrism01' is, what did you meant in:
Quote:
<full-path-to-sudo>/sudo as well
?
what is the path for sudo command? just to remind you i'm using fedora 11 distribution.


and my question for 'Valery Reznic' is, in in your quote:
Quote:
But TREM environment variable in cron likely tobe empty (or 'unknown')
and I think it's a reason why php script complains.
i didn;t understood what is reason? what is TERM at all??

second, about:
Quote:
Also I wonder, why script designed to run without user interaction
care what terminal it run in ?
i did it via PHP script because it's most easy for me ( as a PHP programmer), this script shall delete all files is some directory each hour but not the files that added in the last 10 minutes.. i don't very familiar with Linux Bash scripts so i did it via PHP, is this problematic?

thanks again to all of you..
 
Old 12-06-2009, 05:35 AM   #11
Valery Reznic
ELF Statifier author
 
Registered: Oct 2007
Posts: 676

Rep: Reputation: 137Reputation: 137
Quote:
Originally Posted by shlomi.s View Post
hi Helpers.. thanks for your concern..


i tried to change the cron to full path as Catkin suggestion but still pormpting the message. the new cron is:
" sudo /usr/bin/php -f /home/MY_PATH/cron.MY_CRON.php "

but i have coule of questions for 'chrism01' and for 'Valery Reznic'

my question for 'chrism01' is, what did you meant in:
?
what is the path for sudo command? just to remind you i'm using fedora 11 distribution.


and my question for 'Valery Reznic' is, in in your quote:

i didn;t understood what is reason? what is TERM at all??

second, about:

i did it via PHP script because it's most easy for me ( as a PHP programmer), this script shall delete all files is some directory each hour but not the files that added in the last 10 minutes.. i don't very familiar with Linux Bash scripts so i did it via PHP, is this problematic?

thanks again to all of you..
php itself is OK, as any other scripting language.

Term is environment variable it's content is terminal type. Any program (or library - for example ncurces) can examine this variable to determine what terminal is used.

Usually only interactive program need it.

You can try to run
Code:
TERM= /usr/bin/php -f <full-path-to>/cron.MY_CROM.php
From the command line.
It should give you same error messages about terminal

and you can try change your line for cron as
Code:
sudo /usr/bin/env TERM=xterm /usr/bin/php -f /home/MY_PATH/cron.MY_CRON.php
And see if it's help.
But all the same. I don't understand, why your program interested in the TERM
 
Old 12-07-2009, 10:24 AM   #12
shlomi.s
LQ Newbie
 
Registered: Dec 2009
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks.. It's working..

Quote:
Originally Posted by Valery Reznic View Post
php itself is OK, as any other scripting language.

Term is environment variable it's content is terminal type. Any program (or library - for example ncurces) can examine this variable to determine what terminal is used.

Usually only interactive program need it.

You can try to run
Code:
TERM= /usr/bin/php -f <full-path-to>/cron.MY_CROM.php
From the command line.
It should give you same error messages about terminal

and you can try change your line for cron as
Code:
sudo /usr/bin/env TERM=xterm /usr/bin/php -f /home/MY_PATH/cron.MY_CRON.php
And see if it's help.
But all the same. I don't understand, why your program interested in the TERM
Looks like this fixing helped:
Quote:
sudo /usr/bin/env TERM=xterm /usr/bin/php -f /home/MY_PATH/cron.MY_CRON.php
now i stopped getting the message..

thanks for everybody..
 
Old 09-06-2011, 09:20 AM   #13
k1mgy
Member
 
Registered: Jul 2004
Posts: 40

Rep: Reputation: 15
Post

If fedora-based:

edit: /root/.bash_profile
add: term=xterm
 
  


Reply



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
"FATAL: Unknown capture source type" error from Kismet atlantanewbie Linux - Wireless Networking 2 04-03-2010 05:34 AM
How to get the "data type" of an "unknown variable" in "C Language" ? Affair Programming 8 06-20-2009 12:30 PM
Unable to Type the character "d" in Terminal Window vkichu Linux - Newbie 4 05-03-2009 12:08 AM
Error opening terminal: xterm Terminal type "xterm" unknown Pscylo Slackware 10 04-17-2009 06:33 AM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-21-2003 11:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:00 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