Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]Make nautilus not follow symlink when opening a file
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
chrisyu
Apprentice
Apprentice


Joined: 10 Apr 2003
Posts: 207
Location: China

PostPosted: Sat May 25, 2013 1:05 pm    Post subject: [SOLVED]Make nautilus not follow symlink when opening a file Reply with quote

Hi, all

Since nautilus 3.6, when opening a soft link by mime type, nautilus will pass this link's target to application.

Say I double click a file /path1/a-link.mkv, with a subtitle a-link.srt in same dir.
/path1/a-link.mkv linked to a file named /path2/a-movie.mkv .

Nautilus will pass the link target /path2/a-movie.mkv as argument to mplayer.
Which causes mplayer cannot find the subtitle file.

I want to ask if there is a setting or a patch to make nautilus open the link itself, not the target?

Thanks


Last edited by chrisyu on Tue May 28, 2013 1:23 am; edited 1 time in total
Back to top
View user's profile Send private message
chrisyu
Apprentice
Apprentice


Joined: 10 Apr 2003
Posts: 207
Location: China

PostPosted: Tue May 28, 2013 1:21 am    Post subject: Reply with quote

OK, solution found, and tested. :D

Or you could replace nautilus by nemo file manager.

Code:

--- src/nautilus-mime-actions.c.orig    2013-05-27 11:51:32.186241851 +0800
+++ src/nautilus-mime-actions.c 2013-05-27 11:52:08.609244156 +0800
@@ -2061,10 +2061,11 @@
                /* We want the file for the activation URI since we care
                 * about the attributes for that, not for the original file.
                 */
+               /*
                if (nautilus_file_is_symbolic_link (location->file)) {
                        uri = nautilus_file_get_symbolic_link_target_uri (location->file);
                }
-
+               */
                if (uri == NULL) {
                        uri = nautilus_file_get_activation_uri (location->file);
                }

Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum