Today I’ll be briefly touching upon ways to send text to clipboard from Bash, and to Open Popup windows.
Bash and the Clipboard
To copy to clipboard, you may use xclip (Or xsel).
The format is:
To send to primary clipboard (Middle click pastes this content)
echo "Something" | xclip[/code]
To send to secondary clipboard (Rightclick and Choose Paste to paste)echo "Something else" | xclip -selection clipboard[/code]
Bash and Popups
Install zenitysudo apt-get install zenity[/code]
Informational popups:zenity --info --text 'Hello World!'[/code]
Display calendar dialog
Display text entry dialog
Display error dialog
Display file selection dialog
--info Display info dialog
--list Display list dialog
Display progress indication dialog
Display question dialog
Display text information dialog
Display warning dialog
Display scale dialog
Display color selection dialog
Set the dialog title
Set the window icon with the path to an image. Alternatively, one of the four stock icons can be used: 'error', 'info', 'question' or 'warning'
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.