LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-03-2011, 07:20 PM   #1
cryingthug
Member
 
Registered: Jun 2009
Posts: 131

Rep: Reputation: 18
Cron environment


I have tried this:

Code:
* * * * * . $HOME/.bashrc ; myscript.sh
I want myscript.sh to open a gnome-terminal window from cron. It does not work.
Inside of myscript.sh I have this:
/usr/bin/gnome-terminal

I have also tried this:

Code:
* * * * * . ~/.profile ; myscript.sh
I open mutt and I get this:

Code:
Failed to parse arguments: Cannot open display:
I have searched a bit for an answer but have not found anything. Anyone know how to get gnome-terminal to open from a crontab?

Last edited by cryingthug; 10-03-2011 at 07:26 PM. Reason: clarify
 
Old 10-03-2011, 07:38 PM   #2
sinuhe
Member
 
Registered: Apr 2010
Location: Utah
Distribution: Slackware
Posts: 53

Rep: Reputation: 9
Which $HOME?

Use explicit, not relative, paths.
 
Old 10-03-2011, 07:45 PM   #3
cryingthug
Member
 
Registered: Jun 2009
Posts: 131

Original Poster
Rep: Reputation: 18
explicit paths = fail

Quote:
Originally Posted by sinuhe View Post
Use explicit, not relative, paths.
This is what I got from explicit paths:

Code:
Failed to parse arguments: Cannot open display:
Any other ideas?
 
Old 10-19-2011, 10:00 PM   #4
cryingthug
Member
 
Registered: Jun 2009
Posts: 131

Original Poster
Rep: Reputation: 18
I can make a gui window open using a scheduled task in Windows easy. Why would this not work in cron/Bash?

Last edited by cryingthug; 10-19-2011 at 10:00 PM. Reason: mistake
 
  


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
How Can Interactive Login Environment Be Duplicated in Cron cmnorton Linux - General 1 05-24-2010 09:17 AM
rsync behaves differently under cron and under my normal environment jjge Linux - Software 1 03-16-2010 08:55 AM
cron jobs environment variables Alfar Linux - General 4 12-15-2006 01:47 PM
Cron Losing Environment Variables? SteveT Fedora 1 12-24-2005 08:37 AM
Cron: TERM environment variable not set. hydro Linux - General 4 04-15-2004 10:59 PM

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

All times are GMT -5. The time now is 01:01 PM.

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