You are not logged in.
Hi!
I installed Nautilus-3.16.2 in my sistem using pacman and SublimeText-3 mannually(unpacking it into /opt/ and creating a symbolic link in /usr/bin).
So, the problem is Nautilus doesn't see Sublime even in "Open With Other Application"!
I tried this after read some threads in Google, but didn't work:
cp /opt/sublime_text_3/sublime_text.desktop /usr/share/applicationsOpen again Nautilus or restarting the system.
mkdir ~/.local/share/applications
cp /opt/sublime_text_3/sublime_text.desktop ~/.local/share/applicationsOpen again Nautilus or restarting the system.
The content of "sublime_text.desktop":
[Desktop Entry]
Version=1.0
Type=Application
Name=Sublime Text
GenericName=Text Editor
Comment=Sophisticated text editor for code, markup and prose
Exec=/opt/sublime_text/sublime_text %F
Terminal=false
MimeType=text/plain;
Icon=sublime-text
Categories=TextEditor;Development;
StartupNotify=true
Actions=Window;Document;
[Desktop Action Window]
Name=New Window
Exec=/opt/sublime_text/sublime_text -n
OnlyShowIn=Unity;
[Desktop Action Document]
Name=New File
Exec=/opt/sublime_text/sublime_text --command new_file
OnlyShowIn=Unity;How make Nautilus see Sublime?
Thanks!
Last edited by claudiogc (2015-06-26 14:26:07)
Offline
You probably just need to update your desktop file cache. See 'man update-desktop-database'.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
You probably just need to update your desktop file cache. See 'man update-desktop-database'.
My "sublime_text.desktop" file is in /usr/share/applications.
I did: "update-desktop-database /usr/share/applications"
And here i little bit of my "mimeinfo.cache" file:
text/plain=libreoffice-writer.sublime;sublime_text.desktop;gvim.desktop;I recheck if he is in Nautilus option but nothing!
Offline
And what are you trying to open? Are you sure it is recognized as 'text/plain'? Check with `file -i /path/to/the/file`
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Check with `file -i /path/to/the/file`
Or with the XDG tools (since this is an XDG issue) by using:
xdg-mime query filetype FILENAMELast edited by drcouzelis (2015-06-25 13:41:41)
Offline
And what are you trying to open? Are you sure it is recognized as 'text/plain'? Check with `file -i /path/to/the/file`
I want to open .txt files. Here a test:
file -i test.txt
test.txt: text/plain; charset=utf-8Or:
xdg-mime query filetype test.txt
text/plainHere a screenshot of Nautilus:
http://postimg.org/image/gonvd0p1d
Last edited by claudiogc (2015-06-25 15:29:16)
Offline
1- Guys, i will reinstall my system for another reasons and i would like to know in which folder i have to put "sublime_text.desktop" file.
"/usr/share/applications" or "~/.local/share/applications"?
2- What do you think if i install Nautilus after install Sublime and put the .desktop file in the right place?
Offline
Put it in /usr/share/applications if you want it to be available to all users,
Put it in ~/.local/share/applications if it is just for you.
More info : http://www.freedesktop.org/wiki/Specifications/
Offline
Edited: Wrong post info
chmod +x your .desktop file
also read the last paragraph on https://wiki.archlinux.org/index.php/De … plications
Last edited by Malkymder (2015-06-26 04:18:19)
Offline
Malkymder, i tried what you said, but did not work!
Guys, problem fixed!
I tried with an old "sublime_text.desktop" version from "Sublime Text 2" i had in a flashdrive and i pasted it into /usr/share/applications/. As the execution command is the same "sublime_text" for both, i believe it doesn't matter if the version of the software is 2, 3, 4, ... I'm usgin 3 - 64bit(in this particular case).
So, bellow, the content of the "/usr/share/applications/sublime_text.desktop" file:
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=/usr/bin/sublime_text %u
Name=Sublime Text
Comment=Custom definition for Sublime TextAnd the permitions of it:
-rwxrwxrwx 1 root root 166 Nov 13 2014 sublime_text.desktopNow, is working fine. Have no idea why, but is working.
Thank you for your help anyway!
Last edited by claudiogc (2015-06-26 14:26:39)
Offline