The officially official Devuan Forum!

You are not logged in.

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

rolfie
Member
Registered: 2017-11-25
Posts: 1,057  

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"
 "http://www.freedesktop.org/standards/PolicyKit/1.0/policyconfig.dtd">
<policyconfig>

  <vendor>Mate-Terminal</vendor>
  <vendor_url></vendor_url>
  <icon_name>mate-terminal</icon_name>

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

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.

Rolf

Online

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

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

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 https://en.wikipedia.org/wiki/Principle … _privilege

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

[Desktop Entry]
Version=1.0
Name=Root Terminal
Comment=Run terminal emulator as root
Type=Application
Exec=x-terminal-emulator -e sudo -i
Categories=System;TerminalEmulator;

^ 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

Offline

Board footer