Thursday, November 29, 2018

Odroid XU4 board

some photos and info on the Odroid Xu4

  • Samsung Exynos5422 Cortex™-A15 2Ghz and Cortex™-A7 Octa core CPUs
  • Mali-T628 MP6 (OpenGL ES 3.0/2.0/1.1 and OpenCL 1.1 Full profile)
  • 2GB LPDDR3 RAM PoP stacked
  • eMMC5.0 HS400 Flash Storage
  • 2 x USB 3.0 Host, 1 x USB 2.0 Host
  • Gigabit Ethernet port
  • HDMI 1.4a for display
  • Operating temperature range: approx. -10C to +45C
  • Size: ~82 x 58 x 22 mm (including heat sink)
  • Fully software compatible with ODROID-XU3 and XU3-Lite
  • Low cost, small form factor, high performance!


visual studio on Odroid XU4

Today, we can run the Visual Studio on the XU4 Ubuntu Linux.
Visual Studio Code is a source code editor developed by Microsoft for Windows, Linux and macOS.
It includes support for debugging, embedded Git control, syntax highlighting, intelligent code completion, snippets, and code refactoring.
It is also customizable, so users can change the editor’s theme, keyboard shortcuts, and preferences.
It is free and open-source, although the official download is under a proprietary license.
From the VS Code GitHub :
You need following items.
– Git
– Node.JS, >= 8.9.1, < 9.0.0
– Yarn >= 1.5.0
– Python, >=  2.7 (version 3 is not supported)
– npm
– libx11-dev and libxkbfile-dev for native-keymap
– libsecret-1-dev for keytar
Let’s install the required packages.
sudo apt install git nodejs libx11-dev libxkbfile-dev libsecret-1-dev npm
And check the versions of key components.
odroid@odroid:~$ yarn --version
odroid@odroid:~$ python --version
Python 2.7.15rc1
odroid@odroid:~$ nodejs --version
odroid@odroid:~$ npm --version
“yarn” command in “cmdtest” package was too old which was compatible with npm.
So you have to install “yarn” package manually.
curl -sS | sudo apt-key add - echo "deb stable main" | sudo tee /etc/apt
sudo apt update
sudo apt install yarn
And I had the latest “yarn” version.
odroid@odroid:~$ yarn --version
Let’s download Visual Studio Code source from MS Github and build it.
git clone --depth 1
cd vscode
./scripts/ install --arch=armhf
Then, run your instance with ./scripts/ from that same folder.
You must force to reinstal libgconf2 manually to fix a runtime error.
sudo apt -y install libgconf2-4
The first launching took quite a long time. Be patient.
The performance of source code editor was very good and look-and-feel was very similar to the original Visual Studio.
It’s time to learn how to configure the gcc and gdb command in the integrated development environment.


Tuesday, November 27, 2018

change user name and home directory of linux user

Rename the user on linux.

This changes the login id and the home directory name.  It will not change any of the info in possible config files for shortcuts and packages which were embedded while configuring tools or programs on the account.

Things may have to be edited and replaced as needed manually.

Change the home directory using usermod

This method is for command line warriors. Before you use the usermod command the new home directory should be created, ownership should be assigned to the new user and the folder should be chmoded correctly so that no one else can access it. Run the following commands to do it.
mkdir /home/new_home_directory
chown username:username /home/new_home_directory
chmod 700 /home/new_home_directory
usermod --home /home/new_home_directory username

Change the home directory by editing /etc/passwd

Alternatively you can also edit the /etc/passwd to change the home directory. But you should be careful not to edit anything else. Before editing this file it is always better to create the new home directory and assign proper permissions and ownership to it. Execute the following commands.
mkdir /home/new_home_directory
chown username:username /home/new_home_directory
chmod 700 /home/new_home_directory

Open the /etc/passwd file using a text editor and locate the line containing the required username it should look something like this

change it to

Save the file.
Finally copy all the old content to the new home directory
cp -f /home/username/* /home/new_home_dir/

another link


Ubuntu 16.04: Mount USB storage on boot

Ubuntu 16.04: Mount USB storage on boot

Use blkid (sudo required) to determine blkid info

$ sudo blkid
<device>: <uuid> <fstype>

Grep UUID of USB device attached to /dev/sdh1.
$ sudo blkid | grep "^/dev/sdh1:"
/dev/sdh1: UUID="e801fc70-a741-48da-b82d-d55b7668a573" TYPE="xfs"

Add UUID mount entry to /dev/fstab.
$ echo 'UUID="e801fc70-a741-48da-b82d-d55b7668a573" /mnt xfs defaults 0 0' \
| sudo tee -a /etc/fstab
Now USB device can be mount automatically on boot.

Thursday, November 22, 2018

Install Lamp Server on Linux

Install Lamp server

sudo apt install apache2
sudo apt install mysql-server
sudo apt install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php
sudo service apache2 restart

check php
php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'