{{tag>google desktop "keyboard shortcuts"}} ====== Search google for selected text ====== Google from anywhere ===== Install ===== ==== Ubuntu ==== sudo apt install xclip ==== Archu ==== Install ''xbindkeys'' and run ''xbindkeys_config'' in terminal. ==== Xubuntu ==== Install ''xsel'' ===== Add script to keyboard shortcuts ===== ==== Ubuntu ==== sh -c 'firefox "https://www.google.com/search?q=$(xclip -o)"' ==== Xubuntu 16.04, Arch ==== sh -c 'xsel | tr " " "+" | xargs -I %s xdg-open "http://www.google.com/search?q=%s"' ====== Tested on ====== * Ubuntu Gnome 16.04, 19.10, 20.04 ====== See also ====== * [[wiki:desktop_shortcut_to_open_ssh_tunnel_and_then_open_firefox_tab|Desktop shortcut to open ssh tunnel and then open firefox tab]] * [[wiki:show_zenity_notifcation_string_selection|Show zenity notifcation on string selection]] ====== References ====== * https://askubuntu.com/questions/222240/select-text-and-send-it-to-google-search-and-google-translate-from-shortcut/222340#222340