Comment 24 for bug 134682

Revision history for this message
flaviano petrocchi (flavianopetrocchi) wrote : Re: [Tribe5] user don't know where are his pdf file

I have solved this problem on hardy writing a simple server in python that I added to my session autostart list, then i have modified cups-pdf which now, after reading the configuration file, connect to the server sending him the path to the output file. The server create and present the user a file save dialog pointing at that path and the user can simply save there or choose another output file. The dialog ask confirmation if the file already exists. The server sends back to cups-pdf the chosen path which is used as the destination file. If the server is not active cups-pdf simply use the directory in the configuration file as destination. The server default port is 50000, but can be passed as first parameter to the program, the client also try to connect to the 50000 as default but the port can be changed in cups-pdf.conf adding the key FileChooserPort. The server accept connections only from 127.0.0.1 and only from one client at a time. I think dbus should be used for this task but for me was simpler to implement a tcp server. If this solution is acceptable for someone else i can attach the code and instructions to build and install.