# Quick&dirty VPN quick setting button for Plasma Mobile

**URL:** <https://discuss.kde.org/t/quick-dirty-vpn-quick-setting-button-for-plasma-mobile/898>\
**Category:** Plasma Mobile\
**Created:** [April 15, 2023, 7:42pm UTC](https://discuss.kde.org/t/quick-dirty-vpn-quick-setting-button-for-plasma-mobile/898 "2023-04-15T19:42:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![kkofler](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/k/b9e5f3/32.png) [@kkofler](https://discuss.kde.org/u/kkofler)\
**Post date:** [April 15, 2023, 7:42pm UTC](https://discuss.kde.org/t/quick-dirty-vpn-quick-setting-button-for-plasma-mobile/898/1 "2023-04-15T19:42:38Z")

</div>

FYI, I have hacked up a quick&dirty Plasma Mobile quick settings drawer button for VPNs:

> **[quicksettings/vpn · kkofler/vpn-quicksetting · Kevin Kofler / Plasma Mobile ·...](https://invent.kde.org/kkofler/plasma-mobile/-/tree/kkofler/vpn-quicksetting/quicksettings/vpn)**
>
> General UI components for Plasma Phone including shell, containment and applets.

You do not need to compile anything for it, you can just drop the contents of the linked folder into a new folder called ~/.local/share/plasma/quicksettings/org.kde.plasma.quicksetting.vpn (where ~ is your home directory) on the device (PinePhone, PinePhone Pro, or any other Plasma Mobile device).

The set up still requires the desktop kcm\_networkmanagement, so you need to scroll around a bit in that dialog to configure the VPN. If you have no VPN set up yet, the quick settings button just brings up the dialog for you. Otherwise, it takes the first VPN it finds (there is no selection yet for the case where there is more than one) and toggles it, i.e., disables it if it was enabled, enables it otherwise. Depending on the VPN type, you will most likely be prompted for secrets with yet another desktop dialog, but it allows you to connect.

I doubt the code can be included upstream as is because the code architecture is just ugly (scraping a string to check the status and invoking a shell script to do the toggling using nmcli), but if you want a convenient way to use a VPN under Plasma Mobile as long as upstream does not support it officially, there you go.

---

<div class="post-metadata">

**Author:** ![kkofler](https://discuss-cdn.kde.org/letter_avatar_proxy/v4/letter/k/b9e5f3/32.png) [@kkofler](https://discuss.kde.org/u/kkofler)\
**Post date:** [February 3, 2026, 12:27am UTC](https://discuss.kde.org/t/quick-dirty-vpn-quick-setting-button-for-plasma-mobile/898/2 "2026-02-03T00:27:42Z")

</div>

This has been stuck in Plasma Mobile 5 land for a while, but a few weeks ago (December 15), I finally got around to making my quick setting work with Plasma Mobile 6.

However, I was at the time not able to test it completely because the relevant NetworkManager VPN plugins were not packaged in postmarketOS 25.06 / Alpine 3.22. This omission is fixed in Alpine 3.23, hence also in postmarketOS 25.12. (Now the Plasma parts of the VPN plugins are included in the `plasma-nm`package, the NetworkManager parts in subpackages such as `network-manager-openconnect` that you have to install with `apk add`.) Hence, I was now able to successfully test my changes. (No further fixes were needed.)

So I am officially announcing: [quicksettings/vpn · kkofler/vpn-quicksetting · Kevin Kofler / Plasma Mobile · GitLab](https://invent.kde.org/kkofler/plasma-mobile/-/tree/kkofler/vpn-quicksetting/quicksettings/vpn) **is now compatible with (and requires) Plasma Mobile 6.**

The legacy Plasma Mobile 5 version is now available in [the `vpn-quicksetting-plasma5` branch](https://invent.kde.org/kkofler/plasma-mobile/-/tree/kkofler/vpn-quicksetting-plasma5/quicksettings/vpn), but no updates to the legacy version are planned. (Attempting to support both major versions of Plasma with the same code proved impractical.)
