Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 581016 - app-admin/eselect eselect editor set needs root privileges
Summary: app-admin/eselect eselect editor set needs root privileges
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: eselect (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo eselect Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-24 09:15 UTC by Nikolay
Modified: 2016-04-25 07:20 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nikolay 2016-04-24 09:15:37 UTC
When I try change default editor through eselect, I got error: "!!! Error: You need root privileges!"

user $ eselect editor list
[1]   /usr/bin/ex
[2]   /usr/bin/vi
[ ]   (free form)

user $ eselect editor set 2
Setting EDITOR to /usr/bin/vi ...
!!! Error: You need root privileges!
exiting

Documentation: "Each user can also set their own default editor with the eselect utility. "

https://wiki.gentoo.org/wiki/Text_editor#User
Comment 1 Alan Neilan 2016-04-24 15:58:38 UTC
that's because it's modifying the variable in /etc/profile (i think).
Comment 2 Jonas Stein gentoo-dev 2016-04-24 20:41:16 UTC
The last line in the wiki remarks:

==
Actually eselect modifies the file above. It seems that the old method of editing rc.conf doesn't work any more. 
==

I could not find a better source of documentation than the wiki for the editor variable. The wiki should be updated as soon as we know more.
Perhaps ulm can help in this case?
Comment 3 Ulrich Müller gentoo-dev 2016-04-25 07:20:08 UTC
I guess the confusion is due to the dichotomy that somebody with root privileges is still called a "Gentoo user" (in contrast to a developer).

"eselect editor" will update the system default for the EDITOR variable, which is set in the /etc/env.d/99editor file. root privileges are needed for that.

So, not a bug in eselect, but the wiki page should be clarified. (You can do this yourself, therefore closing this bug.)