================ Ubuntu 18.04 LTS ================ .. figure:: img/ubuntu-logo.* :align: right :alt: Ubuntu Logo :width: 300px .. contents:: :local: Additional Informations ======================= * https://ubuntu.com/ - Ubuntu Webpage * https://ubuntu.com/#download - Ubuntu Download * `Zawiki Linux `_ * https://www.osboxes.org/ubuntu/ - Virtual Box images * Additional Tools * `ZSH `_ * `Oh My ZSH `_ * `Sublime Text `_ * `Sublime Merge `_ * `Krusader `_ * `Yakuake `_ * `FSearch `_ * `Anaconda `_ * `QT Creator `_ * `Visual Studio Code `_ * Hitachi SDK * `Hitachi LiDaR SDK `_ * `Hitachi LiDaR ROS Driver `_ * `ROS Installation `_ Base Installation ================= This installation is based on Ubuntu 18.4 LTS and ROS Melodic Morenia. Default Tools ------------- .. code-block:: bash sudo apt-get install git curl vim openssh-server krename rar unrar kget diffutils kate x11vnc echo "Configure Firewall and Port for ssh" sudo ufw allow ssh sudo ufw enable sudo ufw status sudo service ssh restart ZSH --- .. code-block:: bash sudo apt-get install zsh sudo chsh -s /bin/zsh $USER Oh My ZSH --------- .. code-block:: bash cd ~/Downloads sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)" SublimeText 3 ------------- .. code-block:: bash wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - sudo apt-get install apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list sudo apt-get update sudo apt-get install sublime-text SublimeMerge ------------ .. code-block:: bash wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add - sudo apt-get install apt-transport-https echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list sudo apt-get update sudo apt-get install sublime-merge Krusader -------- .. code-block:: bash sudo apt-get install krusader Yakuake ------- .. code-block:: bash sudo apt-get install yakuake Once the main tool is installed, make you have *qdbus-qt5* installed : .. code-block:: bash which qdbus-qt5 If it is not installed, simply install it : .. code-block:: bash sudo apt-get install qdbus-qt5 Now create a script such as *yakuake-startup.sh* : .. code-block:: bash #!/bin/bash INITIAL_ID=`qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.activeSessionId` function addSession { SESSION_ID=`qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.addSession` qdbus org.kde.yakuake /yakuake/tabs setTabTitle $SESSION_ID "$1" if [ ! -z "$2" ]; then qdbus org.kde.yakuake /yakuake/sessions runCommandInTerminal $SESSION_ID "$2" fi } addSession "shell 0" addSession "shell 1" addSession "tools 0" "cd tools" addSession "tools 1" "cd tools" qdbus org.kde.yakuake /yakuake/sessions org.kde.yakuake.removeSession $INITIAL_ID This will create 4 tabs in Yakuake when you execute this script. It is very useful to retrieve specific tabs when launching the Ubuntu machine. FSearch ------- .. code-block:: bash sudo add-apt-repository ppa:christian-boxdoerfer/fsearch-daily sudo apt update sudo apt-get install fsearch-trunk Anaconda -------- .. code-block:: bash cd ~/Downloads wget https://repo.anaconda.com/archive/Anaconda3-2019.10-Linux-x86_64.sh bash Anaconda3-2019.10-Linux-x86_64.sh QT-Creator ---------- QT Creator Login .. code-block:: text Email: gilles.mottiez@hevs.ch PW: Spl2019 .. code-block:: bash cd ~/Downloads wget http://download.qt.io/official_releases/qt/5.13/5.13.1/qt-opensource-linux-x64-5.13.1.run chmod +x qt-opensource-linux-x64-5.13.1.run ./qt-opensource-linux-x64-5.13.1.run sudo apt-get install build-essential sudo apt-get install libfontconfig1 sudo apt-get install mesa-common-dev sudo apt-get install libglu1-mesa-dev -y Visual Studio Code ------------------ .. code-block:: bash curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg sudo install -o root -g root -m 644 packages.microsoft.gpg /usr/share/keyrings/ sudo sh -c 'echo "deb [arch=amd64 signed-by=/usr/share/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/vscode stable main" > /etc/apt/sources.list.d/vscode.list' sudo apt-get install apt-transport-https sudo apt-get update sudo apt-get install code # or code-insiders Hitachi SDK Installation Guide ------------------------------ For the Hitachi SDK installation visit the :doc:`ROS Install ` ROS Installation Guide ----------------------- For the ROS installation visit :doc:`ROS Install ` Configuration ============== Oh My ZSH Config ---------------- .. code-block:: bash :caption: ~/.zshrc additions echo"#------------------------------------------------------------------------------" >> ~/.zshrc echo "# Program in Path" >> ~/.zshrc echo "#" >> ~/.zshrc echo "#------------------------------------------------------------------------------" >> ~/.zshrc echo "# Special zsh config" >> ~/.zshrc echo "# Show hidden files and folders" >> ~/.zshrc echo "setopt globdots" >> ~/.zshrc echo "#------------------------------------------------------------------------------" >> ~/.zshrc echo "# Goto Alias" >> ~/.zshrc echo "# Common home locations" >> ~/.zshrc echo "alias home='cd ~'" >> ~/.zshrc echo "alias root='cd /'" >> ~/.zshrc echo "alias dtop='cd ~/Desktop'" >> ~/.zshrc echo "alias dwld='cd ~/Downloads'" >> ~/.zshrc echo "alias docs='cd ~/Documents'" >> ~/.zshrc echo "alias www='cd /var/www/html'" >> ~/.zshrc echo "alias workspace='cd ~/Workspace'" >> ~/.zshrc echo "alias aptlock-rm='sudo rm /var/lib/dpkg/lock && sudo rm /var/lib/dpkg/lock-frontend'" >> ~/.zshrc echo "# Common commands" >> ~/.zshrc echo "alias o=open" >> ~/.zshrc echo "alias ..='cd ..'" >> ~/.zshrc echo "alias ...='cd ..; cd ..'" >> ~/.zshrc echo "alias ....='cd ..; cd ..; cd ..'" >> ~/.zshrc echo "# Common command shortcuts" >> ~/.zshrc echo "alias cls=clear" >> ~/.zshrc echo "alias ll='ls -la'" >> ~/.zshrc SublimeText 3 Config -------------------- .. code-block:: bash :caption: ~/.zshrc additions echo "# Sublime Text" >> ~/.zshrc echo "export PATH=$PATH:/opt/sublime_text" >> ~/.zshrc echo "# Sublime Text" >> ~/.bashrc echo "export PATH=$PATH:/opt/sublime_text" >> ~/.bashrc cp ./../config/sublimetext/Package Control.sublime-settings ~/.config/sublime-text-3/Packages/User/ SublimeMerge Config ------------------- .. code-block:: bash :caption: ~/.zshrc additions echo "#Sublime Merge" >> ~/.zshrc echo "export PATH=$PATH:/opt/sublime_merge" >> ~/.zshrc echo "#Sublime Merge" >> ~/.bashrc echo "export PATH=$PATH:/opt/sublime_merge" >> ~/.bashrc QT Creator Config ----------------- TODO Visual Studio Code Config ------------------------- TODO How To Use Ubuntu Tools ======================= SSH --- * ```` = ``spl`` * ```` = ``spl-spectra-1.local`` or ``ip address`` * ```` = ``22`` SSH connection without password ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. code-block:: bash # On your local machine generate a RSA Key pair ssh-keygen -t rsa # Copy your local public key to the remote machine safely ssh-copy-id -i ~/.ssh/id_rsa.pub "@ -p " # OR scp id_rsa.pub @:~/.ssh/machine.pub # Append key to file authorized_keys cat ~/.ssh/*.pub | ssh @ -p 'umask 077; cat >>.ssh/authorized_keys' Open SSH Connection ^^^^^^^^^^^^^^^^^^^ .. code-block:: bash # Just ssh ssh @ # ssh with portforwarding ssh -L :localhost: @ # ssh with vnc port forwarding ssh -L 5900:localhost:5900 spl@ VNC --- On remote PC x11vnc needs to be installed and launched. Prefereable add to startup commands Create password ^^^^^^^^^^^^^^^ Only needed if not only localhost used. .. code-block:: bash x11vnc -storepasswd Launch x11vnc ^^^^^^^^^^^^^ .. code-block:: bash # Command with all options x11vnc -usepw -forever -display :0 -safer -bg -o /home/zas/Documents/log/vnc/x11vnc.log -localhost # Minimal command but still restricted to localhost x11vnc -forever -display :0 -safer -bg -localhost XRDP ---- `XRDP `_ is needed to con>nect the the GUI (XServer) of the linux machine even without a monitor attached. VNC won't work because no xerver is created. `XRDP `_ automtically creates an xserver. .. code-block:: bash sudo apt install xfce4 xfce4-goodies xorg dbus-x11 x11-xserver-utils sudo apt install xrdp sudo adduser xrdp ssl-cert echo gnome-session > ~/.xsession Optional you can configure the Firewall .. code-block:: bash sudo ufw allow from 192.168.33.0/24 to any port 3389 (allow from certain LAN Network) sudo ufw allow 3389 # allow from anywhere (unsafe) Getting information about the XRDP service .. code-block:: bash sudo systemctl status xrdp sudo systemctl restart xrdp .. important:: Once an Xserver is launched not two users can use it at the same time. So either XRDP or a user with a connected screen. :tag:`Linux` :tag:`Ubuntu`