[SOLVED] script stays on the desktop, because it doesn't finish.
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
script stays on the desktop, because it doesn't finish.
The script that starts my VPN stays on the screen until it's finished, which is all of the time we are connected. The only way I know to shut it down is to shut town the VPN. Is there a way to hide the script? This is the script:
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
If the script needs to remain active then it will show on the desktop. Putting it into the background is a good idea but you say you cannot background it because you need to answer a password. So you want it to be on the foreground and at the same time invisible. This is the classic case of have the pudding and eat it at the same time.
Anyway, I am wondering how you ended up in this situation. Debian install OpenVPN and adds a startup script. The startup script takes care of automatic startup at boot time. Both server and client.
So what did you do to disable this mechanism, and why. The OpenVPN startup script uses a config file in a standard location with a standard name. No need to create your own startup script. And why didn't you use the standard key scheme as explained in the OpenVPN HowTo?
At first I tried oneclickvpn from the internet. They have 'free install/free trial' offer. But I couldn't get it to working. Tried off and on for a long time. Then a friend of mine who lives a long way away, offered to help by means of BOMGAR. He also had a hard time with it. finally got it working with said script, But had to go on family business.
I'd guess that if there was a scriipt or setting in some config file, I probably deleted it or messed it up trying to get rid of the files installed by oneclickvpn
I really don't need to have that VPN up and running all the time. I pay for it by the Gb, so it would be nice to be able to turn it off when I don't need it - which I can do by rebooting.
I tried it as you said,NevemTeve, but it doesn't have any effect on the behavior of the system. I inserted the file exactly named, and copied by 'cut-&-paste' and then deleted 'password' and inserted my password. Then I reset the permissions to 440.
When it didn't work, I went to the directory mentioned in the script, and discovered that /usr/local/sbin And that is an empty directory. There is no openvpn at that address. I wonder if mint17 put it somewhere else, - or if I should build it, or move it from some place else.
I have done exactly as you said here. Sure enough I had the permissions set wrong, but I have double and triple checked the wording of each file and it's permissions.
And It still will not even connect to the VPN. It's a weekend. Perhaps I can connect with Darkwirevpn in the morning and see what they say. The problem could be on their end.
In one of your messages you ask for the results of the command:
ls -ld /usr/local/sbin/openvpn /etc/sudoers.d /etc/sudoers.d/openvpn;
here it is after I corrected the permissions of:/etc/sudoers.d/openvpn
drwxr-xr-x 2 root root 4096 Dec 20 23:37 /etc/sudoers.d
-r--r----- 1 root root 53 Dec 21 23:20 /etc/sudoers.d/openvpn
-rwxr-xr-x 1 root root 83 Dec 21 00:30 /usr/local/sbin/openvpn
Quote:
Originally Posted by NevemTeve
Set the rights of sudoer file to 0440 (do it as root):
I messed up somewhere here. After making the edit you suggest I run the script (as below) and get the immediate message below that. (running as user). (Tried running from administrative prompt, e.g. "# /usr/local/sbin/openvpn" and got the same result)
_______________________________
sudo /usr/local/sbin/openvpn
/usr/local/sbin/openvpn: 2: exec: /usr/sbin/openvpn: Permission denied
______________________________
here is a copy of /usr/sbin/openvpn
_____________________________
/usr/sbin/openvpn: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.24,BuildID[sha1}=c9a4cb73d2d1c4c574aeac11d3b39cda59cba521, stripped
____________________________
at one point I got an error box (don't know for sure what I did to get it) with the message: Warning /usr/sbin/openvpn:no symbols
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.