mc/mc-extd-xdg.patch

118 lines
3.8 KiB
Diff
Raw Normal View History

Index: misc/ext.d/archive.sh
===================================================================
--- misc/ext.d/archive.sh.orig
+++ misc/ext.d/archive.sh
@@ -210,7 +210,7 @@ view)
do_view_action "${filetype}"
;;
open)
- ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
+ test -n "$DISPLAY" && ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
do_open_action "${filetype}" "${pager}"
;;
*)
Index: misc/ext.d/doc.sh.in
===================================================================
--- misc/ext.d/doc.sh.in.orig
+++ misc/ext.d/doc.sh.in
@@ -210,7 +210,7 @@ view)
do_view_action "${filetype}"
;;
open)
- ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
+ test -n "$DISPLAY" && ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
do_open_action "${filetype}"
;;
*)
Index: misc/ext.d/image.sh
===================================================================
--- misc/ext.d/image.sh.orig
+++ misc/ext.d/image.sh
@@ -64,7 +64,7 @@ view)
do_view_action "${filetype}"
;;
open)
- ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
+ test -n "$DISPLAY" && ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
do_open_action "${filetype}"
;;
*)
Index: misc/ext.d/misc.sh.in
===================================================================
--- misc/ext.d/misc.sh.in.orig
+++ misc/ext.d/misc.sh.in
@@ -102,7 +102,7 @@ view)
do_view_action "${filetype}"
;;
open)
- ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
+ test -n "$DISPLAY" && ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
do_open_action "${filetype}"
;;
*)
Index: misc/ext.d/package.sh
===================================================================
--- misc/ext.d/package.sh.orig
+++ misc/ext.d/package.sh
@@ -51,7 +51,7 @@ view)
do_view_action "${filetype}"
;;
open)
- ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
+ test -n "$DISPLAY" && ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
do_open_action "${filetype}"
;;
*)
Index: misc/ext.d/sound.sh
===================================================================
--- misc/ext.d/sound.sh.orig
+++ misc/ext.d/sound.sh
@@ -116,7 +116,7 @@ view)
do_view_action "${filetype}"
;;
open)
- ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
+ test -n "$DISPLAY" && ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
do_open_action "${filetype}"
;;
*)
Index: misc/ext.d/text.sh.in
===================================================================
--- misc/ext.d/text.sh.in.orig
+++ misc/ext.d/text.sh.in
@@ -147,7 +147,7 @@ view)
do_view_action "${filetype}"
;;
open)
- ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
+ test -n "$DISPLAY" && ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
do_open_action "${filetype}" "${pager}"
;;
*)
Index: misc/ext.d/video.sh
===================================================================
--- misc/ext.d/video.sh.orig
+++ misc/ext.d/video.sh
@@ -66,7 +66,7 @@ view)
do_view_action "${filetype}"
;;
open)
- ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
+ test -n "$DISPLAY" && ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
do_open_action "${filetype}"
;;
*)
Index: misc/ext.d/web.sh.in
===================================================================
--- misc/ext.d/web.sh.in.orig
+++ misc/ext.d/web.sh.in
@@ -47,7 +47,7 @@ view)
do_view_action "${filetype}"
;;
open)
- ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
+ test -n "$DISPLAY" && ("${MC_XDG_OPEN}" "${MC_EXT_FILENAME}" >/dev/null 2>&1) || \
do_open_action "${filetype}"
;;
*)