Hello,
Recently I attached an LCD screen to my Raspberry Pi and wanted to be able to type commands via ssh and have them display on the screen.
After searching the web, I came up with the following solution to fit my needs.
It has 3 parts:
- You must autologin on the console, to do that, follow this: http://elinux.org/RPi_Debian_Auto_Login
- Launch a screen session once the user is logged in an run all commands there
- To do that, you need to edit your ~/.bashrc file and add this at the end:
123if [ $(tty) == /dev/tty1 ]; thenscreen -S console -mfi
Where “console” is the name of the screen session you are starting
- To do that, you need to edit your ~/.bashrc file and add this at the end:
- When you SSH into your raspberry pi use this command to connect to the screen session that is attached to tty1 and the LCD screen:
1screen -x console
That’s it :)!