Summary Sudo password prompt on login due to a script in ~/.bash-profile causes boot hang. Description When a user includes a script in `~/.bash-profile` that requires `sudo` privileges, the system hangs on the Laptop Manufacturer (ASUS) loading screen after the user login window. The issue occurs after the user has logged in, leading to a situation where the user must input their password blindly to continue booting. It would be beneficial to have a visible password prompt instead of the current behavior. Steps to Reproduce 1. Create a script in `~/.bash-profile` that requires `sudo` privileges. 2. Restart the system. 3. Observe the ASUS loading screen after the user login window. 4. Input the password blindly and press enter to resume booting. Expected Behavior A visible password prompt should appear when a script requiring `sudo` privileges is executed during the login process, rather than hanging on the loading screen. Additional Information - On boot, the `xwaylandbridge` quits unexpectedly. - This issue has been observed on ASUS hardware. Environment Operating System: Fedora Linux 42 KDE Plasma Version: 6.4.4 KDE Frameworks Version: 6.17.0 Qt Version: 6.9.1 Kernel Version: 6.15.9-201.fc42.x86_64 (64-bit) Graphics Platform: Wayland Processors: 6 × 11th Gen Intel® Core™ i5-11400H @ 2.70GHz Memory: 8 GiB of RAM (7.5 GiB usable) Graphics Processor 1: Intel® UHD Graphics Graphics Processor 2: NVIDIA GeForce RTX 3050 Laptop GPU Manufacturer: ASUSTeK COMPUTER INC. Product Name: ASUS TUF Gaming F15 FX506HC_FX506HC System Version: 1.0
Unfortunately there's no way to improve this from the KDE side. `sudo` is a command-line tool that doesn't know how to display a GUI authentication prompt. So if there is none, it'll just ask invisibly into the ether, hanging forever. As such, this is unfortunately a configuration issue on your side that needs to be fixed there too. If you replaced `sudo` with `run0` or `pkexec`, then it would do what you expect automatically, because those tools do know how to display a GUI authentication prompt.
(In reply to Nate Graham from comment #1) > Unfortunately there's no way to improve this from the KDE side. `sudo` is a > command-line tool that doesn't know how to display a GUI authentication > prompt. So if there is none, it'll just ask invisibly into the ether, > hanging forever. As such, this is unfortunately a configuration issue on > your side that needs to be fixed there too. > > If you replaced `sudo` with `run0` or `pkexec`, then it would do what you > expect automatically, because those tools do know how to display a GUI > authentication prompt. I presumed it as a bug because Linux Mint had prompted with the GUI authentication when a script with `sudo` was there in `.bash-profile`. But yeah, what you say makes sense. Thanks. Will update my code.
Interesting, that's unexpected. I wonder what wizardry they do to make that happen. If you could find it, it would be useful to compare notes.
(In reply to Nate Graham from comment #3) > Interesting, that's unexpected. I wonder what wizardry they do to make that > happen. If you could find it, it would be useful to compare notes. I am not using Mint as of now and remembering out of memory. Will try to recreate that behavior in a VM and get back here.