Skip to main content
Topic: Surfshark GUI (VPN) not starting (Read 671 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Surfshark GUI (VPN) not starting

Hi everyone.
I have fresh Artix install (Community QT, KDE, OpenRC) I updated system and installed surfshark-client from AUR using trizen.
During installation I noticed few errors:
Code: [Select]
1/1) installing surfshark-client                                  [------------------------------------] 100%
warning: directory permissions differ on /etc/
filesystem: 755  package: 777
warning: directory permissions differ on /etc/init.d/
filesystem: 755  package: 777
warning: directory permissions differ on /usr/
filesystem: 755  package: 777
warning: directory permissions differ on /usr/lib/
filesystem: 755  package: 777
warning: directory permissions differ on /usr/lib/systemd/
filesystem: 755  package: 777
warning: directory permissions differ on /usr/lib/systemd/system/
filesystem: 755  package: 777
warning: directory permissions differ on /usr/lib/systemd/user/
filesystem: 755  package: 777
warning: directory permissions differ on /var/
filesystem: 755  package: 777
warning: directory permissions differ on /var/lib/
filesystem: 755  package: 777
/tmp/alpm_iLvo68/.INSTALL: line 69: update-rc.d: command not found
/tmp/alpm_iLvo68/.INSTALL: line 70: update-rc.d: command not found
/etc/init.d/surfshark: line 57: log_daemon_msg: command not found
start-stop-daemon: unrecognized option '--remove-pidfile'

Code: [Select]
start-stop-daemon: unrecognized option '--no-close'
/etc/init.d/surfshark2: line 64: log_end_msg: command not found

Whenever I start surfshark I receive error notification. Pic related as I haven't found a way to copy text from it.


Unfortunately I'm a basic Linux user so can't resolve it myself so any help is appreciated.
I tested it in EndeavourOS and it was working, so my guess is, that have something to do with Artix init system  :)

 

Re: Surfshark GUI (VPN) not starting

Reply #1
In short the service file for systemd that this appl. depends on needs to be converted.

Does Surfshark have an option to export wireguard/openvpn config file? This would probably be easier for you than getting this application working.

Re: Surfshark GUI (VPN) not starting

Reply #2
Does Surfshark have an option to export wireguard/openvpn config file? This would probably be easier for you than getting this application working.
Yes it does, but I found it easier to just use an app. Also I like challenges so if you can point me in right direction I might try to modify app to make it work on OpenRC. Since I'm testing Artix and it's not my daily driver I'm not afraid to experiment a little even if it will break whole system  :D

Since I'm new in this whole non-systemd OS world, does it happen frequently - I mean apps not working due to different init?

edit:
Also - is there any chance that it will run on init different than OpenRC? Do others maybe have some built in  systemd emulator?

Re: Surfshark GUI (VPN) not starting

Reply #3
Quote
Yes it does, but I found it easier to just use an app. Also I like challenges so if you can point me in right direction I might try to modify app to make it work on OpenRC.
:-)
You can get the service file from /lib/systemd/system, if it's not in the placeholder directory in your system then you can find it within the .tar.zst package that the aur manager made. After that visit http://openrc.run/ to convert, then place the result in a file in /etc/init.d, also start the service manually.
Quote
Since I'm new in this whole non-systemd OS world, does it happen frequently - I mean apps not working due to different init?
Not many, I personally saw one or two other occasions.
You will discover in the Artix repos that a lot of things have services available and ready made, exceptions are few and workarounds mostly exist for those as well.
Quote
Also - is there any chance that it will run on init different than OpenRC? Do others maybe have some built in  systemd emulator?
There are conversions between the inits with more or less feature parity, they have their own perks that can be leveraged in some occasions, of course you or a dev need to script that by hand.
There is no systemd emulation but inits close to it's functionality are s6 and dinit.

Re: Surfshark GUI (VPN) not starting

Reply #4
Awesome. Thank you very much. Will play with it when will find some spare time  :)

edit:
I tried to install surfshark with dinit. No success. Now I tried with runit. Had similiar permission errors
Code: [Select]
(1/1) installing surfshark-client                                  [####################################] 100%
warning: directory permissions differ on /etc/
filesystem: 755  package: 777
warning: directory permissions differ on /usr/
filesystem: 755  package: 777
warning: directory permissions differ on /usr/lib/
filesystem: 755  package: 777
warning: directory permissions differ on /usr/lib/systemd/
filesystem: 755  package: 777
warning: directory permissions differ on /usr/lib/systemd/system/
filesystem: 755  package: 777
warning: directory permissions differ on /usr/lib/systemd/user/
filesystem: 755  package: 777
warning: directory permissions differ on /var/
filesystem: 755  package: 777
warning: directory permissions differ on /var/lib/
filesystem: 755  package: 777
Unsupported service manager

When I try to run it I have different error notification


Is it going to be easier to fix it than on OpenRC?

Re: Surfshark GUI (VPN) not starting

Reply #5
Quote
Is it going to be easier to fix it than on OpenRC?
Not for a beginner afaik. You need the actual service part of it to be running, take a look firstly at what the systemd service file does, maybe it's a simple command and you can get away with running it in a terminal, otherwise do as described above :-)

LE:
Good news, I had a look at the package myself and it doesn't seem to depend on systemd, it's just to call some scripts, /etc/init.d/surfshark*, which in term execute this:
/opt/Surfshark/resources/dist/resources/surfsharkd*.js

I'm trying to make it run out of curiousity and if it works i'll let you know

Re: Surfshark GUI (VPN) not starting

Reply #6
As I don't have a lot of spare time during working days (and I'm a noob  :P )I was going to read through tips you sent me over the upcoming weekend.
It seems You try to solve my problem for me. Has anyone told you that - "You are awesome!" ?
Anyway I just installed Artix s6 and have exactly same errors and notifications as with runit. Right now I have 3 different init Artix systems installed on my laptop  ;D

Re: Surfshark GUI (VPN) not starting

Reply #7
Just as a side note, you should ignore those permissions errors. I don't know what's up with that package, but 777 is a terrible idea in general, let alone on directories like /etc and /usr... "Unsupported service manager" is the real issue.

There are two systemd service files included with the package, but only "surfsharkd.service" is enabled when installed.

snippet from the post-install script shipped with the .deb package, this is where your error is coming from as well as where it tries to enable the systemd unit
Code: [Select]
case "$(ps -p 1 --no-headers -o '%c' | tr -d '\n')" in
    systemd)
        systemctl daemon-reload || true
        systemctl enable --global surfsharkd.service || true
    ;;
    init)
        update-rc.d surfshark defaults || true
        update-rc.d surfshark2 defaults || true
        /etc/init.d/surfshark restart || true
        /etc/init.d/surfshark2 restart || true
    ;;
    *)
        echo "Unsupported service manager"
    ;;
esac

surfsharkd.service
Code: [Select]
[Unit]
Description=Surfshark Daemon

[Service]
ExecStart=/opt/Surfshark/resources/dist/resources/surfsharkd.js
Restart=on-failure
RestartSec=5
IPAddressDeny=any
RestrictRealtime=true
ProtectKernelTunables=true
ProtectSystem=full
RestrictSUIDSGID=true

[Install]
WantedBy=default.target

surfsharkd2.service
Code: [Select]
[Unit]
Description=Surfshark Daemon2

[Service]
ExecStart=/opt/Surfshark/resources/dist/resources/surfsharkd2.js
Restart=on-failure
RestartSec=5
IPAddressDeny=any
RestrictRealtime=true
ProtectKernelTunables=true
ProtectSystem=full
RestrictSUIDSGID=true

[Install]
WantedBy=default.target

If you want to take a shot at writing some service files for your preferred init then like @Hitman said that's where I'd start :) You could also try looking at the scripts that are installed to /etc/init.d, but if you're coming from systemd it might be easier to work from those services.

Re: Surfshark GUI (VPN) not starting

Reply #8
@andyscott thanks for your input. Unfortunately I'm busy this weekend, but I promise I will get to it when I will find some free time. Luckily I don't use SurfShark too often, I don't use it at all on PC tbh, but still would be nice to have it working.

Anyway my thanks  go to You and @Hitman and I will update this topic after I will succeed with "Kernel panic"  ;D