Похожие чаты

I created a shell script that launches a rofi menu

with couple of options which i mapped it to a keyboard shortcut in i3. Whenever i press the keyboard shortcut menu opens, howsoever i couldn't find a way to provide permission for restart/stop/start services... Can't use sudo in that shell script, that's certain. How can i use sth. like sudo there to provide privilege for that process?

4 ответов

35 просмотров

You can make calls to systemctl via sudo allowed without a password. See man sudoers

almayayım-Cormac (aka ATB) Автор вопроса
Alexander Gnatyuk
You can make calls to systemctl via sudo allowed w...

i suppose that when systemctl doesn't have the rights to do whatever user wanted to do, it opens polkit. I got that idea by doing this: strings /usr/bin/systemctl | grep polkit This really interesting, if I'm on the terminal it asks for my password. However on rofi it doesn't ask for anything.

almayayım Cormac (aka ATB)
i suppose that when systemctl doesn't have the rig...

If you used sudo like I said it wouldn't have asked for any password.

Похожие вопросы

Обсуждают сегодня

Господа, а что сейчас вообще с рынком труда на делфи происходит? Какова ситуация?
Rꙮman Yankꙮvsky
29
А вообще, что может смущать в самой Julia - бы сказал, что нет единого стандартного подхода по многим моментам, поэтому многое выглядит как "хаки" и произвол. Короче говоря, с...
Viktor G.
2
@Benzenoid can you tell me the easiest, and safest way to bu.y HEX now?
Živa Žena
20
This is a question from my wife who make a fortune with memes 😂😂 About the Migration and Tokens: 1. How will the old tokens be migrated to the new $LGCYX network? What is th...
🍿 °anton°
2
30500 за редактор? )
Владимир
47
а через ESC-код ?
Alexey Kulakov
29
What is the Dex situation? Agora team started with the Pnetwork for their dex which helped them both with integration. It’s completed but as you can see from the Pnetwork ann...
Ben
1
Гайс, вопрос для разносторонее развитых: читаю стрим с юарта, нада выделять с него фреймы с определенной структурой, если ли чо готовое, или долбаться с ринг буффером? нада у...
Vitaly
9
Anyone knows where there are some instructions or discort about failed bridge transactions ?
Jochem
21
@lozuk how do I get my phex copies of my ehex from a atomic wallet, to move to my rabby?
Justfrontin 👀
11
Карта сайта