[Boot] Excute Script On Boot

This is the exploration of procedures to automatically launch a script everytime raspberry boots up with power cycle.

View and control local tty(x) from network

> sudo apt-get install linuxvnc
> sudo linuxvnc (numerical tty number)

Auto-login for ttys

Create symlink at




Manual starting of extra ttys

$ systemctl start getty@ttyN.service

Script Launching on tty(x)

Adding scripts under ~/.profile:

# ~/.profile: executed by the command interpreter for login shells.

if [[ $(tty) = /dev/tty2 ]]; then
 echo Welcome! Using tty2 to run tau2 camera v4l2 driver...

if [[ $(tty) = /dev/tty3 ]]; then
 echo Welcome! Using tty3 to run gstreamer 14-bit image capture...


Read more about .profile file:

On a clean install of Ubuntu, you’ll notice your home directory contains both a .profile and .bashrc file. Starting a login shell executes .profile and starting a non-login shell executes .bashrc.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s