[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead
[phpBB Debug] PHP Notice: in file /viewtopic.php on line 981: getdate(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead
Tynsoe Projects • View topic - SH scripts won't work

SH scripts won't work

SH scripts won't work

Postby enigmajr » Thu Jul 15, 2010 6:19 am

I can't get any kind of script such as news.sh, icalbuddy, or twitter.sh to display using GeekTool. The scripts work if I do the exact same command in Terminal, but if I paste that command into a shell geeklet, no go. Any ideas?
enigmajr
 
Posts: 6
Joined: Thu Jul 15, 2010 6:17 am

Re: SH scripts won't work

Postby ybizeul » Thu Jul 15, 2010 5:43 pm

Taks a look at Console.app when the script is run (and fails)
ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm

Re: SH scripts won't work

Postby enigmajr » Fri Jul 16, 2010 2:56 am

Ahhh that explains it. It keeps saying permission denied. I tried to chmod the script to 755 but I still get the same error. What else can I try? Thanks for the help!
enigmajr
 
Posts: 6
Joined: Thu Jul 15, 2010 6:17 am

Re: SH scripts won't work

Postby ybizeul » Fri Jul 16, 2010 7:07 am

What is the content of the command window in GeekTool ? How do you call the script you chmod'ed ?
ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm

Re: SH scripts won't work

Postby enigmajr » Fri Jul 16, 2010 4:50 pm

simply /users/matt/geektool/tweets.sh
enigmajr
 
Posts: 6
Joined: Thu Jul 15, 2010 6:17 am

Re: SH scripts won't work

Postby ybizeul » Fri Jul 16, 2010 8:45 pm

So you say that, from terminal,
Code: Select all
/users/matt/geektool/tweets.sh

works, and in GeekTool, you get permission denied ?

Can you paste the first line in this script, starting with #! ?
Can you paste the exact error thrown ?
ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm

Re: SH scripts won't work

Postby enigmajr » Fri Jul 16, 2010 11:11 pm

Yup, if I use it in terminal it works, then paste the exact same thing into Geektool it doesn't.

#!/bin/sh

7/16/10 7:10:40 PM [0x0-0x5f85f8].org.tynsoe.geektool3[17441] /users/matt/geektool/tweets.sh: line 21: tweets.txt: Permission denied
7/16/10 7:10:40 PM [0x0-0x5f85f8].org.tynsoe.geektool3[17441] cat: tweets.txt: No such file or directory
7/16/10 7:10:40 PM [0x0-0x5f85f8].org.tynsoe.geektool3[17441] grep: tweets.txt: No such file or directory
enigmajr
 
Posts: 6
Joined: Thu Jul 15, 2010 6:17 am

Re: SH scripts won't work

Postby ybizeul » Sun Jul 18, 2010 7:38 am

What's in line 21 of tweets.sh ?
Looks like the script needs to create tweets.txt but can't.
ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm

Re: SH scripts won't work

Postby enigmajr » Tue Jul 27, 2010 4:55 pm

line 21: curl --silent "$URL" > tweets.txt

It's able to create tweets.txt, as I can see tweets.txt in finder and that's what is displayed when I use it via command line. Someone suggested it could be a permissions thing but I've already chmodded everything! It's not the end of the world if I can't display my tweets, but I really can't do any commands other than date/time kind of things.
enigmajr
 
Posts: 6
Joined: Thu Jul 15, 2010 6:17 am

Re: SH scripts won't work

Postby ybizeul » Wed Jul 28, 2010 2:35 pm

Well, actually it is pretty simple : tweets.txt cannot be created because you are not authorized to.

I think it is trying to create it in a place you do not expect it to do.

Check if there are any path change in the script or something that would make the script write somewhere unusual.
Unless specified otherwise in the script, GeekTool executes scripts from your home directory.
ybizeul
Site Admin
 
Posts: 133
Joined: Fri Jan 22, 2010 4:34 pm

Next

Return to GeekTool

Who is online

Users browsing this forum: No registered users and 6 guests

cron