This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Print to File dialogue default directory, is it configurable

Tags: None
(comma "," separated)
tamimake
Registered Member
Posts
7
Karma
0
Using OpenSUSE 13.1, KDE4

From time to time I need to print text or scanned image files to PDF.
This is easy enough, I just open the file in text editor or image viewer, and use the "print to file" dialogue, which I assume is provided by KDE.

The only problem is that the print dialogue defaults to my home directory.
Of course I can use the dialogue to select another directory, but it becomes tedious after a few files.
I would prefer it to default to my Documents directory, but I have been unable to find where the default is configured.

Can anyone point me in the right direction?

John
User avatar
google01103
Manager
Posts
6668
Karma
25
there's a line in ~/.kde[4]/share/config that look appropriate
Code: Select all
DocDirectory[$e]=$Home
but changing it didn't work for me

Google'ing I only found this and a FireFox only solution

https://unix.stackexchange.com/question ... nt-to-file
Yes it is possible if you are using cups. You usually need separate package cups-pdf. You can then setup a virtual PDF printer in CUPS admin (http://localhost:631) which will place PDF files in /var/spool/cups-pdf/<USER>


ps - doesn't seem to be a KDE

update: the file referred to is kprinterrc


OpenSuse Leap 42.1 x64, Plasma 5.x

tamimake
Registered Member
Posts
7
Karma
0
Thanks for the reply.

"~/.kde[4]/share/config" is a directory on my system, not a file. I've grepped the contents for DocDirectory, but none contain this string.
A firefox solution won't help, I'm not printing from Firefox (or any other browser).

I've tried cups.pdf, but it has the same default.

I asked the same question in the OpenSUSE forum, and they suggested it was a kde matter. I'm inclined to agree
User avatar
google01103
Manager
Posts
6668
Karma
25
looked at your post on openSUSE the "they" you refer to is a single entity and guessing he's a KDE user so until you get confirmation from someone using a different d.e. you don't have any valid reason to think its a KDE issue - and no I'm not positive but my research implies it isn't.

see https://en.opensuse.org/SDB:Printing_to ... r_cups-pdf again using cups-pdf
here's a Mint Gnome thread https://superuser.com/questions/635761/ ... e-settings
here's an Ubuntu thread https://superuser.com/questions/635761/ ... e-settings
here's an older Ubuntu thread http://tombuntu.com/index.php/2008/03/2 ... directory/

and I too have wondered about this over time and think it's a needed feature


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
google01103
Manager
Posts
6668
Karma
25
tamimake wrote:Thanks for the reply.
<snip>I've tried cups.pdf, but it has the same default. <snip>

you mean cups-pdf? because that's what was suggested

fyi - there is a cups-pdf openSUSE package in the printing repo http://software.opensuse.org/package/cu ... m=cups-pdf

see in the cups-pdf config file:
Code: Select all
### Key: Out
##  CUPS-PDF output directory
##  special qualifiers:
##     ${HOME} will be expanded to the user's home directory
##     ${USER} will be expanded to the user name
##  in case it is an NFS export make sure it is exported without
##  root_squash!
### Default: /var/spool/cups-pdf/${USER}

#Out /var/spool/cups-pdf/${USER}


unfortunately this is a system wide setting, if you don't wish to edit the file you can always soft link to the spool directory


OpenSuse Leap 42.1 x64, Plasma 5.x

tamimake
Registered Member
Posts
7
Karma
0
Amending the cups-pdf.conf file as you suggested did make a difference to where the output file was printed, but only if the printing was not interactive. Try printing a browser page with cups-pdf and you will see what I mean. It made no difference to the dialogue.

I now have confirmation that the print dialogue is generated by KDE.
See http://doc.opensuse.org/documentation/html/openSUSE_113/opensuse-kdeuser/cha.kde.print.html

Which refers to:

Figure 7.1. KDE Print Dialog
Image

I know it is from an earlier version of OpenSUSE, but still KDE4, so I see no reason why it would not still apply.
Unfortunately, none of the references led to an answer.

So, how is the "KDE Print Dialog" called?
Perhaps the answer to that will lead me to the configuration options.
User avatar
google01103
Manager
Posts
6668
Karma
25
not convinced that confirms your opinion it just shows a different default print file name and location not the ability to have the dialog retain a change in the default location but either way you should post a bug on bugs.kde.org if you can't find one already there

do you have another d.e. (xfce, gnome) installed? if so that would be a good determinant that it is or isn't a KDE specific issue


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
google01103
Manager
Posts
6668
Karma
25
so I booted up the openSUSE rescue disc which is XFCE and tested printing to file
- Leafpad (a GTK+ text editor) retained changes to the print file destination folder
- Midori (a Gtk browser) did not retain the destination folder
this confuses me because I would think they used the same printer libraries

I noticed no additional posts on openSUSE, was hoping that someone there with more than just KDE experience would weigh in

if you do post a bug kindly post the link here


OpenSuse Leap 42.1 x64, Plasma 5.x

tamimake
Registered Member
Posts
7
Karma
0
Had a problem posting images from dropbox. Will fix and repost.
User avatar
google01103
Manager
Posts
6668
Karma
25
your images aren't set as being public (guessing that's error 403) so they can't be viewed

so when you printed using gedit and changed the destination did starting a new print job retain that changed dialog? if so did it retain it after restarting gedit and printing again?

if you can show it works as you want/expect in Gnome then definitely post a bug because you've shown its KDE specific, if it doesn't you could still post a bug and maybe you'll get an explanation from a dev (or someone better versed then me) or possibly even a fix


OpenSuse Leap 42.1 x64, Plasma 5.x

tamimake
Registered Member
Posts
7
Karma
0
The images are in my dropbox public folder, but for some reason they aren't accessible. Anyway that's a different issue that I'll look at later.

What I was trying to show was that the dialogues are different for KDE and Gnome, but it might be more accurate to say that apps written specifically for KDE (e.g. kwrite, gwenview, okular) use a common print dialogue. Apps that are not written specifically for KDE (gedit, gimp etc) use different dialogues, that have different print to file defaults.

I'm going to load a system into a VM, and install some different desktops to see if I can tie this down more precisely.
tamimake
Registered Member
Posts
7
Karma
0
I set up a Debian system, with a numbe of different desktop environments, Mate, Enlightenment, Cinnamon, KDE, XFCE.
Comparing gedit and kwrite in each environment showed their behaviour remains constant irrespective of the DE in use.

In kwrite the print to file default output directory is always the users home directory.
This default directory persists from file to file. If a different directory is selected, that choice is not retained for the next file.

On the other hand gedit has the Document directory as its default print to file destination.
When a different directory is chosen, gedit retains memory of that directory, from file to file, and from intance to instance.
Even when I log out and log in to a different DE, gedit retains memory of the previously selected directory.

Gwenview exhibits the same behaviour as kwrite. Their behaviour is independant of the distro used, and of the DE running, but both require kdebase4-runtime, i.e. KDE must be installed, even if not being used.

I don't expect to be able to change the apps ability to remember the previous directory used, and I don't really need this. So long as I can preset a directory where the output files are written, that would meet my needs.

Surely setting the default output directory is configurable. If only I knew where the config was located.
User avatar
google01103
Manager
Posts
6668
Karma
25
Maybe it's not a KDE thing but a QT thing

found these:

https://techbase.kde.org/Projects/KDEPrint
KDEPrint is no longer used in KDE4 and has been replaced by the Qt printing infrastructure and the system-config-printer tool.


https://community.kde.org/
Printing Current information
KDE4 uses the Qt printing infrastructure for the application side and system-config-printer for the Print System Configuration.


OpenSuse Leap 42.1 x64, Plasma 5.x

User avatar
google01103
Manager
Posts
6668
Karma
25
Tested in plasma 5 and the behavior has not changed


OpenSuse Leap 42.1 x64, Plasma 5.x

tamimake
Registered Member
Posts
7
Karma
0
Also found those references and had looked at QT earlier.
system-config-printer affects CUPS printers only.


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]