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 504323 - Folder as .desktop visible in filechooser but cannot be used
Folder as .desktop visible in filechooser but cannot be used
Status: RESOLVED WONTFIX
Product: gtk+
Classification: Platform
Component: Widget: GtkFileChooser
2.20.x
Other Linux
: Normal major
: ---
Assigned To: gtk-bugs
Federico Mena Quintero
: 613630 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-12-18 20:05 UTC by Markus Johnsson
Modified: 2015-07-04 05:38 UTC
See Also:
GNOME target: ---
GNOME version: 2.29/2.30


Attachments
Test desktop-file links (1.82 KB, text/x-csrc)
2007-12-19 19:00 UTC, Mathias Hasselmann (IRC: tbf)
Details

Description Markus Johnsson 2007-12-18 20:05:52 UTC
I use .desktop files as "shortcuts" on the desktop to at-the-moment important folders. This works with nautilus, but it doesn't work very well with gtk+ as the file chooser dialog can't handle the .desktop files. The .desktop files are visible (as folders) in the file chooser, but cannot be used. When double clicked they open a (non-existing) folder (named after the .desktop "Name" property), while they should open the folder in the "URL" property. 

1. create a folder ~/foo
2. create a text file ~/Desktop/foo.desktop
3. paste this inside the text file:

[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=foo_desktop
Comment=Open "file:///home/markus/foo"
Icon=gnome-fs-directory
URL=file:///home/markus/foo
Type=Link

4. replace /home/markus with your $HOME
5. Open gedit (behavior also verified with firefox 3) and enter some text in a new file
6. Choose "Save as..." and browse to ~/Desktop/foo

Expected behavior: 
the content of folder ~/foo is listed and when Save is hit the file is saved in that forlder.

Actual behavior:
the content of a non-existing folder ~/Desktop/foo is listed (well.. it's empty.. so..).. And the saving fails as the folder doesn't exist.
Comment 1 Markus Johnsson 2007-12-18 20:08:43 UTC
The text in the desktop file I pasted was wrong, the name should say just "foo" to match the rest of the explanation.. however, this has nothing to do with the bug behavior. 
Comment 2 Matthias Clasen 2007-12-19 15:48:52 UTC
if this works in nautilus, i guess we should support it in the file chooser too.
Comment 3 Federico Mena Quintero 2007-12-19 18:58:01 UTC
This used to work fine before the async changes.
Comment 4 Mathias Hasselmann (IRC: tbf) 2007-12-19 19:00:07 UTC
Hmm. Cannot reproduce the described behaviour:

When running with "gnome-vfs" backend, the attached program works as expected: A "foo_desktop" folder appears. Choosing it enters the desktop folder, and choosing a file there gives the proper filename and URI.

When running with "unix" backend the temporary desktop file is listed and choosing its gives its proper filename and URI.

Tested with Ubuntu 7.10 (gtk: 2.12.0, libgnomeui: 2.20.1.1), jbhuild for gnome-2.22 (gtk: 2.12.4, libgnomeui: 2.21.0) and gtk trunk.

Same effect with gedit.
Comment 5 Mathias Hasselmann (IRC: tbf) 2007-12-19 19:00:46 UTC
Created attachment 101273 [details]
Test desktop-file links
Comment 6 Matthias Clasen 2007-12-22 15:10:24 UTC
Yeah, it works as expected with the gnome-vfs backend, and doesn't work (as exected) with the unix backend. 

It does not work, however, with Carlos' gvfs backend - that probably needs fixing.
Comment 7 Nelson Benitez 2010-03-23 21:43:26 UTC
*** Bug 613630 has been marked as a duplicate of this bug. ***
Comment 8 Binposk 2010-03-25 12:29:12 UTC
*************I THINK THIS IS IMPORTANT: Slax Linux distro, that uses KDE (based on Qt) (instead of GNOME & GTK+), has the same problem!!*********************

I think this problem is basic and important & should be fixed. Otherwise it's not possible for (old, ...) people that only (know to) use the computer to send emails (and very few other things) to send attached their photos, ... in their email messages (they don't know how to find their folder from / -file system root-; they only know to use the launcher or shortcut someone else created for them). More info in bug 613630.

Please, don't force them to use Windows .... I hope this will be solved. Thanks.
Comment 9 Javier Jardón (IRC: jjardon) 2010-03-25 13:10:13 UTC
Confirmed here in GTK+ 2.20
Comment 10 Binposk 2010-03-28 18:40:32 UTC
There is a workaround:

Open a terminal and create a symbolic link:

ln -s /the/destination/folder ~/Desktop/link

( Taken from http://www.slax.org/forum.php?action=view&parentID=59037 )

( FOR KDE based distros: in the file system navigator window, to see the just
created symlink, it may be necessary to click on the refresh button. )
Comment 11 Binposk 2010-03-29 12:51:13 UTC
I've learned that Firefox for Linux uses GTK dialogs, no matter if the Linux distro uses KDE or GNOME. I thought that KDE based distros didn't have GTK packages but I've seen that they have some.

So many Linux users should be waiting for this to be solved ...

I hope this will soon be fixed.

Thanks for your work & good luck.
Comment 12 Matthias Clasen 2015-07-04 05:38:18 UTC
I don't think we will support Type=Link desktop files - they are a historical curiosity at best, at this point.