How to Receive Notifications from Android to Linux



In this short article, I will introduce you to a tool that allows you to receive notifications from Android to Linux. The tool is called Android2Linux Notifications.

How to Receive Notifications from Android to Linux

Android2Linux Notifications is a way to show notifications from Android on desktop Linux using libnotify.

Both the computer and the phone must be on the same network, as a direct connection is established between them with each new notification. But no one forbids creating this connection remotely using a VPN tunnel like Wireguard.

The server is installed on the computer first, and then the application on the phone. The server is installed with the following commands:

If you run into problems, install the dependencies via pip – the list is in requirements.txt.

After that, you can start the server with the a2ln 50505 command to listen on the 50505th port. Of course, you can change it to your liking, but remember that ports below 1024 require root privileges.

And don’t forget to set the server start to autoload in any convenient way so that notifications continue to come after the machine is rebooted, if you reboot it at all.

On the phone, you need to download the client application from F-Droid and drive into it the IP and port on which the server part is listening.

If you are a happy owner of a Huawei, Samsung, Xiaomi or other phone with dragon power saving, then you will have to take care of whitelisting the application so that the system does not kill it.