GithubHelp home page GithubHelp logo

utkarshgpta / bing-desktop-wallpaper-changer Goto Github PK

View Code? Open in Web Editor NEW
199.0 18.0 49.0 674 KB

Automatically changes desktop wallpaper to Bing Photo of the Day for Linux with Gnome.

Home Page: https://utkarsh.xyz/bing-desktop-wallpaper-changer/

License: MIT License

Python 41.00% Shell 59.00%
bing-wallpaper desktop-wallpaper gnome bing-photo linux

bing-desktop-wallpaper-changer's People

Contributors

adamwojs avatar akargl avatar alzemand avatar choomchichi avatar genericuk avatar jhsoby avatar justinnichols avatar lmr avatar oliverjd avatar pygeek03 avatar rollingsun avatar shoeyn avatar utkarshgpta avatar vmarci21 avatar yashwanthv21 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bing-desktop-wallpaper-changer's Issues

Namespace Notify not available

I am seeing the following error:

$ python main.py 
Traceback (most recent call last):
  File "main.py", line 21, in <module>
    gi.require_version('Notify', '0.7')
  File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 102, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Notify not available

A fix/solution would be much appreciated. Thanks.

Gtk issue

Hi, I'm not sure if this is an issue with this program, or if I should even post it here, but I'm not able to run it. Whenever I run it I get the following error:

Traceback (most recent call last):
  File "Nedlastinger/bing-desktop-wallpaper-changer-master/main.py", line 20, in <module>
    gi.require_version('Gtk', '3.0')
AttributeError: 'module' object has no attribute 'require_version'

Does anyone know a solution for this?

Run as crontab

The script does not seem to be able to run as a user crontab:

$ crontab -e
> 57 * * * * /usr/bin/python /home/wtower/.local/share/bing-desktop-wallpaper-changer-master/main.py

The log does not show anything wrong:

$ tail /var/log/syslog
> Aug  8 12:57:01 rodope CRON[20519]: (wtower) CMD (/usr/bin/python /home/wtower/.local/share/bing-desktop-wallpaper-changer-master/main.py)

It runs beautifully standalone. Running Ubuntu 16.04.

Any ideas?

not work in mac

GitHub: https://github.com/UtkarshGpta/bing-desktop-wallpaper-changer
Contributors: https://github.com/UtkarshGpta/bing-desktop-wallpaper-changer/network/members

uname: illegal option -- o
usage: uname [-amnprsv]
cat: /etc/issue: No such file or directory
cat: /etc/issue: No such file or directory
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
./installer.sh: line 215: [: !=: unary operator expected
./installer.sh: line 217: [: !=: unary operator expected
./installer.sh: line 219: [: !=: unary operator expected

Installer: Error 3 (Unknown package manager. Please report to GitHub!)!

File downloaded is empty

Hi there!

Interesting script! I have a peculiar problem, I've installed python-lxml and python-bs4, but when I run the script, the file that is created in the BingWallpapers directory is empty.

Currently there is a file there called "20160805.jpg", but it is 0 bytes. When I delete the file and run the script again, the same thing happens. (I've tried this several times.)

Any ideas?

I run Gnome 3.20/Debian Stretch (testing), my resolution is 1920*1080 and I have two monitors. I'll be happy to provide more information upon request!

Cheers!

Does not work in Parrot OS.

I was able to install it successfully, the images get downloaded, the problem is that the desktop does not change.

Script Stopped Running

I installed anaconda in my system and later removed it, this script doesn't run after that.
I tried importing gi manually it worked.
but gi.require_version('Gtk', '3.0') gives error as below
Traceback (most recent call last): File "main.py", line 28, in <module> gi.require_version('Gtk', '3.0') AttributeError: 'module' object has no attribute 'require_version'.
I tried a lot online but i dint find any fix, all other modules in python works file except this
is there a problem in my packages or do we need to change the code?

Bing watermark appearing randomly

Running this script on two different machines, and on one of them, the downloaded images almost always seem to have Bing watermarks.

Cinnamon trying to cron

crontab -e

* * * * * /opt/bing-desktop-wallpaper-changer/main.py

syslog

Nov  4 23:46:01 sasha-laptop CRON[14839]: (sasha) CMD (/opt/bing-desktop-wallpaper-changer/main.py)
Nov  4 23:46:12 sasha-laptop kernel: [10414.222821] main.py[14840]: segfault at 0 ip 00007febf73e2799 sp 00007fffd28de850 error 4 in libgtk-3.so.0.2200.30[7febf70ff000+6f1000]

output

Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
Segmentation fault (core dumped)

Please, help me to figure out how to set it via cron properly

PS: manual and start afret reboot works perfectly

Permissions issue

My System: Linux Mint 19.1 Cinnamon 64 bits

I have just found a bug and I have fixed it for me.
When I installed the program it didn't work, but when I ran the main.py from the terminal, it worked.
Investigating even more, if I executed: "python main.py" it worked correctly but if I did it with "sudo python main.py" not
I discovered that it was a problem with the permits.

My solution:

  • Keep the "bing-desktop-wallpaper-changer-master" folder inside the /home/$USER folder.

  • Replace the /usr/bin/binwallpaper code with:

#!/bin/bash
python /home/roberto/bing-desktop-wallpaper-changer-master/bin/main.py

Make download path configurable

The script is working nicely, but it would be handy to have the download path as a configurable item.

For instance via command line argument or via a configuration item in the .ini file (or both).

Doesn't change at startup fedora 25

Installed as instructed, runs manually, doesn't change on startup, or the next day, wallpaper remains the same.

Using Fedora 25 and gnome.

Download empty image file

Not working with for some resolution.
If 1366x768 < screen resolution < 1920x1080 the script not working, the program download 0 bytes image. In this case, try download 1920x1080 version ;)

Also change screensaver background?

Hi there. I just read about your script and installed it on Fedora (24). Works great so far. Thank! I do like to keep my screensaver background the same as my desktop wallpaper. I tried to hack your script to make it also change that, but have failed so far. I know no Python. Could you help me? I don't think it is very difficult when you know a little Python (which I don't) . I think it should use something like:

SCHEMA = 'org.gnome.desktop.screensaver'
KEY = 'picture-uri'

Hope you can help. Pointers as what you think needs to be changed are also appreciated. I am more than willing to do it, but I have failed so far...

regards,
Rolf

Fail on Ubuntu 18.04

Works fine before, but fail when these day I upgrade to Ubuntu 18.04
It echos:

rm: cannot remove '/opt/bing-desktop-wallpaper-changer/.gitignore': No such file or directory

Executing bing-desktop-wallpaper-changer...
Traceback (most recent call last):
  File "/usr/bin/bingwallpaper", line 429, in <module>
    main()
  File "/usr/bin/bingwallpaper", line 424, in main
    app_notification.show()
GLib.Error: g-dbus-error-quark: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files (2)

I installed python 2.7 and gi module

sudo apt-get install python2.7 python2.7-dev
sudo ln -s /usr/bin/python2.7 /usr/bin/python
sudo apt install python-gi

As lockscreen

Hi I know it says "wallpaper" on its name, but could it be possible to add the funtionality to change the lock screen picture?

Script isn't working!

I am getting the following error when I run the script manually.

Traceback (most recent call last): File "./main.py", line 21, in <module> gi.require_version('Notify', '0.7') File "/usr/lib/python2.7/dist-packages/gi/__init__.py", line 102, in require_version raise ValueError('Namespace %s not available' % namespace) ValueError: Namespace Notify not available

Issues when I run pyton main.py manually.

Hey,
My wallpaper didnt change this morning and when I run main.py manually I received the below :

Traceback (most recent call last):
File "main.py", line 378, in
main()
File "main.py", line 370, in main
with open(download_path + "/image-details.txt", "a+") as myfile:
UnboundLocalError: local variable 'download_path' referenced before assignment

If I run it as root I receive a popup saying wallpaper unchaged, because it exists in wallpapers directory, but atm my BIng Wallpaper directory is empty.

The startup script does not work as well.
Is there something I can do to ammend this?

Doesn't work on Xubuntu 16.10

Script seems to be configured successfully, notification "bing wallpaper changed" appears, as well as the downloaded wallpaper in the directory, however the wallpaper isn't actually changed

How do I run the script on a daily basis?

I manually execute BDWC first using sudo /opt/bing-desktop-wallpaper-changer/main.py and then /opt/bing-desktop-wallpaper-changer/main.py after which the desktop wallpaper changes. But it's not scheduled to run daily. I've tried crontab with DISPLAY:0 added and see that main.py is being executed but neither notification nor any wallpaper change occurs. How do I set it to run daily, say, at 2pm?

Keep only the last downloaded image

The downloaded image is not set as wallpaper automatically so the user have to use other meanings in order to select it as the current wallpaper. While this might not be the purpose of this software it could help here by simply leaving into the downloaded directory only the last fetched image. This could be also made configurable within ~/.config/bing-desktop-wallpaper-changer/config.ini with a property e.g. keep_only_last_count; then the user could simply set keep_only_last_count=1 in order to keep only the last downloaded image (dir_max_size won't help here).

Connection reset by peer

Hi

Having some issue, it immediatly fails upon call with an errno 104 (Connection reset by peer).

My guess, as being behind a corporate firewall, it does not handle my proxy settings. Is there a way, I could define them in the script?

regards
Roland

Default path problem

Good afternoon,

Well, with default installation, I always get error:
[Errno 2] No such file or directory: '/"/home/eko/Pictures/BingWallpapers/"/20171001.jpg'

But, after I change get_download_path(), it has no such problem again. Here is the get_download_path():
def get_download_path():
default_path = "/home/eko/Pictures/BingWallpapers/"
return default_path

[Errno 13] Permission denied: u'/home/user/Pictures/BingWallpapers/20180223.jpg

I have some permission issues when launching Bing Desktop Wallpaper Changer in Ubuntu. It appears a notification stating "[Errno 13] Permission denied: u'/home/user/Pictures/BingWallpapers/20180223.jpg". I tried to give permission to bingwallpaper executable in /usr/bin via sudo chmod 777 bingwallpaper but the problems persists. Any clue? Thx

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.