Open Augusto7743 opened 1 year ago
Is there somewhere I can enter the password for sudo? So you should set proper permission for your script and then execute it. Have you tried it? or use pkexec as the launcher
I want create an shortcut launch being possible run "bash" with script. One launch link with sudo bash running an script and other without sudo.
I've given the tips, have you tried them?
1.SUID
Does not involve sudo command
Make the first line of your script
#!/bin/bash
This is not a menu issue, if this corrects your issue pleas mark it as closed.
Make the first line of your script
#!/bin/bash
I adapter the example in man pkexec
, so:
Change
#!/bin/bash
becomes:
#!/usr/bin/pkexec /usr/bin/bash
pkexec
effectively does cd /root
; if that causes problems, try:
#!/usr/bin/pkexec --keep-cwf /usr/bin/bash
Hello. Thanks for reading my topic. Is possible use MenuLibre to create an menu launcher to run an bash script ? bash script file have the command to flush writeback cache before OS log out or power off.
/usr/sbin/dmsetup message /dev/mapper/rc-wb_sda4 0 flush
the command need to run being sudo.
I had created an launcher pointing to the bash file and selecting to run in terminal , but not work.
Thanks for any reply. Have an nice week.