Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #62532
| Newsgroups | comp.lang.python |
|---|---|
| Date | 2013-12-22 05:27 -0800 |
| References | <b0b2ea81-0051-4e59-9b91-67cd9decbcab@googlegroups.com> |
| Message-ID | <6fc90651-e42f-444d-a6de-2ca030cc9110@googlegroups.com> (permalink) |
| Subject | Re: vnc-problem with idle running as sudo on raspberry pi |
| From | Jean Dubois <jeandubois314@gmail.com> |
Op zondag 22 december 2013 14:02:47 UTC+1 schreef Jean Dubois:
> I found the following solution to use idle on the raspberry pi
> as sudoer (which is necessary or at least comfortable when programming the
> GPIO)
> 1. Open a terminal
> 2. type cd ~/Desktop
> 3. type touch idle_as_root
> 4. type nano idle_as_root
> 5. type in sudo idle
> 6. exit nano
> 7. type in sudo chmod +x idle_as_root
> 8. Close terminal
> 9. Double click on the idle_as_root program on your desktop
> This all works fine as long as I use X, however
> I also want to use it via vnc
> For vnc I did the following:
> Installed script "tightvncserver" on the RPiwith the following contents:
> #!/bin/bash
> # /etc/init.d/tightvncserver
> VNCUSER='pi'
> case "$1" in
> start)
> # su $VNCUSER -c '/usr/bin/tightvncserver :1'
> su -l $VNCUSER -c '/usr/bin/tightvncserver :1'
> echo "Starting TightVNC server for $VNCUSER "
> ;;
> stop)
> pkill Xtightvnc
> echo "Tightvncserver stopped"
> ;;
> *)
> echo "Usage: /etc/init.d/tightvncserver {start|stop}"
> exit 1
> ;;
> esac
> exit 0
> sudo chmod 755 /etc/init.d/tightvncserver
> sudo update-rc.d tightvncserver defaults
> when starting the script manually like this
> sudo /etc/init.d/tightvncserver start
> everything works as expected i.e. I can click on the idle_as_root-icon and
> it works as expected.
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
> If however I reboot the system, the service does start and I do see the
> rpi-desktop but clicking the idle_as_root-icon doesn't work. Manually
> trying to start it as follows show an error:
> pi@raspberrypi ~ $ sudo idle
> Client is not authorized to connect to ServerTraceback (most recent call
> last):
> File "/usr/bin/idle", line 5, in <module>
> main()
> File "/usr/lib/python2.7/idlelib/PyShell.py", line 1427, in main
> root = Tk(className="Idle")
> File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1712, in __init__
> self.tk = _tkinter.create(screenName, baseName, className,
> interactive, wantobjects, useTk, sync, use)
> _tkinter.TclError: couldn't connect to display ":1.0"
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
vnc-problem with idle running as sudo on raspberry pi Jean Dubois <jeandubois314@gmail.com> - 2013-12-22 05:02 -0800
Re: vnc-problem with idle running as sudo on raspberry pi Jean Dubois <jeandubois314@gmail.com> - 2013-12-22 05:27 -0800
Re: [OT] vnc-problem with idle running as sudo on raspberry pi Michael Torrie <torriem@gmail.com> - 2013-12-22 10:06 -0700
Re: [OT] vnc-problem with idle running as sudo on raspberry pi Jean Dubois <jeandubois314@gmail.com> - 2013-12-23 06:06 -0800
Re: [OT] vnc-problem with idle running as sudo on raspberry pi Michael Torrie <torriem@gmail.com> - 2013-12-23 08:29 -0700
Re: [OT] vnc-problem with idle running as sudo on raspberry pi Jean Dubois <jeandubois314@gmail.com> - 2013-12-23 09:02 -0800
csiph-web