Re: [gentoo-user] Root cannot open display
On Tue, Mar 01, 2005 at 05:45:08PM -0500, A. Khattri wrote: > I usually do > > :set noautoindent > > from within vi when I need to paste in insert mode. In vim at least, I believe :set noai also works as a nice short hand. Another nice command is :set paste which implies noai but also prevents line wraps, which, although not a problem in C, could cause a LOT of pain in shell scripts. W -- * Address: 45 Spelman Hall, Princeton University 08544 * * Phone: x68958 AIM: AngularJerk* *E-mail: [EMAIL PROTECTED]From: sep.dynalias.net * "`Er, hey Earthman...' `Arthur,' said Arthur. `Yeah, could you just sort of keep this robot with you and guard this end of the passageway. OK?' `Guard?' said Arthur. `What from? You just said there's no one here.' `Yeah, well, just for safety, OK?' said Zaphod. `Whose? Yours or mine?'" - Arthur drawing the short straw on Magrathea. Sortir en Pantoufles: up 6 days, 14:42 -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Root cannot open display
On Tue, 1 Mar 2005, darren kirby wrote: > quoth the Bill Roberts: > > > > > Alternately, is there some way of copying nicely into vim from code I > > find on the internet. > > Edit /etc/vim/vimrc and comment out with a double quote mark --> " the line: > set ai " Always set auto-indenting on > > Now code will paste properly. I usually do :set noautoindent from within vi when I need to paste in insert mode. -- -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Root cannot open display
quoth the Bill Roberts: > > Alternately, is there some way of copying nicely into vim from code I > find on the internet. Edit /etc/vim/vimrc and comment out with a double quote mark --> " the line: set ai " Always set auto-indenting on Now code will paste properly. > Thanks in advance > > Bill Roberts -d -- darren kirby :: Part of the problem since 1976 :: http://badcomputer.org "...the number of UNIX installations has grown to 10, with more expected..." - Dennis Ritchie and Ken Thompson, June 1972 pgpcUumMiLcKy.pgp Description: PGP signature
Re: [gentoo-user] Root cannot open display
On 17:01 Tue 01 Mar , Ulrich Anhalt wrote: > normally it should work with sudo. Please comment out the line > Defaults env_reset > in your /etc/sudoers (if it isn't) and try again > Ulli Your suggestion for /etc/sudoers solved the problem for gvim, but firefox was very unhappy, root needs to own the firefox profile in the users home directory. I think sux might be a possibility, but I need to look at the implications of it. Lastly, if I can figure out the MIT-magic-cookie thing, I might try that as well. Thanks to everyone for pointing the way(s). Bill Roberts > > On 10:02 Tue 01 Mar , Christopher Fisk wrote: > > > On Tue, 1 Mar 2005, Bill Roberts wrote: > > > > > > >When I'm logged on as a user, and I try to open gvim or firefox by > > > >su'ing or sudo'ing as root, I get the following error. > > > > > > > >E233: cannot open display > > > > > > This is an X security thing. Instead of launching Firefox from a su'd > > > session, why not install sudo and run sudo firefox? > > > > > I've tried it with sudo, and get the same error. > > > > > > The other option is to look into xhosts and figure out how to set the > > > magic key. > > > > > I've also stayed away from xhosts for security reasons. Is there any > > secure way of using it? -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Root cannot open display
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Bill Roberts wrote: | When I'm logged on as a user, and I try to open gvim or firefox by | su'ing or sudo'ing as root, I get the following error. | | E233: cannot open display | | I used to be able to do this, but there was a tightening of security | at some point, and now I cannot. I am using xfce4. | | Is there some sort of workaround? Currently, I have to log off as | user, and log in as root. The only reason I normally have to do either | of these things is to change certain settings in firefox, or when I am | copying some code from the internet into a file. The copy operation | works nicely with gvim, but gets messed up in vim. Besides all the other suggestions in this thread you can also use xhost to allow every connection from localhost. This is secure unless you don't want to allow every local user to access to your X-server. Use the following command (e.g. in your .xsession file): xhost local: Regards, Karsten -BEGIN PGP SIGNATURE- Version: GnuPG v1.2.6 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCJJKSgUNlsZQzobwRAiRtAKCnu+efvyJpOlbXkIZqmXMST2Nu4wCeOkkc 5iESFGhS5CJW+zKUoP8TpR8= =q0Vw -END PGP SIGNATURE- -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Root cannot open display
Hi Bill, normally it should work with sudo. Please comment out the line Defaults env_reset in your /etc/sudoers (if it isn't) and try again Ulli Am Dienstag, den 01.03.2005, 10:25 -0500 schrieb Bill Roberts: > On 10:02 Tue 01 Mar , Christopher Fisk wrote: > > On Tue, 1 Mar 2005, Bill Roberts wrote: > > > > >When I'm logged on as a user, and I try to open gvim or firefox by > > >su'ing or sudo'ing as root, I get the following error. > > > > > >E233: cannot open display > > > > This is an X security thing. Instead of launching Firefox from a su'd > > session, why not install sudo and run sudo firefox? > > > I've tried it with sudo, and get the same error. > > > > The other option is to look into xhosts and figure out how to set the > > magic key. > > > I've also stayed away from xhosts for security reasons. Is there any > secure way of using it? > > Bill Roberts > -- > gentoo-user@gentoo.org mailing list > signature.asc Description: Dies ist ein digital signierter Nachrichtenteil
Re: [gentoo-user] Root cannot open display
On Tue, 1 Mar 2005, Bill Roberts wrote: When I'm logged on as a user, and I try to open gvim or firefox by su'ing or sudo'ing as root, I get the following error. E233: cannot open display I used to be able to do this, but there was a tightening of security at some point, and now I cannot. I am using xfce4. See my other mail... Is there some sort of workaround? Currently, I have to log off as user, and log in as root. The only reason I normally have to do either of these things is to change certain settings in firefox, or when I am copying some code from the internet into a file. The copy operation works nicely with gvim, but gets messed up in vim. What I usually do, if there's a task that only root can do (changing a config or doing maintenance), is 'su -' in an xterm. All changes done to a config file (or whatever) by root is pasted from my user-run firefox/mozilla into 'nano -w'. I don't use vi(m) myself but it should work the same... Alternately, is there some way of copying nicely into vim from code I find on the internet. If nothing else works: 'cat >textfile < Best regards Peter K -- We Can Put an End to Word Attachments: http://www.fsf.org/philosophy/no-word-attachments.html -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Root cannot open display
On Tue, 1 Mar 2005 10:25:12 -0500, Bill Roberts wrote: > I've also stayed away from xhosts for security reasons. Is there any > secure way of using it? emerge sux Note: that is a command, not an opinion ;-) -- Neil Bothwick Use Microsoft . . . . . pgpK2XULr39Yg.pgp Description: PGP signature
Re: [gentoo-user] Root cannot open display
On Tue, 1 Mar 2005, Bill Roberts wrote: I've also stayed away from xhosts for security reasons. Is there any secure way of using it? You could (as root) copy the mit-magic cookie to root's directory (/root). This is usually the recommended way, from a security point of view. X clients scan the home directory for the mit-magic cookie (.Xauthority) and only allow those who can produce said cookie in their home directory to connect to the X server. See: http://pangea.stanford.edu/computerinfo/unix/xterminal/xauthentication.html Best regards Peter K -- We Can Put an End to Word Attachments: http://www.fsf.org/philosophy/no-word-attachments.html -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Root cannot open display
Hi! If you're not on an outside machine and security is not really a concern for the moment you can try "xhost +" as the user and then su to root. This disables access control; you might want to be careful. When you are done you can reenable it by "xhost -" after root logged off. This is a rather quick approach, but if you just need a window every once in a while it's okay. Ben On Tuesday 01 March 2005 16:04, Bill Roberts wrote: > When I'm logged on as a user, and I try to open gvim or firefox by > su'ing or sudo'ing as root, I get the following error. > > E233: cannot open display > > I used to be able to do this, but there was a tightening of security > at some point, and now I cannot. I am using xfce4. > > Is there some sort of workaround? Currently, I have to log off as > user, and log in as root. The only reason I normally have to do either > of these things is to change certain settings in firefox, or when I am > copying some code from the internet into a file. The copy operation > works nicely with gvim, but gets messed up in vim. > > Alternately, is there some way of copying nicely into vim from code I > find on the internet. > > Thanks in advance > > Bill Roberts > -- > gentoo-user@gentoo.org mailing list -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Root cannot open display
On 10:02 Tue 01 Mar , Christopher Fisk wrote: > On Tue, 1 Mar 2005, Bill Roberts wrote: > > >When I'm logged on as a user, and I try to open gvim or firefox by > >su'ing or sudo'ing as root, I get the following error. > > > >E233: cannot open display > > This is an X security thing. Instead of launching Firefox from a su'd > session, why not install sudo and run sudo firefox? > I've tried it with sudo, and get the same error. > > The other option is to look into xhosts and figure out how to set the > magic key. > I've also stayed away from xhosts for security reasons. Is there any secure way of using it? Bill Roberts -- gentoo-user@gentoo.org mailing list
RE: [gentoo-user] Root cannot open display
> When I'm logged on as a user, and I try to open gvim or firefox by > su'ing or sudo'ing as root, I get the following error. > > E233: cannot open display By default X.org disables tcp access. To enable root (or another user) to open windows on the display you need to: 1. remove the "-nolisten tcp" from the config files in /etc/X11 and the startx script (if you start X from the console). 2. use the xhost command to allow users to open windows in your session. Dave -- gentoo-user@gentoo.org mailing list
Re: [gentoo-user] Root cannot open display
On Tue, 1 Mar 2005, Bill Roberts wrote: When I'm logged on as a user, and I try to open gvim or firefox by su'ing or sudo'ing as root, I get the following error. E233: cannot open display This is an X security thing. Instead of launching Firefox from a su'd session, why not install sudo and run sudo firefox? The other option is to look into xhosts and figure out how to set the magic key. Christopher Fisk -- BOFH Excuse #184: loop found in loop in redundant loopback -- gentoo-user@gentoo.org mailing list