pia-foss / desktop

Private Internet Access - Desktop VPN Client for Windows/macOS/Linux
Other
279 stars 52 forks source link

The Install button doesn't install (Linux) #16

Closed MrMikeJJ closed 3 years ago

MrMikeJJ commented 4 years ago

Describe the bug The Install button doesn't work. When there is an update, the Download button downloads the new version The update button does nothing. I have to manually go to /opt/piavpn/var/update and run the update from there After installing the update, the ChangeLog button does work

To Reproduce 1) Wait for a new update 2) Press "Download" 3) Press "Install"

Expected behavior The update to install

Observed on:

thanks Mike

JonathonH-PIA commented 4 years ago

Hi @MrMikeJJ , Desktop uses the /opt/piavpn/bin/run-in-terminal.sh script to try to find a terminal emulator for the installer. It's possible we may need to add a detection to this script for LXQt.

Could you check a few things on your system to help us narrow down the problem?

  1. Is your default terminal emulator QTerminal or something else?
  2. Do you have a symlink at /usr/bin/x-terminal-emulator to your default terminal emulator?
    • PIA checks for that symlink first since most systems have it, otherwise it looks for /usr/bin/{gnome-terminal,konsole,xterm}. If your system lacks the symlink we can add QTerminal, etc. to this list.
  3. Does /opt/piavpn/bin/run-in-terminal.sh /usr/bin/top (using top just as an example) successfully start a terminal emulator running top?

If you're feeling adventurous, you can try hacking /opt/piavpn/bin/run-in-terminal.sh to detect your preferred terminal emulator, please let us know if you find any changes we should incorporate!

MrMikeJJ commented 4 years ago

Hi JonathonH, Thank you for the response. Certainly i will check 1) Yes, it is qterminal 2) /usr/bin-xterminal-emulator is a symlink to /etc/alternatives/x-terminal-emulator /etc/alternatives/x-terminal-emulator is a symlink to /usr/bin/qterminal 3) Yes, /opt/piavpn/bin/run-in-terminal.sh /usr/bin/top opens a terminal running top

I added some logging to the /opt/piavpn/bin/run-in-terminal.sh file and confirm it is getting called. At the end it calls nohup /usr/bin/x-terminal-emulator -e /opt/piavpn/var/update/pia-linux-2.4-05574.run &

When i run this line from a terminal, the update starts and it prompts for the sudo password. If i edit /opt/piavpn/bin/run-in-terminal.sh and remove the ampersand from the end of that line; the update starts and prompts for the password :) However the service didn't start up afterwards, which it does do when i use sh /opt/piavpn/var/update/pia-linux-2.4-05574.run

(the update added the ampersand back onto the end of that line)

thanks Mike

MrMikeJJ commented 4 years ago

Hi JonathonH, Been playing with it, Both the following work (but don't start the service afterwards) nohup $TERMCMD -e "$1" 2>/dev/null & nohup $TERMCMD -e "$1" 2>~/nohup.out &

This implies it maybe a permissions issue, where user mike doesn't have write access to /opt/piavpn/bin (which is owned by root) and nohup is trying to write stderr to that directory. It doesn't explain the service not starting afterwards, but does explain why the Upgrade doesn't even start.

thanks Mike

JonathonH-PIA commented 4 years ago

Great find @MrMikeJJ ! Sorry for the delay on getting back to this.

It looks like the failure to start the client after install is similar - we had a disown in the install script when starting the client, I changed that to a nohup with 2>/dev/null and the client now starts correctly after install on LXQt!

Thank you so much for helping us find the cause of this issue! We should be able to get this into our 2.6 release (we already have 2.5 in testing). I'll keep this issue open until we release the fix.

JonathonH-PIA commented 3 years ago

Fixed in 2.6.0 👍