Customizing Ubuntu 16.04 for XPS13

Reviews and other little ventures that don't quite fit into the other forums
Post Reply
Daniel Wee
Site Admin
Posts: 2073
Joined: Wed 25 Feb 25 2009 8:00 pm

Customizing Ubuntu 16.04 for XPS13

Post by Daniel Wee » Thu 27 Jul 27 2017 8:07 pm

Installation over existing system

Boot from USB stick and select "Other"
Select the Ubuntu partition that's largest
Select "Change"
Select "ext4 journalling" and "/" as mount point
Close this Change window
Select install
Accept warning and proceed

Give the same username, machine name and password when prompted.

Once installed, a number of customizations need to be made starting with the GRUB bootloader.

sudo nano /etc/default/grub

add the following lines:-

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
GRUB_GFXMODE=1280x1024

Save and then run:-

sudo update-grub

Daniel Wee
Site Admin
Posts: 2073
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Customizing Ubuntu 16.04 for XPS13

Post by Daniel Wee » Thu 27 Jul 27 2017 8:10 pm

Next, change the permissions so you won't have to keep entering your password on sudo.

sudo visudo

add the following line as the last entry after %sudo

daniel ALL=NOPASSWD : ALL

Fix dual-boot clock issue

timedatectl set-local-rtc 1

Daniel Wee
Site Admin
Posts: 2073
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Customizing Ubuntu 16.04 for XPS13

Post by Daniel Wee » Fri 28 Jul 28 2017 12:35 am

Fix the over-sensitive touchpad for the XPS13:-

sudo apt remove xserver-xorg-input-synaptics-hwe-16.04
sudo apt install xorg-input-abi-24
sudo apt install xserver-xorg-input-libinput-hwe-16.04

Create or edit /usr/share/X11/xorg.conf.d/60-libinput.conf

sudo nano /usr/share/X11/xorg.conf.d/60-libinput.conf

Contents as follows:-

Code: Select all

Section "InputClass"
	Identifier "libinput touchpad catchall"
	MatchIsTouchpad "on"
	MatchDevicePath "/dev/input/event*"
	Driver "libinput"
	Option "Tapping" "True"
	Option "AccelSpeed" "1.0"
        Option "PalmDetection" "True"
        Option "TappingDragLock" "True"
EndSection
Reboot for changes to take effect.

For gestures, see https://www.reddit.com/r/Dell/comments/ ... ures_with/

Daniel Wee
Site Admin
Posts: 2073
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Customizing Ubuntu 16.04 for XPS13

Post by Daniel Wee » Fri 28 Jul 28 2017 12:52 am

In Settings->Security & Privacy

uncheck password requirements where desired

To stop unlock keyring requests, open "Passwords and Keys" from search bar

right click on "Login" and select "unlock"
right click on "Login" and select "Change Password"
leave new password and confirmation blank and hit "Continue"

Daniel Wee
Site Admin
Posts: 2073
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Customizing Ubuntu 16.04 for XPS13

Post by Daniel Wee » Fri 28 Jul 28 2017 1:35 am

In Settings->Keyboard->Shortcuts
under Launchers->Key to show the HUD

highlight and press the right Alt to free the left Alt key

Common Installs

autokey-gtk libindicator7 libappindicator1 libffi-dev libblas-dev libssl-dev libprotobuf-dev libleveldb-dev libsnappy-dev
libopencv-dev libhdf5-serial-dev libboost-all-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
libatlas-dev libatlas-base-dev liblapack-dev python-pip python-numpy python-imaging python-openssl git wget cmake gfortran
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev

libxvidcore-dev libx264-dev libgtk-3-dev python2.7-dev python3.5-dev libgdal-dev
liblapacke-dev libopenblas-dev checkinstall libvorbis-dev libxvidcore-dev v4l-utils python-vtk
libv4l-dev libtbb-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev
libavcodec-dev libavformat-dev libswscale-dev libxine2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
pkg-config unzip ffmpeg qtbase5-dev python-dev python3-dev python-numpy python3-numpy
ccache libeigen3-dev libgstreamer1.0-dev gphoto2 libgphoto2-dev libreadline6 libreadline6-dev python-software-properties
software-properties-common libgraphicsmagick1-dev libfftw3-dev sox libsox-dev libsox-fmt-all
build-essential gcc g++ curl cmake libreadline-dev git-core libqt4-dev libjpeg-dev libpng-dev ncurses-dev
imagemagick libzmq3-dev unzip gnuplot gnuplot-x11 ipython gcc-4.9 libgfortran-4.9-dev g++-4.9 libreadline5 luarocks
libqt5libqgtk2 qt5-image-formats-plugins qtwayland5 libvtk5-dev mayavi2 hdf5-tools
libavresample-dev gstreamer0.10-plugins-base-doc libgstreamer-plugins-base0.10-dev libgstreamer-plugins-base1.0-dev
python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff5-dev libjasper-dev libavcodec-dev libavformat-dev
libswscale-dev libxine2-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev
libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip
python-vtk libvtk5-dev
libsoap-lite-perl build-essential git-core pkg-config automake libtool wget zlib1g-dev python-dev libbz2-dev
g++ subversion libboost-all-dev libbz2-dev liblzma-dev graphviz imagemagick libgoogle-perftools-dev
python-numpy python-dev python-pip python-wheel python3-dev python3-pip python3-wheel

distcc gcc-4.9-locales ffmpeg-doc g++-4.9-multilib gcc-4.9-doc libstdc++6-4.9-dbg gcc-4.9-multilib libgcc1-dbg libgomp1-dbg
libitm1-dbg libatomic1-dbg libasan1-dbg liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libquadmath0-dbg feedgnuplot
gnuplot-doc libgnuplot-iostream-dev python-gnuplot gnuplot5-doc gthumb imagemagick-doc autotrace enscript gimp grads graphviz hp2xx
html2ps libwmf-bin mplayer povray radiance texlive-base-bin transfig ufraw-batch ipython-doc ipython-notebook ipython-qtconsole
python-matplotlib python-zmq krb5-doc libfont-freetype-perl libcurl4-doc libcurl3-dbg libgnutls-dev libidn11-dev libkrb5-dev
libldap2-dev librtmp-dev libeigen3-doc libmrpt-dev libfftw3-doc libgdal-doc gmp-doc libgmp10-doc libmpfr-dev graphicsmagick-dbg
graphicsmagick krb5-user libvisual-0.4-plugins gstreamer0.10-tools gstreamer0.10-plugins-base gstreamer0.10-doc gstreamer1.0-doc
libgtk-3-doc libgtk2-perl-doc libhdf4-doc hdf4-tools libnetcdf4 liblapack-doc-man liblapack-doc ncurses-doc netcdf-bin netcdf-doc
libmyodbc odbc-postgresql tdsodbc unixodbc-bin ogdi-bin postgresql-doc-9.5 firebird-dev libsqlite0-dev qt4-dev-tools qt4-doc
libqt5libqgtk2 qt5-image-formats-plugins qtwayland5 readline-doc sqlite3-doc libstdc++-4.9-doc tbb-examples libtbb-doc libvtk5-dev
vtk-doc vtk-examples libwmf-doc libxerces-c-doc python-apt-dbg python-apt-doc python-pexpect-doc python-pycurl-dbg
python-pycurl-doc mayavi2 python-numpy-doc python3-nose python3-numpy-dbg python3.5-venv python3.5-doc binfmt-support

Pip installs

tensorflow imutils six numpy wheel

Daniel Wee
Site Admin
Posts: 2073
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Customizing Ubuntu 16.04 for XPS13

Post by Daniel Wee » Fri 28 Jul 28 2017 2:06 am

Install Intel support for OpenCV related libraries

Directories were saved in the Intel folder
in each directory, execute:

sudo ./install.sh

Daniel Wee
Site Admin
Posts: 2073
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Customizing Ubuntu 16.04 for XPS13

Post by Daniel Wee » Fri 28 Jul 28 2017 10:51 pm

Compiling OpenCV 3.2.0

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON WITH_OPENCL=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DFORCE_VTK=ON -DOPENCV_EXTRA_MODULES_PATH=/home/daniel/opencv_contrib-3.2.0/modules -D BUILD_EXAMPLES=ON -DPYTHON2_EXECUTABLE=/usr/bin/python -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_INCLUDE_DIR2=/usr/include/x86_64-linux-gnu/python2.7 -DPYTHON2_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so -DPYTHON2_NUMPY_INCLUDE_DIR=/usr/lib/python2.7/dist-packages/numpy/core/include/ -DBUILD_OPENCV_PYTHON2=ON ..

make -j $(nproc)
sudo make install
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'
sudo ldconfig

Daniel Wee
Site Admin
Posts: 2073
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Customizing Ubuntu 16.04 for XPS13

Post by Daniel Wee » Sat 29 Jul 29 2017 12:58 am

Install sublime

wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/dev/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
sudo apt-get update
sudo apt-get install sublime-text

Daniel Wee
Site Admin
Posts: 2073
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Customizing Ubuntu 16.04 for XPS13

Post by Daniel Wee » Mon 31 Jul 31 2017 1:34 am

Install Microsoft core fonts

Code: Select all

wget http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb -P ~/Downloads
sudo apt install ~/Downloads/ttf-mscorefonts-installer_3.6_all.deb

Daniel Wee
Site Admin
Posts: 2073
Joined: Wed 25 Feb 25 2009 8:00 pm

Re: Customizing Ubuntu 16.04 for XPS13

Post by Daniel Wee » Mon 31 Jul 31 2017 1:56 am

Building tensorflow from source

Do this in case you want special optimizations such as SSE4 and AVX for Intel GPUs.

cd ~
git clone https://github.com/tensorflow/tensorflow
sudo apt-get install openjdk-8-jdk
echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | sudo tee /etc/apt/sources.list.d/bazel.list
curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add -
sudo apt-get update && sudo apt-get install bazel
sudo apt-get upgrade bazel -y
cd ~/tensorflow
./configure
bazel build --config=opt //tensorflow/tools/pip_package:build_pip_package
sudo pip install /tmp/tensorflow_pkg/tensorflow-1.2.1-py2-none-any.whl

See https://www.tensorflow.org/install/install_sources
For fresh rebuild, run:-

bazel clean


Install SSE4 enabled tensorflow from wheel

Download wheel from https://github.com/lakshayg/tensorflow-build
- for Python 2.7 use the cp27 for Ubuntu versions

pip install --ignore-installed --upgrade tensorflow-1.2.1-cp27-cp27mu-linux_x86_64.whl

Post Reply