File tree Expand file tree Collapse file tree 2 files changed +34
-38
lines changed
usr/libexec/default-editor Expand file tree Collapse file tree 2 files changed +34
-38
lines changed Original file line number Diff line number Diff line change 1414# # <code>XDG_CONFIG_DIRS</code> environment variable.
1515# ### meta end
1616
17- if [ -x /usr/libexec/default-editor/default_editor.sh ]; then
18- . /usr/libexec/default-editor/default_editor.sh || true > /dev/null 2> /dev/null
19- fi
17+ # # Sets mousepad as the default editor for environment variable 'VISUAL'
18+ # # is unset and if mousepad is installed.
19+
20+ # # Environment variable 'VISUAL' will also be honored by 'sudoedit'.
21+
22+ # # https://forums.whonix.org/t/use-sudoedit-in-whonix-documentation/7599
23+
24+ # # please provide /usr/bin/visual
25+ # # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=758228
2026
2127if [ -z " $XDG_DATA_DIRS " ]; then
2228 XDG_DATA_DIRS=" /usr/local/share/:/usr/share/"
2329fi
2430if ! printf ' %s\n' " $XDG_DATA_DIRS " | grep -- " /usr/share/usability-misc/xdg-override/" > /dev/null 2> /dev/null ; then
2531 export XDG_DATA_DIRS=" /usr/share/usability-misc/xdg-override/:$XDG_DATA_DIRS "
2632fi
33+
34+ if [ " $XDG_SESSION_TYPE " = " tty" ]; then
35+ true " $0 : INFO: Running inside tty. Stop."
36+ return 0
37+ exit 0
38+ fi
39+
40+ if [ ! " $VISUAL " = " " ]; then
41+ return 0
42+ exit 0
43+ fi
44+
45+ if command -v featherpad 1> /dev/null 2> /dev/null ; then
46+ VISUAL=" featherpad"
47+ export VISUAL
48+ return 0
49+ exit 0
50+ fi
51+ if command -v mousepad 1> /dev/null 2> /dev/null ; then
52+ VISUAL=" mousepad"
53+ export VISUAL
54+ return 0
55+ exit 0
56+ fi
57+
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments