sudo gedit

Questions about applications and software
Forum rules
Before you post please read how to get help

sudo gedit

Postby milen on Wed Jul 09, 2008 4:14 pm

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
Happy Linux Mint User!!!!
milen
Level 1
Level 1
 
Posts: 33
Joined: Sat Jul 05, 2008 10:00 am

Linux Mint is funded by ads and donations.
 

Re: sudo gedit

Postby Fred on Wed Jul 09, 2008 4:18 pm

milen,

You should be using:

gksu gedit </folder/file>

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

Fred
Insanity: Doing the same thing over and over and each time expecting a different result.

Democracy is 2 wolves and a lamb voting on the menu. Liberty is an armed lamb protesting the electoral outcome. A Republic negates the need for an armed protest.
User avatar
Fred
Level 10
Level 10
 
Posts: 3356
Joined: Fri Jan 04, 2008 11:59 am
Location: NC USA

Re: sudo gedit

Postby milen on Wed Jul 09, 2008 6:45 pm

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
Happy Linux Mint User!!!!
milen
Level 1
Level 1
 
Posts: 33
Joined: Sat Jul 05, 2008 10:00 am

Re: sudo gedit

Postby Deirdre on Thu Jul 10, 2008 12:20 pm

i think gedit prefs are in ~/.gconf/apps/gedit-2
Deirdre
Level 1
Level 1
 
Posts: 26
Joined: Thu Jun 26, 2008 4:47 pm

Re: sudo gedit

Postby msuggs on Thu Jul 10, 2008 1:17 pm

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
msuggs
Level 5
Level 5
 
Posts: 882
Joined: Thu Jul 10, 2008 8:25 am
Location: non-local

Re: sudo gedit

Postby BigBird on Thu Jul 10, 2008 8:32 pm

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
User avatar
BigBird
Level 1
Level 1
 
Posts: 6
Joined: Mon Jun 09, 2008 7:58 am

Re: sudo gedit

Postby Husse on Fri Jul 11, 2008 6:56 am

You should not use sudo for GUI applications - under rare circumstances it can make it impossible to log in
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: sudo gedit

Postby milen on Fri Jul 11, 2008 4:36 pm

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
Happy Linux Mint User!!!!
milen
Level 1
Level 1
 
Posts: 33
Joined: Sat Jul 05, 2008 10:00 am

Re: sudo gedit

Postby msuggs on Fri Jul 11, 2008 5:51 pm

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 :)
msuggs
Level 5
Level 5
 
Posts: 882
Joined: Thu Jul 10, 2008 8:25 am
Location: non-local

Re: sudo gedit

Postby Husse on Sat Jul 12, 2008 9:24 am

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 :))
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19703
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: sudo gedit

Postby milen on Sat Jul 12, 2008 2:25 pm

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
Happy Linux Mint User!!!!
milen
Level 1
Level 1
 
Posts: 33
Joined: Sat Jul 05, 2008 10:00 am

Re: sudo gedit

Postby milen on Mon Jul 14, 2008 5:44 pm

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
Happy Linux Mint User!!!!
milen
Level 1
Level 1
 
Posts: 33
Joined: Sat Jul 05, 2008 10:00 am

Re: sudo gedit

Postby msuggs on Mon Jul 14, 2008 6:27 pm

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 :)
msuggs
Level 5
Level 5
 
Posts: 882
Joined: Thu Jul 10, 2008 8:25 am
Location: non-local

Re: sudo gedit

Postby milen on Tue Jul 15, 2008 7:07 am

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
Happy Linux Mint User!!!!
milen
Level 1
Level 1
 
Posts: 33
Joined: Sat Jul 05, 2008 10:00 am

Re: sudo gedit

Postby msuggs on Tue Jul 15, 2008 7:24 am

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
msuggs
Level 5
Level 5
 
Posts: 882
Joined: Thu Jul 10, 2008 8:25 am
Location: non-local

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: chenier, ES44AC8102, Google Adsense [Bot], jfcam, WinterTroubles and 21 guests