N
N
Nicholas2016-12-30 18:40:23
JavaScript
Nicholas, 2016-12-30 18:40:23

How to add an icon to the tray in ubuntu, windows, etc. in node.js?

There is an application without a gui and you need to display an icon from it in the ubuntu tray (where it shows the layout and internet connection, etc...) about its status! How can it be implemented?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Alexey Yarkov, 2016-12-30
@ACCNCC

NW.js, Electron

N
Nikita Kit, 2016-12-30
@ShadowOfCasper

WAT? I did not understand a little, what state do you want to see in the nodejs applet? It's a platform that makes js work on the server. Here you can only track the state of js modules that are executed on the server. Here everything is implemented by error handling, they are displayed in the terminal from which the process was started. The process can be started from the browser, then errors can be returned to the browser. It can be started from electron (the link above to this feature was sent to you).
Error handling is written in the js module itself. Monitor nodejs... well, it's like a platform and not an executable process to monitor it.

K
Konstantin Kitmanov, 2016-12-30
@k12th

And search zayuzat? https://www.npmjs.com/package/tray-windows

C
ckr, 2016-12-31
@ckr

For Linux, you can make a small bash script to start the farm.
To run applications without a GUI, you can use the terminal:
yad can be responsible for the tray icon:

yad --notification \
    --image="gtk-help" \
    --command="echo 'Hello World'" \
    --text="The notification's tooltip"

Instead of "echo 'Hello World'" you need to insert a command that, for example, will raise the terminal window to the foreground, the wmctrl tool will help here
wmctrl -a "*Terminal"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question