Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

please offer command-line option to force print-to-screen #8

Open
hymie0 opened this issue Apr 3, 2017 · 2 comments
Open

please offer command-line option to force print-to-screen #8

hymie0 opened this issue Apr 3, 2017 · 2 comments

Comments

@hymie0
Copy link

hymie0 commented Apr 3, 2017

pwdhash.py will check my environment and, if I'm running X, will default to copying password to clipboard.

Please offer a command-line option to allow me to force "No, please copy to the screen instead."

@abbot
Copy link
Owner

abbot commented Apr 3, 2017

Usually unsetting DISPLAY variable does the thing. E.g.

DISPLAY= ./pwdhash.py foobar.com

Is it not sufficient?

@hymie0
Copy link
Author

hymie0 commented May 9, 2017

I'm sorry -- I missed that you responded to my question so quickly.

No, that didn't work

$ DISPLAY= pwdhash
domain: foo.com
Password for foo.com:
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
  warnings.warn(str(e), _gtk.Warning)
/usr/local/bin/pwdhash:190: GtkWarning: IA__gtk_clipboard_get_for_display: assertion 'display != NULL' failed
  clip = gtk.Clipboard()

Completely unsetting DISPLAY did work, but I would prefer not to completely unset DISPLAY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants