Search This Blog

Showing posts with label script. Show all posts
Showing posts with label script. Show all posts

13 June, 2020

Ubuntu 18.04 running script at boot

Ubuntu 18 is using systemd, and there are three things we need to do 

1) Create a service file and put it in /etc/systemd/system/
  let say the file be board-init.service, with the below content


[Unit]
Description=Board initializations
DefaultDependencies=no

[Service]
Type=oneshot
ExecStart=/etc/board-init.sh

[Install]
WantedBy=sysinit.target

2) create your board-init.sh script file, and put it in /etc/

3) Create a soft link in the /etc/systemd/system/sysinit.target.wants to the service file w created

cd /etc/systemd/system/sysinit.target.wants
ln -s /etc/systemd/system/board-init.service board-init.service

reboot the board. To see the output of the script type 

journalctl -u board-init -b

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...