[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Etch netinstl. problem starting kwrite, synaptic, gedit.etc



On Tuesday 26 August 2008 00:34, debian@cercy.net wrote:
> > On Sunday 24 August 2008 23:37, debian@waysoft.com wrote:
> >> On Sun, 24 Aug 2008 23:16:46 +0200
> >>
> >> Nigel Henry <cave.dnb2m97pp@aliceadsl.fr> wrote:

> > I did an apt-get install xorg, which pulled in a few more packages, and
> > apart
> > from some complaints about finding directories for fonts, which didn't
> > appear
> > to exist, but no change when running su, plus password, and kwrite, for
> > example, which stiill failed to open.
> >
> > I also tried another suggestion, as below.
> >
> > <quote>
> >
> > the basic problem is that you are launching these programs as root, but
> > your desktop is running as your user. So after su'ing run "export
> > DISPLAY=localhost:0" and as a user run "xhost localhost".
> >
> > The export command sets the DISPLAY variable to your local machine, this
> > variable is how X apps figure out what X server to connect to. The xhost
> > command allows programs running on your local machine to connect to your
> > desktop.
> > <end quote>
> >
> > I don't think I made any typos.
> >
> > Having done an apt-get install xorg, and also the export stuff above, I
> > still
> > can't just simply su, plus password, and bring up kwrite for example.
> >
> > This is how things are at present, and hand written. Excuse any typos
> > please.
> >
> > djmons@debian: ~$ su
> > Password:
> > debian: /home/djmons# kwrite
> > Xlib: connection to ":0.0" refused by server
> > Xlib: Invalid MIT-MAGIC-COOKIE-1 key
> > kwrite: cannot connect to X server :0.0
> > debian: /home/djmons#
> >
> > Any suggestions welcome, as usual.
> >
> > Nigel.
>
> On my Ubuntu laptop, just su'ing, no dash, works as you describe. Send the
> output of env after you su. On Debian 3.0, su'ing without the dash also
> works as you describe.
>
> I can't get 4.0 installed because it doesn't recognize my ps2 keyboard. So
> I can't test the behavior of 4.0. Perhaps there is some new secuity dealie
> that changes the default behavior. I downloaded the latest testing CD last
> night, If it works I'll let you know how it su's.

Env output below.

djmons@debian:~$ su
Password:
debian:/home/djmons# env
SSH_AGENT_PID=3136
KDE_MULTIHEAD=false
DM_CONTROL=/var/run/xdmctl
SHELL=/bin/bash
TERM=xterm
XDM_MANAGED=/var/run/xdmctl/xdmctl-:0,maysd,mayfn,sched,rsvd,method=classic
GTK2_RC_FILES=/etc/gtk-2.0/gtkrc:/home/djmons/.gtkrc-2.0:/home/djmons/.kde/share/config/gtkrc-2.0
GS_LIB=/home/djmons/.fonts
GTK_RC_FILES=/etc/gtk/gtkrc:/home/djmons/.gtkrc:/home/djmons/.kde/share/config/gtkrc
WINDOWID=39845893
KDE_FULL_SESSION=true
USER=root
LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.flac=01;35:*.mp3=01;35:*.mpc=01;35:*.ogg=01;35:*.wav=01;35:
SSH_AUTH_SOCK=/tmp/ssh-ulJocC3096/agent.3096
SESSION_MANAGER=local/debian:/tmp/.ICE-unix/3184
KONSOLE_DCOP=DCOPRef(konsole-3238,konsole)
MAIL=/var/mail/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
DESKTOP_SESSION=default
PWD=/home/djmons
KONSOLE_DCOP_SESSION=DCOPRef(konsole-3238,session-1)
LANG=en_GB.UTF-8
PS1=\h:\w\$
HISTCONTROL=ignoredups
HOME=/root
SHLVL=3
XCURSOR_THEME=default
LOGNAME=root
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-9HMQFdnV6q,guid=d923f13f2106044f6a7b330048b3fd82
DISPLAY=:0.0
COLORTERM=
_=/usr/bin/env
debian:/home/djmons#

This is a puzzling problem on this Etch install. I also have other Debian 
installs on another machine. All these were originally installed from Woody 
3.0r2 discs, and I currently have a Sarge, Etch, and Lenny install, but no 
problems with su, and starting GUI apps.

Looking back through my handwritten notes I'd had the same problem with 
accessing X apps as root with my 1st Archlinux install. the fix was to do, as 
user.
xhost +local:root

This can then be added as a shell script to KDE's autostart directory.

The command "xhost +local:root" works ok on the Etch install that I'm having 
problems with.

I do also have Archlinux installed on the same machine that I'm having this 
problem with Etch starting X apps, yet this Archlinux install, which I 
installed from the same cdrom, has no problems with su starting X apps.

All a bit weird.

When I do, while su'ed to root "export DISPLAY=localhost:0", then as user run 
xhost localhost, where exactly are these commands being saved to? The only 
xhost file I can find is an executable (binary) in /usr/bin.

Just trying to understand how all this stuff works.

Nigel.






Reply to: