PDA

View Full Version : Opening folders as root in F26



RayCarling
4th October 2017, 08:13 PM
Hi,

Been a while since I've used Fedora, but I'm having trouble opening bashrc as root within the default GNOME GUI. I right click the etc folder and no option to open as root is there. How do I do this? I'm only doing this to get Screenfetch to display automatically upon opening my terminal. Thanks!

dswaner
5th October 2017, 02:36 AM
There is a package beesu which maybe would provide a means to do what you want:


Beesu is a wrapper around su and works with consolehelper under Fedora to let you have a graphic interface like gksu.

There are some ubuntu links which show something like:

gksu nautilus /etc/..., for root access to nautilus.

On the other hand, running a gui as root is discouraged, to my understanding.

solo2101
5th October 2017, 03:28 AM
try this in a terminal


su-
password:
nautilus

flyingdutchman
5th October 2017, 06:19 AM
Something like this should also work:
su -c nautilus

feddy
5th October 2017, 09:58 AM
I don't use Gnome but have similar problem using GUI filemanagers as root user.

Running form command line will give you some output when it does not work. It is likely that root does not have access to X11 if you logged in as basic user.

use xhost command to get output on who has rights to X.


xhost


You can add root with the following




xhost +SI:localuser:root

RayCarling
9th November 2017, 10:19 PM
try this in a terminal


su-
password:
nautilus


Sorry to reply so long after you've given advice.

My terminal doesn't even work any more--it just opens up and has a blinking cursor with no other characters at all visible, and never gives me the prompt like normal. Any idea why this would happen?

nsnbm
9th November 2017, 11:55 PM
My terminal doesn't even work any more--it just opens up and has a blinking cursor with no other characters at all visible, and never gives me the prompt like normal. Any idea why this would happen?

Perhaps try another terminal such as xterm, rxvt, roxterm ... there are heaps of them, though you may need to install one or more of them.

Alternatively bring up a virtual terminal by pressing Cntl+Alt+F4 (or another F number), log in and do what you need to do. To return to the GUI you press Alt+F2 (or another F number ... you can keep trying them until you get the right one).

lsatenstein
10th November 2017, 02:06 AM
If I understand your original post correctly...

You want to add something to /etc/bashrc. Here is some gleaning that works for me.

The rules are not to touch /etc/bashrc but to create a script within /etc/profile.d subdirectory and add what you want to the script.
Of course, being there, it's for everyone. It may contain alias settings, program names, etc.


On the other hand, if it is only for you...
vi ~/.bashrc (vi dot bashrc) and add your personalized items there.