You are not logged in.
Hello,
I am trying to create an application launcher that will let me connect to my vpn account at start up instead of having to manually type the openvpn command each time my machine boots. I need to use sudo, but lxterminal disappears the instant it opens. I tried adding the read command as suggested here:http://ubuntuforums.org/showthread.php?t=192427, but it just doesn't work.
Any suggestions? Or alternatively, is there a way for me to start the vpn connection automatically at startup, preferably without even having to enter my password?
Here's my .desktop file:
[Desktop Entry]
Encoding=UTF-8
Name=OpenVPN
Comment=Establish a secure connection
Icon=vpn
Exec=lxterminal --command="sudo openvpn --config /home/myhomefolder/.vpnkey/vpnfile.ovpn"
Terminal=false
Type=Application
Thanks!
Last edited by DavidR (2009-09-19 17:43:06)
Offline
You can put that command in rc.local to run it at boot or in /etc/xdg/lxsession/LXDE/autostart to run it when LXDE starts.
Offline
I tried adding it to /etc/rc.local, and according to the boot up messages it works, but the boot process just stops after OpenVPN opens the tunnel. OpenVPN doesn't terminate and I think that the startup process keeps waiting for bash to exit, but bash doesn't as it keeps waiting for the OpenVPN output. In other words, my machine stops booting.
Here's what I have in rc.local:
#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
cd /home/homefolder/.vpnkey
openvpn --config vpn.ovpn
Offline
Fixed by adding and & to the rc.local command and redirecting the output to a textfile that's located in my home directory.
Thanks for your help!
Offline