This project provides a workaround to streamline the usage of the Perimeter81 VPN client, specifically for environments utilizing pkexec. It's designed to automate the starting of the perimeter81helper and subsequently restart NetworkManager after the Perimeter81 application is closed.
Version: v1.0
Tested Environment: CachyOS (an Arch Linux derivative) with KDE Plasma 6 and Wayland.
Note: While this project is primarily developed and tested on the environment mentioned above, it is likely to work on other distributions with pkexec, notify-send, and the required systemd services installed. However, this is not officially tested or guaranteed.
The workaround consists of a script and a desktop entry:
boot.sh: This is the main script that acts as a wrapper around the Perimeter81 application.- It first executes
.pre-run.shwith root privileges usingpkexecto start theperimeter81helpersystemd service. - It then launches the official Perimeter81 application (
/opt/Perimeter81/perimeter81). - Once the Perimeter81 application is closed, it sends a desktop notification indicating the stopping process is starting.
- It then executes
.post-run.shwith root privileges usingpkexecto stop theperimeter81helperand restart theNetworkManagersystemd service. - Finally, it sends a desktop notification confirming that the process is complete.
- It first executes
.pre-run.sh: A simple script executed with root privileges to start theperimeter81helpersystemd service..post-run.sh: A simple script executed with root privileges to stop theperimeter81helperand restart theNetworkManagersystemd service.p81-fix.desktop: A desktop entry file that points to theboot.shscript. This allows you to launch the Perimeter81 workaround directly from your application menu.
To integrate the workaround with your desktop environment, a simple initialization script is provided:
init-fix.sh: This script copies thep81-fix.desktopfile to your user's local applications directory (~/.local/share/applications/) and then updates the desktop database. This makes the "Perimeter81 VPN (fixed)" entry appear in your application launcher.
To initialize the workaround, simply run the init-fix.sh script from the project directory:
./init-fix.sh-
Clone the repository:
git clone https://gitlab.com/krane.dev/p81-workaround.git
-
Navigate into the cloned directory:
cd p81-workaround -
Copy the workaround files to a location of your choice. It's recommended to place them in a consistent system-wide location like
/opt:sudo cp -r . /opt/p81-workaround -
Make the scripts executable:
sudo chmod +x /opt/p81-workaround/*.sh -
Run the initialization script to add the desktop entry:
/opt/p81-workaround/init-fix.sh
After installation and initialization, you should find a new application entry in your menu called "Perimeter81 VPN (fixed)". Launching this entry will use the workaround script to manage the perimeter81helper and NetworkManager services as needed, providing desktop notifications for feedback.
Alternatively, you can directly execute the boot.sh script from the terminal:
/opt/p81-workaround/boot.shpkexecinstalled and configured.notify-sendcommand available (usually part of a desktop environment's notification system).- Perimeter81 VPN client installed, specifically at the path
/opt/Perimeter81/perimeter81. This includes the helper serviceperimeter81helper. NetworkManagersystemd service.
You can find official releases of the Perimeter81 Workaround project on the GitLab releases page. Each release is tagged and provides a snapshot of the project at a specific version.
- v1.0: The initial release of the project.
You can download release archives from the following URL:
https://gitlab.com/krane.dev/p81-workaround/-/releases
Feel free to contribute to this project by opening issues or submitting merge requests on the GitLab repository.
This project is licensed under the MIT License. See the LICENSE file for details.