Configuration Common Linux: Difference between revisions

From miki
Jump to navigation Jump to search
No edit summary
Line 4: Line 4:


First we install etckeeper (with git)
First we install etckeeper (with git)
<source lang="bash">
<source lang=bash>
# ### etckeeper + git
# ### etckeeper + git


sudo apt install git etckeeper
sudo apt install git etckeeper
git config --global user.email "user@server.com" # Make sure this is defined for admin user + root
git config --global user.email "user@server.com" # Make sure this is defined for admin user + root
git config --global user.name "User Name" # or release upgrade might fail in the future
git config --global user.name "User Name" # or release upgrade might fail in the future
sudo su -
sudo su -
git config --global user.email "user@server.com"
git config --global user.email "user@server.com"
Line 15: Line 15:
logout
logout


sudo vi /etc/etckeeper/etckeeper.conf # Select git, avoid daily commit, avoid auto-commit
sudo vi /etc/etckeeper/etckeeper.conf # Select git, AVOID_DAILY_AUTOCOMMITS, AVOID_COMMIT_BEFORE_INSTALL
sudo etckeeper init
sudo etckeeper init
sudo etckeeper commit "1st commit"
sudo etckeeper commit "1st commit"
cd /etc
cd /etc
sudo vi .gitignore # Ignore resolv.c* (and cups/subscriptions.* before Ubuntu Precise)
sudo vi .gitignore # Ignore resolv.c* (and cups/subscriptions.* before Ubuntu Precise)
sudo git rm --cached resolv.c*
sudo git rm --cached resolv.c*
sudo git rm --cached cups/subscriptions.* # No longer needed on Ubuntu Precise and after
sudo git rm --cached cups/subscriptions.* # No longer needed on Ubuntu Precise and after
sudo git add .gitignore
sudo git add .gitignore
sudo etckeeper commit "ignore resolv.c*, cups/subscriptions.*"
sudo etckeeper commit "ignore resolv.c*, cups/subscriptions.*"
Line 57: Line 57:


* '''hosts''' &mdash; Update {{file|/etc/hosts}}
* '''hosts''' &mdash; Update {{file|/etc/hosts}}
<source lang="bash">
<source lang=bash>
sudo vi /etc/hosts # Add any relevant entries.
sudo vi /etc/hosts # Add any relevant entries.
# Make sure localhost as FQDN:
# Make sure localhost as FQDN:
Line 67: Line 67:
<source lang=bash>
<source lang=bash>
# envkeep
# envkeep
# http_proxy, https_proxy -- to keep proxy settings for apt-get etc
# GREP_OPTIONS -- keep grep options
# DISPLAY, XAUTHORITY -- avoid doing 'xhost local:root' before launching X pgm
# HOME -- e.g. to keep git aliases and settings when using etckeeper
# PASSWD -- e.g. to pass password via env. var to <code>mount.cifs</code>
echo "Defaults env_keep += \"http_proxy https_proxy GREP_OPTIONS DISPLAY XAUTHORITY HOME\"" | sudo tee /etc/sudoers.d/envkeep
echo "Defaults env_keep += \"http_proxy https_proxy GREP_OPTIONS DISPLAY XAUTHORITY HOME\"" | sudo tee /etc/sudoers.d/envkeep
# Truecrypt
# Truecrypt
Line 79: Line 84:


* Restore home profile (from git)
* Restore home profile (from git)
<source lang="bash">
<source lang=bash>
# Restore my profile
# Restore my profile
mv home/.git .
mv home/.git .
Line 118: Line 123:
chromium-browser ttf-mscorefonts-installer \
chromium-browser ttf-mscorefonts-installer \
qiv gthumb gnupg-agent renameutils mplayer \
qiv gthumb gnupg-agent renameutils mplayer \
mplayer-doc mplayer-fonts gimp gdmap gparted \
mplayer-doc mplayer-fonts gimp gparted \
xsel moreutils tmux libavcodec-extra \
xsel moreutils tmux libavcodec-extra \
pepperflashplugin-nonfree dconf-tools \
pepperflashplugin-nonfree dconf-tools \
gnome-tweak-tool silversearcher-ag gawk
gnome-tweak-tool silversearcher-ag gawk
# moreutils: for chronic, sponge
# Removed in Bionic: gnome-mplayer gecko-mediaplayer ubuntu-tweak
# Removed in Bionic: gnome-mplayer gecko-mediaplayer ubuntu-tweak
# app-install-data-medibuntu
# app-install-data-medibuntu
# Upgraded: libavcodec-extra-54
# Upgraded: libavcodec-extra-54
# Discontinued: ubuntu-restricted-extras
# Discontinued: ubuntu-restricted-extras (would install libdvdread4)
# 14.04 Trusty: packages 'ubuntu-tweak', 'app-install-data-medibuntu',
# 14.04 Trusty: packages 'ubuntu-tweak', 'app-install-data-medibuntu',
# 'smbfs' missing
# 'smbfs' missing
Line 141: Line 147:
sudo /usr/share/doc/libdvdread4/install-css.sh
sudo /usr/share/doc/libdvdread4/install-css.sh
# Optional essentials
# Optional essentials
sudo apt install nmap winbind libnss-winbind # winbind + libnss-winbind for NetBIOS name resolution
sudo apt install nmap # For various personal scripts (''prj'', ''tsync''')
sudo apt install winbind libnss-winbind # winbind + libnss-winbind for NetBIOS name resolution
sudo vi /etc/nsswitch.conf # Add "wins" at the end of "hosts:" line
sudo vi /etc/nsswitch.conf # Add "wins" at the end of "hosts:" line
</source>
</source>

* Install packages - optional
== Desktop - Gnome ==

=== Gnome tweak ===
* Top bar &rarr; Application Menu &rarr; '''OFF'''.

=== Gnome extensions ===
;AlternateTab
* By default, Gnome {{kb|Alt-Tab}} will group windows from the same application. To get rid of this annoying behaviour and restore the good old one, install extension '''AlternateTab'''.
* Debian: To install it, go to ''Gnome Tweaks'' (package {{deb|gnome-tweaks}}).
* Ubuntu: press ''Super'' key, then AlternateTab, it will be installed automatically. This might require installing <code>sudo apt install gnome-tweak-tool</code> [https://askubuntu.com/questions/69776/how-do-i-alt-tab-between-windows-using-gnome-3].

;[https://extensions.gnome.org/extension/120/system-monitor/ system-monitor] ([https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet github])
* This replaces applet {{deb|indicator-multiload}} that no longer works since Ubuntu Bionic.
* Requires the following package:
<source lang="bash">
<source lang="bash">
sudo apt install gir1.2-gtop-2.0 gir1.2-networkmanager-1.0 gir1.2-clutter-1.0 # Ubuntu
# Optional applications
sudo apt install gnugo qgo uligo cgoban quarry pgpgpg powertop
sudo apt install gir1.2-gtop-2.0 gir1.2-nm-1.0 gir1.2-clutter-1.0 # Debian
</source>
</source>
* However the indicator conflicts with owncloud client indicator (no longer visible).
* Selects ''memory'', ''cpu'', ''network''.

;[https://extensions.gnome.org/extension/1267/no-title-bar/ No title bar]
* Revive Unity-like merging of window title bar with desktop top bar.
* Caveat: Window's menu is not merged [https://askubuntu.com/questions/966685/wasted-screen-space-due-to-multiple-horizontal-bars-at-the-top-when-an-applicati]

;[https://extensions.gnome.org/extension/1250/gnome-global-application-menu/ Gnome Global Application Menu]
* '''AVOID 'ALT' KEY STEALING FOCUS''' &rarr; In extension configuration (via Gnome Tweaks), Go to main menu, click on <code>Alt</code>, then {{kb|Backspace}} to remove the shortcut. Breathe again.
* To merge application menu in top title bar.
* As a side-effect, this extension fixes the owncloud-icon-not-showing bug.

== Development packages ==
* Install packages - development
* Install packages - development
<source lang=bash>
<source lang=bash>
sudo apt install gitk git-gui git-doc exuberant-ctags cscope ruby meld colordiff
sudo apt install gitk git-gui git-doc exuberant-ctags cscope ruby meld colordiff # ruby for Vim plugin snipMate.vim
</source>
* Install fonts
:* '''[https://github.com/belluzj/fantasque-sans Fantasque Sans Mono]'''
<source lang=bash>
mkdir ~/.fonts
wget https://github.com/belluzj/fantasque-sans/releases/download/v1.7.1/FantasqueSansMono.tar.gz
tar xvzf FantasqueSansMono.tar.gz -C ~/.fonts/ --wildcards *.ttf
sudo fc-cache -fv
</source>
* Apply common settings (see below)
* Applications not from repositories:
** Panda glGo 1.4.1 (does not work on ''Oneiric 64-bit'')
* Install latest updates:
<source lang=bash>
sudo apt dist-upgrade
</source>
* Optional - Fix flash issue
<source lang="bash">
# Optional - Fix blue video in flash (see below for details)
sudo mkdir /etc/adobe
echo -e "EnableLinuxHWVideoDecode=1\nOverrideGPUValidation=true" | sudo tee /etc/adobe/mms.cfg > /dev/null
sudo etckeeper commit "Fix blue video bug in adobe flashplayer"
</source>


# Optional
* Restore scrollbar behaviour in GTK3 [https://support.mozilla.org/en-US/questions/1121076], [https://bugzil.la/1260067#c3].
sudo apt install gitweb git-svn
: Use {{kb|Shift+Click}} or {{right click}} to get the ''jump to click'' behaviour.
<source lang=bash>
cat >> ~/.config/gtk-3.0/settings.ini <<__HERE__
[Settings]
gtk-primary-button-warps-slider=false
__HERE__
</source>

; Ubuntu 12.04
<source lang=bash>
sudo vi /etc/default/apport # Disable apport by setting "enabled=0"
sudo etckeeper commit "disable apport"
</source>
</source>


== Optional packages ==
== Optional packages ==

=== Thunderbird ===
See [[Thunderbird]].


=== terminator ===
=== terminator ===
Line 206: Line 209:
See [[Neovim]] page to install Neovim.
See [[Neovim]] page to install Neovim.


=== neovim / vim plugins ===
Neovim / vim plugins are installed via ''vim-plug'', which is part of the home git repository.
Neovim / vim plugins are installed via ''vim-plug'', which is part of the home git repository.


Line 232: Line 234:
cd ~/.fzf
cd ~/.fzf
./install
./install
</source>

=== Java from Oracle ===
Reference: https://launchpad.net/~webupd8team/+archive/ubuntu/java
<source lang="bash">
sudo add-apt-repository ppa:webupd8team/java
sudo apt update
</source>

;Java 8
<source lang="bash">
sudo apt install oracle-java8-set-default
</source>

;Java 7
<source lang="bash">
sudo apt install oracle-java7-installer
# An error occur because archive is not found anymore
# ... so we copy back our backup at the right location
sudo cp /smb/lacie-cloudbox/family/archives/software/any/oracle-jdk-7u80-linux-x64/jdk-7u80-linux-x64.tar.gz /var/cache/oracle-jdk7-installer/
# Resume install
sudo apt install oracle-java7-installer
</source>
</source>


Line 267: Line 247:


Script:
Script:
<source lang="bash">
<source lang=bash>
#! /bin/bash
#! /bin/bash


Line 289: Line 269:
</source>
</source>


=== Gnome tweaks ===
=== Java from Oracle ===
Reference: https://launchpad.net/~webupd8team/+archive/ubuntu/java
* Top bar &rarr; Application Menu &rarr; '''OFF'''.
<source lang=bash>

sudo add-apt-repository ppa:webupd8team/java
=== Gnome extensions ===
sudo apt update

;AlternateTab
* By default, Gnome {{kb|Alt-Tab}} will group windows from the same application. To get rid of this annoying behaviour and restore the good old one, install extension '''AlternateTab'''.
* Debian: To install it, go to ''Gnome Tweaks'' (package {{deb|gnome-tweaks}}).
* Ubuntu: press ''Super'' key, then AlternateTab, it will be installed automatically. This might require installing <code>sudo apt install gnome-tweak-tool</code> [https://askubuntu.com/questions/69776/how-do-i-alt-tab-between-windows-using-gnome-3].

;[https://extensions.gnome.org/extension/120/system-monitor/ system-monitor] ([https://github.com/paradoxxxzero/gnome-shell-system-monitor-applet github])
* This replaces applet {{deb|indicator-multiload}} that no longer works since Ubuntu Bionic.
* Requires the following package:
<source lang="bash">
sudo apt install gir1.2-gtop-2.0 gir1.2-networkmanager-1.0 gir1.2-clutter-1.0 # Ubuntu
sudo apt install gir1.2-gtop-2.0 gir1.2-nm-1.0 gir1.2-clutter-1.0 # Debian
</source>
</source>
* However the indicator conflicts with owncloud client indicator (no longer visible).


;Java 8
;[https://extensions.gnome.org/extension/1267/no-title-bar/ No title bar]
<source lang=bash>
* Revive Unity-like merging of window title bar with desktop top bar.
sudo apt install oracle-java8-set-default
* Caveat: Window's menu is not merged [https://askubuntu.com/questions/966685/wasted-screen-space-due-to-multiple-horizontal-bars-at-the-top-when-an-applicati]

;[https://extensions.gnome.org/extension/1250/gnome-global-application-menu/ Gnome Global Application Menu]
* '''AVOID 'ALT' KEY STEALING FOCUS''' &rarr; In extension configuration (via Gnome Tweaks), Go to main menu, click on <code>Alt</code>, then {{kb|Backspace}} to remove the shortcut. Breathe again.
* To merge application menu in top title bar.
* As a side-effect, this extension fixes the owncloud-icon-not-showing bug.

=== Debian ===
Add <code>contrib non-free</code> repositories to apt source [https://wiki.debian.org/SourcesList].

Add <code>sid</code> release apt sources.
<source lang="bash">
cat << EOF | sudo tee /etc/apt/sources.list.d/sid.list
# Unstable / Sid
deb http://ftp.debian.org/debian/ sid main contrib
deb-src http://ftp.debian.org/debian/ sid main contrib
EOF

cat << EOF | sudo tee /etc/apt/preferences.d/sid
Package: *
Pin: release a=unstable
Pin-Priority: 400
EOF
</source>
</source>


;Java 7
Install these packages
<source lang="bash">
<source lang=bash>
sudo apt install mlocate dnsmasq-base
sudo apt install oracle-java7-installer
# An error occur because archive is not found anymore
sudo apt install libcanberra-gtk-module # Fix truecrypt warning
# ... so we copy back our backup at the right location
sudo cp /smb/lacie-cloudbox/family/archives/software/any/oracle-jdk-7u80-linux-x64/jdk-7u80-linux-x64.tar.gz /var/cache/oracle-jdk7-installer/
# Resume install
sudo apt install oracle-java7-installer
</source>
</source>


=== mDNS ===
We install '''Firefox 56''' and '''Thunderbird 52.8''' to preserve some important add-ons. These packages and their dependencies are no longer available but they can still be downloaded on http://snapshot.debian.org/:

<source lang="bash">
<source lang="bash">
sudo apt install libnss-mdns avahi-daemon mdns-scan
sudo dpkg -i firefox_56.0-2_amd64.deb \
libcurl3_7.52.1-5+deb9u9_amd64.deb \
libevent-2.0-5_2.0.21-stable-3_amd64.deb \
libhunspell-1.3-0_1.3.4-2_amd64.deb \
libhunspell-1.6-0_1.6.2-2_amd64.deb \
libvpx4_1.6.1-3+deb9u1_amd64.deb \
thunderbird_52.8.0-1~deb8u1_amd64.deb
sudo apt install -f
echo "firefox hold" | sudo dpkg --set-selections
echo "thunderbird hold" | sudo dpkg --set-selections
</source>
</source>


* To scan:
=== Wayland / XOrg ===
In Ubuntu 18.04 and Debian Testing (Debian 10, Buster), Wayland is enabled by default in Gnome session.

Sadly enough, Wayland comes with [[Wayland|several regressions]].
To '''disable Wayland''', edit file {{file|/etc/gdm3/daemon.conf}}:
<source lang="diff">
-#WaylandEnable=false
+WaylandEnable=false
</source>

== Common Applications ==

{| class="install_simple_log"
|-
|'''Opera''' (<tt>opera</tt>)||See [[Opera]] to fix apt key issues
|-
|'''Firefox''' (<tt>firefox</tt>)||
* Set {{kb|Ctrl-Tab}} to show last tab. Browse to <code>about:config</code>, and set <code>browser.ctrlTab.previews</code> to <code>True</code>.
|-
|'''Synapse''' (<tt>synapse</tt>)||
Install with:
<source lang=bash>
sudo add-apt-repository ppa:synapse-core/ppa
sudo apt-get update && sudo apt-get install synapse
</source>
* Start ''synapse'' → ''Preferences'' → click '''Startup on login'''
* Still in preferences, set ''Activate shortcut'' to '''{{kb|Ctrl-Alt-Space}}'''
|-
|'''Git''' (<tt>git gitk git-gui git-doc gitweb git-svn</tt>)||<small>[2011-12-15]</small> {{red|Updated to 1.7.8}} [https://kiwi.noekeon.org/miki/index.php?title=Git#From_sources Installed from sources]
|-
|'''etckeeper''' (<tt>etckeeper</tt>)||Configured to use ''git'' as SCM, ''AVOID_DAILY_AUTOCOMMITS'', ''AVOID_COMMIT_BEFORE_INSTALL''
|-
|'''mDNS''' (<tt>libnss-mdns avahi-daemon mdns-scan</tt>)||After install, do:
<source lang=bash>
<source lang=bash>
mdns-scan
mdns-scan
Line 396: Line 304:
host-name=griffin
host-name=griffin
</source>
</source>

|-
=== Midnight Commander===
|'''Midnight Commander''' (<tt>mc</tt>)||See [[Midnight Commander|reference page]]. Use '''vi''' as standard viewer/editor. Installed version from mc official repository to fix file highlighting issue.
<source lang="bash">
|-
sudo apt instal mc
|'''AutoSSH''' (<tt>autossh</tt>)||
</source>
|-
* See [[Midnight Commander|reference page]].
|'''SSH''' (<tt>ssh</tt>)||
* Use '''vi''' as standard viewer/editor.
* Installed version from mc official repository to fix file highlighting issue.

=== SSH ===
* Create / restore private key:
* Create / restore private key:
ln -sf ../private/ssh/id_rsa_work ~/.ssh/id_rsa
ln -sf ../private/ssh/id_rsa_work ~/.ssh/id_rsa
* If using {{file|bin/ssh-agent-refresh.sh}}:
* If using {{file|bin/ssh-agent-refresh.sh}}:
touch ~/.use_ssh_agent
touch ~/.use_ssh_agent

|-
=== Terminator ===
|'''Vim''' (<tt>vim vim-gnome exuberant-ctags</tt>)||including '''GVim''' to enable support of X clipboard
<source lang="bash">
|-
sudo apt install terminator
|'''Vim/Cscope''' (<tt>cscope</tt>)||
</source>
|-
* See [[Linux Software#Gnome Terminator|Gnome Terminator]] for tips.
|'''Ruby''' (<tt>ruby</tt>)||... for Vim plug-in <tt>snipMate.vim</tt>
|-
|'''Gnome Terminator''' (<tt>terminator</tt>)||See [[Linux Software#Gnome Terminator|Gnome Terminator]] for tips.
* Set ''background'' to '''transparent 6%''' (through <tt>~/.config/terminator/config</tt>)
* Set ''background'' to '''transparent 6%''' (through <tt>~/.config/terminator/config</tt>)
* Set ''scrollback'' to '''infinite scrollback'''
* Set ''scrollback'' to '''infinite scrollback'''
Line 420: Line 330:
* (not needed on trusty) Set <code>terminator</code> as default terminal for {{kb|Ctrl-Alt-T}} [http://askubuntu.com/questions/70540/how-can-i-set-default-terminal-used-in-unity]:
* (not needed on trusty) Set <code>terminator</code> as default terminal for {{kb|Ctrl-Alt-T}} [http://askubuntu.com/questions/70540/how-can-i-set-default-terminal-used-in-unity]:
gsettings set org.gnome.desktop.default-applications.terminal exec 'terminator --geometry=1220x720+100+100'
gsettings set org.gnome.desktop.default-applications.terminal exec 'terminator --geometry=1220x720+100+100'

|-
=== Samba ===
|'''Samba''' (<tt>smbclient cifs-utils</tt>)||
<source lang="bash">
sudo apt install smbclient cifs-utils
</source>

* Use package {{deb|smbfs}} for u1204 Precise Pangolin and before
* Use package {{deb|smbfs}} for u1204 Precise Pangolin and before

|-
=== NFS ===
|'''NFS Server''' (<tt>nfs-kernel-server nfs-common rpcbind</tt>)||See [[NFS]] for more details; Created entries in <tt>/etc/exports</tt>. ''rpcbind'' replaces ''portmap'' since Oneiric.
*'''NFS Server''' (<tt>nfs-kernel-server nfs-common rpcbind</tt>)||See [[NFS]] for more details; Created entries in <tt>/etc/exports</tt>. ''rpcbind'' replaces ''portmap'' since Oneiric.
|-

|'''AutoFS''' (<tt>autofs</tt>)||
=== AutoFS ===
<source lang="bash">
sudo apt install autofs
</source>
* Mount '''mnemosyne''' shares as '''NFS autofs''' (see [https://help.ubuntu.com/community/Autofs]) and as '''SMB autofs'''
* Mount '''mnemosyne''' shares as '''NFS autofs''' (see [https://help.ubuntu.com/community/Autofs]) and as '''SMB autofs'''
:Enabled/created the following automounters in <tt>/etc/auto.master</tt>:
:Enabled/created the following automounters in <tt>/etc/auto.master</tt>:
Line 449: Line 367:
</source>
</source>
* If necessary, mount shares '''read-only''': add option <code>ro</code> in {{file|/etc/autofs.smb.mnemosyne}}
* If necessary, mount shares '''read-only''': add option <code>ro</code> in {{file|/etc/autofs.smb.mnemosyne}}

|-
=== KeePass ===
|'''KeePassX''' (<tt>keepassx</tt>)||
* '''KeePassX''' (<tt>keepassx</tt>)||
* Set kbd layout to fix autotype bug ([https://bugs.launchpad.net/ubuntu/+source/keepassx/+bug/891048]). Create {{file|~/.xprofile}} and {{file|/etc/skel/.xprofile}} [https://wiki.archlinux.org/index.php/Xprofile]:
* Set kbd layout to fix autotype bug ([https://bugs.launchpad.net/ubuntu/+source/keepassx/+bug/891048]). Create {{file|~/.xprofile}} and {{file|/etc/skel/.xprofile}} [https://wiki.archlinux.org/index.php/Xprofile]:
<source lang=bash>
<source lang=bash>
Line 458: Line 377:
setxkbmap be
setxkbmap be
</source>
</source>

|-
=== Gpg ===
|'''apt-file''' (<tt>apt-file</tt>)||
<source lang=bash>
|-
sudo apt install gnupg-agent pgpgpg
|'''p7zip''' (<tt>p7zip-full p7zip-rar</tt>)||
</source>
|-
|'''dlocate''' (<tt>dlocate</tt>)||
|-
|'''Thunderbird''' (<tt>thunderbird</tt>)||See [[Thunderbird]].
|-
|'''Google Chrome''' (<tt>chromium-browser</tt>)||
|-
|'''Meld''' (<tt>meld</tt>)||Diff tool
|-
|'''Color Diff''' (<tt>colordiff</tt>)||
|-
|'''MS Truetype core fonts''' (<tt>ttf-msttcorefonts-installer</tt>)||
|-
|'''Qiv''' (<tt>qiv</tt>)||
|-
|'''gThumb''' (<tt>gthumb</tt>)||
|-
|'''GPG''' (<tt>gpgv gnupg-agent pgpgpg</tt>)||
* Added <code>use-agent</code> at end of {{file|~/.gnupg/gpg.conf}}
* Added <code>use-agent</code> at end of {{file|~/.gnupg/gpg.conf}}
* Edit {{file|~/.gnupg/gpg.conf}} as necessary.
* Edit {{file|~/.gnupg/gpg.conf}} as necessary.

|-
=== Firefox ===
|'''Rename utils''' (<tt>renameutils</tt>)||
|-
|'''Wine''' (<tt>wine</tt>)||See [[Configuration NXP Dell Latitude_E6500 - Wine|Wine page]]
|-
|'''MPlayer''' (<tt>mplayer mplayer-doc mplayer-fonts</tt>)||
|-
|'''Flash Plugin 10''' (<tt>flashplugin-installer</tt>)||
* Enable Ubuntu partner repository if needed(<tt>deb http://archive.canonical.com/ubuntu lucid partner</tt>).
* In case of error <code>failure to download extra data files flashplugin-installer</code>, try
<source lang=bash>
<source lang=bash>
sudo apt-get --reinstall install flashplugin-installer
sudo apt install firefox
</source>
</source>
* Set {{kb|Ctrl-Tab}} to show last tab. Browse to <code>about:config</code>, and set <code>browser.ctrlTab.previews</code> to <code>True</code>.
(Old recipe:

<source lang="bash">sudo aptitude autoremove "flashplugin-*"
=== XBMC ===
sudo aptitude install flashplugin-installer
* see [[XBMC#Install|XBMC]]
</source>)

* '''{{red|broken}}'''&mdash; This is too unstable, see next solution &mdash; On Ubuntu 12.04 with NVidia card, there is a bug ''[http://askubuntu.com/questions/117127/flash-video-appears-blue Flash video appears blue]''. That link recommends to update ''libvdpau1'', but in my case it was already at the latest version. Instead the following did the trick (from [https://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/+bug/968647 bug 968647]):
=== tmux ===
* Alternative to ''screen'', but with support for multiple panes like ''terminator''

=== Wine ===
* '''Wine''' (<tt>wine</tt>)||See [[Configuration NXP Dell Latitude_E6500 - Wine|Wine page]]

== Configuration ==
* Install fonts
:* '''[https://github.com/belluzj/fantasque-sans Fantasque Sans Mono]'''
<source lang=bash>
<source lang=bash>
sudo mkdir /etc/adobe
mkdir ~/.fonts
wget https://github.com/belluzj/fantasque-sans/releases/download/v1.7.1/FantasqueSansMono.tar.gz
echo -e "EnableLinuxHWVideoDecode=1\nOverrideGPUValidation=true" | sudo tee /etc/adobe/mms.cfg > /dev/null
tar xvzf FantasqueSansMono.tar.gz -C ~/.fonts/ --wildcards *.ttf
sudo fc-cache -fv
</source>
</source>
* Apply common settings (see below)
* Another solution is to disable ''hardware acceleration'', by going into flash player settings. If the settings window is not clickable, first disable unity 3D (for instance with <code>metacity --replace&</code>)
* Applications not from repositories:
** Panda glGo 1.4.1 ([[Linux Software#Panda glGo|local page]], does not work on ''Oneiric 64-bit'')
* Install latest updates:
<source lang=bash>
sudo apt dist-upgrade
</source>

* Restore scrollbar behaviour in GTK3 [https://support.mozilla.org/en-US/questions/1121076], [https://bugzil.la/1260067#c3].
: Use {{kb|Shift+Click}} or {{right click}} to get the ''jump to click'' behaviour.
<source lang=bash>
cat >> ~/.config/gtk-3.0/settings.ini <<__HERE__
[Settings]
gtk-primary-button-warps-slider=false
__HERE__
</source>

; Ubuntu 12.04

<source lang=bash>
sudo vi /etc/default/apport # Disable apport by setting "enabled=0"
sudo etckeeper commit "disable apport"
</source>

=== Fonts ===
Antialiasing '''RGBA''', Hinting '''Slight''', Text scaling factor '''1.00'''.

{| class=wikitable
|-
|-
!Application!!Font!!Selected font
|'''Quicktime plugin''' (<tt>gnome-mplayer gecko-mediaplayer</tt>)||To play Quicktime content in ''Opera'', ''Firefox''
|-
|-
|Terminator
|'''Gimp''' (<tt>gimp</tt>)||
|Monospace font
|<code>Fantasque Sans Mono 9</code>
|-
|-
|Gnome Terminal
|'''Graphical Disk Map''' (<tt>gdmap</tt>)||
|Monospace font
|<code>Fantasque Sans Mono 9</code>
|-
|-
|Unity (desktop)
|'''gparted''' (<tt>gparted</tt>)||
|Default font
|<code>Lucida Sans Regular 9</code>
|-
|-
|Unity (desktop)
|'''Ubuntu restricted extras''' (<tt>ubuntu-restricted-extras</tt>)||shall install automatically '''libdvdread4'''
|Document font
|<code>Lucida Sans Regular 10</code>
|-
|-
|Unity (desktop)
|'''libdvdcss2'''||Installed via <code>sudo /usr/share/doc/libdvdread4/install-css.sh</code> (see also [https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs])
|Monospace font
|-
|<code>Fantasque Sans Mono 10</code>
|'''libavcodec-extra-54''' (<tt>libavcodec-extra-54</tt>)||
|-
|-
|Unity (desktop)
|'''Ubuntu tweak''' (<tt>ubuntu-tweak</tt>)||see [[Ubuntu#Ubuntu Tweak|Ubuntu Tweak]]
|Windows title font
|<code>Lucida Sans Unicode Bold 10</code>
|-
|-
|Firefox
|{{gray|'''Medibuntu application center''' (<tt>app-install-data-medibuntu</tt>)}}||
|Sans-serif (latin)
* No longer available on u1404 Trusty Tahr
|<code>Liberation Sans 16</code>
* {{gray|This install medibuntu apps in Ubuntu Application Center}}
|-
|'''XBMC''' (<tt>xbmc</tt>)||see [[XBMC#Install|XBMC]]
|-
|'''XSel''' (<tt>xsel</tt>)||
|-
|'''Compiz config settings manager''' (<tt>compizconfig-settings-manager</tt>)||
|-
|-
|Firefox
|'''moreutils'''||For ''chronic'', ''sponge''
|Monospace (Latin)
|-
|<code>Fantasque Sans Mono 16</code>
|'''tmux''' (<tt>tmux</tt>)||Alternative to ''screen'', but with support for multiple panes like ''terminator''
|-
|'''CPU indicator''' (<tt>indicator-multiload</tt>)||Selected ''CPU'', ''Memory'', ''Network''
|-
|'''Unity tweak tool''' (<tt>unity-tweak-tool</tt>||
* Don't show desktop in switcher
* top right hot corner: ''Spread all windows''
|}
|}


For firefox, fonts are inspired from [https://www.mediawiki.org/wiki/Typography_refresh Mediawiki Vector skin -- typography refresh].
'''Optional Applications:'''


== Debian ==
{| class="install_simple_log"
Add <code>contrib non-free</code> repositories to apt source [https://wiki.debian.org/SourcesList].
|-
|'''GNU Go''' (<tt>gnugo</tt>)||
|-
|Various '''Go''' games (<tt>qgo uligo cgoban</tt>)||
|-
|'''Quarry''' (<tt>quarry</tt>)||Board games Go, Amazons, and Reversi
|-
|'''PowerTop''' (<tt>powertop</tt>)||
|}


Add <code>sid</code> release apt sources.
'''Applications not from repositories:'''
<source lang="bash">
cat << EOF | sudo tee /etc/apt/sources.list.d/sid.list
# Unstable / Sid
deb http://ftp.debian.org/debian/ sid main contrib
deb-src http://ftp.debian.org/debian/ sid main contrib
EOF


cat << EOF | sudo tee /etc/apt/preferences.d/sid
{| class="install_simple_log"
Package: *
|-
Pin: release a=unstable
|'''Panda glGo 1.4.1'''||See [[Linux Software#Panda glGo|local page]] &mdash; does not work on ''Oneiric 64-bit''
Pin-Priority: 400
|}
EOF
</source>


Install these packages
'''Optional Essentials''':
<source lang="bash">
sudo apt install mlocate dnsmasq-base
sudo apt install libcanberra-gtk-module # Fix truecrypt warning
</source>


We install '''Firefox 56''' and '''Thunderbird 52.8''' to preserve some important add-ons. These packages and their dependencies are no longer available but they can still be downloaded on http://snapshot.debian.org/:
{| class="install_simple_log"
|-
|'''nmap''' (<tt>nmap</tt>)||For use with my git ''prj'' script
|}


<source lang="bash">
== Common Settings ==
sudo dpkg -i firefox_56.0-2_amd64.deb \
=== /etc/sudoers ===
libcurl3_7.52.1-5+deb9u9_amd64.deb \
* '''SUDO''' - keep environment variables:
libevent-2.0-5_2.0.21-stable-3_amd64.deb \
** <code>http_proxy</code>, <code>https_proxy</code> (to keep proxy settings for apt-get etc)
libhunspell-1.3-0_1.3.4-2_amd64.deb \
** <code>GREP_OPTIONS</code> (keep grep options)
libhunspell-1.6-0_1.6.2-2_amd64.deb \
** <code>DISPLAY</code>, <code>XAUTHORITY</code> (avoid doing <code>xhost local:root</code> before launching X pgm)
libvpx4_1.6.1-3+deb9u1_amd64.deb \
** <code>HOME</code> (e.g. to keep git aliases and settings when using etckeeper)
thunderbird_52.8.0-1~deb8u1_amd64.deb
** <code>PASSWD</code> (e.g. to pass password via env. var to <code>mount.cifs</code>)
sudo apt install -f
{{pl2|1=<source lang=bash>
echo "firefox hold" | sudo dpkg --set-selections
Defaults env_reset
echo "thunderbird hold" | sudo dpkg --set-selections
Defaults env_keep += "http_proxy https_proxy GREP_OPTIONS DISPLAY XAUTHORITY HOME"
</source>}}
</source>
* '''SUDO''' - Allow <code>truecrypt</code> and <code>rfkill</code> w/o password:
{{pl2|1=<source lang=bash>
ALL ALL=NOPASSWD: /usr/bin/truecrypt
ALL ALL=NOPASSWD: /sbin/rfkill
</source>}}


=== Network ===
== Workaround ==
* Install custom ''udisks'' package, version ''1.0.4-5ubuntu2.1fuu1'', to fix unreadable DVD-RW. See [[Linux_Admin#Udisks|udisks]], or [https://bugs.launchpad.net/ubuntu/+source/udisks/+bug/635499 bug 635499]).
* '''Samba / NFS client''': Via ''autofs''
sudo dpkg -i udisks_1.0.4-5ubuntu2.1fuu1_amd64.deb


* Add the following to {{file|~/.bash_profile}} and {{file|~/.profile}} to Meta-key ({{kb|Alt}}) not working and ''Midnight Commander'' displays <code>Press any key...</code> after each command when in ''tmux'' session [https://www.midnight-commander.org/ticket/2479]:
===Preferences===
<source lang=bash>
* [[Ubuntu#Assign Ctrl-Alt-Del to Shutdown dialog|Use '''Ctrl-Alt-Delete''' for shutdown dialog]].
# This fix meta-key support and stop mc displaying "Press any key..." in tmux session
if [ $TERM = "screen" ]; then
export TERM=xterm
fi
if [ -n "$TMUX" ]; then
export COLORTERM=rxvt
fi
</source>

== The pit (things to tidy up) ==

=== Miscellaneous ===
* Optional - Fix flash issue
<source lang=bash>
# Optional - Fix blue video in flash (see below for details)
sudo mkdir /etc/adobe
echo -e "EnableLinuxHWVideoDecode=1\nOverrideGPUValidation=true" | sudo tee /etc/adobe/mms.cfg > /dev/null
sudo etckeeper commit "Fix blue video bug in adobe flashplayer"
</source>


* Install packages - optional
<source lang=bash>
# Optional applications
sudo apt install gnugo qgo uligo cgoban quarry pgpgpg powertop
</source>

=== Synapse ===
<source lang=bash>
sudo apt install synapse
</source>
Install with:
<source lang=bash>
sudo add-apt-repository ppa:synapse-core/ppa
sudo apt-get update && sudo apt-get install synapse
</source>
* Start ''synapse'' → ''Preferences'' → click '''Startup on login'''
* Still in preferences, set ''Activate shortcut'' to '''{{kb|Ctrl-Alt-Space}}'''

=== Opera ===
<source lang=bash>
sudo apt install opera
</source>
See [[Opera]] to fix apt key issues.


===Users===
===Users===
Line 604: Line 575:
</source>
</source>


===X11===
=== Flash ===
*'''Flash Plugin 10''' (<tt>flashplugin-installer</tt>)||
* Enable Ubuntu partner repository if needed(<tt>deb http://archive.canonical.com/ubuntu lucid partner</tt>).
* In case of error <code>failure to download extra data files flashplugin-installer</code>, try
<source lang=bash>
sudo apt-get --reinstall install flashplugin-installer
</source>
(Old recipe:
<source lang="bash">sudo aptitude autoremove "flashplugin-*"
sudo aptitude install flashplugin-installer
</source>)
* '''{{red|broken}}'''&mdash; This is too unstable, see next solution &mdash; On Ubuntu 12.04 with NVidia card, there is a bug ''[http://askubuntu.com/questions/117127/flash-video-appears-blue Flash video appears blue]''. That link recommends to update ''libvdpau1'', but in my case it was already at the latest version. Instead the following did the trick (from [https://bugs.launchpad.net/ubuntu/+source/flashplugin-nonfree/+bug/968647 bug 968647]):
<source lang=bash>
sudo mkdir /etc/adobe
echo -e "EnableLinuxHWVideoDecode=1\nOverrideGPUValidation=true" | sudo tee /etc/adobe/mms.cfg > /dev/null
</source>
* Another solution is to disable ''hardware acceleration'', by going into flash player settings. If the settings window is not clickable, first disable unity 3D (for instance with <code>metacity --replace&</code>)

=== Quicktime ===
* '''Quicktime plugin''' (<tt>gnome-mplayer gecko-mediaplayer</tt>)||To play Quicktime content in ''Opera'', ''Firefox''
* '''libdvdcss2'''||Installed via <code>sudo /usr/share/doc/libdvdread4/install-css.sh</code> (see also [https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs])

=== Ubuntu tweak ===
;Ubuntu tweak
<source lang="bash">
sudo apt install ubuntu-tweak
</source>
* see [[Ubuntu#Ubuntu Tweak|Ubuntu Tweak]]
{{gray|'''Medibuntu application center''' (<tt>app-install-data-medibuntu</tt>)}}||
* No longer available on u1404 Trusty Tahr
* {{gray|This install medibuntu apps in Ubuntu Application Center}}

;Unity tweak tool
<source lang="bash">
sudo apt install unity-tweak-tool
</source>
* Don't show desktop in switcher
* top right hot corner: ''Spread all windows''

=== gdmap ===
<source lang="bash">
sudo apt install gdmap # Graphical Disk Map - broken? using baobab instead
</source>

=== X11 ===
* Custom keyboard mapping '''be''':
* Custom keyboard mapping '''be''':
<source lang=bash>
<source lang=bash>
Line 629: Line 644:
</source>
</source>


=== Workaround ===
=== Network ===
* '''Samba / NFS client''': Via ''autofs''
* Install custom ''udisks'' package, version ''1.0.4-5ubuntu2.1fuu1'', to fix unreadable DVD-RW. See [[Linux_Admin#Udisks|udisks]], or [https://bugs.launchpad.net/ubuntu/+source/udisks/+bug/635499 bug 635499]).
sudo dpkg -i udisks_1.0.4-5ubuntu2.1fuu1_amd64.deb


===Preferences===
* Add the following to {{file|~/.bash_profile}} and {{file|~/.profile}} to Meta-key ({{kb|Alt}}) not working and ''Midnight Commander'' displays <code>Press any key...</code> after each command when in ''tmux'' session [https://www.midnight-commander.org/ticket/2479]:
* [[Ubuntu#Assign Ctrl-Alt-Del to Shutdown dialog|Use '''Ctrl-Alt-Delete''' for shutdown dialog]].
<source lang=bash>
# This fix meta-key support and stop mc displaying "Press any key..." in tmux session
if [ $TERM = "screen" ]; then
export TERM=xterm
fi
if [ -n "$TMUX" ]; then
export COLORTERM=rxvt
fi
</source>

=== Fonts ===
Antialiasing '''RGBA''', Hinting '''Slight''', Text scaling factor '''1.00'''.

{| class=wikitable
|-
!Application!!Font!!Selected font
|-
|Terminator
|Monospace font
|<code>Fantasque Sans Mono 9</code>
|-
|Gnome Terminal
|Monospace font
|<code>Fantasque Sans Mono 9</code>
|-
|Unity (desktop)
|Default font
|<code>Lucida Sans Regular 9</code>
|-
|Unity (desktop)
|Document font
|<code>Lucida Sans Regular 10</code>
|-
|Unity (desktop)
|Monospace font
|<code>Fantasque Sans Mono 10</code>
|-
|Unity (desktop)
|Windows title font
|<code>Lucida Sans Unicode Bold 10</code>
|-
|Firefox
|Sans-serif (latin)
|<code>Liberation Sans 16</code>
|-
|Firefox
|Monospace (Latin)
|<code>Fantasque Sans Mono 16</code>
|}

For firefox, fonts are inspired from [https://www.mediawiki.org/wiki/Typography_refresh Mediawiki Vector skin -- typography refresh].

Revision as of 12:04, 14 April 2019

This page details a common configuration for Linux, independent of the underlying platform.

Base

First we install etckeeper (with git)

# ### etckeeper + git

sudo apt install git etckeeper
git config --global user.email "user@server.com"       # Make sure this is defined for admin user + root
git config --global user.name "User Name"              # or release upgrade might fail in the future
sudo su -
git config --global user.email "user@server.com"
git config --global user.name "User Name (root)"
logout

sudo vi /etc/etckeeper/etckeeper.conf                  # Select git, AVOID_DAILY_AUTOCOMMITS, AVOID_COMMIT_BEFORE_INSTALL
sudo etckeeper init
sudo etckeeper commit "1st commit"
cd /etc
sudo vi .gitignore                                     # Ignore resolv.c* (and cups/subscriptions.* before Ubuntu Precise)
sudo git rm --cached resolv.c*
sudo git rm --cached cups/subscriptions.*              # No longer needed on Ubuntu Precise and after
sudo git add .gitignore
sudo etckeeper commit "ignore resolv.c*, cups/subscriptions.*"

Then we install ssh, ssh server, and vim + mc

# ### SSH + vim + mc

sudo apt install ssh openssh-server vim-gnome mc

From now, the configuration can continue either locally or remotely (using ssh).

We now install a few repositories, as required.

# ### Repositories (enable as required)

sudo vi /etc/apt/sources.list                                      # Ubuntu/debian - Enable 'partner' (and 'extra' if available)
sudo etckeeper commit "enable partners, extra repositories"

sudo add-apt-repository ppa:phoerious/keepassxc                    # keepassxc
# sudo add-apt-repository ppa:synapse-core/ppa                     # Synapse - older ubuntu release
sudo add-apt-repository ppa:tualatrix/next                         # Ubuntu Tweak
                                                                   # 14.04 Trusty: ppa not yet available
sudo add-apt-repository ppa:team-xbmc/ppa                          # XBMC
sudo etckeeper commit "Add a few repositories"

sudo apt update
  • hosts — Update /etc/hosts
sudo vi /etc/hosts                                                 # Add any relevant entries.
                                                                   # Make sure localhost as FQDN:
                                                                   #     127.0.1.1	myhost.domain.com
sudo etckeeper commit "update hosts file"
  • sudoers — Create new files in /etc/sudoers.d as required:
# envkeep
# http_proxy, https_proxy -- to keep proxy settings for apt-get etc
# GREP_OPTIONS            -- keep grep options
# DISPLAY, XAUTHORITY     -- avoid doing 'xhost local:root' before launching X pgm
# HOME                    -- e.g. to keep git aliases and settings when using etckeeper
# PASSWD                  -- e.g. to pass password via env. var to <code>mount.cifs</code>
echo "Defaults env_keep += \"http_proxy https_proxy GREP_OPTIONS DISPLAY XAUTHORITY HOME\"" | sudo tee /etc/sudoers.d/envkeep
# Truecrypt
echo "ALL ALL = NOPASSWD: /usr/bin/truecrypt" | sudo tee /etc/sudoers.d/truecrypt
# Privoxy - no longer needed with tun2socks-manager
#echo "ALL ALL = (ALL) NOPASSWD: /etc/privoxy/set-network-config" | sudo tee /etc/sudoers.d/privoxy
# rfkill - no more used
#echo "ALL ALL = NOPASSWD: /sbin/rfkill" | sudo tee /etc/sudoers.d/rfkill
sudo chmod o-r /etc/sudoers.d/*
sudo etckeeper commit "update sudoers.d files"
  • Restore home profile (from git)
# Restore my profile
mv home/.git .
rm -rf home
git reset --hard
git st
export PATH=$PATH:$HOME/bin
set-network.sh
~/setup.sh

Kernel update

  • Install latest kernel [1]
# Get Utopic kernel
sudo apt install --install-recommends linux-generic-lts-utopic xserver-xorg-lts-utopic libgl1-mesa-glx-lts-utopic libegl1-mesa-drivers-lts-utopic
# Get Vivid kernel
# DO NOT UPDATE TO VIVID X.ORG - IT LEAKS LIKE HELL
# sudo apt install --install-recommends linux-generic-lts-vivid xserver-xorg-lts-vivid libgl1-mesa-glx-lts-vivid libegl1-mesa-drivers-lts-vivid
sudo apt install --install-recommends linux-generic-lts-vivid

Standard packages

  • Install packages - standard
# Common Applications
# sudo apt install synapse                                                # No longer available (U 13.10)

sudo apt install keepassxc                                                # Upgrade: keepassx -> keepassxc
sudo apt install rpcbind                                                  # Use 'portmap' before oneiric ocelot
sudo apt install cifs-utils                                               # Use 'smbfs' with precise pangolin or before

sudo apt install libnss-mdns avahi-daemon mdns-scan autossh terminator \
                 smbclient nfs-kernel-server nfs-common \
                 autofs apt-file p7zip-full p7zip-rar dlocate \
                 chromium-browser ttf-mscorefonts-installer \
                 qiv gthumb gnupg-agent renameutils mplayer \
                 mplayer-doc mplayer-fonts gimp gparted \
                 xsel moreutils tmux libavcodec-extra \
                 pepperflashplugin-nonfree dconf-tools \
                 gnome-tweak-tool silversearcher-ag gawk
                                                                          # moreutils: for chronic, sponge
                                                                          # Removed in Bionic: gnome-mplayer gecko-mediaplayer ubuntu-tweak 
                                                                          #     app-install-data-medibuntu
                                                                          # Upgraded: libavcodec-extra-54
                                                                          # Discontinued: ubuntu-restricted-extras (would install libdvdread4)
                                                                          # 14.04 Trusty: packages 'ubuntu-tweak', 'app-install-data-medibuntu',
                                                                          # 'smbfs' missing
sudo apt install unity-tweak-tool compizconfig-settings-manager compiz-plugins 
sudo apt install xbmc
sudo apt install thunderbird
sudo apt install wine-stable
sudo apt install chrome-gnome-shell                                       # Since U18.04, to manage Gnome extension in Chrome / FF. Require browser ext.
sudo dpkg -i ripgrep_0.10.0_amd64.deb                                     # Download from https://github.com/BurntSushi/ripgrep
wget https://github.com/sharkdp/bat/releases/download/v0.10.0/bat_0.10.0_amd64.deb
sudo dpkg -i bat_0.10.0_amd64.deb
sudo apt install fasd fd-find

sudo apt-file update
sudo /usr/share/doc/libdvdread4/install-css.sh
# Optional essentials
sudo apt install nmap                                                     # For various personal scripts (''prj'', ''tsync''')
sudo apt install winbind libnss-winbind                                   # winbind + libnss-winbind for NetBIOS name resolution
sudo vi /etc/nsswitch.conf                                                # Add "wins" at the end of "hosts:" line

Desktop - Gnome

Gnome tweak

  • Top bar → Application Menu → OFF.

Gnome extensions

AlternateTab
  • By default, Gnome Alt-Tab will group windows from the same application. To get rid of this annoying behaviour and restore the good old one, install extension AlternateTab.
  • Debian: To install it, go to Gnome Tweaks (package gnome-tweaks).
  • Ubuntu: press Super key, then AlternateTab, it will be installed automatically. This might require installing sudo apt install gnome-tweak-tool [2].
system-monitor (github)
  • This replaces applet indicator-multiload that no longer works since Ubuntu Bionic.
  • Requires the following package:
sudo apt install gir1.2-gtop-2.0 gir1.2-networkmanager-1.0  gir1.2-clutter-1.0   # Ubuntu
sudo apt install gir1.2-gtop-2.0 gir1.2-nm-1.0  gir1.2-clutter-1.0               # Debian
  • However the indicator conflicts with owncloud client indicator (no longer visible).
  • Selects memory, cpu, network.
No title bar
  • Revive Unity-like merging of window title bar with desktop top bar.
  • Caveat: Window's menu is not merged [3]
Gnome Global Application Menu
  • AVOID 'ALT' KEY STEALING FOCUS → In extension configuration (via Gnome Tweaks), Go to main menu, click on Alt, then Backspace to remove the shortcut. Breathe again.
  • To merge application menu in top title bar.
  • As a side-effect, this extension fixes the owncloud-icon-not-showing bug.

Development packages

  • Install packages - development
sudo apt install gitk git-gui git-doc exuberant-ctags cscope ruby meld colordiff  # ruby for Vim plugin snipMate.vim

# Optional
sudo apt install gitweb git-svn

Optional packages

Thunderbird

See Thunderbird.

terminator

Install the new terminator that depends on GTK3 (terminator-gtk3, version 1.97~ppa3).

See Terminator.

tmux

Make sure that tmux is at least version 2.2. If not install it:

neovim / vim

See Neovim page to install Neovim.

Neovim / vim plugins are installed via vim-plug, which is part of the home git repository.

However the following plugins require extra configuration:

YouCompleteMe

This is the install script to enable the minimum features. Note that this is done automatically by vim-plug.

cd ~/.vim/plugged/YouCompleteMe
./install.py
cpsm

Run this script after installing the plugin with vim-plug.

sudo apt install libboost-all-dev cmake python-dev libicu-dev
cd ~/.vim/plugged/cpsm
./install.sh

fzf

fzf is a very fast fuzzy-finder written in Go.

It is installed when installing vim plugins. To install it in bash:

git clone https://github.com/junegunn/fzf.git ~/.fzf    # Skip this step if already present
cd ~/.fzf
./install

LibreOffice

Install latest LibreOffice by adding the PPA:

sudo add-apt-repository ppa:libreoffice/ppa
sudo apt update

KeepassXC

We now store the database on Owncloud, and sync to local git repository with cron.

Script:

#! /bin/bash

BASEDIR=$(dirname "$(readlink -nf "${BASH_SOURCE[0]}")")
cd "$BASEDIR"

KDBX=work.kdbx
OWNCLOUD_DIR=~/ownCloud/kdbx

if ! diff -q $OWNCLOUD_DIR/$KDBX $KDBX; then
    echo "Adding $KDBX to git..."
    cp $OWNCLOUD_DIR/$KDBX $KDBX
    git add $KDBX
    git commit -m "Sync keepassx db with Owncloud"
fi

Cronjob:

31 * * * *      chronic ~peetersm/private/kdbx/sync_from_owncloud.sh

Java from Oracle

Reference: https://launchpad.net/~webupd8team/+archive/ubuntu/java

sudo add-apt-repository ppa:webupd8team/java
sudo apt update
Java 8
sudo apt install oracle-java8-set-default
Java 7
sudo apt install oracle-java7-installer
# An error occur because archive is not found anymore
# ... so we copy back our backup at the right location
sudo cp /smb/lacie-cloudbox/family/archives/software/any/oracle-jdk-7u80-linux-x64/jdk-7u80-linux-x64.tar.gz /var/cache/oracle-jdk7-installer/
# Resume install
sudo apt install oracle-java7-installer

mDNS

sudo apt install libnss-mdns avahi-daemon mdns-scan
  • To scan:
mdns-scan

Machine should broadcast its ip address on griffin.local to all avahi clients. For some strange reason, avahi may append a -2 suffix to broadcast name. To avoid that, edit /etc/avahi/avahi-daemon.conf and set host-name variable:

host-name=griffin

Midnight Commander

sudo apt instal mc
  • See reference page.
  • Use vi as standard viewer/editor.
  • Installed version from mc official repository to fix file highlighting issue.

SSH

  • Create / restore private key:
ln -sf ../private/ssh/id_rsa_work ~/.ssh/id_rsa
  • If using bin/ssh-agent-refresh.sh:
touch ~/.use_ssh_agent

Terminator

sudo apt install terminator
  • See Gnome Terminator for tips.
  • Set background to transparent 6% (through ~/.config/terminator/config)
  • Set scrollback to infinite scrollback
  • Custom geometry terminator --geometry=1220x720+100+100 (in application menu)
  • Font Lucida Console, 9 (on nxl67002ux / nxl67063ux), or Bitstream Vera Sans Mono Roman 9 (on nxl67063 Cygwin-X).
  • (not needed on trusty) Set terminator as default terminal for Ctrl-Alt-T [4]:
gsettings set org.gnome.desktop.default-applications.terminal exec 'terminator --geometry=1220x720+100+100'

Samba

sudo apt install smbclient cifs-utils
  • Use package smbfs for u1204 Precise Pangolin and before

NFS

  • NFS Server (nfs-kernel-server nfs-common rpcbind)||See NFS for more details; Created entries in /etc/exports. rpcbind replaces portmap since Oneiric.

AutoFS

sudo apt install autofs
  • Mount mnemosyne shares as NFS autofs (see [5]) and as SMB autofs
Enabled/created the following automounters in /etc/auto.master:
/net                /etc/auto.net                   --ghost
/smb/mnemosyne      /etc/auto.smb.mnemosyne         --ghost
/smb/lacie-cloudbox /etc/auto.smb.lacie-cloudbox    --ghost
  • Create configuration file /etc/auto.smb.mnemosyne
  • Create SMB credential files /etc/auto.smb.mnemosyne.* (see man mount.cifs)
  • Created path for mount points:
sudo mkdir /net
sudo mkdir -p /smb/mnemosyne
# ls /net/mnemosyne
# sudo mkdir -p /mnt/mnemosyne
# for i in /net/mnemosyne/volume1/*; do sudo ln -s $i /mnt/mnemosyne/$(basename $i); done
  • Or recover settings from an already configured host:
scp griffin:tmp/autofs.tgz .                                        # Configure autofs
sudo tar -xvzf autofs.tgz
sudo cp etc/* /etc
  • If necessary, mount shares read-only: add option ro in /etc/autofs.smb.mnemosyne

KeePass

  • KeePassX (keepassx)||
  • Set kbd layout to fix autotype bug ([6]). Create ~/.xprofile and /etc/skel/.xprofile [7]:
#!/bin/sh

#
setxkbmap be

Gpg

sudo apt install gnupg-agent pgpgpg
  • Added use-agent at end of ~/.gnupg/gpg.conf
  • Edit ~/.gnupg/gpg.conf as necessary.

Firefox

sudo apt install firefox
  • Set Ctrl-Tab to show last tab. Browse to about:config, and set browser.ctrlTab.previews to True.

XBMC

tmux

  • Alternative to screen, but with support for multiple panes like terminator

Wine

Configuration

  • Install fonts
mkdir ~/.fonts
wget https://github.com/belluzj/fantasque-sans/releases/download/v1.7.1/FantasqueSansMono.tar.gz
tar xvzf FantasqueSansMono.tar.gz -C ~/.fonts/ --wildcards *.ttf
sudo fc-cache -fv
  • Apply common settings (see below)
  • Applications not from repositories:
    • Panda glGo 1.4.1 (local page, does not work on Oneiric 64-bit)
  • Install latest updates:
sudo apt dist-upgrade
  • Restore scrollbar behaviour in GTK3 [8], [9].
Use Shift+Click or Template:Right click to get the jump to click behaviour.
cat >> ~/.config/gtk-3.0/settings.ini <<__HERE__
[Settings]
gtk-primary-button-warps-slider=false
__HERE__
Ubuntu 12.04
sudo vi /etc/default/apport                         # Disable apport by setting "enabled=0"
sudo etckeeper commit "disable apport"

Fonts

Antialiasing RGBA, Hinting Slight, Text scaling factor 1.00.

Application Font Selected font
Terminator Monospace font Fantasque Sans Mono 9
Gnome Terminal Monospace font Fantasque Sans Mono 9
Unity (desktop) Default font Lucida Sans Regular 9
Unity (desktop) Document font Lucida Sans Regular 10
Unity (desktop) Monospace font Fantasque Sans Mono 10
Unity (desktop) Windows title font Lucida Sans Unicode Bold 10
Firefox Sans-serif (latin) Liberation Sans 16
Firefox Monospace (Latin) Fantasque Sans Mono 16

For firefox, fonts are inspired from Mediawiki Vector skin -- typography refresh.

Debian

Add contrib non-free repositories to apt source [10].

Add sid release apt sources.

cat << EOF | sudo tee /etc/apt/sources.list.d/sid.list
# Unstable / Sid
deb http://ftp.debian.org/debian/ sid main contrib
deb-src http://ftp.debian.org/debian/ sid main contrib
EOF

cat << EOF | sudo tee /etc/apt/preferences.d/sid
Package: *
Pin: release a=unstable
Pin-Priority: 400
EOF

Install these packages

sudo apt install mlocate dnsmasq-base
sudo apt install libcanberra-gtk-module      # Fix truecrypt warning

We install Firefox 56 and Thunderbird 52.8 to preserve some important add-ons. These packages and their dependencies are no longer available but they can still be downloaded on http://snapshot.debian.org/:

sudo dpkg -i firefox_56.0-2_amd64.deb \
    libcurl3_7.52.1-5+deb9u9_amd64.deb \
    libevent-2.0-5_2.0.21-stable-3_amd64.deb \
    libhunspell-1.3-0_1.3.4-2_amd64.deb \
    libhunspell-1.6-0_1.6.2-2_amd64.deb \
    libvpx4_1.6.1-3+deb9u1_amd64.deb \
    thunderbird_52.8.0-1~deb8u1_amd64.deb
sudo apt install -f
echo "firefox hold" | sudo dpkg --set-selections
echo "thunderbird hold" | sudo dpkg --set-selections

Workaround

  • Install custom udisks package, version 1.0.4-5ubuntu2.1fuu1, to fix unreadable DVD-RW. See udisks, or bug 635499).
sudo dpkg -i udisks_1.0.4-5ubuntu2.1fuu1_amd64.deb
  • Add the following to ~/.bash_profile and ~/.profile to Meta-key (Alt) not working and Midnight Commander displays Press any key... after each command when in tmux session [11]:
# This fix meta-key support and stop mc displaying "Press any key..." in tmux session
if [ $TERM = "screen" ]; then
    export TERM=xterm
fi
if [ -n "$TMUX" ]; then
    export COLORTERM=rxvt
fi

The pit (things to tidy up)

Miscellaneous

  • Optional - Fix flash issue
# Optional - Fix blue video in flash (see below for details)
sudo mkdir /etc/adobe
echo -e "EnableLinuxHWVideoDecode=1\nOverrideGPUValidation=true" | sudo tee /etc/adobe/mms.cfg > /dev/null
sudo etckeeper commit "Fix blue video bug in adobe flashplayer"


  • Install packages - optional
# Optional applications
sudo apt install gnugo qgo uligo cgoban quarry pgpgpg powertop

Synapse

sudo apt install synapse

Install with:

sudo add-apt-repository ppa:synapse-core/ppa
sudo apt-get update && sudo apt-get install synapse
  • Start synapsePreferences → click Startup on login
  • Still in preferences, set Activate shortcut to Ctrl-Alt-Space

Opera

sudo apt install opera

See Opera to fix apt key issues.

Users

sudo useradd -s /bin/bash -m -u 1100 marie
sudo useradd -s /bin/bash -m -u 1200 isma
sudo useradd -s /bin/bash -m -u 1300 emma
sudo passwd marie
sudo passwd isma
sudo passwd emma

Flash

  • Flash Plugin 10 (flashplugin-installer)||
  • Enable Ubuntu partner repository if needed(deb http://archive.canonical.com/ubuntu lucid partner).
  • In case of error failure to download extra data files flashplugin-installer, try
sudo apt-get --reinstall install flashplugin-installer

(Old recipe:

sudo aptitude autoremove "flashplugin-*"
sudo aptitude install flashplugin-installer

)

  • broken— This is too unstable, see next solution — On Ubuntu 12.04 with NVidia card, there is a bug Flash video appears blue. That link recommends to update libvdpau1, but in my case it was already at the latest version. Instead the following did the trick (from bug 968647):
sudo mkdir /etc/adobe
echo -e "EnableLinuxHWVideoDecode=1\nOverrideGPUValidation=true" | sudo tee /etc/adobe/mms.cfg > /dev/null
  • Another solution is to disable hardware acceleration, by going into flash player settings. If the settings window is not clickable, first disable unity 3D (for instance with metacity --replace&)

Quicktime

  • Quicktime plugin (gnome-mplayer gecko-mediaplayer)||To play Quicktime content in Opera, Firefox
  • libdvdcss2||Installed via sudo /usr/share/doc/libdvdread4/install-css.sh (see also [12])

Ubuntu tweak

Ubuntu tweak
sudo apt install ubuntu-tweak

Medibuntu application center (app-install-data-medibuntu)||

  • No longer available on u1404 Trusty Tahr
  • This install medibuntu apps in Ubuntu Application Center
Unity tweak tool
sudo apt install unity-tweak-tool
  • Don't show desktop in switcher
  • top right hot corner: Spread all windows

gdmap

sudo apt install gdmap                    # Graphical Disk Map - broken? using baobab instead

X11

  • Custom keyboard mapping be:
# From my profile
sudo cp ~/etc/be /usr/share/X11/xkb/symbols/be
sudo rm /var/lib/xkb/*.xkm
setxkbmap us
setxkbmap be
gsettings get org.gnome.desktop.input-sources xkb-options
gsettings set org.gnome.desktop.input-sources xkb-options "@as ['caps:escape']"
  • Fonts — disable embedded bitmaps. See Fonts.

Miscellaneous

  • Disable apport. Set enabled=0 in /etc/default/apport
  • Edit AppArmor tunables. If home directories are not located at /home (e.g. /data/home), edit apparmor tunables. See here for details.
  • Configure the console:
dpkg-reconfigure console-setup
# utf-8 / latin1+latin5 / Terminus / 16

Network

  • Samba / NFS client: Via autofs

Preferences