On 05/28/2015 01:03 AM, Andrei Borzenkov wrote:
В Wed, 27 May 2015 15:06:01 -0700 Linda Walsh <suse@tlinx.org> пишет:
tried editing a file as root:
sudo gvim /etc/fstab Error detected while processing /usr/share/vim/vim74/menu.vim: line 354: E327: Part of menu-item path is not sub-menu E233: cannot open display
Default sudo configuration in openSUSE does not preserve DISPLAY environment variable.
Indeed. Cracked record time. RTFM. <quote> -E, --preserve-env Indicates to the security policy that the user wishes to preserve their existing environment variables. The security policy may return an error if the user does not have permission to preserve the environment. </quote> Simple to test: $ sudo -E bash -c 'echo $DISPLAY' Do note the single quotes And also, perhaps more manageable and specific <quote> Environment variables to be set for the command may also be passed on the command line in the form of VAR=value, e.g.LD_LIBRARY_PATH=/usr/local/pkg/lib. Variables passed on the command line are subject to restrictions imposed by the security policy plugin. The sudoers policy subjects variables passed on the command line to the same restrictions as normal environment variables with one important exception. If the setenv option is set in sudoers, the command to be run has the SETENV tag set or the command matched is ALL, the user may set variables that would otherwise be forbid-den. See sudoers(5) for more information. </quote> -- A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting frowned upon? -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org