Manipulating files owned by root in GUI.

GeoffinOz

New Member
Joined
Jun 21, 2023
Messages
27
Reaction score
2
Credits
293
Ok, I'm about ready to throw this thing at a wall.

I love the entire concept of Linux and generally love how well it works.

However.

Very simple things require truly ridiculous antics in a tiny text terminal and seem to require using a user angry command line text editor (the only kind linux terminal seems to have) to do simple things like edit a text file or even copy a file I just downloaded to an area (in this case /lib/sdrpp/plugins) that is for some reason owned by root.

I want to be able to do this from the GUI in thirty seconds and use a GUI based text editor. Yes, just like in Windows, because all these things are extremely easy there.

So, in detail.

Using DragonOS Focal (which seems to be Ubuntu under the hood).

Comes installed with a lot of radio specific stuff and it's very nice.

So, I download a plugin for SDR++ one of the SDR radio apps.
It goes to /home/downloads or whatever.

So first problem. I want to copy or move it to /lib/sdrpp/plugins where all the plugin files live.

So I right click copy and discover it won't paste there. No reason given, it just has the option greyed out.
After some minutes stuffing around I discover it's owned by root. Now, given I'm trying to do something that apparently requires root privs, I would expect it to pop a window like other apps that require that and ask for the root password. But no, it just doesn't work.

So I have to open that nasty terminal and after more stuffing around discover there's no actual 'copy' command. Instead after a while I discover the obscurely named mv which can apparently do what copy does in every OS since CP/M and then have to remember to precede it with sudo to make it work with root privs. Finally get the file copied over and then realise I need to rename it and discover there's no rename command either. Again it seems you have to use mv to change the name of a file. Pardon? What crackhead thought this was a good idea? It's extremely annoying having to write two long paths into the command line to do something that takes seconds in a gui.

Then I want to edit a text file that is also unfortunately owned by root. And that's where it gets worse.
I eventually installed nano which is marginally less user angry than the alternatives, but only marginally. Not to mention you can only see about six lines at a time and the commands are vague and I'm not always sure if I've saved it or not. I hate it.

I want this to be as easy as it is in Windows. I'm sure there's a conspiracy to drive new users crazy by requiring them to do everything non trivial (and some things that are trivial) in a two inch terminal window in a nasty excuse for an editor. Were GUIs not invented for a reason? To make it easy to do all these things? Yet for some reason Linux won't allow such things, you must use this ridiculous terminal and a nasty excuse for a command line or even nastier text editor to do the simplest of things.

So, is there a way to 1, Copy, move or rename files owned by root from the gui 2. edit text files with a nice, gui based text editor.

Because I am tired of using this terminal thing for trivial things and taking five times as long to do simple things than more complex things take in windows.
I'm not a programmer, I don't 'code', or at least not since TurboPascal close to thirty years ago and I consider C(any C) almost as cryptic as assembler, so I'm not even slightly interested in learning to code at almost 67. I just want to use the OS and make minor changes as needed EASILY. I can use command line stuff in Windows because I've done it since DOS 3.2, but this thing is getting to me because you can't do anything useful without Root and that means that bloody terminal, a command line and a disgusting excuse for a text editor.


Is there any hope out there, because I'm about ready to scream. It's not that I can't use terminal, I can, but I HATE it because its hard to do simple things without ridiculously complex command lines and worthless so called text editors and it's extremely frustrating. Or is there some way to just login to the entire system as root and forget about it?


Cheers

GeoffinOz
 


Which desktop does it use? some will have a root file manager in the menu others will need some work to get that done.
 
Something called LXQT. I thought this was Ubuntu based, but other things suggest Debian.
I don't see anything that suggests it's a root file editor, but I probably wouldn't recognise it just by name either.

Thanks for responding.


GeoffinOz
 
cp = copy in Linux

The problem is your GUI environment, only has the privileges you have.
So you can read these files, but you can't edit them usually.

One way around this is... launch your GUI editor from the CLI as the root user.
I can't give you the specific command because each desktop uses it's own editor.
In my case...

sudo pluma /path/to/file

( pluma is my GUI text editor )
 
Were GUIs not invented for a reason? To make it easy to do all these things?

I can give some examples where it is much easier to do some things from the CLI.
 
I don't know if it is frowned on, but I use the Terminal to open the Package Manager as Root. Then I can Cut, Copy and Paste and it will stick.

Your Package Manager might be PCManFM or PCManFm-QT

I use the command
Code:
sudo pcmanfm
or QT
 
cp = copy in Linux

I thought so too, but it didn't seem to exist. However, I just tried it again and this time it's there. Ok, maybe I dreamed it or something, I was pressed for time and I'd spent some of it already trying to do it with the gui and discovering I couldn't. So presumably, in terminal: sumo cp /presentlocation/filename /newlocation would work.

The problem is your GUI environment, only has the privileges you have.
So you can read these files, but you can't edit them usually.

One way around this is... launch your GUI editor from the CLI as the root user.
I can't give you the specific command because each desktop uses it's own editor.
In my case...

sudo pluma /path/to/file

( pluma is my GUI text editor )
Thank you, that helps. But copy and rename? I'd need to run the File Manager as root presumably? Is that even possible? I imagine it's already running if the GUI is up.

Yes, gui only has 'user' privs and that's the problem. With everything. I'd cheerfully just login as root so I could do such things without intermediate steps, but it doesn't seem to be possible (or maybe just not obvious)

Text editor seems to be something called Featherpad, it's not startling, but it's 40 years ahead of and easier than nano. What's more irritating is that you can open the file with it, or presumably any other editor, edit all you like and then discover it won't write the file because it's owned by root. So, you have to save it to desktop and bugger about with terminal and sudo cp or whatever.

Presumably I could just sudo featherpad and then browse to the file from within the editor?

Thanks for you response, appreciate your advice.

Regards

GeoffinOz
 
I don't know if it is frowned on, but I use the Terminal to open the Package Manager as Root. Then I can Cut, Copy and Paste and it will stick.

Your Package Manager might be PCManFM or PCManFm-QT

I use the command
Code:
sudo pcmanfm
or QT
 
Um, ok. I'm not sure how you use Package Manager to cut copy and paste but I'll take your word for it.

I'll give it a try. For some reason doing most anything as root seems to be seriously frowned on, I'm really not sure why this paranoia exists.

Thanks for responding.

Regards

GeoffinOz
 
I'd need to run the File Manager as root presumably? Is that even possible?

Again, it depends on your desktop environment.

sudo caja
sudo nautilus
sudo dolphin

... those are some of the common file managers.
 
Again, it depends on your desktop environment.

sudo caja
sudo nautilus
sudo dolphin

... those are some of the common file managers.
Ok, thank you. I'll try that. Appreciate your advice.


Regards

GeoffinOz
 
I'm really not sure why this paranoia exists.

It's the same way in Windows. There are things I can't do unless I have administrator privileges.
 
It's the same way in Windows. There are things I can't do unless I have administrator privileges.
When I use Windows, (daily, most of the day) I always have administrator privileges. Pleb user is too limiting and I don't use it, I want to fix something I've found, and to do so I have to close it out, logout and login as an Administrator. No thanks. But in this Linux it doesn't seem possible to login to the gui with that privilege level, or I'd have done just that. It would instantly solve all my issues.

One of the issues with Linux I've hit on is that you can't give any user account 'admin' privs. Only root has them. In the three main OS I've worked with, Windows, Netware and VMS, you could do that if you chose too, but apparently not in Linux, which is incredibly annoying.

Hmm, thinking about it, I accepted autologin to my 'user' account when I installed the OS, perhaps that was a mistake. Might redo it and leave it as require password, in theory that should give me the option to change the user name as well and login as root? Interestingly it doesn't ask for a password for 'root' well, not specifically anyway, just for the user account, but the root password (it prompts for it when installing packages etc) is the same as the one for my account.

Thanks again for your help.

Regards

GeoffinOz
 
I accepted autologin to my 'user' account when I installed the OS, perhaps that was a mistake. Might redo it and leave it as require password, in theory that should give me the option to change the user name as well and login as root? Interestingly it doesn't ask for a password for 'root' well, not specifically anyway, just for the user account, but the root password

Again, it depends on the distro, and the desktop environment.
Some desktops do not let you login as root.
I have gotten around this, by booting into a CLI environment as root, and then doing a "startx"
to start the GUI with root privileges.

I haven't installed Ubuntu in a while, but if I recall, it doesn't ask you to create a root passwd, it always
assumes you will use sudo.
Other distro's such as Redhat/Fedora require you to set a root password when you are installing the OS.
 
Your Package Manager might be PCManFM or PCManFm-QT

I believe you may have lacked enough coffee - or I have had too much coffee...

I believe our esteemed colleague meant 'file manager'.
 
I have been looking at distros lately, so why not DragonOS Focal? According to the SourceForge website, "DragonOS FocalX (22.04) and DragonOS Focal (20.04) are out-of-the-box Lubuntu based x86_64 operating systems for anyone interested in software defined radios."

https://sourceforge.net/projects/dragonos-focal/

That's where I stopped. It appears to be Lubuntu with specialty applications for operating software defined radios. I already know about Lubuntu, and my "software defined radio" sits on the nightstand with a clock and a built-in alarm. :-(

Ham radio must have moved beyond tubes, and I slept through it all.
 
Also, assuming it follows Lubuntu closely, the command should be:

Code:
sudo pcmanfm-qt

Lubuntu has used LXQt for a while now, but you can still install pcmanfm if you want.

More importantly, there are a zillion file managers out there. Many of them can be installed without brining in a ton of dependencies. Then, disk space is fairly cheap these days, so it's really not all that big of a deal if they do bring in dependencies.

The sky's the limit. Linux is pretty much zombo.com! You can do anything at zombo.com!
 
Also, assuming it follows Lubuntu closely, the command should be:

Code:
sudo pcmanfm-qt

Lubuntu has used LXQt for a while now, but you can still install pcmanfm if you want.

More importantly, there are a zillion file managers out there. Many of them can be installed without brining in a ton of dependencies. Then, disk space is fairly cheap these days, so it's really not all that big of a deal if they do bring in dependencies.

The sky's the limit. Linux is pretty much zombo.com! You can do anything at zombo.com!
Ok, well, I got it to run, however any attempt to browse anywhere gives you a big red x. And 'operation unsupported' in the terminal window. Sigh.

Thanks anyway, still open to ideas.

GeoffinOz
 
I have been looking at distros lately, so why not DragonOS Focal? According to the SourceForge website, "DragonOS FocalX (22.04) and DragonOS Focal (20.04) are out-of-the-box Lubuntu based x86_64 operating systems for anyone interested in software defined radios."

https://sourceforge.net/projects/dragonos-focal/

That's where I stopped. It appears to be Lubuntu with specialty applications for operating software defined radios. I already know about Lubuntu, and my "software defined radio" sits on the nightstand with a clock and a built-in alarm. :-(

Ham radio must have moved beyond tubes, and I slept through it all.
It's actually at version 30.x now. And yes, it's very good, and works a treat with USB SDR radio devices and does a whole range of things.

Well beyond 'tubes' (we call them valves outside the USA actually) and computers play a huge part, there's a whole range of digital modes, starting with the AX25 packet and a host of low signal stuff that can extract message from what sounds like just random noise. $50 for a half decent SDR receiver and an I5 from a few years back with 8gb of ram or so (though I've done it with a Core2 duo in 4gb and it still works) and you'd be surprised what you can do. I intercept and occasionally recover radiosondes this way.

GeoffinOz
 


Top