create new tag
view all tags

Linux Basics

What to do after installing Ubuntu

Ubuntu has become a very suitable Operating System for building embedded systems. But immediately after installing any version of Ubuntu for the purpose of building electronic/embedded systems. This text will contain what I usually do. Run these commands one after the other:

$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install build-essential
$ sudo apt-get install git make gcc ant openjdk-8-jdk vim

In a case where openjdk-8-jdk encounter errors, use this guide

Building arduino from sources

Arduino is the goto software when it comes to hardware/electronics prototyping in recent times. Ubuntu has a very good repository for keeping all its software. Inasmuch as the software repository managed by apt-get is good, we need the current version of arduino, which is not present in Ubuntu's repository. Luckily, the arduino developers manage the sources using https://github.com. Type the following commands to build the arduino latest source tree.

$ sudo apt-get update
$ sudo mkdir -p /opt/ucc/micros
$ cd /opt/ucc/micros
$ sudo -i
# git clone https://github.com/arduino/Arduino.git
# cd Arduino/build
# ant dist
# ant run

The above command builds and installs arduino's core. But we all want to see the arduino ide. Luckily after the ant build , the arduino IDE is located within the dist folder. Doing the ant run command brings it up, but we will want an easier way to run the IDE. Unpacking the tar.gz folder and using the install.sh shell program does not help. It generates a whole lot of errors, at least my assertion after try with the latest build. Perusing the install.sh program just showed that all it does was to create a [program].desktop file (typical Ubuntu application file for the launcher). The following set of command should help do exactly what that file was intended to do.

$ cd /opt/ucc/micros/Arduino/build/linux
$ sudo tar -xvf arduino-x.x.x-linuxY.tar.xz
$ sudo touch /usr/share/applications/arduino.desktop
$ sudo vim /usr/share/applications/arduino.desktop

x.x.x => version number, Y => hardware architecture, either 32bit or 64bit. On opening the arduino.desktop file, I place the follwing code in it:

[Desktop Entry]
Comment=Create physical computing projects

Afterwards save the file. Run the below ode to make it executable by all:

$ sudo chmod +x /usr/share/applications/arduino.desktop

You will now have arduino IDE in your launcher. Enjoy it.


Topic revision: r1 - 2017-05-01 - uli
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback