The officially official Devuan Forum!

You are not logged in.

#1 2019-03-10 13:41:11

Registered: 2017-11-25
Posts: 1,105  

root-Terminal under Beowulf with Mate desktop

With Beowulf a new challenge is that gksu as tool is no more available to get root privilegues from the graphical desktop. Instead pkexe needs to be used.

This descrition documents the steps required with Mate desktop to create a starter that directly allows to open a root terminal.

Create a new starter in Mate main menu by adding a new entry.
Name: root-Terminal
Command: pkexec mate-terminal
Comment: Starts mate Terminal as root
Icon: select any.
I liked the former gksu icon and have copied the file gksu-root-terminal.png from ASCII to Beowulf and saved it in /usr/share/pixmaps.

In addition a policy needs to be created and saved in /usr/share/polkit-1/actions:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
 "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"


<action id="org.mate-terminal.pkexec">
   <description>Run mate-terminal as root</description>
   <message>Authentication is required to run mate-terminal as root.</message>
   <annotate key="org.freedesktop.policykit.exec.path">/usr/bin/mate-terminal</annotate>
   <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>

Owner is root.

If you want to read system log files with the log viewer, a similar thing needs to be done with the system-log-viewer.



#2 2021-08-01 09:00:28

From: London
Registered: 2019-03-24
Posts: 3,125  

Re: root-Terminal under Beowulf with Mate desktop

There's no need to run the entire terminal emulator as root — only the shell itself needs elevated privileges. See also … _privilege

So perhaps try this file at /usr/local/share/applications/root-terminal.desktop instead:

[Desktop Entry]
Name=Root Terminal
Comment=Run terminal emulator as root
Exec=x-terminal-emulator -e sudo -i

^ That example calls the x-terminal-emulator alternative as your normal user and runs a root shell in it. No need for pkexec at all wink

Brianna Ghey — Rest In Power


Board footer