LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 07-04-2021, 06:39 PM   #1
Snugbug
Member
 
Registered: May 2020
Posts: 97

Rep: Reputation: Disabled
Kubuntu 21.04 - How to get terminal back from root to username?


Usually, I open the terminal with CTRL+ALT+T.
Then, the prompt says:
Code:
username@computername:~#
But after I opened a folder (doesn't matter, which one) with root privileges, even after that folder is closed again, I get the following prompt, when opening the terminal with the above keyboard shortcut.
Code:
root@computername:/#
How can I get back to the ordinary one automatically, after the folder, opened with root privileges, is closed and without rebooting, please?

Last edited by Snugbug; 07-04-2021 at 07:03 PM.
 
Old 07-04-2021, 07:32 PM   #2
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
I don't think
Code:
exit
will work for you there but you could run a command to open new terminal or tab as user?

E.g: https://askubuntu.com/questions/7145...b-as-same-user or more searching? I used: add tab as another user terminal

 
Old 07-04-2021, 08:28 PM   #3
GentleThotSeaMonkey
Member
 
Registered: Dec 2016
Posts: 338
Blog Entries: 4

Rep: Reputation: 128Reputation: 128
How *exactly* did you "open a folder" *as root*?

What *exactly* (in maximum detail)
did you do
to "open a folder with root privileges"
?

I think that may reveal what is happening.

Did you run the `su` cli command?
Did you *log in* to the (whole) GUI as root?

I web-searched my quoted question & found this
https://forum.peppermintos.com/index.php?topic=5766.0
But I doubt if it's the same situation (it's obscure&convoluted)
But it may help you understand my question.

p.s. Oh, an idea: at that UNwanted root prompt:
su - <username>

Let us know....

Last edited by GentleThotSeaMonkey; 07-04-2021 at 08:30 PM.
 
Old 07-05-2021, 02:03 AM   #4
Snugbug
Member
 
Registered: May 2020
Posts: 97

Original Poster
Rep: Reputation: Disabled
@ GentleThotSeaMonkey
Here's what I did:
I booted into Kubuntu in the ordinary way and also logged in there with my ordinary username and the according password. It's btw. a single user system, so there's only me there.
When I did it the first time, I couldn't find a context option to "open a folder as root". I found that option in the settings of Dolphin, within the new services of Dolphin (as a download) and added that option accordingly. As a result the missing option was present, now.
Then I opened a root folder (*) using this added option. But each time I'm doing this, the terminal always opens with the root prompt, as mentioned above. So far, the only way to fix this is by rebooting Kubuntu.

(*) Rem.: I need this mainly during the configuration of a newly installed distro, to fix for example the launcher of the Easystroke tool (in /usr/share/applications), because I have to remove a switch there at the end of the Exec line to let Easystroke start minimized to tray, i.e. without showing its configuration window.

EDIT:
To reproduce this, do the following:
Hit CTRL+ALT+T to verify that the terminal is opening normally. Close it.

Go to /usr/share/application and open one of the launchers there with Kate (no need to edit anything there). Close Kate and this folder.

Hit the mentioned shortcut again.
You will probably notice, the terminal is opening differently now.

su - <username> does indeed work, but only for the currently opened terminal. As soon as I close the terminal and open it again, the root prompt is back.

Last edited by Snugbug; 07-05-2021 at 06:24 AM.
 
Old 07-05-2021, 04:49 AM   #5
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Think you made it more confusing?

https://docs.xfce.org/xfce/thunar/custom-actions
 
Old 07-05-2021, 06:13 AM   #6
Snugbug
Member
 
Registered: May 2020
Posts: 97

Original Poster
Rep: Reputation: Disabled
@ jamison20000e
Please don't forget, this is about Kubuntu 21.04, which means, it's a KDE, not XFCE. Therefore, there's no Thunar and no custom actions in Kubuntu. Instead of that, there's Dolphin with some services available there. In its context menu, there is no option "Open as root", originally. I had to download and install this option as a new service.

EDIT: Sorry, I have to apologize for confusing Thunar with Dolphin in #4. Of course it is Dolphin. I fixed this mistake already in #4.

Last edited by Snugbug; 07-05-2021 at 06:27 AM.
 
Old 07-05-2021, 08:15 AM   #7
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
K. I figured you had just installed Thunar, as I often do.
Code:
sudo thunar
no 3rd or 4th parties needed...
 
Old 07-05-2021, 11:54 AM   #8
Snugbug
Member
 
Registered: May 2020
Posts: 97

Original Poster
Rep: Reputation: Disabled
Actually, I'd prefer Dolphin, which is the intended file manager for Kubuntu. If somebody has an idea, how to fix the problem with Dolphin, let me know, please.
 
Old 07-05-2021, 03:21 PM   #9
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Post

Quote:
... "open a folder as root". I found that option in the settings of Dolphin, within the new services of Dolphin (as a download) and added that option accordingly. ...
I* can only assume this is the addon: ("Download New Services...":) https://store.kde.org/p/1384645/ KDE, especially *buntu will take us in many directions not planed by the operating systems "maintained" package manager.

I.e:
Quote:
[flightofthenavig@tor applications]$ sudo dolphin
[sudo] password for h:
Executing Dolphin with sudo is not possible due to unfixable security vulnerabilities.
So, I'm also assuming that for us to reproduce your error we'd need to install "run as root" from Dolphin's settings? (Not recommended. Nor do I *buntu. )

Opining one of those.desktop files "properly" as root, me:
Code:
sudo vi
as kate:
Quote:
Executing Kate with sudo is not possible due to unfixable security vulnerabilities. It is also not necessary; simply use Kate normally, and you will be prompted for elevated privileges when saving documents if needed.
plus many other things I just tried have not reproduced minus your misuses...

Links I found searching:
http://www.timelessguru.com/easystroke
https://askubuntu.com/questions/6111...ser-privileges
not to waste, could help?
 
Old 07-05-2021, 04:28 PM   #10
Snugbug
Member
 
Registered: May 2020
Posts: 97

Original Poster
Rep: Reputation: Disabled
Quote:
* can only assume this is the addon: ("Download New Services..." https://store.kde.org/p/1384645/ KDE, ...
Indeed, it looks like the one, I installed, but I didn't get it from your link, but from the Dolphin settings->Configure Dolphin->Services->Download new services.
There are two versions available there, but the other one is meant for Plasma 4, but since Kubuntu 21.04 is using Plasma 5, I took the according one, of course.

Quote:
So, I'm also assuming that for us to reproduce your error we'd need to install "run as root" from Dolphin's settings?
This should be only a minor issue, if you create a Timeshift backup first, just for the very unlikely worst case.
Or maybe a virtual box installation of Kubuntu will do for such a test.

Not exactly sure about it, but currently, it looks like there's only the /usr/share/applications folder involved in this (got no idea, why!), because I just installed the Hibiscus home banking tool in Kubuntu manually, where I had to extract the program folder, called /jameica, from the downloaded zip and paste it into /opt.

Prior to this, I copied the ~/.jameica profile from a previously used Mint installation into my home folder of Kubuntu and then Hibiscus was instantly running perfectly.

To copy the extracted /jameica folder into /opt, I had to use the "Open as root" option of Dolphin.
But afterwards, testing the terminal again, there was still the ordinary user prompt.

Rem.: If anybody is confused about Jameica and Hibiscus, ... Jameica is sort of a JAVA platform and Hibiscus is a home banking plugin of Jameica.

EDIT:
Quote:
Executing Kate with sudo is not possible due to unfixable security vulnerabilities. It is also not necessary; simply use Kate normally, and you will be prompted for elevated privileges when saving documents if needed.
Yes, I realized this, too, the other day.

After examining this issue for a few days now, finally, I also realized, I don't need an option to open Dolphin as root in Kubuntu.
Just edit a file as you wish, save it and if root, respectively its password, is needed, Kubuntu will ask you for it.

More and more, I'm coming to the conclusion, I better just uninstall that added service from Dolphin and everything will be fine.

Again, sorry, for my mistake about Thunar. Hopefully, nobody took it personally.

Last edited by Snugbug; 07-05-2021 at 04:50 PM.
 
Old 07-05-2021, 05:19 PM   #11
lovemeslk
Member
 
Registered: Feb 2020
Location: Rantoul IL
Distribution: Slackware
Posts: 350

Rep: Reputation: 72
Quote:
Originally Posted by Snugbug View Post
Actually, I'd prefer Dolphin, which is the intended file manager for Kubuntu. If somebody has an idea, how to fix the problem with Dolphin, let me know, please.
You will have to recompile dolphin and patch it. Or use slackware.
Unthinkable to deny root user access. Just nuts.
Attached Files
File Type: txt dolphin_revert_noroot.patch.txt (1.3 KB, 5 views)

Last edited by lovemeslk; 07-05-2021 at 05:21 PM.
 
Old 07-05-2021, 05:25 PM   #12
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
I haven't used that setting in dolphin for sometime but remember it warning me from code to code ta know and trust the sources ourselves.

Last edited by jamison20000e; 07-05-2021 at 05:26 PM. Reason: Type0
 
Old 07-05-2021, 05:36 PM   #13
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
There's more than one way to kill a future timeline 🐝 or skin a flee for that matter?

https://askubuntu.com/questions/9906...olphin-as-root
 
Old 07-06-2021, 06:57 AM   #14
Snugbug
Member
 
Registered: May 2020
Posts: 97

Original Poster
Rep: Reputation: Disabled
I also wonder, why there's no such an option in Kubuntu. I know several other distros and all of them do have this option "open as root".
This means, all of these other distros ignore the mentioned security issues? Can't be so dangerous then, can it?

Last edited by Snugbug; 07-06-2021 at 11:10 AM.
 
Old 07-06-2021, 07:54 AM   #15
jamison20000e
Senior Member
 
Registered: Nov 2005
Location: ...uncanny valley... infinity\1975; (randomly born:) Milwaukee, WI, US( + travel,) Earth&Mars (I wish,) END BORDER$!◣◢┌∩┐ Fe26-E,e...
Distribution: any GPL that work on freest-HW; has been KDE, CLI, Novena-SBC but open.. http://goo.gl/NqgqJx &c ;-)
Posts: 4,888
Blog Entries: 2

Rep: Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567Reputation: 1567
Microcoughed makes it harder to login as the administrator but I'm pretty sure you can open explorer as the admin from a user login; canonical knows better?

One problem with Linux is it goes in so many directions. Another only someone whould say, is it's become mainstream?

Android you have to root.
 
  


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
Why "bash-2.05b$" in Terminal instead of "username@localhost username" jayelitumbiolo Linux - General 9 10-04-2009 03:16 AM
How can I match username from username/ ? abefroman Linux - Newbie 2 04-26-2009 09:10 PM
fedora 8 asking username but during installation i dint give any username ?? herevenku Linux - Newbie 2 08-25-2008 04:37 AM
Differance between su <username> and su <username> - guguma Linux - General 3 08-19-2007 01:01 PM
useradd: invalid username username$ engyeow Fedora 5 12-05-2004 04:35 AM

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

All times are GMT -5. The time now is 03:24 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