File Managers with Admin Rights (SOLVED)

All Gurus once were Newbies
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Please stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions prefer the other forums within the support section.
Before you post please read how to get help
Post Reply
User avatar
frostymusic
Level 4
Level 4
Posts: 245
Joined: Fri Jul 06, 2018 8:21 pm

File Managers with Admin Rights (SOLVED)

Post by frostymusic »

I had a File Manager installed that had the option to address files with Admin privileges. I can't recall what the name of the manager was, if anybody can answer that, thanks!
Last edited by frostymusic on Wed Apr 22, 2020 11:00 am, edited 1 time in total.
User avatar
lsemmens
Level 10
Level 10
Posts: 3498
Joined: Wed Sep 10, 2014 9:07 pm
Location: Rural South Australia

Re: File Managers with Admin Rights

Post by lsemmens »

Nemo in the right click menu has the option to open a file as root. Is that what you mean?
Fully mint Household
Out of my mind - please leave a message
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: File Managers with Admin Rights

Post by all41 »

Before xed became the default text editor MATE came with pluma.
pluma enabled a right-click context choice to 'Edit as Administrator'
Perhaps that is what you are recalling. I don't normally use pluma as my
text editor but I do install it for this particular function.

Code: Select all

apt install pluma
pluma.jpg
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: File Managers with Admin Rights

Post by all41 »

lsemmens wrote:
Tue Apr 21, 2020 9:03 pm
Nemo in the right click menu has the option to open a file as root. Is that what you mean?
I looked through their post history and it seems they use MATE.
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
User avatar
Pierre
Level 20
Level 20
Posts: 10599
Joined: Fri Sep 05, 2008 5:33 am
Location: Perth, AU.

Re: File Managers with Admin Rights

Post by Pierre »

frostymusic wrote:
Tue Apr 21, 2020 6:39 pm
I had a File Manager installed that had the option to address files with Admin privileges. I can't recall what the name of the manager was, if anybody can answer that, thanks!
that may have been Gnome Commander :?:
- it's Run as Root option, no longer works, in the later versions of the LinuxMint system,
as an file that the Root option used, is no longer available.
:(

there are alternatives, but that program was a brilliant idea .. no more.
Image
Please edit your original post title to include [SOLVED] - when your problem is solved!
and DO LOOK at those Unanswered Topics - - you may be able to answer some!.
User avatar
MartyMint
Level 6
Level 6
Posts: 1015
Joined: Thu Dec 27, 2012 10:50 pm

Re: File Managers with Admin Rights

Post by MartyMint »

Caja has an add-on extension for allowing admin rights in the right-click menu. It's in the repositories.
User avatar
all41
Level 16
Level 16
Posts: 6249
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: File Managers with Admin Rights

Post by all41 »

MartyMint wrote:
Tue Apr 21, 2020 9:56 pm
Caja has an add-on extension for allowing admin rights in the right-click menu. It's in the repositories.
I believe you are referring to caja-admin package. That package is installed by default now, but it depends on
the presence of pluma. Perhaps it could be modified to point to other editors though.
Linux Crux=Aut Viam Inveniam Aut Faciam+libera ab tyrannis
User avatar
smurphos
Level 17
Level 17
Posts: 7150
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: File Managers with Admin Rights

Post by smurphos »

For Cinnamon / Nemo to add an right click option to open a file with Xed with elevated privileges

Each code block below is a single copy/paste commands in the terminal

Code: Select all

tee ~/.local/share/nemo/actions/xed_sudoedit.nemo_action <<'EOB'
[Nemo Action]
Name=_Xed (Sudoedit)
Comment=Open %F with xed opening as different user when needed via sudoedit.
Exec=<scripts/xed_sudoedit_check.sh %F>
Icon-Name=text-editor-symbolic
Selection=s
Mimetypes=text/plain;text/css;text/english;text/html;text/x-apt-sources-list;text/x-c;text/x-c++;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-diff;text/x-dsrc;text/x-java;text/x-makefile;text/x-moc;text/x-pascal;text/x-perl;text/x-python;text/x-sql;text/x-tcl;text/x-tex;
Dependencies=sudoedit;xed;
EscapeSpaces=true
Terminal=false
EOB

Code: Select all

tee ~/.local/share/nemo/actions/scripts/xed_sudoedit_check.sh <<'EOB'
#!/bin/bash
FILEOWNER=$(stat -c %U "$1")
if [ "$FILEOWNER" = "$USER" ]; then
  xed "$1"
else
  export SUDO_EDITOR="xed -w"
  export SUDO_ASKPASS="$HOME/.local/share/nemo/actions/scripts/zenity_askpass.sh"  
  sudoedit -A -u "$FILEOWNER" "$1"
fi
EOB

Code: Select all

tee ~/.local/share/nemo/actions/scripts/zenity_askpass.sh <<'EOB'
#!/bin/bash
zenity --password --title="Authenticate"
EOB

Code: Select all

chmod +x ~/.local/share/nemo/actions/scripts/zenity_askpass.sh

Code: Select all

chmod +x ~/.local/share/nemo/actions/scripts/xed_sudoedit_check.sh
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Petermint
Level 6
Level 6
Posts: 1100
Joined: Tue Feb 16, 2016 3:12 am

Re: File Managers with Admin Rights

Post by Petermint »

My Cinnamon 19.3 does not have right click open with admin but it works through command sudo nemo. :shock: :twisted:
User avatar
smurphos
Level 17
Level 17
Posts: 7150
Joined: Fri Sep 05, 2014 12:18 am
Location: Britisher
Contact:

Re: File Managers with Admin Rights

Post by smurphos »

Petermint wrote:
Wed Apr 22, 2020 2:52 am
My Cinnamon 19.3 does not have right click open with admin but it works through command sudo nemo. :shock: :twisted:
Are you sure? Open as Root is a stock option in nemo.

FYI - if you want to run nemo with elevated privileges from the command line use pkexec nemo (19.x) or gksudo nemo (18.x). A plain sudo with a GUI app with lead to file ownership corruption in your home folder.

Image
For custom Nemo actions, useful scripts for the Cinnamon desktop, and Cinnamox themes visit my Github pages.
Petermint
Level 6
Level 6
Posts: 1100
Joined: Tue Feb 16, 2016 3:12 am

Re: File Managers with Admin Rights

Post by Petermint »

Ah, it only appears for the directory, not for a file. Nemo 4.4.2
Last edited by Petermint on Wed Apr 22, 2020 6:20 pm, edited 1 time in total.
User avatar
frostymusic
Level 4
Level 4
Posts: 245
Joined: Fri Jul 06, 2018 8:21 pm

Re: File Managers with Admin Rights

Post by frostymusic »

Nemo in the right click menu has the option to open a file as root. Is that what you mean?

Installed Nemo, yes the right click option for root is there, thanks!
Post Reply

Return to “Newbie Questions”