doktor5000 wrote:Major difference is that you start it with a different configuration compared to what kodi tried in the log
sorry, too many attempts and too many log files. The cited log entries was, when I temporarily disabled the sudo in the add-on settings. This is the log entry for the "standard" approach with enabled sudo setting (please note that I even manipulated the code to save the log file in the /home of media to get rid of any permission issues if the log is written to /run/openvpn.log)
- Code: Select all
16:26:11 T:140517134538496 NONE: VPN Mgr Debug: (Linux) Starting VPN with sudo /usr/sbin/openvpn "/home/media/.kodi/addons/service.vpn.manager/ExpressVPN/Albania (UDP).ovpn" > /home/media/openvpn.log &
I posted exactly this command in the terminal and it works.
doktor5000 wrote:... so the environment may be different.
I thought in the same direction, that a different evironment between ssh login as user, and the kodi -standalone login
doktor5000 wrote:Could you please also add the output of
- Code: Select all
sudo -l
run as the media user and as root of
- Code: Select all
su - media -c sh 'sudo /usr/sbin/openvpn ~/.kodi/addons/service.vpn.manager/ExpressVPN/Germany\ -\ Frankfurt\ -\ 1\ \(UDP\).ovpn'
su - media -c sh 'sudo /usr/sbin/openvpn "/home/media/.kodi/addons/service.vpn.manager/ExpressVPN/Albania (UDP).ovpn"'
- Code: Select all
[media@MediaCenter ~]$ LC_ALL=C sudo -l
Matching Defaults entries for media on MediaCenter:
requiretty, env_reset, env_keep="COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR LS_COLORS",
env_keep+="MAIL PS1 PS2 QTDIR USERNAME LANG LC_ADDRESS LC_CTYPE", env_keep+="LC_COLLATE
LC_IDENTIFICATION LC_MEASUREMENT LC_MESSAGES", env_keep+="LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER
LC_TELEPHONE", env_keep+="LC_TIME LC_ALL LANGUAGE LINGUAS _XKB_CHARSET XAUTHORITY",
secure_path=/sbin\:/bin\:/usr/sbin\:/usr/bin, env_keep+=QT_GRAPHICSSYSTEM
User media may run the following commands on MediaCenter:
(root) NOPASSWD: /sbin/shutdown, /sbin/halt, /sbin/reboot, /sbin/poweroff
(root) NOPASSWD: /usr/sbin/openvpn
as media and as root (both commands same output):
- Code: Select all
media@MediaCenter ~]$ LC_ALL=C su - media -c sh 'sudo /usr/sbin/openvpn ~/.kodi/addons/service.vpn.manager/ExpressVPN/Germany\ -\ Frankfurt\ -\ 1\ \(UDP\).ovpn'
Password:
sh: Kann die Prozessgruppe des Terminals nicht setzen (-1).: Unpassender IOCTL (I/O-Control) für das Gerät
sh: Keine Job Steuerung in dieser Shell.
sh-4.3$
I am connected via ssh. Or is there a difference when I logged in locally?
doktor5000 wrote:What is also pretty sad is that the kodi vpn manager way to run the command drops everything that goes to stderr and only redirects stdout into the log /home/media/openvpn.log.
It should start the VPN like this to also capture stderr into the log
- Code: Select all
/usr/sbin/openvpn "/home/media/.kodi/addons/service.vpn.manager/ExpressVPN/Albania (UDP).ovpn" > /home/media/openvpn.log 2>&1 &
I can try to modify the code (I managed as well in adapting the log path, so I should get it even with my limited python skills

plspls wrote:did you check if sudo is installed? sometimes sudo is not installed and it doesn't work
hmm? Did you read my in my first post:
Latte wrote:using sudo /usr/sbin/openvpn ~/.kodi/addons/service.vpn.manager/ExpressVPN/Germany\ -\ Frankfurt\ -\ 1\ \(UDP\).ovpn in the terminal an working VPN connection can be established