Skip to content

Commit

Permalink
Allow grub-reboot-picker to read the grub.cfg file
Browse files Browse the repository at this point in the history
  • Loading branch information
mendhak committed Aug 3, 2024
1 parent 5082d21 commit cf9669d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ Clone this repo, then run the python script.

```
cd src
./grub-reboot-picker.py
sudo ./grub-reboot-picker.py
```


Sudo is required here because grub.cfg may not be readable (0600 permission)

## Building a distributable

Expand Down
2 changes: 1 addition & 1 deletion com.mendhak.grubrebootpicker.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Type=Application
Name=Grub Reboot Picker
GenericName=Grub Reboot Picker
Comment=Pick an OS to reboot into
Exec=/usr/sbin/grub-reboot-picker
Exec=pkexec /usr/sbin/grub-reboot-picker
Terminal=false
Icon=un-reboot
Keywords=reboot;grub;restart;OS;windows;ubuntu;
Expand Down
12 changes: 12 additions & 0 deletions com.mendhak.grubrebootpicker.policy
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,16 @@
<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/shutdown</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">false</annotate>
</action>
<action id="org.freedesktop.policykit.pkexec.grub-reboot-picker">
<description>Run grub-reboot-picker</description>
<message>Run grub-reboot-picker so it can read grub.cfg</message>
<icon_name>un-reboot</icon_name>
<defaults>
<allow_any>yes</allow_any>
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/grub-reboot-picker</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">false</annotate>
</action>
</policyconfig>

0 comments on commit cf9669d

Please sign in to comment.