Skip to content

Instantly share code, notes, and snippets.

@ajitid
Last active May 17, 2023 23:21
Show Gist options
  • Save ajitid/fe71c68e97210b706056019759c04418 to your computer and use it in GitHub Desktop.
Save ajitid/fe71c68e97210b706056019759c04418 to your computer and use it in GitHub Desktop.
Pasting sensitive info on X11
  1. Install keyring using conda install keyring. Then put your sensitive info by entering keyring set system apass. In a key value pair, apass would be your key and your sensitive info would be your value. (You can change key name from apass to anything you like)
  2. Install xdotool and xsel, and chmod u+x a script and put it into ~/.local/bin with the content:
#!/usr/bin/sh
xdotool type $(keyring get system apass | tr -d '\n')
xdotool key enter

The script types in the sensitive info and then hits enter key.

  1. Call the script using a keyboard shortcut (with Gnome Settings app) directly using the script's name.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment