LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-23-2018, 05:34 PM   #1
isoabola
LQ Newbie
 
Registered: Sep 2018
Posts: 1

Rep: Reputation: Disabled
Crontab


Hello,

I'm trying to run a script that opens the background screen through crontab. the command i used to open the screen ' screen -S test'

It gives me an error 'Must be connected to a terminal' and terminates the screen.

Kindly assist me please
 
Old 09-23-2018, 06:25 PM   #2
wpeckham
Senior Member
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, Fedora, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, Vsido, tinycore, Q4OS
Posts: 3,200

Rep: Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386Reputation: 1386
That is because you are doing something cron was never intended to do.
Depending upon how you set up crontab, you either start something as root or as the user. In either case, it runs in a new session that does not own a display. You would need to give it permissions to a display, set that display as the default in its environment, and ensure that the specific display was current and running when it starts.
If that sounds like a lot of trouble, it is. It can be done, but seems pretty silly. Why do you want to start a GUI process in a non-gui cron environment? What is your true objective?
 
1 members found this post helpful.
  


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
LXer: Scheduling important jobs with CRONTAB : Crontab Examples LXer Syndicated Linux News 0 09-11-2018 06:00 PM
LXer: What Is Crontab And How To Automate Tasks In Linux With Crontab LXer Syndicated Linux News 0 05-13-2017 06:45 PM
[SOLVED] crontab does not reread the crontab file upon modification of the latter. stf92 Slackware 4 08-01-2015 07:12 PM
[SOLVED] Problem with crontab:: command not executed properly via crontab Ankush Seth Linux - Newbie 11 11-11-2013 07:25 AM
linux crontab vs unix crontab ytd Linux - General 2 08-09-2009 06:07 AM

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

All times are GMT -5. The time now is 02:56 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration