Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: Help starting program (Read 3913 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help starting program

Hi there. I have been getting on pretty well with Aritx since I installed it a few months ago, but I have a slight problem now that I would like some help with.
 
I want to run the program 'nordvpn-bin'. I know there are other alternatives but I like this program better, however I can't get it to run. The error I get it this:

Code: [Select]
nordvpn connect is
Whoops! Cannot reach User Daemon
To use this program requires two daemons to run 'nordvpnsd' and 'nordvpnud' These are provided in the install package and reside in /usr/bin. They are binaries not scripts so I can't read them.

What I have done so far:

Created 2 folders /etc/runit/sv/nordvpnsd and /etc/runit/sv/nordvpnud. In each of these folders I created a shell script with the title 'run' and containing the following:

Code: [Select]
cat /etc/runit/sv/nordvpnsd/run

#!/bin/bash
exec nordvpnsd 2&>1

cat /etc/runit/sv/nordvpnud/run

#!/bin/bash
exec nordvpnud 2&>1
and made these executable with 755 permissions.

I then symlinked these folders to /run/runit/service:

Code: [Select]
ls -l /run/runit/service/ | grep "nord*"

lrwxrwxrwx 1 root root 23 May 23 11:39 nordvpnsd -> /etc/runit/sv/nordvpnsd
lrwxrwxrwx 1 root root 23 May 23 11:39 nordvpnud -> /etc/runit/sv/nordvpnud
The services have both started:

Code: [Select]
sudo sv status nordvpnsd
run: nordvpnsd: (pid 6597) 734s

sudo sv status nordvpnud
run: nordvpnud: (pid 6714) 732s

But the error remains - can't reach user deamon.

Maybe this is a permission error or maybe I have missed some vital step out.

That is what I would like some help with, any ideas?

Re: Help starting program

Reply #1
I'll take a closer look later since I'm not on my computer right now but from the NordVPN AUR it looks like they use some systemd-exclusive features in systemctl --user enable --now nordvpnud

I may be wrong. Since it seems nordvpnud is supposed to be run per user, try to change your nordvpnud runitscript a little bit to:

exec chpst -u <yourusername> nordvpnud 2&>1

nordvpnsd can remain as is.
now only the dinit guy in artix

Re: Help starting program

Reply #2
Runit scripts in Artix seem require the program after exec not to be daemonized. Did you try to start daemons manully, without using runit?
Also, could it require dbus session to work?
ARMtix

Re: Help starting program

Reply #3
Thank you  both for the suggestions.
@konimex - I tried altering the nordvpnud file as per your suggestion but it doesn't make any difference I get the same error message.

@phoenix_king_rus  - I altered the nordvpnud run file to:

Code: [Select]
#!/bin/bash
sv start dbus || exit 1
exec chpst -U artix nordvpnud 2&>1

again it doesn't seem to make any difference.

When I tried the same trick with the nordvpnsd file it wouldn't restart - just  timed out, so I changed that back again.

Starting the files manually without using sv  doesn't seem to work at all, the terminal cursor just moves to another line but produces no output.

Maybe this program is too bound up with systemd to be runit compatible.

Going off line now, will check in again tomorrow to see if anybody has any further ideas.

Thanks again.

Re: Help starting program

Reply #4
Starting the files manually without using sv  doesn't seem to work at all, the terminal cursor just moves to another line but produces no output.
I meant starting programs directly, not your scripts
ARMtix

Re: Help starting program

Reply #5
Thank you  both for the suggestions.
@konimex - I tried altering the nordvpnud file as per your suggestion but it doesn't make any difference I get the same error message.

Code: [Select]
#!/bin/bash
sv start dbus || exit 1
exec chpst -U artix nordvpnud 2&>1

-u, not -U. Different flag. You need to run it as user so the flag does that.
now only the dinit guy in artix

Re: Help starting program

Reply #6
Doh! What a dummy I am.

Thank you konimex, with the lower case u it works perfectly.

BTW I guess you know there has been quite a few problems with the forum website today, it has been offline for most of the day and even now it doesn't work properly, if I click on any forum section title like 'OpenRC', Runit, etc. etc. it just loads a blank page. I can only access content by clicking the link in the 'latest post' column.

Re: Help starting program

Reply #7
In the unlikely event that anyone else is interested in this topic, I will just update it for you.

In the opening post back in May, I stated that nordvpn-bin needed two daemons to be running before you could use it and with a bit of help from konimex I got them both set up and the program working.

Sometime later it stopped working again. I couldn't figure out why for quite a while and switched to using openpyn-nordvpn instead but I don't like this program quite as much.

The other day I found out that nordvpn now requires not two, but three daemons to be running in order to work - seems a bit excessive but there you are.

So if you want it working on artix again in addition to creating and starting nordvpnsd and nordvpnud daemons you also have to create and start nordvpnd. The procedure for doing that is the same as for nordvpnsd which I outlined in the opening post.

That's all.