LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   gedit not opening from terminal - not authenticated (https://www.linuxquestions.org/questions/linux-newbie-8/gedit-not-opening-from-terminal-not-authenticated-4175530980/)

Higgsboson 01-14-2015 06:17 AM

gedit not opening from terminal - not authenticated
 
I have just installed a new debian OS and want to change a file.
For some reason, gedit didn't come pre-packaged so I installed it with apt-get.

When I use a terminal as root, gedit won't open. I get the following error message:
Code:

gedit grub
(gedit:3679): EggSMClient-WARNING **: Failed to connect to the session
manager: Authentication Rejected, reason : None of the authentication
protocols specified are supported and host-based authentication
failed

Gedit will open page files on the desktop - but not on the terminal.
Is this because I haven't done something with the new install or should I remove gedit and reinstall?

brianL 01-14-2015 06:22 AM

Did you try:
Code:

gksu gedit

Higgsboson 01-14-2015 06:44 AM

Quote:

Originally Posted by brianL (Post 5300728)
Did you try:
gksu gedit

It's funny but both 'gksu' and 'gksudo' aren't recognised as commands:
Code:

gksu gedit grub
bash: gksu: command not found
gksudo gedit grub
bash: gksudo: command not found

I'm using xfce GUI - I hope that doesn't have anything to do with it.
On a different debian install, I think gksudo tends to work.

yancek 01-14-2015 07:00 AM

Quote:

I'm using xfce GUI - I hope that doesn't have anything to do with it.
I believe the default file manager in xfce is thunar and the default text editor is leafpad or mousepad. There should be several text editors available and you should be able to find them from from your Debian menu under editors or text editors. Something is amiss though if you correctly installed gedit and it won't open files. You might try one of the other text editors to ensure that it is just gedit. I don't use Debian so can't really be much help.

Some alternative options at the Debian forums, link below. Scroll down to the post by user kedaha which shows the same error message you posted and several options to get around it.

http://forums.debian.net/viewtopic.php?f=17&t=105850

brianL 01-14-2015 07:00 AM

Try (as root, of course):
Code:

apt-get install gksu
I think it should work in xfce.

Higgsboson 01-14-2015 09:32 AM

Quote:

Originally Posted by yancek (Post 5300749)
I believe the default file manager in xfce is thunar and the default text editor is leafpad or mousepad.
Some alternative options at the Debian forums, link below. Scroll down to the post by user kedaha which shows the same error message you posted and several options to get around it.

I used mousepad for the text editor as root. But it told me not to make changes to source with the text editor.
So I switched to user and and opened mousepad. But it wouldn't allow me to make changes - probably because I don't have permission!

This has been useful.
I found you need to enter root with
Code:

su -
The hyphen is important.
After that you can use gedit to make changes to files:
Code:

gedit <filename>
This is unconventional and I'm sure I'll forget it soon!

Higgsboson 01-14-2015 09:36 AM

Quote:

Originally Posted by brianL (Post 5300750)
Try (as root, of course):
apt-get install gksu
I think it should work in xfce.

I installed gksu and was surprised it wasn't installed already.
However, I still got an error message with gksu.
I eventually used the archaic vi editor after several attempts.
But I think the 'su -' command will allow you to open gedit without problems.

Fred Caro 01-14-2015 08:55 PM

Great it works. A thought though, on the GUI what applications are used is often dictated by the enteries in the 'main menu' "app", make sure gedit is ticked to use it via gksu or gksudo -the two are different and relate to if you installed with a separate root password or used sudo.

Fred.

nano text editor is probably accessable and lot easier to use than vi.

yancek 01-15-2015 12:41 PM

If you want to edit system files you need to log in as root and that applies to pretty much anything outside the /home/user directory.


All times are GMT -5. The time now is 11:07 AM.