From 3a3c5c867af0b57a93e9fe1808e089b160fd1104 Mon Sep 17 00:00:00 2001 From: TomasM Date: Sun, 24 Dec 2017 06:30:01 -0500 Subject: [PATCH] refresh wicd config each time --- .../03-desktop/rootcopy/root/.fluxbox/menu | 2 +- .../rootcopy/etc/wicd/manager-settings.conf | 1 - .../rootcopy/etc/wicd/wired-settings.conf | 1 - .../04-apps/rootcopy/usr/bin/wicd-manager | 20 +++++++++++++++++++ .../usr/share/applications/wicd.desktop | 2 +- 5 files changed, 22 insertions(+), 4 deletions(-) create mode 100755 Slax/debian/modules/04-apps/rootcopy/usr/bin/wicd-manager diff --git a/Slax/debian/modules/03-desktop/rootcopy/root/.fluxbox/menu b/Slax/debian/modules/03-desktop/rootcopy/root/.fluxbox/menu index 2c528ed..cd48a36 100644 --- a/Slax/debian/modules/03-desktop/rootcopy/root/.fluxbox/menu +++ b/Slax/debian/modules/03-desktop/rootcopy/root/.fluxbox/menu @@ -4,7 +4,7 @@ [exec] (Web Browser) { fbstartupnotify && chromium } [exec] (Text Editor) { fbstartupnotify && leafpad } [exec] (Calculator) { fbstartupnotify && qalculate } - [exec] (Network Manager) { fbstartupnotify && wicd-gtk --no-tray } + [exec] (Network Manager) { fbstartupnotify && wicd-manager } [exec] (Run) { fbappselect } [separator] [workspaces] (Workspaces ...) diff --git a/Slax/debian/modules/04-apps/rootcopy/etc/wicd/manager-settings.conf b/Slax/debian/modules/04-apps/rootcopy/etc/wicd/manager-settings.conf index b0d7691..b6e52cb 100644 --- a/Slax/debian/modules/04-apps/rootcopy/etc/wicd/manager-settings.conf +++ b/Slax/debian/modules/04-apps/rootcopy/etc/wicd/manager-settings.conf @@ -18,4 +18,3 @@ flush_tool = 0 sudo_app = 0 prefer_wired = False show_never_connect = True - diff --git a/Slax/debian/modules/04-apps/rootcopy/etc/wicd/wired-settings.conf b/Slax/debian/modules/04-apps/rootcopy/etc/wicd/wired-settings.conf index 1ba4f12..1d6ee42 100644 --- a/Slax/debian/modules/04-apps/rootcopy/etc/wicd/wired-settings.conf +++ b/Slax/debian/modules/04-apps/rootcopy/etc/wicd/wired-settings.conf @@ -14,4 +14,3 @@ predisconnectscript = None postdisconnectscript = None encryption_enabled = None default = True - diff --git a/Slax/debian/modules/04-apps/rootcopy/usr/bin/wicd-manager b/Slax/debian/modules/04-apps/rootcopy/usr/bin/wicd-manager new file mode 100755 index 0000000..321496f --- /dev/null +++ b/Slax/debian/modules/04-apps/rootcopy/usr/bin/wicd-manager @@ -0,0 +1,20 @@ +#!/bin/bash + +# check if gui is runnning, if so bring it to front and do nothing more +if pgrep wicd-client; then + xdotool search --name "Wicd Network Manager" windowactivate + exit +fi + +CONF=/etc/wicd/manager-settings.conf + +# remove previously configured settings so wicd can gather fresh ones +# then run wicd gtk gui application +service wicd stop +sed -i -r "s/^wireless_interface.*=.*//" $CONF +sed -i -r "s/^wired_interface.*=.*//" $CONF +sed -i -r "s/^wpa_driver.*=.*//" $CONF +service wicd start + +# start gui client +wicd-client --no-tray diff --git a/Slax/debian/modules/04-apps/rootcopy/usr/share/applications/wicd.desktop b/Slax/debian/modules/04-apps/rootcopy/usr/share/applications/wicd.desktop index 48f0f17..bf1fd85 100644 --- a/Slax/debian/modules/04-apps/rootcopy/usr/share/applications/wicd.desktop +++ b/Slax/debian/modules/04-apps/rootcopy/usr/share/applications/wicd.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Exec=wicd-gtk --no-tray +Exec=wicd-manager Icon=gnome_network_workgroup Name=Net Manager Terminal=false