Bug 487366 - Start script at connection activation / deactivation
Summary: Start script at connection activation / deactivation
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasmashell
Classification: Plasma
Component: Networking in general (other bugs)
Version First Reported In: master
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-22 11:56 UTC by tnemeth
Modified: 2024-12-23 18:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tnemeth 2024-05-22 11:56:04 UTC
SUMMARY

Hello.

I'm looking for a way to start a script (potentially as root) when a connection is established and/or disconnected. Eg: to trigger backup, change the FW/GW/routing configuration etc.


STEPS TO REPRODUCE
1. Open the plasma-nm applet
2. Select any connection entry
3. Look for "Start script at connection" or "Start script at disconnection"

OBSERVED RESULT

No script can be triggered at neither connection nor disconnection.

EXPECTED RESULT

Entry for specifying a script in each case.

SOFTWARE/OS VERSIONS
Operating System: Debian GNU/Linux 12
KDE Plasma Version: 5.27.10
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.10
Kernel Version: 6.7.12-amd64 (64-bit)
Graphics Platform: X11


ADDITIONAL INFORMATION
N/A
Comment 1 tnemeth 2024-07-24 11:43:55 UTC
Any progress on the idea presented here ?
Comment 2 David Edmundson 2024-07-24 11:51:00 UTC
This is out of scope. If anyone wanted to do such a thing they can write some small script in any language to also talk to NetworkManager without needing any infrastructure on the KDE side.
Comment 3 tnemeth 2024-07-24 11:57:50 UTC
(In reply to David Edmundson from comment #2)
> This is out of scope. If anyone wanted to do such a thing they can write
> some small script in any language to also talk to NetworkManager without
> needing any infrastructure on the KDE side.

Thanks for your reply :)

I would have imagined an entry in the KDE network configuration window that lets a user specify a script to be started at connection and/or disconnection so that no lowlevel integration would be needed. One can also use /etc/network/if-[pre|post]-[up|down].d/ but I think that solution depends too much on the distro used.
Comment 4 Ben Cooksley 2024-12-23 18:23:47 UTC
Bulk transfer as requested in T17796