LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 05-13-2021, 03:23 PM   #1
PaulFC5
Member
 
Registered: Feb 2008
Location: Auckland, Aotearoa/NZ
Posts: 98

Rep: Reputation: 13
How to run apps as su/root in Mint20?


I have just migrated to Mint20 from the Mint18 instal which I had been using (and very much enjoying! ) for some years but there is one problem I'm having in Mint20:
The mouserightclick "Run as administrator" function, which always used to work fine in M18, does not seem to work in M20 .
There will be a very short flash when something does seem to happen, after which I would expect to see a request for my user (or root??) password, but sometimes this does not happen and whatever app I'm trying to run as root does not then open. And even if I do get to input my user password the same brief flash will happen - but no running app will then appear.

Sure, I can run xyz by calling its executable from a root terminal, but to save that extra bit of time/hassle is there some file (possibly/probably some /etc/... one??) that I can edit to allow "Run as admin" to work properly??
eg something like: "Allow apps to run as root = 1" or somesuch?

Last edited by PaulFC5; 05-13-2021 at 03:44 PM. Reason: A slight correction
 
Old 05-14-2021, 08:58 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
probably: https://forums.linuxmint.com/viewtopic.php?t=319951
 
Old 05-15-2021, 05:28 PM   #3
PaulFC5
Member
 
Registered: Feb 2008
Location: Auckland, Aotearoa/NZ
Posts: 98

Original Poster
Rep: Reputation: 13
It all seems to come down to gksu now being deprecated/obsolete/redundant.
And there doesn't seem to be any way I can find of manually installing it - ie apt-get install caja-gksu wouldn't seem to do it.
So I just copied caja-gksu from my Mint18 instal into the same (= /usr/share/doc) directory in this (the M20) instal- and that may be why, at least, caja will now run as root from the mouserightclick "Open as admin" option.
But I'm not sure - it might possibly have been doing that before the copy from M18, I don't know - caja-admin does seem to allow this.
I'm not as clear as I should/needto be on the process of installing packages in linux .
I had been trying to run MidnightCommander (GnomeCommander doesn't seem to be available for M20 ) as my file browser/editor instead of caja - and it works ≈OK as su/root by running the command mc in a rootterminal.
So, I spose, if I've got text (gedit) and file (mc & caja) editors able to be run as root in my user desktop GUI that's probably most of what I will ever need

Last edited by PaulFC5; 05-15-2021 at 05:31 PM. Reason: Slight correction
 
Old 05-16-2021, 04:44 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
yes, you are right, gksu is now deprecated. I think you found a solution, and also I think if that is ok for you you can use it (and close this thread). There is no reason to find another way. But you know. Do you have anything else?
 
Old 06-05-2021, 04:28 PM   #5
PaulFC5
Member
 
Registered: Feb 2008
Location: Auckland, Aotearoa/NZ
Posts: 98

Original Poster
Rep: Reputation: 13
Question 2nd attempt to solve this - text editing as su - pretty please anyone?? :-)

As I said the last time I posted on this thread: MidnightCommander and TuxCommander work fine from a rootterminal by entering mc or tuxcmd and I can then move/copy files/directories wherever I want to - but it seems that I still can't get a superuser text editor working - in spite of marking this thread "Solved" a few days ago when I thought that I was able to edit text files OK .
Whenever I run gedit or xed in a rootterminal (eg to edit grub.cfg) it appears to be working and saving OK, but when the app is closed a lot of stuff appears in the terminal window about gvfs and metadata not being saved - so if I ever want to do an effective edit of a text file I have to go to my (still working fine ) Mint18 install to do the job - which is a bit of a pain!

In Mint18 when using gedit (or LibreOffice etc etc) the option is there to "Open as administrator" and this then works fine/asonewouldexpect - but in Mint20, even though the same option is nominally available there too, the screen just flashes briefly and nothing happens. And sudo... does nothing better either.

Surely there is something I can do about this??
eg something like: "Allow apps to run as root = 1" in /system.d or somesuch?
Or would moving/upgrading to 20.1 have any effect on this slightlyannoying little hassle??

TIA uplines
Paul W
 
Old 06-05-2021, 05:21 PM   #6
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,597

Rep: Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545Reputation: 2545
Quote:
Originally Posted by PaulFC5 View Post
In Mint18 when using gedit (or LibreOffice etc etc) the option is there to "Open as administrator" and this then works fine/asonewouldexpect - but in Mint20, even though the same option is nominally available there too, the screen just flashes briefly and nothing happens. And sudo... does nothing better either.
So an option that you used in Mint 18 is still present in Mint 20 but does not work the same way?

Check the relevant release notes - if it's not documented a deliberate change, raise it as a bug.

 
Old 09-17-2021, 02:07 PM   #7
SlowCoder
Senior Member
 
Registered: Oct 2004
Location: Southeast, U.S.A.
Distribution: Debian based
Posts: 1,250

Rep: Reputation: 164Reputation: 164
I know, I'm late to this game. And I can't answer your specific question.

It seems like you're saying you are unable to get any GUI tools to run apps with elevated/root privilege. And you mention that sudo doesn't work as expected either? Did you previously make any changes around your security configuration or your sudoers configuration?

As far as running anything "as administrator" from the GUI, I'd ask why would you need/want to do that? I'm going to go old-school and say you probably should be using the CLI/terminal to run any privileged processes. You can even run GUI apps from the CLI using, for instance, 'sudo gedit'.

NOT RECOMMENDED due to safety: you can run 'sudo su -' in the CLI to obtain a persistent root prompt.
 
1 members found this post helpful.
Old 09-20-2021, 12:57 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
Quote:
Originally Posted by SlowCoder View Post
you can run 'sudo su -' in the CLI to obtain a persistent root prompt.
sudo su - is definitely deprecated.

Last edited by pan64; 09-20-2021 at 01:24 AM.
 
1 members found this post helpful.
Old 09-20-2021, 01:22 AM   #9
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Why not just
Code:
sudo -i
???
 
1 members found this post helpful.
Old 09-21-2021, 04:30 PM   #10
PaulFC5
Member
 
Registered: Feb 2008
Location: Auckland, Aotearoa/NZ
Posts: 98

Original Poster
Rep: Reputation: 13
Whatever variety of "su"+rootpassword or "sudo~~~" or "sudo -i" etc etc I try I always get the same result when trying to do what would appear to be an utterly "basic"/trivial task - ie to run gedit as root:
Quote:
gedit:9056): Tepl-WARNING **: 06:44:11.162: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.
And so the end result is always the same: I have to go back to my (still working ) Mint18 install (where "Run as administrator" always works as it should) and easily do whatever editing I want in that OS

And as to why one would ever want to run a GUI tool as root (which there are always warnings about doing ): I thought that that was just about the whole point of linuxes!!:
That you were perfectly free to be able to totally wreck/stuffup your whole OS ( by making some mistake) iffen you wanted to!!
And mainly, in practice, to be able to set it all up in just the way you might prefer.

Since I started using linuxes ≈20years ago (some version of Fedora/RedHat from memory) I have always almost automatically! expected/takenforgranted that one should be able to run GUI apps as root!.
In Mint13 or 18 I even got to the point of editing some file (I can't remember which now - something like "Allow Root log-in" or Root log-in = 1 or somesuch) to be able to get to a working root desktop whenever I wanted to do so - which I accept may be somewhat dangerous/questionable - I used to only do this for a few minutes - and, I guess, I spose that I should have always turned off the modem/router while doing so - which, I confess, I didn't usually do .
And it is a slight pain in the @#$% to not now be able to do this in my current "main" OS - and to have to go back to an "obsolete" version of the (excellent ) Mint to be able to do so.

And I have DuckDuckGo-d the above quoted warning about Tepl & GVfs etc etc with no more success!
And some GUI apps do work fine when calling them from a root-terminal - eg to move files around "mc" will run MidnightCommander well enough - as does caja.
I'm aware that this is all somewhat petty - it's just that I like to have my grub screen showing what I wish and in the way that I choose - and it is a slight annoyance, after ≈2 decades of enjoying several configurable linuxes, to have to go back to Mint18 or a DVD-booting linux to be able to achieve this!

PaulFC5
 
Old 09-22-2021, 01:51 AM   #11
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,804

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
Quote:
Originally Posted by PaulFC5 View Post
Whatever variety of "su"+rootpassword or "sudo~~~" or "sudo -i" etc etc I try I always get the same result when trying to do what would appear to be an utterly "basic"/trivial task - ie to run gedit as root:
looks like bad approach again. Running any app as root will not solve issues like this:
Quote:
gedit:9056): Tepl-WARNING **: 06:44:11.162: GVfs metadata is not supported.
Actually I don't recommend you to run gedit as root. I think gedit is not meant to do that at all (and it looks like gedit is having difficulty with that situation). And also the solution is provided: you should configure Tepl with --disable-gvfs-metadata.
Quote:
Originally Posted by PaulFC5 View Post
And so the end result is always the same: I have to go back to my (still working ) Mint18 install (where "Run as administrator" always works as it should) and easily do whatever editing I want in that OS
again, gedit is not meant to do that. Long time ago probably it worked, but now with increased security and complexity it is just "lost".
Quote:
Originally Posted by PaulFC5 View Post
And as to why one would ever want to run a GUI tool as root (which there are always warnings about doing ): I thought that that was just about the whole point of linuxes!!:
That you were perfectly free to be able to totally wreck/stuffup your whole OS ( by making some mistake) iffen you wanted to!!
And mainly, in practice, to be able to set it all up in just the way you might prefer.
That is wrong again. Obviously you can try to do whatever you want (for example play a song on the Moon), but that does not mean it is feasible.
Quote:
Originally Posted by PaulFC5 View Post
Since I started using linuxes ≈20years ago (some version of Fedora/RedHat from memory) I have always almost automatically! expected/takenforgranted that one should be able to run GUI apps as root!.
That is not (and never was) the regular way of working (run GUI apps as root) and therefore expecting it is a bit irreal.
Quote:
Originally Posted by PaulFC5 View Post
In Mint13 or 18 I even got to the point of editing some file (I can't remember which now - something like "Allow Root log-in" or Root log-in = 1 or somesuch) to be able to get to a working root desktop whenever I wanted to do so - which I accept may be somewhat dangerous/questionable - I used to only do this for a few minutes - and, I guess, I spose that I should have always turned off the modem/router while doing so - which, I confess, I didn't usually do .
a few minutes is more than enough to make your host useless.
Quote:
Originally Posted by PaulFC5 View Post
And it is a slight pain in the @#$% to not now be able to do this in my current "main" OS - and to have to go back to an "obsolete" version of the (excellent ) Mint to be able to do so.
Yes, it is pain in the @#$% to open and close the door when my car is strong enough to go thru.
I have to go back to my previous apartment when I had no garage at all.
Quote:
Originally Posted by PaulFC5 View Post
And I have DuckDuckGo-d the above quoted warning about Tepl & GVfs etc etc with no more success!
actually this is just a warning and you can safely ignore.

And finally this is the correct way yo use gedit:
Code:
gedit admin://<file>
https://easylinuxtipsproject.blogspo...bout-root.html
 
1 members found this post helpful.
Old 09-22-2021, 02:25 AM   #12
Dennis2
LQ Newbie
 
Registered: Apr 2018
Posts: 13

Rep: Reputation: Disabled
In Mint20 there is no root password, all Run as Adminstrator are run on your usual password.

You cannot run su in terminal without adding a root password.

Dennis
 
Old 09-23-2021, 01:10 AM   #13
PaulFC5
Member
 
Registered: Feb 2008
Location: Auckland, Aotearoa/NZ
Posts: 98

Original Poster
Rep: Reputation: 13
Dennis2 - one of the first things I always do on every linux install (for extra safety) is to set a separate root password - from memory the command is: "set passwd root".
Sure - "sudo" uses one's user password - but "su" uses the root password - iffen you've set one.

Thanx for that Pan64.
I'll think over all that .
But I should say that I'm not a complete digital "bunny" - I have by now been using computers for ½century+ (since, at uni, one had to have a shoebox full of fortran4 punched cards to do criticalpath analyses etc etc) - and I did successfully write most of my own graphics/proto-AI language in machine-code (only for the 8-bit Z80 chip - I couldn't get an assembler for it) ⅓century+ ago.
And so, as someone who is quite happy to do CLI stuff when it is needed!, I still maintain: that one of the best/mostpleasing features of linux OSs is their configurability!

One of the things I most enjoy about Mint is the fact that it has what to me is almost axiomatic in an OS!: having its taskbar across the bottom of the screen and with a "Start" button in the lower-left corner - a la winDoze3.11> etc etc. For a long time I used to enjoy using RedHat/Fedora (hence part of my LQ"name" being an abbreviation of FedoraCore5) until, sometime around FC14 I think, it became difficult/impossible to achieve this GUI desktop layout - so I switched to Mint - with which I have been quite happy - until Mint20's greater rigidity/"inflexibility" has now started annoying me slightly.

AAMOI your last suggestion:
Quote:
gedit admin://<file>
only gives much the same bunch of failure notifications as I always get.
I spose it's as you say: that gedit is simply too old/outdated to be able work properly in Mint20 - and I'll just have to keep going back to the Mint18 install to edit my grub.cfg file.
Which I seem to have to do quite often now - with Mint20's (rather pleasing ) habit of automatically updating the kernel every couple of weeks or so - which it seems to do without wrecking the nvidia driver - which my kernel updates have usually done until now. Though why it is such an "old" kernel isn't very clear to me - a more "stable" version I spose!

But one thing I regularly do for safety: is to take a full copy of every OS I have installed onto old spare whirlygig hdds - and, as I'm sure you can imagine! , there has been the occasional time when I've needed - and had to use! - these copies.
I obey the first 3 rules of PCs: (1) Backup, (2) Backup, and (3) Backup - together with Murphy's Law: if it can go wrong it probably will do so !
It's quite interesting to see how "fragmented" a winDoze install copied offof an ssd can be - ≈20+% - it can sometimes take over 2hours to defrag a winDoze ssd>hdd OScopy!

Cheers
PaulW

Last edited by PaulFC5; 09-23-2021 at 07:39 PM. Reason: Fuller reply
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba for Mint20 and Puppy Tahr sergedalle Linux - Software 9 11-10-2020 12:07 PM
"Linux Mint20 "initfrms unpacking decoding failed" zs5zk Linux - Newbie 2 09-27-2020 05:33 AM
sendmsg: operation not permitted - Mint 19.3/Mint20.0 drobble Linux - Networking 1 09-21-2020 05:05 AM
[SOLVED] Cannot instal;l software for Canon MF8230cn printer on linux mint20 DavidR001 Linux - Software 3 09-20-2020 08:34 PM
LXer: Using Mozilla Prism to Run Web Apps like Local Apps on Linux LXer Syndicated Linux News 0 03-24-2010 02:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 07:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration