Pictures folder: --location requires absolute path

Bug #393727 reported by Bryce Harrington
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
gnome-screensaver (Ubuntu)
Low
Unassigned
Lucid
Low
Unassigned

Bug Description

Binary package hint: gnome-screensaver

As I understand it, gnome-screensaver detects if ~/Pictures exists and if so loads photos for a slideshow from there.

However, this does not seem to work on my system. If I create ~/Pictures and put photos in it, nothing shows up. I was able to get it to work by editing /usr/share/applications/screensavers/personal-slideshow.desktop and set Exec as follows:

 Exec=/usr/lib/gnome-screensaver/gnome-screensaver/slideshow --location=/home/bryce/Pictures

I could not get --location=Pictures nor --location=~/Pictures to work, so I believe the issue to be that relative directories are not being handled properly.

ProblemType: Bug
Architecture: amd64
Date: Mon Jun 29 21:56:35 2009
DistroRelease: Ubuntu 9.10
Package: gnome-screensaver 2.27.0-0ubuntu1 [modified: usr/share/applications/screensavers/personal-slideshow.desktop]
ProcEnviron:
 PATH=(custom, user)
 LANG=C
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.30-9.10-generic
SourcePackage: gnome-screensaver
Uname: Linux 2.6.30-9-generic x86_64

Revision history for this message
Bryce Harrington (bryce) wrote :
fixor (gormaengda)
tags: added: bitesize
Changed in gnome-screensaver (Ubuntu):
importance: Undecided → Low
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Bryce, what's the contents of your ~/.config/user-dirs.dirs file?

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

You can also use --location=$HOME/Pictures as a workaround, but I'm curious why your pictures directory isn't picked up automatically.

Changed in gnome-screensaver (Ubuntu Lucid):
assignee: nobody → Marc Deslauriers (mdeslaur)
status: New → Incomplete
Revision history for this message
Bryce Harrington (bryce) wrote :

This is with a totally stock ~/.config/user-dirs.dirs (attached anyway).

I've retested this with latest lucid, and while --location=~/Pictures still does work as I think it should, --location=Pictures does work now, as does --location=$HOME/Pictures.

(My real ulterior motivation for this is to be able to set up my folk's computers to share baby photos with them via UbuntuOne, but I'm finding the --location option to be kind of spotty and it isn't working for this purpose. I haven't re-tested UbuntuOne on Lucid but I did just re-test if the photos are on an NFS mount point and it still doesn't seem to read them.)

Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

So, you actually have three issues?

1- Default pictures directory as set by XDG_PICTURES_DIR isn't being used by the screensaver
2- screensaver's --location should accept ~/Pictures
3- screensaver doesn't work with pictures directory specified on an NFS mount point

Revision history for this message
Bryce Harrington (bryce) wrote : Re: [Bug 393727] Re: Pictures folder: --location requires absolute path

On Thu, Mar 11, 2010 at 12:59:47AM -0000, Marc Deslauriers wrote:
> So, you actually have three issues?
>
> 1- Default pictures directory as set by XDG_PICTURES_DIR isn't being used by the screensaver
> 2- screensaver's --location should accept ~/Pictures
> 3- screensaver doesn't work with pictures directory specified on an NFS mount point

No, just issues #2 and #3. The default out-of-the-box settings work
fine.

Changed in gnome-screensaver (Ubuntu Lucid):
assignee: Marc Deslauriers (mdeslaur) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gnome-screensaver (Ubuntu Lucid) because there has been no activity for 60 days.]

Changed in gnome-screensaver (Ubuntu Lucid):
status: Incomplete → Expired
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for gnome-screensaver (Ubuntu) because there has been no activity for 60 days.]

Changed in gnome-screensaver (Ubuntu):
status: Incomplete → Expired
Bryce Harrington (bryce)
Changed in gnome-screensaver (Ubuntu):
status: Expired → Confirmed
Revision history for this message
Ramón Rocha (ramon.rocha) wrote :

I don't know how to make a patch but if you change this "if" statement around line 100 in savers/slideshow.c from

if (location != NULL) {
    g_object_set (engine, "images-location", location, NULL);
}

to something like

if (location != NULL) {
    wordexp_t expanded_location;
    wordexp(location, &expanded_location, 0);
    location = expanded_location.we_wordv[0];
    g_object_set (engine, "images-location", location, NULL);
}

and #include <wordexp.h> it will expand ~/Pictures correctly

Revision history for this message
Rolf Leggewie (r0lf) wrote :

the correct way to fix this is to have an easy to configure preference for it (googling to edit text files doesn't quite cut it)

Revision history for this message
Rolf Leggewie (r0lf) wrote :

which is reported as bug 47604

Revision history for this message
Ramón Rocha (ramon.rocha) wrote :

Rolf, I would say configuration is a separate issue. The bug described here is about the ~ path not getting expanded correctly.

tags: removed: bitesize
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers