Make Android devices part of your Linux environment
Symbiotic Combo

An Android smartphone or tablet is a versatile device on its own, but with a bit of work and few apps, you can make it an organic part of your Linux-based working environment.
Although an Android device can function autonomously, integrating it into your Linux-based environment can make your daily computing more efficient. Several apps and tools are available to help you to make an Android-based smartphone or tablet fit your workflow.
Mirroring Notifications with LinConnect
Viewing Android notifications on your Linux desktop is less distracting and time-consuming than checking your device every time it vibrates or blinks. The LinConnect [1] tool lets you add this functionality easily to any Linux desktop machine, as long as it's on the same wireless network as the Android device (Figure 1).
LinConnect comprises the service that runs on the Linux desktop and the Android client app. The server component is written in Python and has only a few dependencies. If you happen to use Ubuntu, you can deploy and run the LinConnect server using the following commands:
wget --quiet https://raw.github.com/hauckwill/linconnect-server\ /master/LinConnectServer/install.sh chmod +x install.sh ./install.sh
On other Linux distributions, you can deploy the LinConnect server by installing the required dependencies and cloning the project's GitHub repository with:
git clone https://github.com/hauckwill/linconnect-server.git
Now, switch to the ~/.linconnect-server/LinConnectServer/main
directory and start the server using python linconnect_server.py
. Next, install the LinConnect app [2] on the Android device. Launch the app and pick the machine running the LinConnect server from the list of available servers. This step connects the app to the machine and sends a test notification to the desktop.
KDE Connect
If KDE is your preferred graphical desktop environment, KDE Connect [3] is the best tool for linking it to your Android device. Similar to LinConnect, KDE Connect comes in two parts: a desktop application and an Android app. The binary packages of the desktop component are available for various Linux distributions like openSUSE and Ubuntu (and all its variants). If you use the latter, you can install the latest version of KDE Connect from a PPA [4] using:
sudo apt-add-repository ppa:vikoadi/ppa sudo apt-get update sudo apt-get install kdeconnect
KDE Connect for Android is available on both the Google Play Store and F-Droid, so you can install the app from your preferred source. Once you've done that, launch the KDE Connect application on the KDE desktop and the app on your Android device. Then, pair the desktop client with the detected Android device, and you are good to go.
All functionality in KDE Connect is implemented via plugins, and you can enable and disable individual modules as well as configure their options using the KDE Connect desktop application (Figure 2). In addition to plugins for mirroring and syncing notifications, KDE Connect offers several other useful modules.
The Battery monitor plugin, for example, allows you to keep an eye on the Android battery status from the convenience of the KDE desktop. To make use of this plugin, you need to add the KDE Connect widget to the desktop. The Clipboard plugin enables the functionality that syncs the contents of the desktop and Android clipboards. With the Remote filesystem browser plugin enabled, you can use the Dolphin file manager to access storage on the Android device.
The Share and Receive module makes it possible to exchange files between the desktop and the Android device. You can push any file on your desktop machine by right-clicking on it in Dolphin and choosing Send to <DEVICE> via KDE Connect. You can send files in the opposite direction, too. The KDE Connect app adds a dedicated command to Android's sharing feature, so you can push a file from practically any app. KDE Connect's sharing functionality is not limited to files: You can send URLs from the Android device to the default browser on the KDE desktop (Figure 3).
If you want to use your Android device to control the media player on the KDE desktop, enable the Multimedia Control Receiver plugin to start, stop, pause, and navigate between tracks using a remote control interface in the KDE Connect app (Figure 4). Finally, the Touchpad plugin turns the Android device into a glorified touchpad for controlling the desktop cursor.
SSH Button and Mercury-SSH Commander
When you are on the move, an Android device can come in rather handy for accessing and managing remote Linux machines via SSH. Several excellent SSH client apps can help you with that, including ConnectBot, VX ConnectBot, and JuiceSSH. However, pecking commands on a tiny virtual keyboard can quickly become a nuisance – especially if you usually run only a handful of specific actions (e.g., perform a system update, restart a service, reboot the remote machine, etc.).
In this case, you might want to opt for an app like SSH button [5], which lets you define multiple buttons with commands attached to them (Figure 5). As you would expect, defining buttons in SSH button is as easy as it gets: choose Add entry from the main menu, give the new button a name in the Label field, specify the desired command in the Command field, and provide the required SSH connection info. The Command field can contain practically any Linux command – from a simple sudo reboot
to more complex commands like
sudo apt-get update && sudo apt-get dist-upgrade -y
Although SSH button is available free of charge, it's not open source. If you prefer to stick to pure open source software, Mercury-SSH Commander [6] is right up your alley. This application also allows you to define an unlimited number of entries with specific commands assigned to them. Instead of using the app itself, however, you need to create a configuration file manually in JSON format containing definitions. Fortunately, this is easy to do, and you can use the example shown in Listing 1 as a starting point:
Listing 1
Configuration File for Mercury-SSH Commander
As you can see, the configuration file is relatively simple. The name
, host
, port
, user
, and password
server properties are used to specify the SSH connection info. All commands are specified in the commands
array, and each command has three properties: name
, sudo
(specifies whether the command should be run as root), and cmd
.
The configuration file must be saved as a UTF-8, UTF-16, or UTF-32-encoded text file with the .json
extension in the Mercury-SSH
directory on the Android device. Mercury-SSH Commander supports multiple configuration files, so you can create individual profiles for several remote machines (Figure 6).
Buy this article as PDF
(incl. VAT)
Buy Linux Magazine
Direct Download
Read full article as PDF:
Price $2.95
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters
Find SysAdmin Jobs
News
-
OpenMandriva Lx 23.03 Rolling Release is Now Available
OpenMandriva "ROME" is the latest point update for the rolling release Linux distribution and offers the latest updates for a number of important applications and tools.
-
CarbonOS: A New Linux Distro with a Focus on User Experience
CarbonOS is a brand new, built-from-scratch Linux distribution that uses the Gnome desktop and has a special feature that makes it appealing to all types of users.
-
Kubuntu Focus Announces XE Gen 2 Linux Laptop
Another Kubuntu-based laptop has arrived to be your next ultra-portable powerhouse with a Linux heart.
-
MNT Seeks Financial Backing for New Seven-Inch Linux Laptop
MNT Pocket Reform is a tiny laptop that is modular, upgradable, recyclable, reusable, and ships with Debian Linux.
-
Ubuntu Flatpak Remix Adds Flatpak Support Preinstalled
If you're looking for a version of Ubuntu that includes Flatpak support out of the box, there's one clear option.
-
Gnome 44 Release Candidate Now Available
The Gnome 44 release candidate has officially arrived and adds a few changes into the mix.
-
Flathub Vying to Become the Standard Linux App Store
If the Flathub team has any say in the matter, their product will become the default tool for installing Linux apps in 2023.
-
Debian 12 to Ship with KDE Plasma 5.27
The Debian development team has shifted to the latest version of KDE for their testing branch.
-
Planet Computers Launches ARM-based Linux Desktop PCs
The firm that originally released a line of mobile keyboards has taken a different direction and has developed a new line of out-of-the-box mini Linux desktop computers.
-
Ubuntu No Longer Shipping with Flatpak
In a move that probably won’t come as a shock to many, Ubuntu and all of its official spins will no longer ship with Flatpak installed.