Registered Member
|
Apart from eating it, I mean
- Using kdesu 4.9.5 and konsole 4.9.5 - If, under konsole, I launch whatever_binary, the content of whatever_binary's standard error is correctly printed. - If, I launch kdesu whatever_binary then, konsole displays miscellaneous traces from kdesu but whatever_binary's stderr content is no longer displayed. How can I get it back ?
Last edited by aCOSwt on Fri May 31, 2013 4:55 pm, edited 1 time in total.
|
Administrator
|
Can you try passing the "-t" argument to kdesu?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Manager
|
I don't think you can
supposedly the gtk command gksu, if available, will work I don't understand why this works and I'm pretty sure in days of old it did not, if you can open a root tab in Konsole and you'll see output. not sure this would be considered good practices though. |
Registered Member
|
Thanks bcooksley. That fits for purpose.
That is because a child process inherits the stdin / stdout / stderr from its parent. - su forks an interactive shell (stdin=keyboard / stdout = stderr = console) and then the commands you type are children of that shell. => unless you specifically redirect them, those file descriptors will be kept for the commands you type. - With kdesu whatever_command, things appear a little more complicated. From what I can observe : kdesu starts forking su kdesu_stub which in turns forks kdesu_stub which in turn forks whatever_command. I suspect the stderr / stdout are closed by one of these cascaded children unless the t parameter is given. Nevermind. Thank you all for your contributions. |
Administrator
|
Not a problem.
You may also want to check the other arguments supported by "kdesu", by checking it's help: "kdesu --help".
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]