Skip to content

Setting up for constant use on Raspbian

2haloes edited this page May 9, 2018 · 4 revisions

Setting up

This suggests that the Raspbian install is fresh and using Stretch (as of writing, the latest version). This may apply to other setups but I cannot confirm this

This is mostly done though the terminal but should be almost copy and paste job

First, update the system
sudo apt update
sudo apt dist-upgrade

This ensures that all of the packages are up to date, then install unclutter and xscreensaver
sudo apt install unclutter xscreensaver

Load xscreensaver and disable the screensaver, this can be done by clicking the drop down at the top left of the window
Displaying the xscreensaver window

Then setup crontab to hide the mouse using unclutter
crontab -e
I personally suggest using nano when you're asked by pressing 2 then enter

When it loads the text editor, scroll to below the comments and add the following
@reboot unclutter -idle 0
Crontab file in nano
Then exit using Ctrl+x (if using nano) press "y" and then enter to save the file and crontab should save

Now would be a good idea to download the program if you haven't already, I recommend that you clone from the home folder with the following commands
cd ~
git clone --branch Release-Latest https://github.com/2haloes/Weather-Display-Python.git

After this, use the command
nano ~/.config/autostart/weather_display.desktop And enter the following information
[Desktop Entry]
Name=Weather Display
Exec=/usr/bin/python3 /home/pi/Weather-Display-Python/Weather_display.py -f
Type=Application
Hidden=false

NOTE: The second part of the Exec line should point to the Weather Display file, the one here is based on using the git clone command above
Now press Ctrl+x, press "y" then enter and it should save the file

Finally, use the following command to set the settings for the program
nano /home/pi/Weather-Display-Python/DarkSkyConfig.py

NOTE: Like the Exec line from the last file, this is dependent on where the program was downloaded to, the DarkSkyConfig.py file is in the same folder as the Weather_Display.py file

Now edit the values, there are online services to find the lat and long of where you want to load the weather from, it's perfectly alright to keep the units to auto, finally, the api key needs to be obtained from the DarkSky website

Finally press Ctrl+x then "y" then enter

After this, restarting should load everything properly with the weather display showing full screen after loading the desktop

Clone this wiki locally