#5 options based on DISPLAY not automatic

release 0.1.2

the manpage states that the --echo or --xclip options will be selected automatically depending on the value of $DISPLAY, i find this is not the case and --xclip is always defaulted.

//blue/0/~/ uname -a
Linux blue 2.6.34-ck #1 SMP PREEMPT Wed Jun 23 09:53:02 EDT 2010 x86_64 Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux
//blue/0/~/ pacman -Q pwsafe
pwsafe 0.2.0-6
//blue/0/~/ man pwsafe | grep -m 2 -B 2 DISPLAY

-E, --echo
Force echo'ing of entry to stdout. This is selected by default if $DISPLAY is not set.
-x, --xclip
Force copying of username and password to X clipboard. This is selected by default if
$DISPLAY is set.
//blue/0/~/ echo $DISPLAY

//blue/0/~/ pwsafe --list -u -p nstar
Going to copy login and password to X selection
Enter passphrase for /home/patrick/.pwsafe.dat: ^C
//blue/130/~/ pwsafe --list -E -u -p nstar
Going to print login and password to stdout
Enter passphrase for /home/patrick/.pwsafe.dat: ^C
//blue/130/~/ echo $DISPLAY


this program is very useful, i only report this bug b/c i think it would be easy to fix and is a useful feature IMO.


  • Nicolas Dade

    Nicolas Dade - 2015-06-14

    Thanks. The trouble was in my understanding what XDisplayName() would return.
    It turns out it returns a non-null pointer to "" when DISPLAY isn't set.

    This is fixed in the code on https://github.com/nsd20463/pwsafe

  • Nicolas Dade

    Nicolas Dade - 2015-06-14
    • status: open --> closed-fixed
    • Group: --> release 0.1.2

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks