! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Desktop shows .desktop files that contain OnlyShowIn
Status:
RESOLVED: FIXED
Product:
Xfdesktop
Component:
General

Comments

Description Bernhard Walle 2008-04-15 15:13:55 CEST
User-Agent:       Opera/9.27 (X11; Linux x86_64; U; en)
Build Identifier: 

xfdesktop shows a desktop file that contains the "OnlyShowIn=KDE;" line. According to the specification (http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html) that's not the intended behaviour.

Reproducible: Always

Steps to Reproduce:
Create a xterm.desktop in ~/Desktop that contains

----------------------------------------
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Type=Application
Name=xterm
Comment=
Categories=Application;
Exec=xterm
Icon=
Terminal=false
StartupNotify=false
OnlyShowIn=KDE;
----------------------------------------

and restart Xfce.
Actual Results:  
The xterm icon is shown.

Expected Results:  
The xterm icon should not be shown because it's not KDE.

I use Xfce 4.4.2 on openSUSE 11.0/Factory.
The bug has been reported as 
https://bugzilla.novell.com/show_bug.cgi?id=379918.
Comment 1 Brian J. Tarricone (not reading bugmail) 2008-04-15 17:55:42 CEST
xfdesktop doesn't do .desktop file parsing on its own.  Benny, what do you think?
Comment 2 Stefan Stuhr 2008-04-19 13:59:15 CEST
Thunar shows the same behaviour on my computer.

This is IMHO somewhat controversial. Should a file manager[1] really hide otherwise non-hidden files from the user, like that? Or maybe they should just be considered as hidden files by Thunar, and only be visible in Thunar when regular hidden files are visible.

[1]: I consider the desktop to be a [part of the] file manager, even if it's not Thunar managing the desktop.
Comment 3 Bernhard Walle 2008-04-19 18:19:54 CEST
(In reply to comment #2)
> 
> This is IMHO somewhat controversial. Should a file manager[1] really hide
> otherwise non-hidden files from the user, like that? Or maybe they should just
> be considered as hidden files by Thunar, and only be visible in Thunar when
> regular hidden files are visible.

I don't think that this makes sense since the user doesn't know then *why* the
file is hidden and how to make it visible again.

> [1]: I consider the desktop to be a [part of the] file manager, even if it's
> not Thunar managing the desktop.

I disagree here. I think the file manager for a user is not the same as a
destop. While this technically makes sense, from a user point of view I'd like
to see all files in my file manager but only "some" files on the desktop.


        Bernhard
Comment 4 Stefan Stuhr 2008-04-19 18:57:13 CEST
(In reply to comment #3)
> I don't think that this makes sense since the user doesn't know then *why* the
> file is hidden and how to make it visible again.

Which file? Thunar doesn't show the real filename anyway. It uses the name from the desktop entry data, as well as the specified icon.

> I disagree here. I think the file manager for a user is not the same as a
> destop. While this technically makes sense, from a user point of view I'd like
> to see all files in my file manager but only "some" files on the desktop.

I find that to be rather inconsistent.
"Why aren't the desktop showing all the files in my desktop directory? I can see them in file manager windows, but not on my desktop!"
Comment 5 Brian J. Tarricone (not reading bugmail) 2008-04-19 19:03:39 CEST
(In reply to comment #4)
> (In reply to comment #3)
> > I don't think that this makes sense since the user doesn't know then *why* the
> > file is hidden and how to make it visible again.
> 
> Which file? Thunar doesn't show the real filename anyway. It uses the name from
> the desktop entry data, as well as the specified icon.

Right, but at least there you see *something*.  I don't think a file manager should be arbitrarily hiding files from users depending on what environment is running.  That just sounds wrong and confusing, and there might be security issues here.

> > I disagree here. I think the file manager for a user is not the same as a
> > destop. While this technically makes sense, from a user point of view I'd like
> > to see all files in my file manager but only "some" files on the desktop.
> 
> I find that to be rather inconsistent.
> "Why aren't the desktop showing all the files in my desktop directory? I can
> see them in file manager windows, but not on my desktop!"

Because the file manager is a file manager, and the desktop is not.  It makes sense for, say, KDE to be able to install launchers on the the user's desktop on first run, but for KDE-specific things that the user won't want to see on Xfce.  The desktop isn't meant to be a folder, it's meant to be a desktop.  But from the file manager's POV, ~/Desktop is a folder, and it should show the files in it.  It's a common convention and pretty well-known that dot-files are supposed to be hidden files.  I don't think we should add "sorta hidden depending on what DE you run" files to that list.  It also seems weird to me to have a file manager that displays different things depending on what DE it runs under.

What do KDE/Konqueror and GNOME/Nautilus do?
Comment 6 Pavol Rusnak 2008-04-22 09:00:40 CEST
Please fix also NotShowIn keyword when fixing OnlyShowIn.

http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
Comment 7 Brian J. Tarricone (not reading bugmail) 2008-05-05 02:59:24 CEST
I'm not convinced I want to implement this.  I ask again: what do Nautilus/GNOME and Konqueror/KDE do?
Comment 8 Bernhard Walle 2008-05-10 18:34:14 CEST
GNOME doesn't show it on the desktop. It treats it as a hidden file in the file manager (Nautilus), i.e. the default is to not show the desktop file but it gets shown if you select "hidden files" from the context menu. Tested with GNOME 2.22.1 on openSUSE 11.0 Beta 2 Live DVD.

KDE4 seems to ignore the entry in both the file manager (Dolphin) and the desktop. Tested with KDE 4.0.3 on openSUSE 11.0 Beta 2 Live DVD.
Comment 9 Brian J. Tarricone (not reading bugmail) 2008-05-10 19:20:22 CEST
Ok, sounds reasonable to me, at least for xfdesktop.  I'll assume GNOME and KDE have thought through the possible issues and deemed them not a particularly big deal.  Not sure this will go into 4.4, but definitely for 4.6.
Comment 10 Pavol Rusnak 2008-07-28 09:21:57 CEST
Any news?
Comment 11 Brian J. Tarricone (not reading bugmail) 2008-07-28 18:06:22 CEST
(In reply to comment #10)
> Any news?

Don't spam the bug.
Comment 12 Brian J. Tarricone (not reading bugmail) 2008-09-25 10:37:42 CEST
Checked into trunk, rev 27946.  This is for xfdesktop only; if you think Thunar should behave the same way, please open a separate bug.

Bug #4022

Reported by:
Bernhard Walle
Reported on: 2008-04-15
Last modified on: 2009-07-14

People

Assignee:
Brian J. Tarricone (not reading bugmail)
CC List:
3 users

Version

Attachments

Additional information