lxqt / lxqt-sudo

GUI frontend for sudo/su
https://lxqt.github.io
GNU Lesser General Public License v2.1
37 stars 26 forks source link

When running a terminal application via lxqt-sudo, all user input to the application is discarded #209

Closed ArrayBolt3 closed 10 months ago

ArrayBolt3 commented 10 months ago
Expected Behavior

When running lxqt-sudo apt full-upgrade, I should be able to reply to apt when asked if I want to continue.

Current Behavior

When running lxqt-sudo apt full-upgrade, my input is ignored after apt launches - typing n and pressing Enter silently fails.

Possible Solution

Probably this is just the result of user input not being properly piped to the application (I checked the lxqt-sudo code and I didn't see anything that took user input and shuttled it to the launched app). Theoretically this should be easy to fix.

Steps to Reproduce (for bugs)
  1. Open a terminal on a Debian-based system with LXQt.
  2. Run lxqt-sudo apt full-upgrade
  3. Provide your password when prompted.
  4. When asked if you wish to continue, type n and press Enter. It will appear as if apt didn't get the message.
Context

I'm trying to write an updater application for Lubuntu that uses apt-get to retrieve info and do the installation work. To accomplish this, I have a script that does some two-way communication with the updater application (in order to allow handing conffile conflict problems). The script is then run as root via lxqt-sudo, and it communicates with the Qt-based frontend application. While output from the script (and from apt-get) reaches the application, attempts by the application to "talk back" to the script are being silently ignored since lxqt-sudo isn't forwarding the data.

System Information
palinek commented 10 months ago

Fixed by #210 (e4a321e)