Bug 20279

Summary: Allow IceWM to use mousepad as its editor
Product: Mageia Reporter: Martin Whitaker <mageia>
Component: RPM PackagesAssignee: David Walser <luigiwalser>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: Normal CC: jani.valimaa, marja11
Version: CauldronKeywords: PATCH
Target Milestone: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Source RPM: icewm-1.3.8-5.mga6.src.rpm CVE:
Status comment:

Description Martin Whitaker 2017-02-13 22:05:59 CET
When Xfce is the only other DE installed (e.g. on the Xfce Live DVDs), the editor button in IceWM tries to run vi in a terminal. It would be nicer if it used mousepad (the default GUI-based editor for Xfce). This can be easily implemented by modifying /usr/bin/xeditor like so:

--- xeditor.orig	2017-02-13 20:34:49.674630555 +0000
+++ xeditor	2017-02-13 20:35:09.378353022 +0000
@@ -36,6 +36,7 @@
     
     [[ -z "$TEXTEDITOR" ]] && TEXTEDITOR=`which kwrite 2> /dev/null` 
     [[ -z "$TEXTEDITOR" ]] && TEXTEDITOR=`which gedit 2> /dev/null` 
+    [[ -z "$TEXTEDITOR" ]] && TEXTEDITOR=`which mousepad 2> /dev/null` 
     
     if [[ -z "$TEXTEDITOR" ]]; then
 	EMACS=`readlink /etc/alternatives/emacs`
Comment 1 Marja Van Waes 2017-02-13 23:41:40 CET
(In reply to Martin Whitaker from comment #0)
> When Xfce is the only other DE installed (e.g. on the Xfce Live DVDs), the
> editor button in IceWM tries to run vi in a terminal. It would be nicer if
> it used mousepad (the default GUI-based editor for Xfce). This can be easily
> implemented by modifying /usr/bin/xeditor like so:
> 
> --- xeditor.orig	2017-02-13 20:34:49.674630555 +0000
> +++ xeditor	2017-02-13 20:35:09.378353022 +0000
> @@ -36,6 +36,7 @@
>      
>      [[ -z "$TEXTEDITOR" ]] && TEXTEDITOR=`which kwrite 2> /dev/null` 
>      [[ -z "$TEXTEDITOR" ]] && TEXTEDITOR=`which gedit 2> /dev/null` 
> +    [[ -z "$TEXTEDITOR" ]] && TEXTEDITOR=`which mousepad 2> /dev/null` 
>      
>      if [[ -z "$TEXTEDITOR" ]]; then
>  	EMACS=`readlink /etc/alternatives/emacs`

Assigning to the registered maintainer.

Keywords: (none) => PATCH
CC: (none) => marja11
Assignee: bugsquad => shlomif

Comment 2 David Walser 2017-02-13 23:46:37 CET
Reassigning to me, since I wrote xeditor.

Assignee: shlomif => luigiwalser

Comment 3 Jani Välimaa 2017-03-06 19:16:39 CET
Fixed in icewm-1.3.12-12.mga6.

Status: NEW => RESOLVED
CC: (none) => jani.valimaa
Resolution: (none) => FIXED