After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 47894 - Add ability to handle Windows .lnk files
Add ability to handle Windows .lnk files
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: general
unspecified
Other Linux
: Normal enhancement
: future
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 336177 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2001-03-26 23:48 UTC by Ben FrantzDale
Modified: 2021-06-18 15:29 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Ben FrantzDale 2001-09-10 01:31:35 UTC
Especially for those migrating from Windows to Linux, there are many cases where
it would be nice if Nautilus handled Windows links as though they were real
links.



------- Additional Comments From darin@bentspoon.com 2001-03-26 19:20:36 ----

It would be easy to add a third kind of link to the code that handles GMC links
and Nautilus links.



------- Additional Comments From bfrantzda@hmc.edu 2001-03-27 11:15:55 ----

A quick search of google gave this link:
http://www.wotsit.org/download.asp?f=lnk

It's DOS C code to produce a windows link.



------- Additional Comments From snickell@stanford.edu 2001-07-23 00:34:03 ----

Taking bugs previously assigned to Pavel, assigning them to myself. Will parse
them out at my leisure , but many are GnomeVFS bugs we should look at for 2.0



------- Bug moved to this database by unknown@bugzilla.gnome.org 2001-09-09 21:31 -------
Comment 1 John Fleck 2002-01-05 04:09:23 UTC
Changing to "old" target milestone for all bugs laying around with no milestone set.
Comment 2 Ben FrantzDale 2002-07-12 03:14:07 UTC
Should this just be moved to either gnome-vfs or gnome-vfs-extras?
Comment 3 Ben FrantzDale 2002-07-15 07:03:10 UTC
I'm thinking this probably belongs in gnome-vfs. Feel free to change
the package again if I'm wrong.
Comment 4 Trevor Davenport 2005-09-13 17:17:47 UTC
How exactly would you expect this to work? if my .lnk file points to C:\Program
Files\foo\foo.exe what am I supposed to do? I don't think there is an easy way
to define any method of operation for this.  If I have a .lnk file I probably am
using wine or something similar so I would probably just want it to handle it
instead.
Comment 5 Christian Neumair 2006-04-06 15:05:47 UTC
Reassigning from GnomeVFS to Nautilus.
Comment 6 Nathaniel W. Turner 2008-03-19 16:57:40 UTC
FWIW, I am only interested in the special case of links to UNC paths.  I think this particular case should be easier to implement than the general case.

For example, if foo.lnk points to \\machine12\path\to\some\file.txt, I would like Nautilus to treat it as though it were a link to smb://machine12/path/to/some/file.txt.

Comment 7 Patrik Kullman 2008-10-24 13:16:58 UTC
When accessing a Windows-installation or files copied from one, it's always convenient and helpful to be able to view the lnk-information at least.
So that should be shown in the properties of the lnk-file.

CPP source code for reading and lnk file from the KDE project:
http://websvn.kde.org/branches/KDE/3.3/kdeaddons/kfile-plugins/lnk/read_lnk.cpp?view=markup

For actually using lnk-files, the lnkforward KDE-application does this by mapping drives as arguments.
For example: lnkforward --map c=/mnt/windows --map d=/mnt/windows-data /mnt/windows/notepad.lnk

Or something similar, maybe that wasn't the exact syntax.
Comment 8 bi2h5da02 2008-12-12 16:18:55 UTC
If the lnk contains a relative path or remote path, it can be followed, right?  It's only the absolute path that is unknown.

We should also support launching the browser from .URL files, which are rather trivial:

    [InternetShortcut]
    URL=http://www.example.com/webpage.html

http://www.cyanwerks.com/file-format-url.html
Comment 9 Duncan Lithgow 2008-12-14 20:46:15 UTC
There is also the question - should the .lst extension be reserved for links produced by windows systems? Otherswise any piece of software could reasonably begin using this extension. Just something to keep in mind.
Comment 10 bi2h5da02 2008-12-14 20:54:43 UTC
(In reply to comment #9)
> There is also the question - should the .lst extension be reserved for links
> produced by windows systems? Otherswise any piece of software could reasonably
> begin using this extension. Just something to keep in mind.
> 

What is the format of .lst files?

I wrote a script for launching .url files:

https://bugs.launchpad.net/ubuntu/+source/mime-support/+bug/185165

This probably belongs in a different bug, though.

Launching any of these files doesn't really have anything to do with Nautilus, I guess.  Should we change the product to gnome-mime-data or something?
Comment 11 Joachim Breitner 2009-04-14 08:42:52 UTC
I’d just like to say that this feature would be very appreciated here, especially in the variant that opens UNC paths. I think some Code could be borrowed from KDE here.
Comment 12 Tobias Mueller 2010-02-22 22:17:04 UTC
FWIW: There is lnk-parse-1.0.pl from http://jafat.sourceforge.net/files.html which parses the LNK file or http://bitbucket.org/haypo/hachoir/wiki/hachoir-urwid. See also discussions on http://bugs.kde.org/show_bug.cgi?id=85348 or https://bugs.launchpad.net/kdebase/+bug/76326.
Comment 13 António Fernandes 2013-04-22 19:47:24 UTC
*** Bug 336177 has been marked as a duplicate of this bug. ***
Comment 14 André Klapper 2021-06-18 15:29:14 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version of Files (nautilus), then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new ticket at
  https://gitlab.gnome.org/GNOME/nautilus/-/issues/

Thank you for your understanding and your help.