{{tag>zenity ssh notification desktop}} ====== Show zenity notifcation on string selection ====== ===== Requisite packages ===== Install xclip and zenity if you don't have it: sudo apt install xclip zenity ===== Show hostname ===== Example of showing hostname when IP is selected in primary clipboard. Put the following in script and call it via some keyboard shortcut. zenity --notification --text=$(grep -B1 $(xclip -o) $HOME/.ssh/ssh_config.d/yourhostconfig.conf | head -n1 | cut -d" " -f 2,3,4,5) Your host entry needs to be formated so that the "Hostname" directive is the second one in the file e.g. Host myhost alias2 alias3 Hostname User root ...rest of ssh options... or you will need to tweak the grep command. ====== Tested on ====== * Ubuntu 20.04.3 ====== See also ====== * [[wiki:search_google_selected_text|Search google for selected text]] ====== References ======