Skip Menu |

This queue is for tickets about the File-HomeDir CPAN distribution.

Report information
The Basics
Id: 17875
Status: open
Priority: 0/
Queue: File-HomeDir

People
Owner: Nobody in particular
Requestors: rrwo [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 0.52



Subject: [RFE] Desktop support
Why not add a desktop method to return the desktop? It's not just a Windows-specific attribute. OS/X has it. So do Linux desktops: there is some kind of Unix/Linux desktop standard now, though I don't have the references.
Subject: Re: [rt.cpan.org #17875] [RFE] Desktop support
Date: Tue, 28 Feb 2006 00:38:34 +1100
To: bug-File-HomeDir [...] rt.cpan.org
From: Adam Kennedy <adam [...] phase-n.com>
Sounds great. I'll take a patch. The reason it isn't in there yet it I'm not sure how to handle the Linux desktop. Answer that problem, and it's in. Adam K Guest via RT wrote: Show quoted text
> Mon Feb 27 08:33:23 2006: Request 17875 was acted upon. > Transaction: Ticket created by guest > Queue: File-HomeDir > Subject: [RFE] Desktop support > Owner: Nobody > Requestors: RRWO@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17875 > > > > Why not add a desktop method to return the desktop? > > It's not just a Windows-specific attribute. OS/X has it. So do Linux > desktops: there is some kind of Unix/Linux desktop standard now, though > I don't have the references. > >
From: rrwo [...] cpan.org
On Mon Feb 27 08:41:49 2006, adam@phase-n.com wrote: Show quoted text
> Sounds great. I'll take a patch. > > The reason it isn't in there yet it I'm not sure how to handle the > Linux desktop. > > Answer that problem, and it's in.
Desktop "Standards" are at http://freedesktop.org/wiki/Standards There seems to be a ~/Desktop folder used by Gnome and KDE. I'm not sure what part of the spec says how to determine that folder.
On Mon Feb 27 09:51:35 2006, guest wrote: Show quoted text
> On Mon Feb 27 08:41:49 2006, adam@phase-n.com wrote:
> > Sounds great. I'll take a patch. > > > > The reason it isn't in there yet it I'm not sure how to handle the > > Linux desktop. > > > > Answer that problem, and it's in.
>
File::BaseDir could also be of help. There's a potential circular dependency. It should probably make use of File::HomeDir (though it doesn't).
Subject: Re: [rt.cpan.org #17875] [RFE] Desktop support
Date: Tue, 28 Feb 2006 12:18:46 +1100
To: bug-File-HomeDir [...] rt.cpan.org
From: Adam Kennedy <adam [...] phase-n.com>
Circular dependencies can be resolved by merging the two modules into the one distribution, if needed. Adam K Guest via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=17875 > > > On Mon Feb 27 09:51:35 2006, guest wrote:
>> On Mon Feb 27 08:41:49 2006, adam@phase-n.com wrote:
>>> Sounds great. I'll take a patch. >>> >>> The reason it isn't in there yet it I'm not sure how to handle the >>> Linux desktop. >>> >>> Answer that problem, and it's in.
> > File::BaseDir could also be of help. > > There's a potential circular dependency. It should probably make use of > File::HomeDir (though it doesn't).
From: LGODDARD [...] cpan.org
Show quoted text
> Desktop "Standards" are at http://freedesktop.org/wiki/Standards > > There seems to be a ~/Desktop folder used by Gnome and KDE. I'm not
sure Show quoted text
> what part of the spec says how to determine that folder.
FWIW I am told that this code works: I use it without complaints: # Desktops for dir select: thanks to Slaven Rezic who also suggested SHGetSpecialFolderLocation for Win32. if ($^O =~ /win/i and -d "$ENV{USERPROFILE}/Desktop"){ # use OLE no longer needed; $self->{desktop_dir} = "$ENV{USERPROFILE}/Desktop" } elsif (-d "$ENV{HOME}/Desktop"){ $self->{desktop_dir} = "$ENV{HOME}/Desktop"; } elsif (-d "$ENV{HOME}/.gnome-desktop"){ $self->{desktop_dir} = "$ENV{HOME}/.gnome-desktop"; }
Subject: Re: [rt.cpan.org #17875] [RFE] Desktop support
Date: Fri, 04 Aug 2006 09:22:41 +0800
To: bug-File-HomeDir [...] rt.cpan.org
From: Adam Kennedy <adam [...] phase-n.com>
Are there differences in this between different languages? Currently for at least my_documents and my_music, the directories will be named differently on different language versions of both Windows and Mac. The Linux implementation of music thus currently can't actually be done. Adam K lee via RT wrote: Show quoted text
> Queue: File-HomeDir > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=17875 > >
>> Desktop "Standards" are at http://freedesktop.org/wiki/Standards >> >> There seems to be a ~/Desktop folder used by Gnome and KDE. I'm not
> sure
>> what part of the spec says how to determine that folder.
> > FWIW I am told that this code works: I use it without complaints: > > # Desktops for dir select: thanks to Slaven Rezic who also > suggested SHGetSpecialFolderLocation for Win32. > if ($^O =~ /win/i and -d "$ENV{USERPROFILE}/Desktop"){ > # use OLE no longer needed; > $self->{desktop_dir} = "$ENV{USERPROFILE}/Desktop" > } elsif (-d "$ENV{HOME}/Desktop"){ > $self->{desktop_dir} = "$ENV{HOME}/Desktop"; > } elsif (-d "$ENV{HOME}/.gnome-desktop"){ > $self->{desktop_dir} = "$ENV{HOME}/.gnome-desktop"; > }
On Mon Feb 27 09:59:54 2006, guest wrote: Show quoted text
> File::BaseDir could also be of help. > > There's a potential circular dependency. It should probably make use
of Show quoted text
> File::HomeDir (though it doesn't).
First of all the freedesktop specification does _not_ specify a Desktop directory, BaseDir is about configuration and application data. At some point there was dicussion about a seperate spec for "user directories" (e.g. Desktop MyMusic etc.) but I don't think a draft was actually commited - check the xdg mailing list archives if you're interested. Secondly I don't think BaseDir should depend on HomeDir. The spec explicitly states that we use $HOME as home dir. I'm considering to check a couple more environment variables for win32, but this should be considered an extension to the spec. Full dependency on HomeDir does not seem necessary to me. Of course one could set $HOME using HomeDir if they want to. Regards, Jaap <pardus@cpan.org>