Me too: "Kprinter has stopped working - Unable to start childprintprocess"
Kurt Pfeifle
k1pfeifle at gmx.net
Tue Jan 30 01:43:22 CET 2007
On Monday 29 January 2007 17:51, Kurt Pfeifle wrote:
> On Monday 29 January 2007 12:18, Goffioul Michael wrote:
> > > > Is it possible that the kdeprintd daemon (kded module)
> > > isn't able to
> > > > start a child process anymore? Is it possible for you to "talk"
> > > > directly to the module to see if it behaves correctly?
> > > > (it used to be possible with "dcop kded kdeprintd")
> > >
> > > Yes. I'm not at the office, but I phoned them in the
> > > afternoon. They said "dcop kded kdeprintd openPassDlg root"
> > > opened a password dialog.
> >
> > Could you try the "print" command on the kdeprintd module?
> > This command has the following syntax:
> >
> > print(QString cmd, QStringList files, bool remove_flag)
> >
> > cmd: the command to execute, it could be any command
> > files: a list of files that will replace any "$out" tag in the command
> > remove_flag: a flag specifying if the "files" should be removed
> > after command completion
> >
> > So, in theory, you should be able to do:
> >
> > print("ls -l", QStringList(), false)
>
> I didn't quite understand how to provide the full dcop command syntax
> on the command line:
>
> kurt@~> dcop kded kdeprintd print "ls -l" "/home/kurt/" "false"
> Not enough arguments.
>
> kurt@~> dcop kded kdeprintd 'print("ls -l", "/home/kurt/", "false")'
> Not enough arguments.
>
> kurt@~> dcop kded kdeprintd print("ls -l", /home/kurt/*, false)
> bash: syntax error near unexpected token `('
>
> kurt@~> dcop kded kdeprintd print\("ls -l", /home/kurt/*, false\)
> parentheses do not match
>
>
> Next, I tried to get it done with the GUI, kdcop. Started kdcop,
> manouvered to "kded --> kdeprintd" and filled in the dialog
> accordingly (command: ls -l; files: /home/kurt). This didn't do
> anything else than write a "-1" into the lower white field labeled
> as "Returned data type: int". I assume this just means that the
> return code was "not successfull".
>
> Last, I created a file that I could risk loosing:
>
> kurt@~> echo "testtesttest" > /tmp/kdeprint.txt
>
> Then I filled in the same kdcop dialog as above accordingly
> (command: ls -l; files: /tmp/kdeprint.txt; remove: enabled).
>
> This time, the "-1" return code is the same -- but the newly
> created file /tmp/kdeprint.txt was indeed removed after the
> dcop call had executed!
>
> So it looks, part of the command succeeds, and part doesn't.
Thanks to David Faure, who answered my question on kde-core-devel,
we now know how to make this call on the commandline. Here it is
and also what is returned:
kurt@~> dcop kded kdeprintd print "ls -l" '(' "/tmp/kdeprint.txt" ')' false
object not accessible
kurt@~> ls -l /tmp/kdeprint.txt
-rw-r--r-- 1 kurt kurt 13 2007-01-29 17:32 /tmp/kdeprint.txt
And doing the same as root:
root:# dcop --user kurt --list-sessions
Active sessions for user /home/kurt :
.DCOPserver_soprano__0
root:# dcop --session .DCOPserver_soprano__0 --user kurt |grep kded
kded
root:# dcop --session .DCOPserver_soprano__0 --user kurt kded kdeprintd print "ls -l" '(' "/tmp/kdeprint.txt" ')' false
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
6119
root:# dcop --session .DCOPserver_soprano__0 --user kurt kded kdeprintd print "ls -l" '(' "/tmp/kdeprint.txt" ')' true
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified
6134
root:# ls -l /tmp/kdeprint.txt
/bin/ls: /tmp/kdeprint.txt: No such file or directory
Does this provide more clue now?
As I said before, running KDE as root makes KDEPrint work (like it
does for Andrew)...
Cheers,
Kurt
More information about the kde-print
mailing list