Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved] Trying to set default editor.
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
percy_vere_uk
Apprentice
Apprentice


Joined: 13 Dec 2008
Posts: 210
Location: Dorset UK

PostPosted: Mon Aug 25, 2014 12:21 pm    Post subject: [solved] Trying to set default editor. Reply with quote

Hi

I am using gentoo_64bit with an xfce4 desktop and have been trying to set gedit as the system wide default editor.

I have set the default editor using eselect and 'eselect editor show' gives /usr/bin/gedit both in both a terminal and a root terminal.

This works fine and I get gedit each time I open a file as an ordinary user.

But as root I keep getting 'LibreOffic Writer'as the editor.

Any help would be appreciated.

percy


Last edited by percy_vere_uk on Thu Aug 28, 2014 12:33 pm; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Aug 25, 2014 9:43 pm    Post subject: Reply with quote

What does
Code:
echo $EDITOR
print, both for a regular user and for root?

Also, could you clarity whether you're seeing anomalies when editing files within Xfce, or are you seeing the Gentoo tools (e.g., etc-update, dispatch-conf) using an editor other than that specified by "eselect editor".

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
VoidMage
Watchman
Watchman


Joined: 14 Oct 2006
Posts: 6196

PostPosted: Mon Aug 25, 2014 11:12 pm    Post subject: Reply with quote

More exactly, elaborate what does
percy_vere_uk wrote:
But as root I keep getting 'LibreOffic Writer'as the editor.
mean for you, cause if that's actually mimetype problem, the solution lies in a completely different direction.
Back to top
View user's profile Send private message
percy_vere_uk
Apprentice
Apprentice


Joined: 13 Dec 2008
Posts: 210
Location: Dorset UK

PostPosted: Tue Aug 26, 2014 12:44 pm    Post subject: Reply with quote

John R. Graham

Code:
$ echo $EDITOR  /usr/bin/gedit
# echo $EDITOR  /usr/bin/gedit


The only anomaly I have found when editing files is the one I have mentioned.



VoidMage

"But as root I keep getting 'LibreOffic Writer'as the editor."

This means that if I click on a text file as root I get 'LibreOffic Writer' come up as the editor.
I can select gedit by right clicking on the text file it but this action is only required when root.

percy
Back to top
View user's profile Send private message
Roman_Gruber
Advocate
Advocate


Joined: 03 Oct 2006
Posts: 3846
Location: Austro Bavaria

PostPosted: Tue Aug 26, 2014 3:16 pm    Post subject: Reply with quote

check your home directory of root, that is usually /root for some hidden files starting with a dot. If you are nasty and do not care for any settings for user root you can even delete those dot files in the folder root, but I do not recommend it.
Back to top
View user's profile Send private message
percy_vere_uk
Apprentice
Apprentice


Joined: 13 Dec 2008
Posts: 210
Location: Dorset UK

PostPosted: Wed Aug 27, 2014 1:43 pm    Post subject: Reply with quote

tw04l124

I have looked in the /root hidden files and cannot see anything referring to 'LibreOffic Writer'as the editor."
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10589
Location: Somewhere over Atlanta, Georgia

PostPosted: Wed Aug 27, 2014 1:56 pm    Post subject: Reply with quote

See the very first result from Googling "Setting Default Editor in Xfce". Does that work for you?

The environment variables manipulated by "eselect editor" are not a desktop mechanism and it often requires a desktop-specific mechanism to effect such changes.

Just as an aside, it's considered bad form (because of security risks) to run full-up desktop environments as root.

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
percy_vere_uk
Apprentice
Apprentice


Joined: 13 Dec 2008
Posts: 210
Location: Dorset UK

PostPosted: Thu Aug 28, 2014 12:32 pm    Post subject: Reply with quote

John R. Graham

Thank you.

It was so simple in the end, I think I must have tried everything but!

Code:
Right click on a root text file select properties then open with gedit 

I only had to do this once now all text files in /root open with gedit.


Thanks for all your input on this folks.

percy
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum