Real-time Sunlight Wallpaper

gtk-sunlight has stopped displaying any graphic wallpapers

Reported by Dominik Wujastyk on 2010-11-17
68
This bug affects 11 people
Affects Status Importance Assigned to Milestone
Realtime Sunlight Wallpaper
Critical
Carles Sentis

Bug Description

For no reason I can fathom, gtk-sunlight has reverted to offering a plain colour background. Gradients work, but the sun/moon images are no more, they have joined the choir invisible, gone to meet their maker, they are ex-images.

Linux 10.10, up to date. gtk-sunlight 0.3.2 through the ppa. Running compiz.

It looks to me as if when gtk-sunlight tries to fetch the images, they aren't arriving, but I'm not sure. See attachment.

Thanks!
Dominik

Dominik Wujastyk (wujastyk) wrote :
Carles Sentis (heepie202) wrote :

I've notice this happening to my home computer last night and I couldn't understand why. I still not sure what is wrong.

It seams that it has to do with wget which is use to retrieve the images from die.net. I tried:

$ wget http://static.die.net/earth/rectangular/1600.jpg -O world.jpg

in the terminal and the file i'm getting is a NULL image.

Changed in realtimesunlightwallpaper:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Carles Sentis (heepie202)
Boynas (garyflores) wrote :

Yeap, same thing here.

Ubuntu 10.10 64, Compiz.

my wget does the same thing, (downloads an empty file)

Carles Sentis (heepie202) wrote :

You can try any image url with wget and it downloads the image no problem but as soon as you try it with any of the maps it doesn't work.

$ wget <url_path>

I'm thinking that perhaps die.net has blocked/stopped wget port, making any request useless. As stated here <http://www.die.net/earth/how.html> the images are free to use and when I first created RSW I tried to get in touch with die.net but I never got a response from them, so I continued using their images with a link back to their website as requested on the mentioned address. I already send them a message about this problem and waiting for a response.

I'm looking at other alternatives, like using a http request within RSW instead of using wget or perhaps download the images to an external server and use the for RSW from there, but changes will take some time to develop specially now that I have exams coming before Christmas, etc...

Dominik Wujastyk (wujastyk) wrote :

Good luck with your exams, Carles!

Dominik

Paul Bakulich (palbakulich) wrote :

Wget fails - used CURL it still works.

André (andre-schlichting) wrote :

Also from me good luck for your exams. But maybe you could just implement the change to curl in callbacks.c
Here is the tiny patch, doing just what palhmbs mentioned above:

--- gtk-sunlight-0.3.2-ubuntu-all-1/callbacks.c 2010-11-11 16:45:38.000000000 +0100
+++ gtk-sunlight-0.3.2-ubuntu-all-1.new/callbacks.c 2010-11-17 23:14:31.741207832 +0100
@@ -138,8 +138,8 @@
gchar *file_time;

file_time = g_strdup_printf("sunlight_wallpaper%ld.jpg", time(NULL));
- text1 = "#!/bin/bash\n\nCOUNTER=0\nwhile [ $COUNTER -lt 60 ]; do\n\twget ";
- text2 = g_strdup_printf(" -O world.jpg\n\ttemp=$(stat -c%%s world.jpg)\n\t\tif [[ $temp > 1000 ]]\n\t\tthen rm %s/*.jpg\n\t\t\tmv world.jpg %s/%s\n\t\t\tbreak\n\tfi\n\tsleep 5\n\tlet COUNTER=COUNTER+1\ndone", dir_wallpapers, dir_wallpapers, file_time);
+ text1 = "#!/bin/bash\n\nCOUNTER=0\nwhile [ $COUNTER -lt 60 ]; do\n\tcurl ";
+ text2 = g_strdup_printf(" > world.jpg\n\ttemp=$(stat -c%%s world.jpg)\n\t\tif [[ $temp > 1000 ]]\n\t\tthen rm %s/*.jpg\n\t\t\tmv world.jpg %s/%s\n\t\t\tbreak\n\tfi\n\tsleep 5\n\tlet COUNTER=COUNTER+1\ndone", dir_wallpapers, dir_wallpapers, file_time);

switch(data->gi_rd1)
{

Dominik Wujastyk (wujastyk) wrote :

Reading www.die.net, it's my impression that gtk-sunlight probably violates the terms of service by overloading the die.net server's bandwdth. It looks to me as if the die.net guy is happy for individuals to copy his images, but not on the scale demanded by many users downloading a new image every half an hour. I should think he will block curl access too, if gtk-sunlight starts using it.

If I'm right, then bandwidth perhaps Carles (or some volunteer) could download images once an hour or so, and gtk-sunlight could point at Carles's server, so the rest of us would be getting the images second hand, and not straining die.net's bandwidth.

Of course, it would be nicer if we could communicate with die.net and just get permission to do what we're doing. I wouldn't mind making a micropayment for this - I really love the background. Say $1 per month?

Dominik

Basher Aobasher (aobasher) wrote :

I has proposed merging lp:~aobasher/realtimesunlightwallpaper/bugfix into lp:realtimesunlightwallpaper. I fix by changing Wget to curl in callbacks.c - working fine for me now

Changed in realtimesunlightwallpaper:
status: Confirmed → Fix Committed
wariasc (wariasc-gmail) wrote :

The problem with source image site causing image not downloaded, it is corrected too using wget -U Mozilla/5.0 http://static.die.net/earth/mercator/1600.jpg

Javier Gillette (jfgillette) wrote :

I keep getting this problem too. Is there any solution to it?
I don't know what to do to help find a solution either, but if there is anything I can do or present some information, let me know.

Carles Sentis (heepie202) wrote :

Do you have v0.3.3 installed? if so will you paste the output from the terminal after pressing the apply button...

Javier Gillette (jfgillette) wrote :

Nevermind, haha, I realized I didn't have cURL installed. Problem solved.

Atul (atulkakrana) wrote :

I am using curl but having a different problem. When I execute the task it opens terminal asking to press 'ENTER' to continue.
The Image is not downloading and in 'Schedule Task' command '>/dev/null 2>&1' is being appended on every execution. Any idea????

Atul (atulkakrana) wrote :

Ok...The problem was because of 'Suppress output'. When I choose default behavior its working fine...except I have to press enter after every three hours....Any solution?????

Carles Sentis (heepie202) wrote :

I don't know why is doing all this. It doesn't sense to me.

Lolwhites (lolwhites) wrote :
Lolwhites (lolwhites) wrote :

Terminal output:

move map FALSE
offline mode FALSEsunlight_options created
scale_position: 24, new_position: 1
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 37 100 37 0 0 26 0 0:00:01 0:00:01 --:--:-- 231
mogrify mogrify: geometry does not contain image (unable to crop image).

Carles Sentis (heepie202) wrote :

I'm getting the same thing as you. I think that die.net is blocking the http request again. I've tried emailing them about my application but they keep ignoring my emails.

If any of you have any more ideas I'm all ears. At the mean time I will try to write to die.net yet again and see if we can agree on something.

Thank you for the heads up.

Changed in realtimesunlightwallpaper:
status: Fix Committed → New
Sean DS (se4n-1) wrote :

This problem has returned, my dektop woke up this morning and I got nothing, to confirm it wasn't just my desktop I turned on my laptop and I got more nothing. It seems curl doesn't fetch the images any more - maybe they have moved?

$ gtk-sunlight
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
100 37 100 37 0 0 86 0 --:--:-- --:--:-- --:--:-- 226
^C

It hangs like this every time, let me know if I need to add any more details, I can fire up gdb if need be.

Changed in realtimesunlightwallpaper:
status: New → Confirmed
Sean DS (se4n-1) wrote :

Maybe it helps: if you add an argument for a user agent string on wget instead of using curl like:

$ wget --user-agent="Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0" http://static.die.net/earth/mercator/1600.jpg

I can download the sunlight image no problem, if however I use:

$ wget http://static.die.net/earth/mercator/1600.jpg

 it is blocked.

I looked at your coed and currently you use curl, maybe it would be easy to change the code to use wgen with the firefox user agent flag above?

Best, Sean.

Sean DS (se4n-1) wrote :

I made a quick script to fill the gap until this is fixed, at least if you're running maverick and using Mercator prokection that is..

#!/bin/bash

  wget --user-agent="Mozilla/5.0 (X11; Linux i686; rv:6.0) Gecko/20100101 Firefox/6.0" http://static.die.net/earth/mercator/1600.jpg

  mv ./1600.jpg ./.1600.jpg

  gconftool-2 --type string --set /desktop/gnome/background/picture_filename "/home/<user>/.1600.jpg"

exit 0

Then make a cron to execute every three hours and add the script to startup applications. I'm sure Carles will be able to solve the problem soon enough without having to resort to quick and dirty scripts like this though!

Carles Sentis (heepie202) wrote :

Thank you everybody for you support. I got a fix for the problem and I'll push and update with it in the next few days once I get a chance.

Changed in realtimesunlightwallpaper:
status: Confirmed → Fix Released
Lolwhites (lolwhites) wrote :

Thank you so much!

Brian Rook (smack714) wrote :

If it's fixed then where do we obtain the download?

Carles Sentis (heepie202) wrote :

Brian, What version of Ubuntu are you using?

There's a ppa --> https://launchpad.net/~realtime.sunlight.wallpaper/+archive/rsw

or can be downloaded from here: https://launchpad.net/realtimesunlightwallpaper/+download

Lolwhites (lolwhites) wrote :

It was fixed, until yesterday's update. Now it just gives a dark purple background. Hitting "Apply" changes nothing, and "OK" causes the window to grey out and freeze.

Lolwhites (lolwhites) wrote :

I should add going back to version 0.4.2-1 appears to solve the problem.

Carles Sentis (heepie202) wrote :

I've been away from keyboard for most of the weekend. I'll have a look at this as soon as.

Lolwhites.

After the release of 4.2-1 for oneiric which fix the issue. A couple of days ago I only pushed an update for Natty which I update the new version of RSW with GTK2 for older releases of Ubuntu

This should not have given any problems to Oneiric or Precise releases.

Changed in realtimesunlightwallpaper:
status: Fix Released → In Progress
Lolwhites (lolwhites) wrote :

I discovered I had both Natty and Oneiric repos installed, no idea why. removed the former and it seems to work now.

mrAshley (launchpad-mrashley) wrote :

This problem still exists in Lucid Lynx (10.04). The version in the PPA is 0.3.4 so the problem isn't fixed.

I've uninstalled and reinstalled to make sure it's not something funny, but the problem is exactly as described here.

gtk-sunlight
gtk-sunlight: no process found
  % Total % Received % Xferd Average Speed Time Time Time Current
                                 Dload Upload Total Spent Left Speed
  0 37 0 37 0 0 144 0 --:--:-- --:--:-- --:--:-- 685
Terminated

Eric Angell (some-other-guy) wrote :

die.net indeed appears to block both curl and wget user agents, and with good reason. But he's not blocking Coral (http://coralcdn.org), and I can't see why he would ever start. This is exactly the sort of application where Coral is useful, so I recommend you change the source urls in the scripts to look like "http://static.die.net.nyud.net/earth/peters/1600.jpg" (adding the ".nyud.net" to the end of the host name).

However, despite Coral's FAQ claiming that they respect cache-control headers such as max-age, that doesn't appear to be working in this case. die.net is very conveniently sending a "Cache-control: public, max-age=1800" in responses that have not been caught by the curl/wget user agent blackhole, but when the file is delivered through Coral, it's gaining their default cache timeout of 12 hours instead of the half hour specified by the original server. Subsequent Coral requests sometimes return the original file cached, and sometimes return newer versions of it. Even if I specify "Cache-Control: max-age=1800, must-revalidate" in my curl request, Coral's behavior doesn't change.

So I recommend that somebody put further effort into figuring out why Coral's cache control is broken, but that the project script be updated regardless - better to get an image up to 12 hours out of date than to get nothing at all.

Carles Sentis (heepie202) wrote :

Thank you Eric for the head up... I'm with my final exams of my final year in college at the moment and I don't have much time to spare but I'll try to find a solution for this as soon as I can...

Carles Sentis (heepie202) wrote :

*UPDATE

I should have done this long time ago but I'm after signing up with a web hosting which accepts cron jobs. The idea been to upload the images from die.net to my server and then point the script which RSW use to that one.

I'll try to get in touch with die.net again but after other tries and don't expect an answer from them, but perhaps they will listen this time (fingers cross). Other ways I will try to figure out a way to upload the images to my server now that they pretty much blocked curl and wget.

I'll keep you posted

Donjan Rodic (bryonak) wrote :

What's the current state of affairs?

Carles Sentis (heepie202) wrote :

I didn't even know that this bug was still open... I thought this issue was close long time ago...

Donjan, Are you still having problems with it

Donjan Rodic (bryonak) wrote :

I was having problems usually coinciding with the other reports. Last time there was no connection for some hours, which led me to ask here in December (with regards to your "I'll keep you posted"), but it has worked fine since.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers