I don’t use it very often but occasionally it can be useful to have a launcher somewhere on my desktop that starts a terminal session as root.
Older distributions used gksu to prompt the user for a password and allow them to launch an application at root, but when installing the Mate Desktop on my Jetson Nano this weekend I discovered that gksu has now been deprecated in both Debian and Ubuntu and replaced by pkexec .
The solution seems simple enough, just install pkexec and modify the launcher to use pkexec instead of gksu …
The only problem was that this didn’t work, so it was time to read the manual! After a bit of searching I found the documentation, and discovered that in addition to modifying the launcher you also need to login as root and create a new policy file.
Fortunately it isn’t too hard to modify the example.
# nano /usr/share/polkit-1/actions/org.mate.mate-terminal.policy
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
<description>Run mate-terminal as root</description>
<message>Authentication is required to run mate-terminal as root.</message>
The changes should take effect immediatly.
This entry was posted in Debian
and tagged policykit
. Bookmark the permalink