Giter VIP home page Giter VIP logo

Comments (19)

franciscolourenco avatar franciscolourenco commented on August 17, 2024

The plugin does not work over SSH, only on local. Do you have any ideas to make it work over SSH?

from done.

BarbzYHOOL avatar BarbzYHOOL commented on August 17, 2024

No, sorry

from done.

BarbzYHOOL avatar BarbzYHOOL commented on August 17, 2024

Here a link that talks about SSH https://codeyarns.com/2013/06/29/how-to-get-notification-on-long-duration-command-completion-in-fish/

from done.

franciscolourenco avatar franciscolourenco commented on August 17, 2024

@BarbzYHOOL does it work for you over SSH without using Byobu?

from done.

BarbzYHOOL avatar BarbzYHOOL commented on August 17, 2024

I didn't test because I made my own notification script and still haven't tried with X11 forwarding but it should work fine as long as it opens a GUI program on your home computer, like notify-send (as I've already opened a GUI program once with it)

from done.

franciscolourenco avatar franciscolourenco commented on August 17, 2024

If you could confirm that it is working, that would narrow it down to Byobu.

from done.

BarbzYHOOL avatar BarbzYHOOL commented on August 17, 2024

I'll do some tests in the future (I promise).

I took time to create my own notification and used "xdotool" to get the active window and then I looked at the code of this plugin and was like "why the hell did I spend time on this -__-" (I just was on oh my fish at that time and it was not possible to install it)

from done.

BarbzYHOOL avatar BarbzYHOOL commented on August 17, 2024

Ok I did some tests but I haven't managed to make all that shit work BECAUSE I can't install "notify-send" on my debian server -___________-

EDIT: I installed it with libnotify-bin but it's not working at all. At least the command exists but when i type "notify-send hello" it does nothing while "xeyes" works with SSH forwarding

EDIT2: here are some links https://unix.stackexchange.com/questions/147036/notify-send-not-working-under-ssh
And a perl script that looks really annoying to set up https://github.com/itsamenathan/libnotify-over-ssh

from done.

franciscolourenco avatar franciscolourenco commented on August 17, 2024

@BarbzYHOOL did you configure X11 forwarding on the server? Are you connecting with ssh -X?

https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely

from done.

BarbzYHOOL avatar BarbzYHOOL commented on August 17, 2024

yeah

from done.

ammgws avatar ammgws commented on August 17, 2024

@BarbzYHOOL What's the goal here?

SSH into another machine that has fish shell and done installed, and you want the notifications to appear on the local machine?

Or SSH into another machine that has fish shell and done installed, and you want the notifications to appear on the remote machine's monitor?

from done.

frederickjh avatar frederickjh commented on August 17, 2024

Instead of creating a new issue, I am going comment on this one. If I should create a new one let me know, but I think this along the same lines.

Looking at the done code there are numerous checks to make sure that the terminal window is not in the foreground and that this is not a SSH session.

Done also appears to have the option to run a custom command to notify, but it seems no way to pass the done message to that custom command.

Here is my idea to get notifications while ssh into a remote server.

  1. Add a variable that can be set to disable foreground checking
  2. Add a variable that can disable SSH checking
  3. Add a way to pass the done message to the custom command

My thinking here is there are push and chat services such as PushBullet and Telegram that have API that allow one to quickly put together a function that sends out a message, however I sometimes forget to add the notification function command after my long running command, ie. sleep 300; telegram-me.

Getting notification message to popup on remote machines is problematic at best. Trying to support every push and chat service out there would also be a big undertaking, but maybe this could be done with plugins.

In any case it is just an idea, but thanks for considering it.

from done.

ammgws avatar ammgws commented on August 17, 2024

@frederickjh
I'm not quite sure I follow:

  • Your local machine has a graphical interfaces and is able to display notifications
  • Your local machine has fish shell installed with done
  • You SSH into a remote server
  • The remote server has fish shell installed with done
  • You run a long running command on the server

How does the notification get to the local machine?

from done.

franciscolourenco avatar franciscolourenco commented on August 17, 2024

@ammgws I think you have a good understanding. The last part is that the user configures 3rd party service as a proxy to deliver a some stor of notification to the local machine. That 3rd party service could be a chat like Telegram, or a generic push notification app like PushBullet.

@frederickjh If I understood correctly, could you please open a new issue for this? Thanks!

from done.

frederickjh avatar frederickjh commented on August 17, 2024

How does the notification get to the local machine?

@ammgws Via either a push or chat service's API. The Done message would be passed to an external command that would deliver the message.

from done.

ammgws avatar ammgws commented on August 17, 2024

Ah OK.

This can be done by adding config options for disabling SSH and the window checks, as you mentioned. For passing the message to your custom command you can do it like this:

set -U __done_notification_command "yourcommand --subject \$title --body \$message myphone"

Perhaps it could be documented.

from done.

frederickjh avatar frederickjh commented on August 17, 2024

@ammgws While you were posting your last comment I created the new issue #80.
Can you re-post your last comment on issue #80, please? As I think this is helpful information for that issue.

from done.

frederickjh avatar frederickjh commented on August 17, 2024

Perhaps it could be documented.

👍

from done.

franciscolourenco avatar franciscolourenco commented on August 17, 2024

Closing due to inactivity, please re-open if necessary.

from done.

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.