GSConnect Updated With Command Line Interface, Wayland Clipboard Support (Experimental)

GSConnect v26

GSConnect v25 (quickly followed by v26 to fix a single issue) was released a few hours ago, and is already available on the Gnome Extensions website. The new version brings support for controlling remote media players, experimental clipboard support under Wayland and CLI scripting interface, and more.

So what's GSConnect? It's an implementation of KDE Connect (which integrates with the KDE Plasma desktop) for Gnome Shell.

After pairing your Android device that has the KDE Connect app installed with your desktop via GSConnect, you'll be able perform various actions between the Android device and your desktop computer: transfer files, mirror the clipboard and notifications, remote control media players, send and receive SMS, use Android as a remote keyboard and mouse input, launch commands on the computer from Android, and more.

Newer GSConnect versions require Gnome Shell 3.28, 3.30 or 3.32.

GSConnect v25 had to be released before being fully ready due to a protocol change in the SMS plugin of the KDE Connect Android app, which caused this GSConnect feature to stop working.

My favorite new feature in this GSConnect update is the addition of a command line scripting interface, similar to kdeconnect-cli, which I actually suggested to the developer, and he kindly implemented it. This is currently experimental and undocumented. To see the available command line options you'll need to run this in a terminal:

cd ~/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service

./daemon.js --help

These are the available options in this first GSConnect release that includes a CLI interface:

./daemon.js --help

Usage:
  GSConnect [OPTION…]

Help Options:
  -h, --help                          Show help options
  --help-all                          Show all help options
  --help-gapplication                 Show GApplication options
  --help-gtk                          Show GTK+ Options

Application Options:
  -l, --list-devices                  List available devices
  -a, --list-all                      List all devices
  -d, --device=<device-id>            Target Device
  --pair                              Pair
  --unpair                            Unpair
  --message=<phone-number>            Send SMS
  --message-body=<text>               Message Body
  --notification=<title>              Send Notification
  --notification-appname=<name>       Notification App Name
  --notification-body=<text>          Notification Body
  --notification-icon=<icon-name>     Notification Icon
  --notification-id=<id>              Notification ID
  --photo                             Photo
  --ping                              Ping
  --ring                              Ring
  --share-file=<filepath|URI>         Share File
  --share-link=<URL>                  Share Link
  -v, --version                       Show release version
  --display=DISPLAY                   X display to use

GSConnect commands

Let's look at an example. The command (it's a single command on one line) below is triggered from the KDE Connect Android app, and what it does is it takes a screenshot of your Linux desktop using Gnome Screenshot tool, then sends it back to your Android phone:

file=/tmp/$(hostname)_$(date "+%Y%m%d_%H%M%S").png; gnome-screenshot -f "${file}" && ~/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/daemon.js -d $(~/.local/share/gnome-shell/extensions/gsconnect@andyholmes.github.io/service/daemon.js -a) --share-file="${file}"

It's worth noting that this commands only works if you have one device is available in GSConnect. In other cases you'll need to pass the device ID. This command needs to be added in the GSConnect device Commands panel.

Android-related: Control Android Devices From A Desktop With scrcpy & Helper GUI For scrcpy, The Android Desktop Display And Remote Control Tool

I'm playing music on my Android phone using Spotify, and GSConnect exposes the playback controls for it on my Gnome desktop

The latest GSConnect also brings support for controlling remote media players. With this version, if you have a media player running on your phone, you'll be able to control it from your desktop. GSConnect exposes this remote media player to the MPRISv2 interface, so you can control it from the Gnome Shell notifications panel, or some MPRISv2 extension. This isn't useful for many, but if you're one of the users that listen to music on the phone while using the desktop, you'll find this quite useful.

More changes in GSConnect v25 & v26:

  • Clipboard support for Wayland (experimental)
  • MMS group messaging (read-only)
  • Add support for Brave Web Browser and Nemo File Browser
  • Contacts plugin: GSConnect now supports using libebook-contacts to parse VCards if the GIR is available, as well as improved handling of encoded names in the native parser.
  • SFTP: re-add support for password authentication, as some devices had problems without it.
  • Many bug fixes and major refactoring

GSConnect Nemo send to mobile device

If you use Nemo file manager on Gnome desktop (see how to install Nemo on Ubuntu and replace Nautilus), GSConnect will now integrate with its context menu, allowing you to right click a file to send it to your Android device. For this to work, you'll need to install:

  • nemo-python (on Ubuntu you'll need to install nemo-python if Nemo is installed from the official Ubuntu repositories, or python-nemo if Nemo is installed from a Cinnamon PPA)
  • On Debian/Ubuntu, also install gir1.2-nemo-3.0
  • On Fedora also install nemo-extensions

Install GSConnect


GSConnect can be installed from the Gnome Shell extensions website (already updated to latest version) or by searching for it in Gnome Software app. You'll also need to install KDE Connect on your Android device, either from the Play Store or F-Droid.

To be able to install extensions directly from the Gnome extensions website you'll need to install a package on your system and a browser extension, as explained here.

It's also worth noting that on my system I had to pair GSConnect with KDE Connect for Android again after updating to this version.

Also see the official GSConnect installation and pairing instructions.