Closed BarbzYHOOL closed 3 years ago
The plugin does not work over SSH, only on local. Do you have any ideas to make it work over SSH?
No, sorry
Here a link that talks about SSH https://codeyarns.com/2013/06/29/how-to-get-notification-on-long-duration-command-completion-in-fish/
@BarbzYHOOL does it work for you over SSH without using Byobu?
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)
If you could confirm that it is working, that would narrow it down to Byobu.
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)
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
@BarbzYHOOL did you configure X11 forwarding on the server? Are you connecting with ssh -X
?
yeah
@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?
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.
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.
@frederickjh I'm not quite sure I follow:
done
done
How does the notification get to the local machine?
@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!
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.
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.
@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.
Perhaps it could be documented.
:+1:
Closing due to inactivity, please re-open if necessary.
I don't know what the plugin is supposed to do but I type "sleep 6" and nothing happens.
I made my tests by connecting on a debian 9 server, logging in SSH, in Byobu, installing fisherman and "done" aand typing "sleep 6" and switching window or not.