Giter Club home page Giter Club logo

Comments (8)

alpha01 avatar alpha01 commented on June 28, 2024

Unless the plugin is disabled, each time the guest VM starts/stops; a Ruby script get's copied over to /usr/bin/notify-send onto the guest VM. Is this not happening?

from vagrant-notify.

MekDrop avatar MekDrop commented on June 28, 2024

It seams that happens. Also there is /usr/bin/notify-send.bkp file. And I think it should work but for unknown reason I'm getting such error. Like I said. same vagrant file doesn't have problem when I'm running on windows.

from vagrant-notify.

alpha01 avatar alpha01 commented on June 28, 2024

It sounds like the guest's notify-send is not able to find the notify-send on your host MacOS system. Have you created a script called notify-send and have it saved anywhere on your PATH? I provide some examples here https://github.com/fgrehm/vagrant-notify/tree/master/examples

It is important that the script on your MacOS system is named notify-send and the execute permission is set to it. Because that's what the notification server runs when it receives messages from the guest VM https://github.com/fgrehm/vagrant-notify/blob/master/lib/vagrant-notify/server.rb#L48

from vagrant-notify.

MekDrop avatar MekDrop commented on June 28, 2024

Good point! Tomorow at work I'll try this. Still such message is not very informative.

from vagrant-notify.

MekDrop avatar MekDrop commented on June 28, 2024

It seems that was issue. Somehow I have forgot to add a script. I also modified one of MacOS X examples to be able to run without any external apps with build-in AppleScript support.

Still, I would like to make somehow this error message more informative but i'm unsure how to do.

from vagrant-notify.

alpha01 avatar alpha01 commented on June 28, 2024

Thanks for the AppleScript support!

To get a more relevant error message, might need to modify either guest's notify-send or the actual notification server.

I think the easiest and best approach is to have the plugin display a warning if it doesn't detect a notify-send anywhere on the host's PATH prior to starting the notification-server.

from vagrant-notify.

MekDrop avatar MekDrop commented on June 28, 2024

I think if we could change

system("notify-send #{args}")

line (in https://github.com/fgrehm/vagrant-notify/blob/master/lib/vagrant-notify/server.rb) into

puts "Warning! notify-send on host os not found!" if system("notify-send #{args}").nil?

at least partially would solve the issue. If command is not found system always returns nil.

from vagrant-notify.

alpha01 avatar alpha01 commented on June 28, 2024

closing

from vagrant-notify.

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.