archieroques
Posts: 26
Joined: Sun Mar 16, 2014 8:13 pm

Using a push-button to enter text in the command line/PiTFT

Sat May 10, 2014 9:33 pm

Hi,

I'm not sure if I've posted this in the right place or not. Sorry if I haven't.

Basically, I have got an Adafruit PiTFT and attached it to my pi. It's all working, but to get it to work you have to boot the pi, key in 'startx' and then it starts and logs in to the GUI, displaying it onto the PiTFT and activating the touchscreen. I'd like it to boot straight into the GUI on the TFT. Even if I enable boot-to-desktop then it goes to desktop on my HDMI monitor, and doesn't appear on the TFT. I followed all the instructions on the Adafruit site (I think)

I have got it all set up in a mini-pi box so that I can use it without a mouse/keyboard.

I can't seem to find a way to make that happen - if anyone knows please say - but what I could do is have a pushbutton that entered the text 'startx' and enter, so that it would do a startx and go to the GUI.

I think that what the adafruit code does is tell the pi:
When you recieve the command 'startx' enable the touchscreen and display. ' but i'm guessing that boot-to-desktop doesn't use startx.
However, that might not be right.

If anyone knows any way that would enable me to do that,or if i've done something silly/wrong then that would be great. I'm still learning!

Thanks,
Archie

notro
Posts: 695
Joined: Tue Oct 16, 2012 6:21 pm
Location: Drammen, Norway

Re: Using a push-button to enter text in the command line/Pi

Sat May 10, 2014 10:37 pm

The Adafruit tutorial tells you to move /usr/share/X11/xorg.conf.d/99-fbturbo.conf out of the way, because it overrides the FRAMEBUFFER environment variable.
If you instead move this back and change the fbdev option to /dev/fb1, boot-to desktop should go to the PiTFT display.

archieroques
Posts: 26
Joined: Sun Mar 16, 2014 8:13 pm

Re: Using a push-button to enter text in the command line/Pi

Sun May 11, 2014 10:00 am

That sounds like a good solution -

How exactly do I move it back and change the fbdev option?

I'm still learning

notro
Posts: 695
Joined: Tue Oct 16, 2012 6:21 pm
Location: Drammen, Norway

Re: Using a push-button to enter text in the command line/Pi

Sun May 11, 2014 12:39 pm

If you followed the Adafruit tutorial, you did this:

Code: Select all

sudo mv /usr/share/X11/xorg.conf.d/99-fbturbo.conf ~
Then do this to reverse it:

Code: Select all

sudo mv ~/99-fbturbo.conf /usr/share/X11/xorg.conf.d/ 
Edit file

Code: Select all

sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf
Change to

Code: Select all

Option          "fbdev" "/dev/fb1"
Ctrl-O to save (WriteOut), hit Enter to confirm filename.
Ctrl-X to exit.

archieroques
Posts: 26
Joined: Sun Mar 16, 2014 8:13 pm

Re: Using a push-button to enter text in the command line/Pi

Sun May 11, 2014 7:07 pm

Thanks - that works brillianty! :D

Just out of interest, is there any way to easily switch back to booting on an external (HDMI) display?

Thanks,
Archie


Return to “Other projects”