Hi there, I am using opensuse and Kodi. I bought Ivacy VPN which comes with an Widget for Kodi. Unfortunately, the Ivacy Widget is either broken or not really made for openSuse.
Anyway I made a fix which I would like to present and open an discussion:
Problem1: 1. Ivacy Widget tries to write a log file in /run. This is hard coded in the python script which needs root credentials. Solution: in File $HOME/.kodi/addons/service.ivacy.monitor/libs/platform.py on line 74 change 'return "/run/openvpn.log"' to
This will write the logfile in the home folder of $USER.
Problem 2: 2. Ivacy uses openPVN which needs root credentials to open an vpn connection which leads to connection errors.First an adjustment in one python script file must be made. Solution:
in File $HOME/.kodi/addons/service.ivacy.monitor/libs/platform.py on line 37 change 'use_sudo = False' to 'use_sudo = True' in File $HOME/.kodi/addons/service.ivacy.monitor/libs/platform.py on line 94 add the line
Code:
if p == platforms.LINUX and use_sudo : command = "sudo " + command
Now the sudoers file must be adjusted to enable the user to execute openvpn with root credentials without entering root password. 1. login as root with 'sudo su' 2. edit the sudoers file with 'visudo' 3. look for "## Cmnd alias specification" and enter the alias 'Cmnd_Alias OPENVPN = /usr/sbin/openvpn' 4. look for area "## Runas alias specification" enter 'User_Alias ADMINS = YOUR_USER' (CHANGE YOUR_USER to actual user) 5. look for area "## Same thing without a password" and enter 'ADMINS ALL=(ALL) NOPASSWD: OPENVPN' 6. save with 'ESC' and enter 'wq!