Show GUI alert boxes on remote host

Show popup/alert box on other system :

Sometime you want to give just a message to your colleague, you do not want reply. 

If you do not want to send messages on terminal or chat-box, you can use alert box to display the message but you should be able to log into your colleague's system.



Requirements:
ssh should be installed on both systems.
You should be able to log into your colleague's system.

Steps:
Log into the Remote Host (your colleague's system) using ssh.
# ssh 192.168.xx.xx
where 192.168.xx.xx is IP of the Remote Host.
Run following command on his/her command line
# DISPLAY=:0 zenity --info --text="your-message-should-be-here"
If you want to give the title for the message box.
# DISPLAY=:0 zenity --title="your-title" --info --text="your-message-should-be-here"
If you would not use DISPLAY=:0 in your command, it would show a display error.
Gtk-WARNING **: cannot open display: 
If you open the display using -X in your ssh command like ssh -X 192.168.xx.xx and run the command without using  DISPLAY=:0, it opens the alert box but on your system. Your colleague would not be able to see this.
You have to set DISPLAY on remote host.


No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...