You are not logged in.
My Gnome Commander keeps opening 'text/plain' files with Libre Office Writer, which is driving me crazy. I've been trying to edit files like '~/.local/share/applications/defaults.list' and '~/.local/share/applications/mimeapps.list' but without any success. Then I tried changing the default application using 'xdg-open', and even Nautilus, which works everywhere except for gnome-commander. Does anybody know, where the file, which gnome-commander uses is located? I don't really care if it is global, or just for my user, but I won't accept editing my scripts with LibreOffice.
Thanks in advance!
Offline
I assume that you want to change the default application to Emacs, right? So, lets get started: In '~/.local/share/applications/defaults.list' create an entry for 'text/plain' files in the [Default Applications] section:
[Default Applications]
text/plain=emacs-usercreated.desktop
Now, create the file '~/.local/share/applications/emacs-usercreated.desktop':
[Desktop Entry]
Encoding=UTF-8
Name=display
MimeType=text/plain;
Exec='/usr/bin/emacs'
Type=Application
Terminal=false
NoDisplay=true
Restart Gcmd and it should open all text/plain files with Emacs. See here for more information.
I'll try to fix this behavior in the future to be more consistent with other Gnome applications.
Offline
Thanks! I'll try it tomorrow and get back to you! However, isnt there an easier way than creating a user desktop file for every application I want to set as default?
Offline
If you just want to open a text file with an editor of your choice, go to "Settings->Options->Programs" and set the 'editor' to whatever you want. Than you can open the file with that editor by typing 'F4' while the cursor is located on that file. If you prefer to use the mouse there is currently no other option than creating a desktop file.
Offline
Thanks!
Offline
I think you can define emacs in terminal options (see below pic) with something like
xfce4-terminal -e emacs %s
image of gnome-commander settings
Note: I don't use gnome-commander so I may be wrong.
Arch is home!
https://github.com/Docbroke
Offline
I think you can define emacs in terminal options (see below pic) with something like
xfce4-terminal -e emacs %s
image of gnome-commander settings
Note: I don't use gnome-commander so I may be wrong.
I tried this but unfortunately it didnt work
Last edited by zierler-f (2016-05-31 05:03:59)
Offline
I assume that you want to change the default application to Emacs, right? So, lets get started: In '~/.local/share/applications/defaults.list' create an entry for 'text/plain' files in the [Default Applications] section:
[Default Applications]
text/plain=emacs-usercreated.desktopNow, create the file '~/.local/share/applications/emacs-usercreated.desktop':
[Desktop Entry]
Encoding=UTF-8
Name=display
MimeType=text/plain;
Exec='/usr/bin/emacs'
Type=Application
Terminal=false
NoDisplay=trueRestart Gcmd and it should open all text/plain files with Emacs. See here for more information.
I'll try to fix this behavior in the future to be more consistent with other Gnome applications.
Thank your very much! This worked great for me!
Offline