diff options
author | Peter Palfrader <peter@palfrader.org> | 2013-10-19 08:46:46 +0000 |
---|---|---|
committer | weasel <weasel@bc3d92e2-beff-0310-a7cd-cc87d7ac0ede> | 2013-10-19 08:46:46 +0000 |
commit | a0c8a5a0c3b525b624762c2ab65d1357e8af42a4 (patch) | |
tree | aa058e8d6195457f34cf0dc9067af075df896f09 /publish | |
parent | 0cf9a90df8ab615058baedddf7be8d51b67638e6 (diff) |
publish: only try to fill X clipboard in a X session
Without this patch, when using publish on a host with installed xsel
or xclip e.g. over ssh, an error message from those utilities is
produced, because there is no X session.
Signed-off-by: Peter Palfrader <peter@palfrader.org>
git-svn-id: svn+ssh://asteria.noreply.org/svn/weaselutils/trunk@650 bc3d92e2-beff-0310-a7cd-cc87d7ac0ede
Diffstat (limited to 'publish')
-rwxr-xr-x | publish | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -280,9 +280,9 @@ if [ "$add_default_cs" -gt 0 ] ; then shift fi -if command -v xclip >/dev/null 2>&1; then +if command -v xclip >/dev/null 2>&1 && [ $DISPLAY ]; then echo -n "$main_uri" | xclip -elif command -v xsel >/dev/null 2>&1; then +elif command -v xsel >/dev/null 2>&1 && [ $DISPLAY ]; then echo -n "$main_uri" | xsel fi |