[OT] vnc-problem with idle running as sudo on raspberry pi

Jean Dubois jeandubois314 at gmail.com
Mon Dec 23 15:06:07 CET 2013


Op zondag 22 december 2013 18:06:39 UTC+1 schreef Michael Torrie:
> On 12/22/2013 06:27 AM, Jean Dubois wrote:
> > I was wrong writing idle_as_root worked this way. As a matter of fact,
> > this method also does not work as expected, as can be seen from this
> > message:
> > 
> > X11 connection rejected because of wrong authentication.
> > 
> > New 'X' desktop is raspberrypi:1
> > 
> > Starting applications specified in /home/pi/.vnc/xstartup
> > Log file is /home/pi/.vnc/raspberrypi:1.log
> > 
> > Starting TightVNC server for pi 
> In future, I suspect you'll need to take questions like this that don't
> really have anything to do with Python to a Raspberry Pi forum or e-mail
> list.  Or a general Linux list.
> Short answer:
> Edit /etc/sudoers and add this line somewhere in it (probably near other
> lines that look similar):
> Defaults env_keep += "DISPLAY XAUTHORITY"
> If that doesn't work, then you'll have to talk to folks running the
> Rasbian on their Pi.  Sometimes XAUTHORITY isn't set.

I thought this would be something python-people are familiar with, after
all idle is a Python IDE and running it as a root sometimes is necessary.
Anyway,
I tried out your suggestion but it didn't work, however googling the line
you suggested brought me close to a solution:
the following command does the trick:
xhost +local:root 

unfortunately putting it in ~/.bash_profile doesn't make it work
automatically
after booting, neither does putting it in ~/.xsession, in ~/.xinitrc nor
in an autostart-file in ~/.config/openbox/ 
putting it in .bashrc does work _after_ opening a terminal which isn't
very nice.

thanks and kind regards,
jean



More information about the Python-list mailing list