Wednesday, May 1, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 404  / 2 Years ago, thu, january 6, 2022, 6:18:25

I come from Fedora 16-20 and definitely freshman in using Ubuntu, I was used in Gnome3 to turn off my computer by typing ALT+F2, then typing "poweroff" and return.



In Unity "ALT+F2" actually open the "quick terminal" but "poweroff" command is not working, as well as any other poweruser command (launching applications seems fine), even if provided with sudo command (it is not asking any password).



From the shell it is working fine ("sudo poweroff" and inserting the password).



I've read that it is possible to define a shortcut for this, but I'm not interested in (in that case I can simply use the GUI), I only want to know if it is possible to use poweroff from the "quick terminal" (ALT+F2), or if it is not available for some reason (and possibly I would undestand why).


More From » unity

 Answers
0

It doesn't work because 'sudo' reads input from the Terminal. Alt+F2 doesn't provide a terminal.



To get poweroff (and other admin tools) to work in Alt+F2, use this:




  1. First, open a terminal (Ctrl+Alt+T) and run this command:



    sudo apt-get install gksu


    (It may be already installed in older versions of Ubuntu)


  2. You can then use 'gksu' instead of 'sudo' in the Alt+F2 launcher.



[#27071] Saturday, January 8, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
tionavocad

Total Points: 189
Total Questions: 101
Total Answers: 118

Location: Liechtenstein
Member since Wed, Dec 8, 2021
2 Years ago
tionavocad questions
Tue, May 23, 23, 00:07, 1 Year ago
Tue, Jan 17, 23, 20:38, 1 Year ago
Sun, Oct 10, 21, 04:50, 3 Years ago
Tue, Jun 7, 22, 08:50, 2 Years ago
;