The Lounge

opensuse, ivacy vpn, kodi, ivacy widget fix

Submitted by alppein, , Thread ID: 92605

Thread Closed
18-06-2018, 08:00 PM
This post was last modified: 19-06-2018, 07:49 PM by alppein
#1
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.

Before you do anything, install the Ivacy Widget first : https://support.ivacy.com/kb/setup-ivacy...mment-3805

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

Code:
retPath = os.getenv("HOME") + "/openvpn.log"
return retPath

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!

reboot and enjoy.

Regards Alppein

RE: opensuse, ivacy vpn, kodi, ivacy widget fix

#2
i dont know why i am replying this but bye ggg lolololo

Users browsing this thread: 1 Guest(s)