https://github.com/gabrielmarcano/bingwallpaper
Custom BingWallpaper functionality for Ubuntu
https://github.com/gabrielmarcano/bingwallpaper
bash-script cron script ubuntu
Last synced: 2 months ago
JSON representation
Custom BingWallpaper functionality for Ubuntu
- Host: GitHub
- URL: https://github.com/gabrielmarcano/bingwallpaper
- Owner: gabrielmarcano
- Created: 2022-07-13T23:33:05.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-11-02T03:14:23.000Z (over 3 years ago)
- Last Synced: 2025-10-04T15:39:23.006Z (9 months ago)
- Topics: bash-script, cron, script, ubuntu
- Language: Shell
- Homepage:
- Size: 767 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom BingWallpaper for Ubuntu
This script changes the background of Ubuntu with BingWallpaper everyday. Right now it can be used with cronjob or systemd service.
## Table of Contents
- [Crontab](#crontab)
- [Systemd Service](#service)
## Crontab
Uses crontab to create a cronjob and run a script every day.
See contrab list with `crontab -l`
And edit crontab list with `crontab -e`
Include the cronjob in the list. To define the time you can provide concrete values for minute (m), hour (h), day of month (dom), month (mon), and day of week (dow) or use '*' in these fields (for 'any'). You can check [crontab.guru](https://crontab.guru/) to practice cron time.
`m h dom mon dow /path/to/script.sh`
e.g. `0 8 * * * /bin/sh ~/Documents/BingWallpaper/BingWallpaper.sh`
### Start the cronjob service
`sudo /etc/init.d/cron start`
### Stop the cronjob service
`sudo /etc/init.d/cron stop`
### Restart the cronjob service
`sudo /etc/init.d/cron restart`
## Service
Create a service and use built-in ubuntu services.
Create a file called `/etc/systemd/system/custombingwallpaper.service`
```
[Unit]
Description=Custom BingWallpaper service
After=network.target
StartLimitIntervalSec=0
[Service]
Type=simple
Restart=always
RestartSec=1
User=user
ExecStart=/path/to/script.sh
[Install]
WantedBy=multi-user.target
```
- Set your actual username after `User=`
- Set the proper path to your script in `ExecStart=`
### Start the service
`systemctl start custombingwallpaper`
### Start service on boot
`systemctl enable custombingwallpaper`