summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xpublish4
1 files changed, 2 insertions, 2 deletions
diff --git a/publish b/publish
index ab9e7dd..32c8078 100755
--- a/publish
+++ b/publish
@@ -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