#.

43 messages · Page 1 of 1 (latest)

onyx lynx
#

systemd already uses polkit to ask for root password when required

#

you don't need to run it with sudo

#

it's safer to use polkit, you probably don't have a graphical polkit agent

#

.aw Polkit

snow matrixBOT
onyx lynx
#

go to section "1.1 Authentication agents"

#

install any graphical agent you like in the list

#

you can do what you asked for (running the script as root from a non-root user) using a setuid bit but it is not very safe

#

any mistake in the script and you could ruin your system

#

i believe lxqt stuff are generally the most lightweight

#

yes

#

but you can't use the CLI one if you are not in an interactive shell in a terminal

#

it needs a terminal emulator to read your password through

#

no

#

it can

#

the script just has to be run from a terminal but you are not using a terminal to run it

#

do you understand the reason ?

#

when you run it from a terminal it use the terminal to read your password

#

when you click a button then where would it read the password from

#

it's not visible to you

#

and it's not interactive

#

yes

#

you can

  • make the buttons launch a terminal emulator to read the password through
  • or you can install a graphical agent
  • or you can use a setuid bit but that would be bad
  • or you can make polkit do what you want without asking for a password which is bad too
#

an opened terminal* to be correct

#

but yes that would be the most ideal solution

#

no

#

i don't understand your question

#

ask a proper question please

#

between what and what

#

CLI is not a thing

#

i can give you an analogy to explain what i mean

#

CLI/terminal is like GUI/screen

#

what is GUI ?

#

do you install GUI ?

#

no GUI (graphical user interface) is just a way to interact with an app

#

and a screen shows you GUI apps

#

a terminal emulator is a kind of a screen for CLI apps (apps that use text instead of graphics)

#

GUI apps use screens

#

CLI apps use terminals

#

terminals don't exist anymore

#

so we use terminal emulators

mint gorge
#

[solved] Trying to start and stop system services in a script for i3blocks