Comments (19)
The plugin does not work over SSH, only on local. Do you have any ideas to make it work over SSH?
from done.
No, sorry
from done.
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.
@BarbzYHOOL does it work for you over SSH without using Byobu?
from done.
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.
If you could confirm that it is working, that would narrow it down to Byobu.
from done.
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.
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.
@BarbzYHOOL did you configure X11 forwarding on the server? Are you connecting with ssh -X
?
from done.
yeah
from done.
@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.
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.
- Add a variable that can be set to disable foreground checking
- Add a variable that can disable SSH checking
- 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.
@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.
@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.
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.
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.
@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.
Perhaps it could be documented.
👍
from done.
Closing due to inactivity, please re-open if necessary.
from done.
Related Issues (20)
- No notifications on debian 10 HOT 8
- Bad quotes in __done_humanize_duration? HOT 5
- Allow configuring urgency with notify-send for failed commands HOT 1
- tmux window detection broken in fish 3.2
- Did not work on Mac OS (11.4): ps: unsupported exe keyword HOT 5
- Ability to set notification timeout HOT 2
- Variable `$__done_notification_transient` is used but is not defined HOT 1
- Wrong parameter names in README HOT 2
- Consider joining Hacktoberfest HOT 2
- Unexpected and strange error "Unknown command: humanize_duration" HOT 7
- "basename: illegal option -- f" error when using with Tmux HOT 4
- Error messages: "error: process ID out of range" and "basename: missing operand" HOT 7
- How can I test if it's working? HOT 1
- Error printed after command finishes when terminal-notifier is not installed HOT 2
- Notifications not showing on Wayland due to focused window detection HOT 3
- macOS sound improvement HOT 4
- Not working on macOS 14.0 HOT 6
- Using tmux and terminal-notifier causes failure HOT 1
- Is it possible that this could cause Ghostty to hang on long running processes? HOT 11
- Long commands won't return in a root shell on macOS
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from done.