sudo gedit

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
milen

sudo gedit

Post by milen »

Hello !

Recently I have a problem :(
When I try

$ sudo gedit <file>

it hangs.... Sometimes it opens gedit but after a long wait and after that it not responds. I'm using LinuxMint 5 . I have reinstalled both sudo and gedit - didn't solve the problem....

Any ideas what's going on?
Thank you.

Milen
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Fred

Re: sudo gedit

Post by Fred »

milen,

You should be using:

gksu gedit </folder/file>

Try that and see if it works better for you my friend.

Fred
milen

Re: sudo gedit

Post by milen »

Hello again.

It displays a window that asks for a pass, but after that - the same.... Strange, it was working, maybe during an update I overwrote some settings?

Milen

EDIT: Tried with

$sudo emacs

works....

Tried to

$apt-get autoremove gedit
$apt-get install gedit

didn't solve the problem :( I think I must reset my preferences for gedit but don't know how....

Milen
msuggs

Re: sudo gedit

Post by msuggs »

Deirdre wrote:i think gedit prefs are in ~/.gconf/apps/gedit-2
Trash the gedit-2 folder in this location then start gedit again. This should fix your problem
BigBird

Re: sudo gedit

Post by BigBird »

I went to the Mint menu, selected 'Preferences, scrolled down to 'Nautilus Actions Config...'. You can add an action here and I chose "Edit as root". There is already an "Open as root" option which I copied(wrote it down) and for the command I just changed 'gksu xfe' to 'gksu gedit' and have had no problems. I added this tooltip - Be Extremely Careful Using This! It gives you a right-click way to edit a file as root in Nautilus.

Good Luck
Husse

Re: sudo gedit

Post by Husse »

You should not use sudo for GUI applications - under rare circumstances it can make it impossible to log in
milen

Re: sudo gedit

Post by milen »

Hello !

Thank you all for the help. The last 2 days I had no time to try to fix it but tomorrow I'll play with it and will post the results.

Milen
msuggs

Re: sudo gedit

Post by msuggs »

Husse wrote:You should not use sudo for GUI applications - under rare circumstances it can make it impossible to log in
I've never heard of that. How could that happen? Just curious :)
Husse

Re: sudo gedit

Post by Husse »

It's very uncommon but I have helped more than two people on the forum with the problem
For some reason that I don't remember and that is a bit obscure it could compromise the .ICEauthority and/or .Xauthority files in /home/your_username
If they are borked you can't log in
The solution is simple - boot the live CD and delete them (but please don't do that just for fun :))
milen

Re: sudo gedit

Post by milen »

Hello !

I tried to delete ~/.gconf/apps/gedit-2 directory , and reinstalling gedit -> did not solve the problem :( gksu gedit and gksudo gedit does not work. Well after some minutes (not less than 5) it opens gedit but it does not respond :( With emacs it works. Am I doing something wrong? I go and trash the gedit-2 folder, then I go to synaptic and reinstall gedit.

Thanks,

Milen
milen

Re: sudo gedit

Post by milen »

Hello !

Today I received this message when running gedit as root:

(gedit:14362): GnomeUI-WARNING **: While connecting to session manager:
Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed.

Any ideas?

Milen
msuggs

Re: sudo gedit

Post by msuggs »

A good way to test if it is user based settings that are causing the problem would be to create another user account and then login as that user and see if you still have the same problem. Try this and report back :)
milen

Re: sudo gedit

Post by milen »

Hello !
omns wrote:A good way to test if it is user based settings that are causing the problem would be to create another user account and then login as that user and see if you still have the same problem. Try this and report back :)
Thank you for the clue ! I did that and found that it works with the new account. I don't find ~/.gconf/apps/gedit-2 folder under the new user's home.

What's next :)

Milen
msuggs

Re: sudo gedit

Post by msuggs »

Do you have a file or folder in /tmp called something like this? - gedit.root.3213543513

If so, delete it and see if it makes a difference
Locked

Return to “Software & Applications”