Package: grace
Version: 5.1.22-5
In xmgrace a new dataset can be created from en external text editor. To
do so, the text editor is accessed through Edit->In Text Editor, or
Create New->in text editor. Two different behaviors are observed though,
depending if xmgrace is launched through the GNOME menu or from the
terminal.
Xmgrace launched from the terminal: the text editor (nano) opens
correctly in the terminal.
Xmgrace opened from the GNOME menu: the text editor does not open,
although it is expected to.
The bug has been reported upstream, but qualified as a distro specific
misconfiguration.
http://plasma-gate.weizmann.ac.il/Grace/phpbb/viewtopic.php?t=1962
But present in grace-5.1.22-5, tested on lucid. A similar bug report was
filed for Ubuntu:
https://bugs.launchpad.net/ubuntu/+source/grace/+bug/582399
The problem is in the fact that when the text-editor is launched within
grace, the command:
sensible-editor
is issued. If grace itself was launched through the terminal, nano opens
fine. However, when grace was opened through the GNOME menu, nothing
happens. So the problem is related to the fact that nano can only be
launched from the terminal. When launched as a regular, non-terminal
application a new terminal should open with nano running in it, which
does not happen.
I attach two patches, with two different workarounds:
1. text_editor_gnome.diff: I modified the gnome launcher (grace.desktop)
to launch xmgrace as an application in the terminal (rather than a
regular application). This allows nano to run.
2. text_editor.diff: I revert the debian configuration to the upstream
default. Basically I removed the line:
--with-editor=sensible-editor \
from debian/rules. In this case, the editor (vim) opens with no
problems, and regardless on how grace was launched. I personally like #2
better...
I am using kernel 2.6.32-22-generic and libc6 2.11.1-0ubuntu7
diff -Nru grace-5.1.22.orig/debian/grace.desktop grace-5.1.22/debian/grace.desktop
--- grace-5.1.22.orig/debian/grace.desktop 2010-05-18 11:28:45.646892000 -0700
+++ grace-5.1.22/debian/grace.desktop 2010-05-18 11:29:23.354892205 -0700
@@ -12,6 +12,6 @@
Categories=Education;Math;Science;Motif;
MimeType=application/x-grace
-Terminal=false
+Terminal=true
NoDisplay=false
StartupNotify=false
diff -Nru grace-5.1.22.orig/debian/rules grace-5.1.22/debian/rules
--- grace-5.1.22.orig/debian/rules 2010-05-18 11:24:22.526892000 -0700
+++ grace-5.1.22/debian/rules 2010-05-18 11:25:09.150882910 -0700
@@ -14,7 +14,6 @@
endif
DEB_CONFIGURE_EXTRA_FLAGS := --enable-grace-home=/usr/share/grace \
- --with-editor=sensible-editor \
--with-helpviewer="sensible-browser %s" \
--with-f77=gfortran \
--disable-pdfdrv