PDA

View Full Version : can open gedit as root



Avidanborisov
February 19th, 2011, 05:52 PM
hi :)
I have a problem.
I cant open gedit as root.
i mean, if I just run

gedit
it works but if I run

sudo gedit
nothing happens.
what to do?

nick_goodfate
February 19th, 2011, 05:54 PM
try

gksu gedit

Avidanborisov
February 19th, 2011, 05:57 PM
still, nothing happens...

TeoBigusGeekus
February 19th, 2011, 05:58 PM
Any error messages?

Avidanborisov
February 19th, 2011, 06:01 PM
no,
just nothing happens..

TeoBigusGeekus
February 19th, 2011, 06:04 PM
Could gedit be already open by root?
Output of

ps aux | grep gedit
?

Avidanborisov
February 19th, 2011, 06:14 PM
OK, gedit is opened by root.
how do I close it?

TeoBigusGeekus
February 19th, 2011, 06:16 PM
sudo killall gedit
Repeat ps command. If it's still open, repeat killall command.

Avidanborisov
February 19th, 2011, 06:21 PM
Ok thanks :)
problem solved.

TeoBigusGeekus
February 19th, 2011, 06:23 PM
Brilliant! Don't forget to mark the thread as solved.

Avidanborisov
February 19th, 2011, 06:34 PM
hey,
I ran gedit again as root from terminal.
then when I went back to terminal i wanted to be able to write commands to it so I pressed Ctrl+Z.
This brought me back to the normal "user@machine$"
but it made gedit unresponsive so I closed it with Force Quit.
But then the same problem, I couldn't run gedit as root again.
When I typed

ps aux | grep gedit
it showed that the process is still running so I tried to do

sudo killall gedit
but that didn't help. The process was still running.
What to so?

TeoBigusGeekus
February 19th, 2011, 06:38 PM
sudo killall -s 9 gedit
Don't press ctrl-z; press the x button on the gedit window.

Avidanborisov
February 19th, 2011, 06:44 PM
Ok that helped :)
but just a general question:
when I launch a program from the terminal and I dont want to close the program but I want to be able to write again commands to terminal, what should I do?

TeoBigusGeekus
February 19th, 2011, 06:52 PM
You could just open another terminal.

sisco311
February 19th, 2011, 06:52 PM
Ok that helped :)
but just a general question:
when I launch a program from the terminal and I dont want to close the program but I want to be able to write again commands to terminal, what should I do?

Launch it in the background:

command &

You may want to redirect its output to /dev/null:

command &> /dev/null &

Check out:
http://mywiki.wooledge.org/ProcessManagement
and
http://mywiki.wooledge.org/BashGuide/JobControl

cgroza
February 19th, 2011, 06:55 PM
gnome-terminal supports multiple tabs, just open another one and do you things there.

ajgreeny
February 19th, 2011, 06:58 PM
Actually, it is much less confusing to start gedit with the Alt+F2 run utility and command gksu gedit, rather than terminal. That way you are not left with an open terminal under the gedit window.

TeoBigusGeekus
February 19th, 2011, 07:00 PM
Actually, it is much less confusing to start gedit with the Alt+F2 run utility and command gksu gedit, rather than terminal. That way you are not left with an open terminal under the gedit window.
...or add a launcher in your menus (something like "gedit as root") with

gksu gedit
as its command.

Avidanborisov
February 19th, 2011, 07:11 PM
...or add a launcher in your menus (something like "gedit as root") with

gksu gedit
as its command.

actually I already did that :)
I was just wondering if there is anyway to continue work in the terminal without quiting.
nevermind, I will just use a new tab.