You are not logged in.

#1 2015-06-24 15:00:20

claudiogc
Member
Registered: 2015-06-16
Posts: 108

[SOLVED]Nautilus doesn't see my app in "Open With". How can i fix it?

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/applications

Open again Nautilus or restarting the system.

mkdir ~/.local/share/applications
cp /opt/sublime_text_3/sublime_text.desktop ~/.local/share/applications

Open 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

#2 2015-06-24 15:07:33

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: [SOLVED]Nautilus doesn't see my app in "Open With". How can i fix it?

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

#3 2015-06-25 03:53:19

claudiogc
Member
Registered: 2015-06-16
Posts: 108

Re: [SOLVED]Nautilus doesn't see my app in "Open With". How can i fix it?

WorMzy wrote:

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

#4 2015-06-25 12:21:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: [SOLVED]Nautilus doesn't see my app in "Open With". How can i fix it?

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

#5 2015-06-25 13:41:18

drcouzelis
Member
From: Connecticut, USA
Registered: 2009-11-09
Posts: 4,092
Website

Re: [SOLVED]Nautilus doesn't see my app in "Open With". How can i fix it?

Trilby wrote:

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 FILENAME

Last edited by drcouzelis (2015-06-25 13:41:41)

Offline

#6 2015-06-25 15:26:55

claudiogc
Member
Registered: 2015-06-16
Posts: 108

Re: [SOLVED]Nautilus doesn't see my app in "Open With". How can i fix it?

Trilby wrote:

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-8

Or:

xdg-mime query filetype test.txt 
text/plain

Here a screenshot of Nautilus:
http://postimg.org/image/gonvd0p1d

Last edited by claudiogc (2015-06-25 15:29:16)

Offline

#7 2015-06-25 21:17:23

claudiogc
Member
Registered: 2015-06-16
Posts: 108

Re: [SOLVED]Nautilus doesn't see my app in "Open With". How can i fix it?

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

#8 2015-06-26 00:31:57

cafe
Member
From: Brasil
Registered: 2014-03-20
Posts: 165

Re: [SOLVED]Nautilus doesn't see my app in "Open With". How can i fix it?

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

#9 2015-06-26 03:54:48

Malkymder
Member
Registered: 2015-05-13
Posts: 258

Re: [SOLVED]Nautilus doesn't see my app in "Open With". How can i fix it?

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

#10 2015-06-26 14:24:35

claudiogc
Member
Registered: 2015-06-16
Posts: 108

Re: [SOLVED]Nautilus doesn't see my app in "Open With". How can i fix it?

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 Text

And the permitions of it:

-rwxrwxrwx 1 root root 166 Nov 13  2014 sublime_text.desktop

Now, 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

Board footer

Powered by FluxBB