How to install language support for browsers on Ubuntu

 

Simply run this command

sudo apt install $(check-language-support)
sudo apt-get install fonts-noto-cjk
Advertisements

Run VNC server with LXDE desktop environment on Ubuntu

What you will need

  • The leanest desktop environment LXDE for Ubuntu
  • VNC server

Installation

Install LXDE

$ sudo apt-get update && sudo apt-get upgrade
$ sudo apt-get install -y lxde

Install VNC server

$ sudo apt-get install vnc4server

# Initialize vncserver configuration
# Enter a new password as requested
# Configuration files are created under ~/.vnc/
$ vncserver
# Then kill the server
$ vncserver -kill :1

# Edit configuration to start lxde
$ nano ~/.vnc/xstartup

# Comment out this line
#x-window-manager &

# Add the following lines
lxterminal &
/usr/bin/lxsession -s LXDE &

# Start VNC server
$ vncserver :1 

# To start VNC server and specify color depth
# and screen dimension for a full HD monitor, do like this
$ vncserver -depth 16 -geometry 1920x1080 :1
 
# To connect to VNC server, use a tool such as VNC Viewer 
# on a remote server and specify the address of the target server 
# as {target server IP}:1 or {target server IP}:5901. 
# Input your password and then connect.

 

Build Couchbase v4.0rc Cluster using Docker

Environment
– MacOS with boot2docker installed.

Target
– 3 docker VM running Couchbase v4.0 to form a Couchbase cluster

Command

$ boot2docker up
$ docker pull ubuntu
# start a vm to build a template
$ docker run -h couchbase-template --name couchbase-template -i -t ubuntu /bin/bash

# inside the vm couchbase-template
root@ $ apt-get update
root@ $ apt-get install openssh-server

# setup for docker as recommended here https://hub.docker.com/_/couchbase/
root@ $ ulimit -n 40960
root@ $ ulimit -c unlimited
root@ $ ulimit -l unlimited

# install Couchbase v4.0
root@ $ wget http://packages.couchbase.com/releases/4.0.0-rc0/couchbase-server-community_4.0.0-rc0-ubuntu14.04_amd64.deb
root@ $ dpkg -i couchbase-server-community_4.0.0-rc0-ubuntu14.04_amd64.deb
root@ $ ps -ef | grep couchbase

## confirm that couchbase processes are running.
root@ $ exit

# Commit your change
$ docker commit -m "Build Couchbase 4.0rc" -a "Your Name" {container ID} {dockerhubUsername}/couchbase:v4.0rc

# login to your dockerhub account
$ docker login
Username: yourname
Password: yourpw
Email: youremail

# then push the image
$ docker push {dockerhubUsername}/couchbase



Setting VIM to be an useful IDE for development

Recently, I am tired of finding IDE for each environment I work with (MaxOS, Windows, Linux). I finally decided to switch to VIM. I found a very good summary here to make VIM to be a very useful IDE for development. This is the script to install all of them in a while.

#!/bin/sh
if [ ! -d ~/.vim/bundle ]; then
mkdir -p ~/.vim/bundle
fi

cd ~/.vim/bundle

# install plugin manager Vundle https://github.com/gmarik/Vundle.vim
git clone https://github.com/gmarik/Vundle.vim.git

# install file explorer NERDTree https://github.com/scrooloose/nerdtree
git clone https://github.com/scrooloose/nerdtree.git

# install FuzzyFinder https://github.com/vim-scripts/FuzzyFinder
git clone https://github.com/vim-scripts/FuzzyFinder.git

# install lightline, a light and configurable statusline/tabline for Vim https://github.com/itchyny/lightline.vim
git clone https://github.com/itchyny/lightline.vim.git

# install EasyMotion https://github.com/Lokaltog/vim-easymotion
git clone https://github.com/Lokaltog/vim-easymotion

# install Surround https://github.com/tpope/vim-surround
git clone git://github.com/tpope/vim-surround.git

# install Emmet, webdev-oriented plugin, https://github.com/mattn/emmet-vim
git clone https://github.com/mattn/emmet-vim.git

# install JSHint2, webdev-oriented plugin, https://github.com/Shutnik/jshint2.vim
git clone https://github.com/Shutnik/jshint2.vim.git

# install CSS Color, webdev-oriented plugin, https://github.com/skammer/vim-css-color
git clone https://github.com/skammer/vim-css-color.git

# install l9 http://www.vim.org/scripts/script.php?script_id=3252
curl -o L9.zip http://www.vim.org/scripts/download_script.php?src_id=13948
unzip -d L9 L9.zip

# download font wombat256.vim http://www.vim.org/scripts/script.php?script_id=2465
mkdir -p ~/.vim/colors
cd ~/.vim/colors
curl -o wombat256.vim http://www.vim.org/scripts/download_script.php?src_id=13397
# download .vimrc
cd ~
if [ -f .vimrc ]; then
mv .vimrc .vimrc.`date "+%Y%m%d-%H%M%S"`
fi
curl -o .vimrc https://gist.githubusercontent.com/gosukiwi/080d1d3f87f861a15c44/raw/47c4ac7c9e14cdffaeca5c7b22ac0561ace98576/.vimrc

Install Oracle JDK on Ubuntu

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update

# Install JDK 6
sudo apt-get install oracle-java6-installer

# Install JDK 7
sudo apt-get install oracle-java7-installer

# Install JDK 8
sudo apt-get install oracle-java8-installer

# Change default JDK version
sudo update-alternatives --config java
sudo update-alternatives --config javac