Giter Site home page Giter Site logo

Comments (12)

kb100 avatar kb100 commented on August 20, 2024 1

Hmm... only other obvious thing to check is does your config file name end in .conf? The script assumes this. If not, could you try adding print statements in various places of the script to see where exactly it is exiting?

from i3blocks-contrib.

kb100 avatar kb100 commented on August 20, 2024

Can you read through this thread #67. I think your issue may be the same. Essentially it comes down to "the script doesn't support dynamic devices". In your openvpn config file (usually /etc/openvpn/udp-ch.conf) you need to hardcode tun0

dev tun0

instead of having

dev tun

from i3blocks-contrib.

guest73 avatar guest73 commented on August 20, 2024

I do not start my VPN by putting anything into /etc/openvpn. This will not work for me. I just run it with --config option. My VPN requires an Google Authenticator numbers be prepended each time I must enter a password.

from i3blocks-contrib.

kb100 avatar kb100 commented on August 20, 2024

In that case you will have to also use openvpn's --writepid option when you start it, and the blocklets -p option to match.

from i3blocks-contrib.

guest73 avatar guest73 commented on August 20, 2024

Ok. Thanks for helping me out.
I set the --writepid in my config file. So I put it like this
--writepid /home/[myacc]/[project]/vpn-setup/proc/[myname]-vpn.pid
and then run it like this:
/usr/lib/i3blocks/openvpn -p '/home/[myacc]/[project]/vpn-setup/proc/[myname]-vpn.pid'
but the output is still
VPN: down
VPN: down
The VPN is working and I set dev tun0 in my vpn configuration

from i3blocks-contrib.

kb100 avatar kb100 commented on August 20, 2024

While your vpn is running, can you verify that openvpn actually writes the pid file to the location you specified? Also, by any chance does your [myacc] or [project] or [myname] contain any spaces?

from i3blocks-contrib.

guest73 avatar guest73 commented on August 20, 2024
  1. The pid file is where it suppose to be, confirmed
  2. [myacc] - a simple one word with only english characters
  3. [project] - a simple one word with only english characters, but it's a symlink to a subfolder of Project folder so [project]->[/home/[myacc]/Projects/[the_same_only_English_letters]
    3)[myname] - serser :)
  4. The output does not indicate any error. Just print 2 'down's

from i3blocks-contrib.

guest73 avatar guest73 commented on August 20, 2024

Yey! It works now! Thanks mate! That was the problem.

from i3blocks-contrib.

guest73 avatar guest73 commented on August 20, 2024

One remark, though. It does run successful only from the folder where a configuration file is located. If I try it from any other folder or from the i3-blocks config it end's up with an error
Can't read config file 'serser.conf': No such file or directory
How can I overcome this? Copy my configuration file into usr/lib/i3blocks/ ?

from i3blocks-contrib.

guest73 avatar guest73 commented on August 20, 2024

Ok. making symlink of my serser.conf into the /usr/lib/i3blocks/ did the trick. Now it's finally on my bar working as expected. Thanks again.

from i3blocks-contrib.

kb100 avatar kb100 commented on August 20, 2024

Use the --cd option that openvpn provides.

from i3blocks-contrib.

andersfylling avatar andersfylling commented on August 20, 2024

I had to make a symlink into my home dir in order for this to work. Tried messing around with the --cd options, but that didn't help.

The --cd flag just tells openvpn where to start from, it shouldn't affect the issue with i3blocks/openvpn and the path.

Right now, it seems that symlink is the only way.

from i3blocks-contrib.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.