Hey I was looking for an alarm clock for ubuntu and one suggestion was wakeup which can read you the current date, time, weather, etc.
This sounded far preferable to just an annoying sound playing over and over but when I tried to install it I found it nowhere.
Poking around a bit I found the package in Ubuntu 14 and 16 lts, but no longer in 18 and 19.
Can I ask why it was discontinued? Is it not safe? And would it be problematic to my system to install a version from 16 when I am running 18.04lts?
11 Answer
You could download and install the deb file but you will first need to download and install the xenial shell-fm dependency.
However, you won't get security updates if you manually download and install the deb files.
In order to get security updates, you can use the apt-pinning method to pin these two packages from the xenial universe repository. I've tested this installation method and it starts up and runs okay but I have not tested the alarm function.
Installing packages from other versions of Ubuntu always comes with the possibility of causing problems. Also, Xenial is only supported until 2021 so you will need to delete the xenial repository when this time comes by removing the /etc/apt/sources.list.d/xenial.list file or you will get 404 errors after Xenial is EOL.
First, run the following command to set your default release to 18.04 "bionic" to prevent unwanted upgrades from xenial:
echo 'APT::Default-Release "bionic";' | sudo tee -a /etc/apt/apt.conf.d/01ubuntuNext, run the following command to add the xenial universe repository:
echo 'deb xenial universe
deb xenial-updates universe
deb xenial-security universe' | sudo tee /etc/apt/sources.list.d/xenial.listThen, run the following command to "pin" the two desired packages:
echo 'Package: wakeup
Pin: release n=xenial
Pin-Priority: 995
Package: shell-fm
Pin: release n=xenial
Pin-Priority: 995' | sudo tee -a /etc/apt/preferencesFinally, run the following commands to install wakeup:
sudo apt update
sudo apt install wakeupexplanation:
Apt-pinning can be kind of confusing because the Ubuntu documentation doesn't go into much detail and the Debian documentation examples don't apply to Ubuntu and the default "Pin-Priority" values are different for Debian.
The "Pin-Priority" value decides which version of a package to install regardless of the package version. A package with a higher value will have priority over a package with a lower value.
The "Pin-Priority" for packages in your default distribution "bionic" is 990. Packages from any repository that are not "bionic" are set to 500.
Here, we set the two extra packages to 995 to have priority even though they are not in the default distribution.
If you run the command: apt-cache policy wakeup you will see that the package is listed as 995 but the repositories are listed as 500.
Also, if you want to revert these changes and uninstall these packages run the following commands:
sudo apt purge wakeup shell-fm
sudo rm /etc/apt/sources.list.d/xenial.list
sudo apt update