Opening graphic application on usb plug
up vote
0
down vote
favorite
I'm using Kubuntu 18.04 and Yubikey for VPN authorization.
I want to open Konsole application on key plug-in running nmcli connection up my_connection to show me password prompt. I set up udev to run my shell script, but it only blinks the window. It disappears less than in a second.
My /lib/udev/yubikey file is:
#!/bin/bash
export DISPLAY=:0
sudo -u user konsole -e "nmcli connection up my_connection"
sudo -u user nmcli connection up my_connection
If I run "nmcli connection up my_connection" from opened terminal it works! It works event if I run it using sudo. But not from udev.
Upd.
Added --hold key to konsole call. Now window stays and I can see: Error: Connection activation failed: Not authorized to control networking. Tried adding sudo -u user nmcli general permissions > /perm.txt to script. Got this:
PERMISSION VALUE
org.freedesktop.NetworkManager.enable-disable-network no
networking kubuntu udev
add a comment |
up vote
0
down vote
favorite
I'm using Kubuntu 18.04 and Yubikey for VPN authorization.
I want to open Konsole application on key plug-in running nmcli connection up my_connection to show me password prompt. I set up udev to run my shell script, but it only blinks the window. It disappears less than in a second.
My /lib/udev/yubikey file is:
#!/bin/bash
export DISPLAY=:0
sudo -u user konsole -e "nmcli connection up my_connection"
sudo -u user nmcli connection up my_connection
If I run "nmcli connection up my_connection" from opened terminal it works! It works event if I run it using sudo. But not from udev.
Upd.
Added --hold key to konsole call. Now window stays and I can see: Error: Connection activation failed: Not authorized to control networking. Tried adding sudo -u user nmcli general permissions > /perm.txt to script. Got this:
PERMISSION VALUE
org.freedesktop.NetworkManager.enable-disable-network no
networking kubuntu udev
Welcome to AskUbuntu! what happens if you use the--holdor--nocloseoption rather than the-eas discussed here?
– Elder Geek
Nov 13 at 18:45
Added. Now window stays and I can see:Error: Connection activation failed: Not authorized to control networking.Tried addingsudo -u user nmcli general permissions > /perm.txtto script. Got this:PERMISSION VALUE org.freedesktop.NetworkManager.enable-disable-network no
– Валерий Старынин
Nov 13 at 19:47
Please edit the information into your post as comments can get deleted here for numerous reasons. Thank you for helping us help you!
– Elder Geek
Nov 13 at 23:59
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm using Kubuntu 18.04 and Yubikey for VPN authorization.
I want to open Konsole application on key plug-in running nmcli connection up my_connection to show me password prompt. I set up udev to run my shell script, but it only blinks the window. It disappears less than in a second.
My /lib/udev/yubikey file is:
#!/bin/bash
export DISPLAY=:0
sudo -u user konsole -e "nmcli connection up my_connection"
sudo -u user nmcli connection up my_connection
If I run "nmcli connection up my_connection" from opened terminal it works! It works event if I run it using sudo. But not from udev.
Upd.
Added --hold key to konsole call. Now window stays and I can see: Error: Connection activation failed: Not authorized to control networking. Tried adding sudo -u user nmcli general permissions > /perm.txt to script. Got this:
PERMISSION VALUE
org.freedesktop.NetworkManager.enable-disable-network no
networking kubuntu udev
I'm using Kubuntu 18.04 and Yubikey for VPN authorization.
I want to open Konsole application on key plug-in running nmcli connection up my_connection to show me password prompt. I set up udev to run my shell script, but it only blinks the window. It disappears less than in a second.
My /lib/udev/yubikey file is:
#!/bin/bash
export DISPLAY=:0
sudo -u user konsole -e "nmcli connection up my_connection"
sudo -u user nmcli connection up my_connection
If I run "nmcli connection up my_connection" from opened terminal it works! It works event if I run it using sudo. But not from udev.
Upd.
Added --hold key to konsole call. Now window stays and I can see: Error: Connection activation failed: Not authorized to control networking. Tried adding sudo -u user nmcli general permissions > /perm.txt to script. Got this:
PERMISSION VALUE
org.freedesktop.NetworkManager.enable-disable-network no
networking kubuntu udev
networking kubuntu udev
edited Nov 14 at 13:48
asked Nov 13 at 18:08
Валерий Старынин
11
11
Welcome to AskUbuntu! what happens if you use the--holdor--nocloseoption rather than the-eas discussed here?
– Elder Geek
Nov 13 at 18:45
Added. Now window stays and I can see:Error: Connection activation failed: Not authorized to control networking.Tried addingsudo -u user nmcli general permissions > /perm.txtto script. Got this:PERMISSION VALUE org.freedesktop.NetworkManager.enable-disable-network no
– Валерий Старынин
Nov 13 at 19:47
Please edit the information into your post as comments can get deleted here for numerous reasons. Thank you for helping us help you!
– Elder Geek
Nov 13 at 23:59
add a comment |
Welcome to AskUbuntu! what happens if you use the--holdor--nocloseoption rather than the-eas discussed here?
– Elder Geek
Nov 13 at 18:45
Added. Now window stays and I can see:Error: Connection activation failed: Not authorized to control networking.Tried addingsudo -u user nmcli general permissions > /perm.txtto script. Got this:PERMISSION VALUE org.freedesktop.NetworkManager.enable-disable-network no
– Валерий Старынин
Nov 13 at 19:47
Please edit the information into your post as comments can get deleted here for numerous reasons. Thank you for helping us help you!
– Elder Geek
Nov 13 at 23:59
Welcome to AskUbuntu! what happens if you use the
--hold or --noclose option rather than the -e as discussed here?– Elder Geek
Nov 13 at 18:45
Welcome to AskUbuntu! what happens if you use the
--hold or --noclose option rather than the -e as discussed here?– Elder Geek
Nov 13 at 18:45
Added. Now window stays and I can see:
Error: Connection activation failed: Not authorized to control networking. Tried adding sudo -u user nmcli general permissions > /perm.txt to script. Got this: PERMISSION VALUE org.freedesktop.NetworkManager.enable-disable-network no – Валерий Старынин
Nov 13 at 19:47
Added. Now window stays and I can see:
Error: Connection activation failed: Not authorized to control networking. Tried adding sudo -u user nmcli general permissions > /perm.txt to script. Got this: PERMISSION VALUE org.freedesktop.NetworkManager.enable-disable-network no – Валерий Старынин
Nov 13 at 19:47
Please edit the information into your post as comments can get deleted here for numerous reasons. Thank you for helping us help you!
– Elder Geek
Nov 13 at 23:59
Please edit the information into your post as comments can get deleted here for numerous reasons. Thank you for helping us help you!
– Elder Geek
Nov 13 at 23:59
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1092629%2fopening-graphic-application-on-usb-plug%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Welcome to AskUbuntu! what happens if you use the
--holdor--nocloseoption rather than the-eas discussed here?– Elder Geek
Nov 13 at 18:45
Added. Now window stays and I can see:
Error: Connection activation failed: Not authorized to control networking.Tried addingsudo -u user nmcli general permissions > /perm.txtto script. Got this:PERMISSION VALUE org.freedesktop.NetworkManager.enable-disable-network no– Валерий Старынин
Nov 13 at 19:47
Please edit the information into your post as comments can get deleted here for numerous reasons. Thank you for helping us help you!
– Elder Geek
Nov 13 at 23:59