Bug 888080 - Print to file saves file in $HOME instead of selected location
Summary: Print to file saves file in $HOME instead of selected location
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gtk2
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 951860 959579 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-12-17 23:58 UTC by Stan King
Modified: 2013-07-29 11:27 UTC (History)
11 users (show)

Fixed In Version: gtk2-2.24.18-1.fc18
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-05-28 01:03:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stan King 2012-12-17 23:58:44 UTC
Description of problem:

When printing to the "Print to File" destination, with output file of PDF, the chosen destination directory is ignored.  Instead, the output PDF file always goes to the home directory.


Version-Release number of selected component (if applicable):
17.0.1
rpm name: firefox-17.0.1-1.fc17.x86_64


How reproducible:
Every time.


Steps to Reproduce:
1. Navigate to a web page (fedoraproject.org, for example)
2. Request to print the page, choose "print to file", and output format PDF.
3. With the "Save in folder" dropdown menu, choose "other...", and navigate to an arbitrary folder underneath one's home directory.
  
Actual results:
Output file is generated in one's home directory.

Expected results:
Output file ought to have been generated in the chosen directory.


Additional info:

If the destination directory is entered as absolute path, starting from /, the directory choice is obeyed correctly.  However, the choice is ignored if one navigates from the default, without specifying a full path, even if the navigation goes up to / and then back down the tree.

Comment 1 Jan Horak 2012-12-18 12:02:38 UTC
Hm, I cannot reproduce this one on Fedora 17. Do you have any special setup like home on network drive or saving to symlinked directory. Is the "arbitrary folder" subdirectory of home, could you check whenever you have write access to that folder?

Comment 2 Stan King 2012-12-20 04:11:55 UTC
As I mentioned, it will write to a directory of your choice, as long as you enter its absolute path, which is possible by clicking the "paper and pencil" icon after choosing "other..." in the dropdown.  That would fail if permissions did not permit the write.

To try to get to as blank a slate as possible, I was able to reproduce this from a Fedora 18 Beta Live x86_64 USB.  Here are the steps I performed:

1. Boot Fedora 18 Beta Live.

2. Establish wifi network connectivity.

3. Start Firefox.

4. Do "File -> Print" on the Firefox "a better browser for the greater good" welcome page.  PDF was already defaulted as the output type.

5. Choose "other..." in the "Save in folder" drop-down.  By the way, you must choose "other..." to see the failure.  If you choose one of the pre-ordained defaults, it works OK.

6. Choose the "Documents" directory.  Click "Open" at the lower right.

7. Verify that "Documents" shows after "Save in folder" on the main Print window.

8. Choose an output file name that will not conflict with a pre-existing file, then click "Print".

9. Notice that the output file is in the home directory for "liveuser", not in the directory that was chosen after "other..." was selected from the drop-down.

Comment 3 Brent R Brian 2013-01-01 17:53:27 UTC
Evince seems to work fine, but Firefox 17.0.1 under Fedora 17 does put the PDF in the home folder, regardless of the selected folder.

Comment 4 Brent R Brian 2013-01-01 17:58:20 UTC
OK, there seems to be a trick to it.  

If you SELECT the FOLDER, then change the FILE NAME, it goes to HOME.

If you leave the file name mozilla.pdf, then select the folder, it works.

Seems the "change" method on the file name field may be the culprit ?

Comment 5 Jan Horak 2013-03-13 12:33:57 UTC
I can reproduce it now, thanks. This is bug in gtk2, evince is using gtk3 while Firefox still on gtk2. 

When I get more details, I'll reassign to gtk2.

Comment 6 Jan Horak 2013-03-13 16:51:59 UTC
It seems to be problem in filesave_changed_cb (gtkprinteroptionswidget.c). 

Directory returned by:
directory = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (priv->combo));
is set to $HOME when user pick directory which wasn't present in combo box and change filename afterwards.

Exact reproduction steps are:
1. Open Firefox print dialog
2. Select 'Print to File'
3. Pick 'Save in Folder' then 'Other...'
4. Select directory
5. (at this moment filesave_changed_cb call is fine, picked directory is returned by gtk_file_chooser_get_filename)
6. change 'Name' of file (for example appending one letter to the name calls filesave_changed_cb again but gtk_file_chooser_get_filename now returns home folder instead of previous pick).

Comment 7 Stan King 2013-03-14 21:07:17 UTC
I don't want to mess up your workflow, but I want to point out that this has been working OK for me this morning, with firefox.x86_64 version 19.0-1.fc18.  The command "yum deplist firefox" shows a dependency on gtk2.x86_64 2.24.16-1.fc18.

When I bring up the "print to file" dialog, the box to the right of "save to folder" is initially blank; I think this may be different than previously.  (This will teach me to take screen dumps next time.)

Comment 8 Berend De Schouwer 2013-03-15 07:49:32 UTC
I still experience the problem today with:

gtk2-2.24.16-1.fc18.x86_64
firefox-19.0-1.fc18.x86_64

There is a change, however.

If I manually select my folder, it goes to the right place, always.

If I select one of the list of pre-defined folders (ie. Documents, Music, Videos, Downloads) it still goes to $HOME.

It used to go to $HOME even with a manually selected folder.

Comment 9 Jan Horak 2013-04-16 14:12:47 UTC
*** Bug 951860 has been marked as a duplicate of this bug. ***

Comment 10 Garrett Mitchener 2013-04-23 16:17:19 UTC
I'm seeing this too, on Fedora 18

firefox-20.0-1.fc18.i686
gtk2-2.24.16-1.fc18.i686

See also https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/1090174

Comment 11 Joel 2013-04-25 17:01:51 UTC
Seeing this with Fedora 19 alpha on Firefox as well.

firefox-20.0-1.fc19.x86_64
gtk2-2.24.17-1.fc19.x86_64

As said previously, if I select my own folder instead of using the pre-defined drop-down list, then the file goes to the right place.

Comment 12 Michael Wiktowy 2013-05-01 14:01:40 UTC
I can confirm this bug with the latest F18.

When I print to file, my settings always default to print to a PS file with a blank directory drop-down and just ".ps" in the file name field. It does not store what I entered the last time like some other applications.

Selecting Other... and manually picking a directory is a work-around.

deplist:
package: firefox.x86_64 20.0-1.fc18
  dependency: /bin/bash
   provider: bash.x86_64 4.2.45-1.fc18
  dependency: /bin/sh
   provider: bash.x86_64 4.2.45-1.fc18
  dependency: ld-linux-x86-64.so.2()(64bit)
   provider: glibc.x86_64 2.16-30.fc18
  dependency: ld-linux-x86-64.so.2(GLIBC_2.3)(64bit)
   provider: glibc.x86_64 2.16-30.fc18
  dependency: libatk-1.0.so.0()(64bit)
   provider: atk.x86_64 2.6.0-1.fc18
  dependency: libc.so.6(GLIBC_2.4)(64bit)
   provider: glibc.x86_64 2.16-30.fc18
  dependency: libcairo.so.2()(64bit)
   provider: cairo.x86_64 1.12.14-1.fc18
  dependency: libdl.so.2()(64bit)
   provider: glibc.x86_64 2.16-30.fc18
  dependency: libdl.so.2(GLIBC_2.2.5)(64bit)
   provider: glibc.x86_64 2.16-30.fc18
  dependency: libfontconfig.so.1()(64bit)
   provider: fontconfig.x86_64 2.10.2-2.fc18
  dependency: libfreetype.so.6()(64bit)
   provider: freetype-freeworld.x86_64 2.4.10-3.fc18
   provider: freetype.x86_64 2.4.10-4.fc18
  dependency: libgcc_s.so.1()(64bit)
   provider: libgcc.x86_64 4.7.2-8.fc18
  dependency: libgdk-x11-2.0.so.0()(64bit)
   provider: gtk2.x86_64 2.24.16-1.fc18
  dependency: libgdk_pixbuf-2.0.so.0()(64bit)
   provider: gdk-pixbuf2.x86_64 2.26.5-1.fc18
  dependency: libgio-2.0.so.0()(64bit)
   provider: glib2.x86_64 2.34.2-2.fc18
  dependency: libglib-2.0.so.0()(64bit)
   provider: glib2.x86_64 2.34.2-2.fc18
  dependency: libgobject-2.0.so.0()(64bit)
   provider: glib2.x86_64 2.34.2-2.fc18
  dependency: libgtk-x11-2.0.so.0()(64bit)
   provider: gtk2.x86_64 2.24.16-1.fc18
  dependency: libm.so.6()(64bit)
   provider: glibc.x86_64 2.16-30.fc18
  dependency: libm.so.6(GLIBC_2.2.5)(64bit)
   provider: glibc.x86_64 2.16-30.fc18
  dependency: libmozalloc.so()(64bit)
   provider: xulrunner.x86_64 20.0-1.fc18
  dependency: libnspr4.so()(64bit)
   provider: nspr.x86_64 4.9.5-2.fc18
  dependency: libpango-1.0.so.0()(64bit)
   provider: pango.x86_64 1.32.3-1.fc18
  dependency: libpangocairo-1.0.so.0()(64bit)
   provider: pango.x86_64 1.32.3-1.fc18
  dependency: libpangoft2-1.0.so.0()(64bit)
   provider: pango.x86_64 1.32.3-1.fc18
  dependency: libplc4.so()(64bit)
   provider: nspr.x86_64 4.9.5-2.fc18
  dependency: libplds4.so()(64bit)
   provider: nspr.x86_64 4.9.5-2.fc18
  dependency: libpthread.so.0()(64bit)
   provider: glibc.x86_64 2.16-30.fc18
  dependency: libpthread.so.0(GLIBC_2.2.5)(64bit)
   provider: glibc.x86_64 2.16-30.fc18
  dependency: libstartup-notification-1.so.0()(64bit)
   provider: startup-notification.x86_64 0.12-4.fc18
  dependency: libstdc++.so.6()(64bit)
   provider: libstdc++.x86_64 4.7.2-8.fc18
  dependency: libstdc++.so.6(CXXABI_1.3)(64bit)
   provider: libstdc++.x86_64 4.7.2-8.fc18
  dependency: libstdc++.so.6(GLIBCXX_3.4)(64bit)
   provider: libstdc++.x86_64 4.7.2-8.fc18
  dependency: libxpcom.so()(64bit)
   provider: xulrunner.x86_64 20.0-1.fc18
  dependency: libxul.so()(64bit)
   provider: xulrunner.x86_64 20.0-1.fc18
  dependency: rtld(GNU_HASH)
   provider: glibc.x86_64 2.16-30.fc18
   provider: glibc.i686 2.16-30.fc18
  dependency: system-bookmarks
   provider: fedora-bookmarks.noarch 15-0.4
   provider: astronomy-bookmarks.noarch 1-9.fc18
  dependency: xulrunner(x86-64) >= 20.0-1
   provider: xulrunner.x86_64 20.0-1.fc18

Comment 13 Kalev Lember 2013-05-26 00:04:48 UTC
Should be fixed in gtk2 2.24.18; can you give it a try please?

Comment 14 Fedora Update System 2013-05-26 00:08:05 UTC
gtk2-2.24.18-1.fc18 has been submitted as an update for Fedora 18.
https://admin.fedoraproject.org/updates/gtk2-2.24.18-1.fc18

Comment 15 Fedora Update System 2013-05-27 00:32:46 UTC
Package gtk2-2.24.18-1.fc18:
* should fix your issue,
* was pushed to the Fedora 18 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing gtk2-2.24.18-1.fc18'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-9336/gtk2-2.24.18-1.fc18
then log in and leave karma (feedback).

Comment 16 Fedora Update System 2013-05-28 01:03:22 UTC
gtk2-2.24.18-1.fc18 has been pushed to the Fedora 18 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 17 Michael Wiktowy 2013-05-29 22:54:09 UTC
I can confirm that this works properly for me now.

Comment 18 Jan Horak 2013-07-29 11:27:54 UTC
*** Bug 959579 has been marked as a duplicate of this bug. ***


Note You need to log in before you can comment on or make changes to this bug.