gedit as default editor

5 views
Skip to first unread message

ron...@berkeley.edu

unread,
Aug 9, 2016, 3:29:49 PM8/9/16
to Berkeley Common Environment
I got a report of a problem where gedit will not save to shared folders, and it turns out this has been an issue for years:

  http://unix.stackexchange.com/questions/52951/gedit-wont-save-a-file-on-a-virtualbox-share-text-file-busy

I have devised a workaround based on David and Martin's answers at the link that uses gsettings. It works okay but is inconvenient for users (every other attempt to save still fails), and this is unfortunate behavior for a default application. Any thoughts on whether there might be a suitable replacement for gedit as the default? Other glib-based apps are likely to have the same problem:

  https://bugzilla.gnome.org/show_bug.cgi?id=656225

The problem does not seem to arise on all platforms. I have confirmed this problem on VirtualBox 5.0.12 on Win 7 and did not find it to be a problem on OS X 10.11 with VirtualBox 4.3.26.

Best,

ronald


Ryan Lovett

unread,
Aug 9, 2016, 4:04:37 PM8/9/16
to Ronald Sprouse, Berkeley Common Environment
People who use R may use RStudio's built-in editor. Jupyter has a basic editor and it will get more features over time. kile is KDE's editor but it brings a lot of dependencies. nano is an okay choice. Are emacs and vim suitable for everyone's users?

Given the severity of what you describe, I'd make nano the default if there's no other input.


Ryan

--
You received this message because you are subscribed to the Google Groups "Berkeley Common Environment" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ucb-bce+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ucb-bce/58ba507c-18f2-4506-920d-b7489b7ab11a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ronald L. Sprouse

unread,
Aug 9, 2016, 5:16:36 PM8/9/16
to Ryan Lovett, Berkeley Common Environment
Can nano be the default editor if the user double-clicks on a .txt
file in the file manager? That is how the user ended up with gedit.

I don't think vim/emacs is a good choice for some of our users.
Unfortunately I almost exclusively use vim and don't know the
simpler-to-learn editors well. SciTE looks okay and its installation
doesn't pull in any additional packages, but there might be better
options.

ronald
>> email to ucb-bce+u...@googlegroups.com.

Ryan Lovett

unread,
Aug 9, 2016, 5:35:13 PM8/9/16
to Ronald L. Sprouse, Berkeley Common Environment
Its straightforward to create a "nano.desktop" launcher. I'd have to check how to make it the default with Xfce; I don't think tweaking /etc/alternatives/{gnome-text,}editor is sufficient.

Example snippet:

echo "BCE: Creating nano launcher in panel menu..."
install -d -o ${BCE_USER} -g ${BCE_USER} ${DESKTOP_DIR} && \
(
    sudo -H -u ${BCE_USER} cat <<EOF > ${DESKTOP_DIR}/nano.desktop
[Desktop Entry]
Name=nano
Comment=nano text editor
Exec=/usr/bin/nano %F
Icon=/path/to/some/icon.gif
Terminal=true
Type=Application
Categories=TextEditor;Development;
StartupNotify=true
NoDisplay=false
EOF
) && \
echo "  DONE"  || echo "  FAIL"


Ryan

Reply all
Reply to author
Forward
0 new messages