We use some essential cookies to make our website work.

We use optional cookies, as detailed in our cookie policy, to remember your settings and understand how you use our website.

D-bot
Posts: 1
Joined: Tue Nov 19, 2019 2:09 pm

Running Thonny from Terminal

Tue Nov 19, 2019 5:09 pm

Hello, I am new to this forum and RPi and i am using the 4b. I've done some searching but can't seem to find any answers for this. My pi is set up to boot to the terminal. I type 'startx' at the command line and that brings me to the GUI. From the GUI I can navigate the menu and click on thonny and thonny will run fine. If i open a terminal while in the GUI and type 'thonny' , thonny runs fine but if I exit the GUI and go back to the command line or boot to the command line and type 'thonny', i get a bunch of jiberish and it doesn't run. Anyone know why this is? When the pi boots up, I log in as pi. I found the thonny app in /usr/bin folder and i changed the permissions to 777 and the owner and group to pi (they were set to root) but thonny will not start from the command line. It only runs when i enter the GUI environment. ??

User avatar
Paeryn
Posts: 3608
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Running Thonny from Terminal

Wed Nov 20, 2019 2:03 am

I doubt the errors you get from trying to run Thonny without an X11 server running are gibberish, they are more likely to be telling you in some way that it can't find an X11 server to talk to.

Thonny uses Tcl/Tk in order to display its interface and Tk requires an underlying GUI to provide graphical windows and user input, it isn't capable of running in text mode.
D-bot wrote:
Tue Nov 19, 2019 5:09 pm
I found the thonny app in /usr/bin folder and i changed the permissions to 777 and the owner and group to pi
For what reason did you change ownership and permissions of /usr/bin/thonny? I suggest you change them back, making random changes like this when you don't know what you are doing is likely to end in tears when you inadvertently do it to something that ends up breaking something.
Kira the Koding Kitty, R.I.P. 8/3/24

Return to “Troubleshooting”