You are not logged in.

#1 2022-01-14 02:15:26

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 779

Did I miss a discussion? No text editor & file manager as root?

Looking for the entries in the menu I went, vanished from beryllium they have.

pkexec geany fails to open display if tried in a terminal & geany isn't as helpful as Kate in KDE, who'll politely invoke a dialogue to elevate if you try to save somewhere you need to be root.

Yes I can open gmrun & put pkexec bl-text-editor  or pkexec thunar & that works.. (oddly pkexec bl-file-manager doesn't) but that's less than obvious to a new user of BL & not consistent either, & there are times geany is a tad handier than nano.

OK I know I can invoke either geany or thunar from a terminal using sudo, but using sudo to open graphical applications is frowned upon.

I never used either menu entry often.. but they're absolutely a boon when you need either thing as root.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#2 2022-01-14 02:59:40

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,591
Website

Re: Did I miss a discussion? No text editor & file manager as root?

Not in the menu, but in a Thunar window you can right-click a text file or directory and "open as root" to get Geany or Thunar as appropriate.

Yes there were extensive discussions GUI-as-root quite some time ago and this was the compromise we reached. Some argued that the only safe way to edit a text file as root was to use sudo nano in a terminal, others wanted to be able to open a root GUI on demand and decide what file to open later. Text editors seemed a bit less dangerous than file managers to be given root powers, so we added polkit config for bl-text-editor so any configured text editor (eg mousepad) could also be used. OTOH Thunar ships with polkit config of its own, while many other file managers don't, and we took this to mean the Thunar devs had at least thought about the security implications. Also, since we are now talking about Thunar custom actions, of course the right-click options won't be available in any other file manager set as bl-file-manager unless the user thinks about it and sets it up themselves. We no longer offer "terminal as root" either because it's so easy - and safer - to get root inside a terminal after opening one.

I think out-of-the-box the right-click options give the new user almost as much convenience as they had before, and no need to run pkexec commands at all.

Last edited by johnraff (2022-01-14 03:00:49)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#3 2022-01-14 03:09:34

hhh
Ol' Pink Eyes
Registered: 2015-09-17
Posts: 12,745
Website

Re: Did I miss a discussion? No text editor & file manager as root?

+1, right-click thunar or a file in thunar, "Open as root", done.


Does your physical disability preclude you from coming to the point?

Offline

#4 2022-01-14 03:25:10

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 779

Re: Did I miss a discussion? No text editor & file manager as root?

Terminal as root always seemed a pointless waste of a menu entry to me, & was usually slower to find than a normal terminal & just either sudo -l or sudo -i  according to why you want root & what for. I concur completely on that being dropped, it's redundant.  It's also so well hidden in some DEs it's easier to switch to a tty & login to that.

I think I concur when it comes to thunar too, after all right click isn't hard.

I'd have thrown in behind keeping a text editor as root entry though, particularly given pkexec geany doesn't work in run & gksu(do) has been dropped (you can substitute lxqt-sudo but it clashes with bunsen's theming).  Opening text /config files from thunar right click is all well & good, but I'm often on *very* resource limited old machines or virtual machines, I'd rather open *just* a  GUI text editor than have to wait for Thunar to open first...


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#5 2022-01-14 04:46:25

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,591
Website

Re: Did I miss a discussion? No text editor & file manager as root?

Bearded_Blunder wrote:

Opening text /config files from thunar right click is all well & good, but I'm often on *very* resource limited old machines or virtual machines, I'd rather open *just* a  GUI text editor than have to wait for Thunar to open first...

You can still do that if you don't want to open Thunar: 'pkexec bl-text-editor' works. Add your own custom menu entry. smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#6 2022-01-14 05:03:04

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 779

Re: Did I miss a discussion? No text editor & file manager as root?

There is that., I do know how,

Still anyone new to the distro is more likely to try 'pkexec geany' & have it fail than they are to know the magic word is 'bl-text-editor', then they'll be posting in help & support asking why their new custom menu entry didn't work.  Assuming they know pkexec is there & don't start off by asking what they can use now gksudo is gone from the repos.  Else they'll try sudo geany from a terminal, which depending on options set for sudo, is potentially damaging to their geany config (or the permissions/ownership therof).


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#7 2022-01-14 05:36:59

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,591
Website

Re: Did I miss a discussion? No text editor & file manager as root?

So you're asking we add polkit config specifically for geany? Just for the users who happen to know about pkexec, but haven't stumbled onto the right-click option, or know about bl-text-editor?

These changes were made a long time ago, certainly by Lithium, and there hasn't been a single request for help with running geany as root in that time.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#8 2022-01-14 06:03:14

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 779

Re: Did I miss a discussion? No text editor & file manager as root?

OK, maybe I thought there was / would be more demand for text editor as root than there is.
You wouldn't need to add a polkit config for geany if you had a text editor as root menu entry pointed at bl-text-editor though.

I'll probably just make such an entry on real hardware installs & go quiet, like many things it's not such a big deal.

I know polkit configs are a royal PITA to get written and right, i spent a lot of time playing with google altering some to be stupidly permissive trying to get things working on Buster.  Mind it could be worse, if you think polkit configs are a pain now wait till Debian advance the version, currently they're backporting changes from upstream to an old version in order to stick with the older config format, which tells you what a pain the new format is.  That's why there's such a huge version jump between what's in Experimental & what's in SID.  Basically the instant they go past 105, it screws everyone over.  Experimental is up to 120. 

I wouldn't wish writing polkit configs that aren't needed on anyone, yuk.  Had my druthers, we'd still be using the likes of gksudo rather than policykit at all.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#9 2022-01-14 07:47:19

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,591
Website

Re: Did I miss a discussion? No text editor & file manager as root?

The current (already osolescent) polkit config isn't too bad by comparison with the javascript files we'll be obliged to write some day. roll


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#10 2022-01-14 14:56:43

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 779

Re: Did I miss a discussion? No text editor & file manager as root?

johnraff wrote:

The current (already osolescent) polkit config isn't too bad by comparison with the javascript files we'll be obliged to write some day. roll

Don't I know it! I'll give you three guesses why you never saw a how-to for early Buster without systemd.
Clue: I had to compile the upstream version from Experimental to make polkit work at all, the changes to support elogind hadn't been backported in yet even in SID.

Said how-to was like a book, & the alternative with all the workarounds to run with polkit broken was even longer.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#11 2022-01-14 15:10:51

rbh
Moderator
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 1,344

Re: Did I miss a discussion? No text editor & file manager as root?

Bearded_Blunder wrote:

Still anyone new to the distro is more likely to try 'pkexec geany' & have it fail than they are to know the magic word is 'bl-text-editor',

I think I need to add a section "Run as root" in Introduction to the Bunsenlabs Lithium Desktop


// Regards rbh

Please read before requesting help: Guide to getting help,
Introduction to the Bunsenlabs Lithium Desktop and other help topics under "Help Resources" on the BunsenLabs menu

Offline

#12 2022-01-15 02:58:09

hhh
Ol' Pink Eyes
Registered: 2015-09-17
Posts: 12,745
Website

Re: Did I miss a discussion? No text editor & file manager as root?

rbh wrote:
Bearded_Blunder wrote:

Still anyone new to the distro is more likely to try 'pkexec geany' & have it fail than they are to know the magic word is 'bl-text-editor',

I think I need to add a section "Run as root" in Introduction to the Bunsenlabs Lithium Desktop

Good idea.


Does your physical disability preclude you from coming to the point?

Offline

#13 2022-01-16 06:54:55

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,591
Website

Re: Did I miss a discussion? No text editor & file manager as root?

I forgot to mention: apart from Thunar's right-click, there's also an "Open as root" item in geany's Build menu (BunsenLabs extra cool). Saves some time if you're already looking at the file in a non-root geany.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#14 2022-01-16 07:32:51

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 779

Re: Did I miss a discussion? No text editor & file manager as root?

Thanks, for the tip, I never once thought of looking in the build menu.  TBH most of the stuff I do that wants syntax highlighting I do on Windows in Scite because it's what I'm used to, even Linux stuff, & just paste into the VM when I'm done.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

#15 2022-01-16 07:52:11

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 8,591
Website

Re: Did I miss a discussion? No text editor & file manager as root?

^I used to use SciTE on Windows 98 and liked it. Geany is based on the same Scintilla code I think.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), idle Twitterings and GitStuff )

Introduction to the Bunsenlabs Lithium Desktop

Offline

#16 2022-01-16 07:53:55

Bearded_Blunder
Dodging A Bullet
From: Seat: seat0; vc7
Registered: 2015-09-29
Posts: 779

Re: Did I miss a discussion? No text editor & file manager as root?

I haven't got round to adding it yet, it's in the repos though.


Blessed is he who expecteth nothing, for he shall not be disappointed...
If there's an obscure or silly way to break it, but you don't know what.. Just ask me

Offline

Board footer

Powered by FluxBB