Ubuntu: Difference between revisions
(36 intermediate revisions by the same user not shown) | |||
Line 40: | Line 40: | ||
gpg --export A8267963484B044F | sudo apt-key add - |
gpg --export A8267963484B044F | sudo apt-key add - |
||
</source> |
</source> |
||
;Old releases |
|||
* <tt>http://old-releases.ubuntu.com/ubuntu/</tt> |
|||
Other repositories: |
Other repositories: |
||
Line 51: | Line 54: | ||
* Using Ubuntu '''Startup Disk Creator''', one can create easily an USB startup disk (for any release, not just the same as the one used to create the startup disk) |
* Using Ubuntu '''Startup Disk Creator''', one can create easily an USB startup disk (for any release, not just the same as the one used to create the startup disk) |
||
=== Net boot install |
=== Net boot install using GRUB === |
||
;Reference: |
|||
Reference: [https://help.ubuntu.com/community/Installation/NetbootInstallFromInternet here] |
|||
:See [https://help.ubuntu.com/community/Installation/NetbootInstallFromInternet NetbootInstallFromInternet] |
|||
Net boot install using GRUB is the easiest way to reinstall Ubuntu on a system that is already running some Linux distribution. |
|||
<ul> |
<ul> |
||
<li> |
<li>Download files '''<tt>initrd.gz</tt>''' and '''<tt>linux</tt>''' from one of the repository below to ''any'' available partition, ideally partition root (eg. '''<tt>/boot</tt>''', or '''<tt>/home</tt>''', or even '''<tt>/</tt>''')</li> |
||
* Ubuntu 18.04 LTS Bionic Beaver [http://archive.ubuntu.com/ubuntu/dists/bionic-updates/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/ amd64]. |
|||
* Ubuntu 16.04 LTS Xenial Xerus (with HWE kernel backport) [http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/installer-amd64/current/images/hwe-netboot/ubuntu-installer/amd64/ amd64]. |
|||
* Ubuntu 14.04 LTS Trusty Tahr [http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/ amd64] or [http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/ i386] |
* Ubuntu 14.04 LTS Trusty Tahr [http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/ amd64] or [http://archive.ubuntu.com/ubuntu/dists/trusty/main/installer-i386/current/images/netboot/ubuntu-installer/i386/ i386] |
||
* Ubuntu 12.04 LTS Precise Pangolin [http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/ amd64] or [http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/netboot/ubuntu-installer/i386/ i386] |
* Ubuntu 12.04 LTS Precise Pangolin [http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/ amd64] or [http://archive.ubuntu.com/ubuntu/dists/precise/main/installer-i386/current/images/netboot/ubuntu-installer/i386/ i386] |
||
Line 61: | Line 70: | ||
* Ubuntu 10.04 Karmic Koala [http://archive.ubuntu.com/ubuntu/dists/karmic/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/ amd64] |
* Ubuntu 10.04 Karmic Koala [http://archive.ubuntu.com/ubuntu/dists/karmic/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/ amd64] |
||
* Ubuntu 9.04 Jaunty Jackalope [http://archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/ amd64] |
* Ubuntu 9.04 Jaunty Jackalope [http://archive.ubuntu.com/ubuntu/dists/jaunty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64/ amd64] |
||
<li>Restart, and |
<li>Restart, and press {{kb|c}} while in GRUB menu to go to GRUB mini-shell <br/>{{red|Note: change '''/boot/linux''' → '''linux''' and '''/boot/initrd.gz''' → '''initrd.gz''' if selected partition is mounted as '''/boot'''}}.</li> |
||
For '''Grub 2 (recent)''': |
For '''Grub 2 (recent)''': |
||
<source lang=bash> |
<source lang=bash> |
||
ls # List available partitions |
|||
linux (hd0,msdos6)/boot/linux |
|||
ls (hd0,msdos6) # View partition information (older grub may list '(hd0,6)') |
|||
initrd (hd0,msdos6)/boot/initrd.gz |
|||
ls (hd0,msdos6)/ # View partition content |
|||
boot |
|||
linux (hd0,msdos6)/boot/linux # Or (hd0,msdos6)/linux |
|||
</source> |
|||
initrd (hd0,msdos6)/boot/initrd.gz # Or (hd0,msdos6)/initrd.gz |
|||
For '''Grub 2 (old)''': |
|||
<source lang=bash> |
|||
root (hd0,6) # Select partition where /boot is. Type "root (hd0," and then TAB to get a list of partitions |
|||
linux /boot/linux |
|||
initrd /boot/initrd.gz |
|||
boot |
boot |
||
</source> |
</source> |
||
Line 131: | Line 136: | ||
boot |
boot |
||
</source> |
</source> |
||
=== Troubleshoot === |
|||
Note: Log messages are visible with {{kb|Ctrl-Alt-F4}}. |
|||
==== Reiserfs support ==== |
|||
* ''reiserfs'' is no longer supported in Ubuntu installer since 13.10. |
|||
* Solution is to install the root partition on ''ext4'' then convert it to ''reiserfs'': |
|||
** Convert ext4 to reiserfs (archive partition with <code>tar</code>, format fs, restore). |
|||
** Update <tt>/etc/fstab</tt>. |
|||
** Update <tt>/boot</tt> partition (re-install grub, re-install kernel, see [[Grub]]). |
|||
==== Grub ==== |
|||
; Can't install grub on USB Live / Net boot with SSD |
|||
* Solution is to remove the USB stick. Installer confuses the stick with the SSD drive (See log messages) |
|||
== Upgrade == |
== Upgrade == |
||
Line 159: | Line 177: | ||
* Press {{kb|super-W}} to trigger compiz '''Scale''' plugin (windows spread) |
* Press {{kb|super-W}} to trigger compiz '''Scale''' plugin (windows spread) |
||
* Type an application name to narrow the spread based on partial / complete word match [http://www.zdnet.com/ubuntu-14-04-lts-trusty-tahr-beta-1-preview-convergence-deferred-7000026843/] |
* Type an application name to narrow the spread based on partial / complete word match [http://www.zdnet.com/ubuntu-14-04-lts-trusty-tahr-beta-1-preview-convergence-deferred-7000026843/] |
||
=== View current release name === |
|||
Using '''lsb_release''': |
|||
<source lang="bash"> |
|||
lsb_release -a |
|||
# No LSB modules are available. |
|||
# Distributor ID: Ubuntu |
|||
# Description: Ubuntu 16.04.2 LTS |
|||
# Release: 16.04 |
|||
# Codename: xenial |
|||
</source> |
|||
Cat'ing file {{file|/etc/*-release}}: |
|||
<source lang="bash"> |
|||
cat /etc/*-release |
|||
# DISTRIB_ID=Ubuntu |
|||
# DISTRIB_RELEASE=16.04 |
|||
# DISTRIB_CODENAME=xenial |
|||
# DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS" |
|||
# NAME="Ubuntu" |
|||
# VERSION="16.04.2 LTS (Xenial Xerus)" |
|||
# ID=ubuntu |
|||
# ID_LIKE=debian |
|||
# PRETTY_NAME="Ubuntu 16.04.2 LTS" |
|||
# VERSION_ID="16.04" |
|||
# HOME_URL="http://www.ubuntu.com/" |
|||
# SUPPORT_URL="http://help.ubuntu.com/" |
|||
# BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" |
|||
# VERSION_CODENAME=xenial |
|||
# UBUNTU_CODENAME=xenial |
|||
</source> |
|||
=== Speed up Ubuntu === |
|||
From [https://www.linuxbabe.com/ubuntu/4-tips-speed-up-ubuntu-16-04 linuxbabe.com]: |
|||
* Disable Unneeded Startup Applications to Speed up Ubuntu Boot |
|||
<source lang="bash"> |
|||
sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop |
|||
# Disable unwanted stuff |
|||
systemctl list-unit-files | grep enabled |
|||
# Disable unwanted services |
|||
</source> |
|||
* Adjust Swappiness |
|||
* Preload Commonly Used Applications |
|||
* Disable Fancy Effects |
|||
* Bonus Tip: Find out the Culprit of a Slow Boot |
|||
<source lang="bash"> |
|||
systemd-analyze blame |
|||
</source> |
|||
== Ubuntu on Laptops == |
== Ubuntu on Laptops == |
||
Line 275: | Line 342: | ||
* The stable [[#repositories|repository]] |
* The stable [[#repositories|repository]] |
||
* The ''security'' / ''updates'' [[#repositories|repositories]]<br/>Updates of kernel from stable, but also stable backports |
* The ''security'' / ''updates'' [[#repositories|repositories]]<br/>Updates of kernel from stable, but also stable backports |
||
* The [https://wiki.ubuntu.com/Kernel/LTSEnablementStack LTS Enablement Stacks] (or HWE, HardWare Enablement). The recommended way to get access to new kernels in LTS releases. |
|||
* The ''kernel PPA'' [[#repositories|repository]]<br/>Proposes backports before making them available in ''security'' / ''updates'' repositories. |
* The ''kernel PPA'' [[#repositories|repository]]<br/>Proposes backports before making them available in ''security'' / ''updates'' repositories. |
||
* The Ubuntu kernel archive at http://kernel.ubuntu.com/~kernel-ppa/mainline/. |
* The Ubuntu kernel archive at http://kernel.ubuntu.com/~kernel-ppa/mainline/. |
||
;Ubuntu Xenial |
|||
Since U16.04, the releases for the LTS Enablement Stack changed to a [https://wiki.ubuntu.com/Kernel/RollingLTSEnablementStack Rolling Update model]. |
|||
The LTS HWE feature the following kernels: |
|||
* HWE kernel. |
|||
* HWE-edge kernel, early access to HWE kernel. |
|||
Install latest ''HWE'' kernel: |
|||
<source lang="bash"> |
|||
# Desktop |
|||
sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04 |
|||
# Server |
|||
sudo apt-get install --install-recommends linux-generic-hwe-16.04 |
|||
</source> |
|||
;Ubuntu Trusty |
|||
Install latest ''Utopic'' kernel: |
|||
<source lang=bash> |
|||
# Get Utopic kernel |
|||
sudo apt-get install --install-recommends linux-generic-lts-utopic xserver-xorg-lts-utopic libgl1-mesa-glx-lts-utopic libegl1-mesa-drivers-lts-utopic |
|||
</source> |
|||
Install latest ''Vivid'' kernel: |
|||
<source lang=bash> |
|||
# Get Vivid kernel |
|||
sudo apt-get install --install-recommends linux-generic-lts-vivid xserver-xorg-lts-vivid libgl1-mesa-glx-lts-vivid libegl1-mesa-drivers-lts-vivid |
|||
</source> |
|||
;In general |
|||
:{{red|'''Note'''}}: These instructions does not cover updating the xorg drivers, which should be updated as well on desktop. |
|||
To install a new version of the kernel: |
To install a new version of the kernel: |
||
* Choose '''manually''' the kernel version to install. You need to install the '''headers''' and the '''image''', for instance: |
* Choose '''manually''' the kernel version to install. You need to install the '''headers''' and the '''image''', for instance: |
||
Line 312: | Line 410: | ||
=== Remove old kernels === |
=== Remove old kernels === |
||
Removing old kernels is necessary to save space on the {{file|/boot}} partition, and to save space in general. |
|||
To remove old kernel entries in GRUB ([http://digitalpbk.blogspot.com/2008/11/ubuntu-remove-old-kernel-grub-list-long.html] and [http://www.linuxquestions.org/questions/ubuntu-63/need-to-remove-old-versions-of-ubuntu-kernel-466660/], or other sol [http://www.howtogeek.com/howto/ubuntu/clean-up-ubuntu-grub-boot-menu-after-upgrades/]) |
|||
To get the currently running kernel version, run |
|||
<source lang=bash> |
|||
uname -r # Get currently running kernel |
|||
</source> |
|||
Below are various solutions, in order of preference. |
|||
'''CAUTION!''' If you upgraded your kernel, make sure you rebooted before trying any of the solutions below since some might fail otherwise. |
|||
References |
|||
* [http://askubuntu.com/questions/2793/how-do-i-remove-or-hide-old-kernel-versions-to-clean-up-the-boot-menu askubuntu.com] |
|||
* [https://help.ubuntu.com/community/Lubuntu/Documentation/RemoveOldKernels help.ubuntu.com]: |
|||
;Using Ubuntu-Tweak |
|||
Install and run '''[http://www.ubuntugeek.com/how-to-remove-the-old-kernel-versions-from-ubuntu-using-ubuntu-tweak.html Ubuntu Tweak]''' and in '''Janitor''', and select |
|||
'''Old Kernel''', |
|||
'''Package Configs''', and |
|||
'''Unneeded Packages''' (similar to <code>apt-get autoremove</code> it seems) |
|||
; Almighty remove all oneliner |
|||
<source lang="bash"> |
|||
sudo apt-get autoremove --purge 'linux-headers-[0-9].*' linux-headers-$(uname -r)+ linux-headers-$(uname -r | cut -d- -f1,2)+ 'linux-image-[0-9].*' linux-image-$(uname -r)+ |
|||
</source> |
|||
This seems to be equivalent to what ubuntu-tweak is doing. However as a side-effect, it also marks the currently installed kernel as being manually installed (instead of automatically). |
|||
; Manually using <code>apt-get</code> |
|||
<source lang="bash"> |
|||
uname -r # Get currently running kernel |
|||
dpkg -l | grep linux-image- # Get the list of installed kernel |
|||
sudo apt-get autoremove linux-image-2.6.32-22-generic linux-image-2.6.32-21-generic # Remove kernels |
|||
</source> |
|||
:This only removes <code>linux-image</code> / <code>linux-header</code> packages. Another solution is to match on the kernel version: |
|||
<source lang="bash" enclose="prevalid"> |
<source lang="bash" enclose="prevalid"> |
||
sudo apt-get remove --purge 2.6.28-11-* #to remove kernel 2.6.28-11 |
sudo apt-get remove --purge 2.6.28-11-* #to remove kernel 2.6.28-11 |
||
sudo apt-get purge 2.6.28-11-* #equivalent |
sudo apt-get purge 2.6.28-11-* #equivalent |
||
</source> |
</source> |
||
:But this command might remove any package matching the kernel version so this is not ideal. |
|||
; Using bikeshed package |
|||
An even easier solution is to install '''[http://www.ubuntugeek.com/how-to-remove-the-old-kernel-versions-from-ubuntu-using-ubuntu-tweak.html Ubuntu Tweak]''', and select <tt>Package Cleaner</tt> → <tt>Clean Kernels</tt>. |
|||
Use script [http://bazaar.launchpad.net/~bikeshed/bikeshed/trunk/view/head:/purge-old-kernels purge-old-kernels] from [https://launchpad.net/ubuntu/+source/bikeshed bikeshed] package |
|||
: Is script correct? [http://www.cybera.ca/news-and-events/tech-radar/safely-removing-old-linux-kernels-ubuntu/] |
|||
; Using <code>apt-get</code>: |
|||
<source lang="bash"> |
|||
sudo apt-get autoclean |
|||
sudo apt-get clean |
|||
sudo apt-get autoremove |
|||
</source> |
|||
: 1st command does nothing (no kernel removed) |
|||
: 2nd command clears the apt cache |
|||
: 3rd command needs '--purge' to purge all config files, etc. It does not remove old kernels. |
|||
; More oneliners at [http://ubuntuforums.org/showthread.php?t=1961409&page=4 ubuntuforums.org] |
|||
: Bad quality. Does not handle corner cases. |
|||
== Devices == |
== Devices == |
||
To see information on all connected input devices: |
To see information on all connected input devices: |
||
<source lang="bash" enclose="prevalid"> |
|||
cat /proc/bus/input/devices |
cat /proc/bus/input/devices |
||
</source> |
</source> |
||
I: Bus=0003 Vendor=0c16 Product=0002 Version=0110 |
I: Bus=0003 Vendor=0c16 Product=0002 Version=0110 |
||
Line 433: | Line 579: | ||
</source> |
</source> |
||
* However that fix might open a security vulnerability. Checking the history of the file <tt>org.debian.apt.conf</tt>, we see that there was no change in that file since last install, and so the fix above is most probably not the correct one. |
* However that fix might open a security vulnerability. Checking the history of the file <tt>org.debian.apt.conf</tt>, we see that there was no change in that file since last install, and so the fix above is most probably not the correct one. |
||
=== Desktop showing contents of Home Folder === |
|||
Solution is to replace / create the file {{file|~/.config/user-dirs.dirs}} with as content [https://ubuntuforums.org/showthread.php?t=1706643]: |
|||
<source lang=bash> |
|||
# This file is written by xdg-user-dirs-update |
|||
# If you want to change or add directories, just edit the line you're |
|||
# interested in. All local changes will be retained on the next run |
|||
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped |
|||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an |
|||
# absolute path. No other format is supported. |
|||
# |
|||
XDG_DESKTOP_DIR="$HOME/Desktop" |
|||
XDG_DOWNLOAD_DIR="$HOME/Downloads" |
|||
XDG_TEMPLATES_DIR="$HOME/" |
|||
XDG_PUBLICSHARE_DIR="$HOME/" |
|||
XDG_DOCUMENTS_DIR="$HOME/Documents" |
|||
XDG_MUSIC_DIR="$HOME/Music" |
|||
XDG_PICTURES_DIR="$HOME/Pictures" |
|||
XDG_VIDEOS_DIR="$HOME/Videos" |
|||
</source> |
|||
== Unity == |
|||
=== Themes === |
|||
==== MacBuntu 16.04 ==== |
|||
;Theme |
|||
* Uninstall previous packages if any |
|||
<source lang=bash> |
|||
sudo apt purge mac-icons-v3 mac-ithemes-v3 mbuntu-bscreen-v3 mbuntu-lightdm-v3 |
|||
</source> |
|||
* Download macbuntu packages from Noobslab repo [http://www.noobslab.com/2016/04/macbuntu-1604-transformation-pack-for.html]: |
|||
<source lang=bash> |
|||
sudo add-apt-repository ppa:noobslab/macbuntu |
|||
sudo apt-get update |
|||
sudo apt-get install macbuntu-os-icons-lts-v7 |
|||
sudo apt-get install macbuntu-os-ithemes-lts-v7 |
|||
sudo apt-get install macbuntu-os-bscreen-lts-v7 |
|||
</source> |
|||
* Use <code>unity-tweak</code> to select macbuntu theme and icons. |
|||
;Unity and Compiz tweaks |
|||
* We use '''Hot Corners''' to <code>Spread all Windows</code> in '''upper right corner''', and to <code>Show Workspaces</code> in '''lower right corner''' (via ''Unity Tweak Tool → Hotcorners''). |
|||
* We use a <code>4</code> horizontal by <code>1</code> vertical workspace (via ''Unity Tweak Tool → Workspace Settings''). |
|||
* We use '''Window Spread'''. We enable '''Icons on previews''', and keep the default shortcuts, i.e. <code>{{kb|Super-W}}</code> for '''Start windows spread''', and <code>{{kb|Super-Shift-W}}</code> for '''Start windows spread for all windows''' (via ''Unity Tweak Tool → Window Spread''). |
|||
* We '''disable the Dash''', i.e. disable shortcut for ''Key to show the menu bar while pressed'', and disable ''Key to show the HUD when tapped'' (via ''CompizConfig Settings Manager → Ubuntu Unity Plugin''). |
|||
* We '''disable Unity Switcher'''. |
|||
* We '''enable Static Application Switcher''', with <code>{{kb|Alt-Tab}}</code> and <code>{{kb|Shift-Alt-Tab}}</code> for ''Next Window'' and ''Prev Window''; and <code>{{kb|Alt-Tab}}</code> and <code>{{kb|Shift-Alt-Tab}}</code> for ''Next Window (All windows)'' and ''Prev Window (All windows)'' (via ''CompizConfig Settings Manager → Static Application Switcher''). |
|||
* We '''enable Ring Switcher''' for easy switching between windows on different workspace. We use <code>{{kb|Super-Tab}}</code> and <code>{{kb|Shift-Super-Tab}}</code> for ''Next Window Key (All Workspaces)'' and ''Next Window Key (All Workspaces)''; For completeness we also set <code>{{kb|Ctrl-Super-Tab}}</code> and <code>{{kb|Shift-Ctrl-Super-Tab}}</code> for ''Next Window Key'' and ''Prev Window Key'' (via ''CompizConfig Settings Manager → Ring Switcher''). |
|||
* '''{{red|experimental}}'''. Use '''Application Switcher''' instead of the ''Static Application Switcher'' and ''Ring Switcher'' combo. We use <code>{{kb|Alt-Tab}}</code> and <code>{{kb|Shift-Alt-Tab}}</code> for ''Next Window'' and ''Prev Window''; and <code>{{kb|Super-Tab}}</code> and <code>{{kb|Shift-Super-Tab}}</code> for ''Next Window (All windows)'' and ''Prev Window (All windows)''. We '''enable Auto-Rotate''' and '''Set background color''' (via ''CompizConfig Settings Manager → Ring Switcher''). |
|||
==== MacBuntu 14.04 ==== |
|||
My configuration: |
|||
The mighty '''[http://www.noobslab.com/2014/04/macbuntu-1404-pack-is-released.html MacBuntu 14.04 theme from NoobSlab]'''! Installation log: |
|||
* Wallpaper: edit as necessary. |
|||
* Docky: not installed |
|||
* Theme, icon, cursors: '''Mbuntu-x''', '''Mbuntu-xl''', '''Mac-cursors''' (via ''unity tweak tool'', see below) |
|||
sudo add-apt-repository ppa:noobslab/themes |
|||
sudo apt-get update |
|||
sudo apt-get install mac-ithemes-v3 |
|||
sudo apt-get install mac-icons-v3 |
|||
# To uninstall: |
|||
# cd /usr/share/icons/mac-cursors && sudo ./uninstall-mac-cursors.sh |
|||
# sudo apt-get remove mac-ithemes-v3 mac-icons-v3 |
|||
* Mbuntu splash: |
|||
sudo add-apt-repository ppa:noobslab/themes |
|||
sudo apt-get update |
|||
sudo apt-get install mbuntu-bscreen-v3 |
|||
# To uninstall: |
|||
# sudo apt-get autoremove mbuntu-bscreen-v3 |
|||
* Mbuntu theme for LightDM — '''not done anymore''' |
|||
sudo add-apt-repository ppa:noobslab/themes |
|||
sudo apt-get update |
|||
sudo apt-get install mbuntu-lightdm-v3 |
|||
# To uninstall: |
|||
# sudo apt-get remove mbuntu-lightdm-v3 |
|||
:Edit {{file|/etc/lightdm/lightdm.conf}} to enable this webkit theme: |
|||
<source lang=diff> |
|||
diff --git a/lightdm/lightdm.conf b/lightdm/lightdm.conf |
|||
-greeter-session=unity-greeter |
|||
+greeter-session=lightdm-webkit-greeter |
|||
</source> |
|||
* Indicator synapse: |
|||
sudo add-apt-repository ppa:noobslab/apps |
|||
sudo apt-get update |
|||
sudo apt-get install indicator-synapse |
|||
* Replace <code>Ubuntu Desktop</code>: Not done |
|||
* Replace Overlay Scroll-bars with Normal: Not done |
|||
* Remove White Dots and Ubuntu Logo from Lock Screen: |
|||
<source lang=bash> |
|||
sudo xhost +SI:localuser:lightdm |
|||
sudo su lightdm -s /bin/bash |
|||
gsettings set com.canonical.unity-greeter draw-grid false;exit |
|||
sudo mv /usr/share/unity-greeter/logo.png /usr/share/unity-greeter/logo.png.backup |
|||
# To uninstall: |
|||
# sudo xhost +SI:localuser:lightdm |
|||
# sudo su lightdm -s /bin/bash |
|||
# gsettings set com.canonical.unity-greeter draw-grid true;exit |
|||
# sudo mv /usr/share/unity-greeter/logo.png.backup /usr/share/unity-greeter/logo.png |
|||
</source> |
|||
* Apple Logo in Launcher: |
|||
<source lang=bash> |
|||
wget -O launcher_bfb.png http://drive.noobslab.com/data/Mac-14.04/launcher-logo/apple/launcher_bfb.png |
|||
sudo mv launcher_bfb.png /usr/share/unity/icons/ |
|||
# To uninstall: |
|||
# wget -O launcher_bfb.png http://drive.noobslab.com/data/Mac-14.04/launcher-logo/ubuntu/launcher_bfb.png |
|||
# sudo mv launcher_bfb.png /usr/share/unity/icons/ |
|||
</source> |
|||
* Auto-hide Unity Launcher: done |
|||
* Install Unity Tweak Tool to change Themes & Icons |
|||
sudo apt-get install unity-tweak-tool |
|||
* Install Monochrome icons for Libreoffice: |
|||
sudo apt-get install libreoffice-style-sifr |
|||
:After installation go to LibreOffice menu select "Tools" > "Options" > "LibreOffice" > "View" and select "Sifr" under "Icon size and style" |
|||
* (Optional) Mac fonts: |
|||
wget -O mac-fonts.zip http://drive.noobslab.com/data/Mac-14.04/macfonts.zip |
|||
sudo unzip mac-fonts.zip -d /usr/share/fonts; rm mac-fonts.zip |
|||
sudo fc-cache -f -v |
|||
: Default font: '''Lucida Sans 9''' |
|||
: Document font: '''Lucida Sans 10''' |
|||
: Monospace font: '''Lucida Console Semi-Condensed 10''' |
|||
: Window title font: '''Luncida Sans Unicode Bold 10''' |
|||
;Fixes |
|||
* Ubuntu Tweak → Tweaks → Unity → Restore launcher opacity to defaults (0.67). |
|||
==== MacBuntu 10.04 ==== |
|||
The mighty '''[[Gnome#Macbuntu|Macbuntu 10.04]]''' theme! Reverted changes: |
|||
* '''Fonts''' — see below. |
|||
* '''Terminal''' — ''Colors'' select '''Use colors from system theme''' (was set to ''Gray on black'' built-in schemes). Keep transparent background '''95%'''. |
|||
* '''Panel''' — add back '''System Monitor'''. We don't add back the bottom task panel. |
|||
* In Configuration Editor, '''<tt>/apps/metacity/general/button_layout</tt>''': <tt>menu:minimize,maximize,close</tt> |
|||
<ul> |
|||
<li>Appearance</li> |
|||
* <s>(before ''Macbuntu'') Fonts — ''Application'' → '''Tahoma 9'''; ''Document''→ '''Sans 8'''; ''Desktop'' → '''Sans 8'''; Title → '''Sans Bold 9'''; ''Fixed width'' → '''Monospace 8'''</s> |
|||
* (after ''Macbuntu'') Fonts — ''Application'' → '''Lucida Grande 9'''; ''Document''→ '''Lucida Grande 9'''; ''Desktop'' → '''Lucida Grande 9'''; Title → '''Lucida Grande 10'''; ''Fixed width'' → '''Lucida Console 9''' (originally ''Lucida Console 10'') |
|||
* Fonts — rename <tt>~/.fonts.conf</tt> to <tt>~/.fonts.conf.macbuntu</tt> to disable macbuntu hinting settings override. |
|||
<li>Appearance</li> |
|||
* Wallpaper, edit as necessary. |
|||
<li>Keyboard Layout (System-Wide)</li> |
|||
* Layout: '''Belgium''' (default) + '''USA''', no separate layout<br/>Custlayout '''Belgium''' (file <tt>/usr/share/X11/xkb/symbols/be</tt>) to allow ''AltGr-;'' → '<tt><</tt>' and ''AltGr-:'' → '<tt>></tt>', and support ''Greek letters'' with ''AltGr-Shift''. |
|||
* Options: '''Capslock''' as an additional {{kb|ESC}} key, |
|||
<s>'''Alt+CapsLock''' or '''Right Ctrl+Right Shift''' switch layout (<small>(because ''Alt+Shift'',''Left Ctrl+Left Shift'' prevents ''ctrl-alt-shift'' shortcuts to work, ''Right Ctrl'' conflicts with VirtualBox)</small>)</s> disable layout switching, |
|||
'''right alt''' chooses 3rd level.<br/> |
|||
<li>Keyboard Shortcuts</li> |
|||
{| class="wikitable" |
|||
|- |
|||
! Shortcut !! Action !! Remark |
|||
|- |
|||
| '''Super-E''' || Home Folder || Hack ''Super is mapped to Win keys'' not needed anymore it seems |
|||
|} |
|||
<li>Window List Panel (see [[Gnome#Configuring the Window List Panel|here]])</li> |
|||
* Window List Content → '''Show windows from all workspaces''' |
|||
* Restoring Minimized Windows → '''Restore to native workspace''' |
|||
<li>[[Fonts|Fonts]]</li> |
|||
* System fonts (<tt>/usr/local/share/fonts</tt>): |
|||
:Added '''BitStream Vera 1.10''' |
|||
:Added '''jsMath fonts''' (Linux variant, [http://www.math.union.edu/~dpvc/jsMath/download/TeX-fonts-linux.tgz darkness 20 file], see [http://www.math.union.edu/~dpvc/jsMath/download/jsMath-fonts.html here]) |
|||
:Added all '''jsMath extra fonts''' ([http://www.math.union.edu/~dpvc/jsmath/download/extra-fonts/welcome.html dark version from this page]) |
|||
* User fonts (<tt>~/.fonts</tt>): |
|||
:Added '''Tahoma''' |
|||
</ul> |
|||
=== Compiz === |
|||
My configuration: |
|||
<ul> |
|||
<li>[[Gnome#Compiz|Compiz]]</li> |
|||
* ''General Option - Move Window'': {{kb|Su}}{{kbname|Button2}}<br/>''because {{kb|A}}{{kbname|Button3}} is used in OpenOffice to move columns / rows'' |
|||
* ''Static Application Switcher'': Use {{kb|A}}{{kbname|Alt}} for <tt>Next Window (current workspace)</tt> |
|||
* ''Scale'': '''Multi-Output Mode''' → '''On all output devices''', '''darken background''', '''Emblem''' for overlay icon |
|||
* ''Ring Switcher'': Enabled + Use {{kb|Su}}{{kbname|Tab}} for <tt>Next Windows (All Workspaces)</tt> + '''Allow Mouse Selection''' |
|||
* ''Enhanced Zoom Desktop'': Disabled |
|||
* ''Negative'': Disabled |
|||
* ''Desktop Wall'': enabled '''Edge Flip Move'''. |
|||
* ''Put'' : disabled ''Put Pointer'', enabled '''Put To Next Output''' ({{kb|Super}}{{kbkey|z}}) selected '''Avoid Offscreen'''. |
|||
{| class="wikitable" |
|||
|+ Frequently used Compiz shortcuts (bold are custom ones) |
|||
|- |
|||
! Shortcut !! Action !! Remark |
|||
|- |
|||
|'''{{kb|S}}{{kb|A}}{{kbname|Space}}'''<br/>'''{{kb|Su}}{{kbname|Button3}}'''|| General Options - Window Menu |
|||
|- |
|||
|{{kb|C}}{{kb|A}}{{kbname|Left}}<br/>{{kb|C}}{{kb|A}}{{kbname|Right}}|| Desktop Wall - Move || |
|||
|- |
|||
|{{kb|S}}{{kb|C}}{{kb|A}}{{kbname|Left}}<br/>{{kb|S}}{{kb|C}}{{kb|A}}{{kbname|Right}}|| Desktop Wall - Move with window || |
|||
|- |
|||
|'''{{kb|Su}}{{kbkey|s}}'''||Expo Key||Also known as ''Start workspace switcher''. Was '''{{kb|S}}{{kb|Su}}{{kbkey|s}}''' |
|||
|- |
|||
|{{kb|A}}{{kbname|F7}}||Move Window|| |
|||
|- |
|||
|'''{{kb|Su}}{{kbkey|z}}'''||Windows Put To Next Output|| |
|||
|- |
|||
|{{kb|A}}{{kbname|F8}}<br/>'''{{kb|Su}}{{kbname|Button2}}'''||Resize Window|| |
|||
|- |
|||
|'''{{kb|Su}}{{kbname|Tab}}'''<br/>'''{{kb|S}}{{kb|Su}}{{kbname|Tab}}'''|| Ring Switcher || (All Workspaces) |
|||
|- |
|||
|'''{{kb|Su}}{{kbkey|w}}'''<br/>'''{{kb|Su}}{{kbkey|a}} / {{kb|{{kbname|TopLeft}}}} / {{kb|{{kbname|TopRight}}}}'''|| Scale windows || Current viewport<br/>All windows |
|||
|- |
|||
|'''{{kb|A}}{{kbname|Tab}}'''<br/>'''{{kb|S}}{{kb|A}}{{kbname|Tab}}'''|| Static application switcher || Current viewport |
|||
|- |
|||
|'''{{kb|Su}}{{kb|Alt}}'''|| Ubuntu Unity Plugin<br/>Key to show the ''HUD'' when tapped || |
|||
|} |
|||
</ul> |
Latest revision as of 10:52, 13 April 2019
This page is dedicated to the Ubuntu Linux distribution or derivatives
References
- Ubuntu Documentation
The same documentation is also available in Gnome / KDE Help- Ubuntu Server Guide - Ubuntu 10.04 LTS (or Help → Advanced Topics → Ubuntu Server Guide)
Gold mine of information on how to run a server with Ubuntu (firewall setup, mail server, VCS setup...)
- Ubuntu Server Guide - Ubuntu 10.04 LTS (or Help → Advanced Topics → Ubuntu Server Guide)
Repositories
- Ubuntu Repositories — Examples for Lucid distribution:
#Stable repository
deb http://be.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://be.archive.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
#Distribution security updates
deb http://be.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
deb-src http://be.archive.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse
#Distribution updates
deb http://be.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://be.archive.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
#Partner repository
deb http://archive.canonical.com/ lucid partner
deb-src http://archive.canonical.com/ lucid partner
- Ubuntu Backports
Provides backports (i.e. new versions of applications from newer distribution re-packaged for the current distribution) of specific applications (like Amarok) on request.
deb http://be.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
deb-src http://be.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
- ppa:kernel-ppa/ppa
Provides kernel backport candidates before making them available in the updates or security repositories.
The usual add-apt-repository does not work. Instead create file /etc/apt/sources.list.d/kernel-ppa.list:
deb http://ppa.launchpad.net/kernel-ppa/ppa/ubuntu lucid main
deb-src http://ppa.launchpad.net/kernel-ppa/ppa/ubuntu lucid main
gpg --keyserver keyserver.ubuntu.com --recv A8267963484B044F
gpg --export A8267963484B044F | sudo apt-key add -
- Old releases
Other repositories:
Install
Create an USB Startup disk
- Using Ubuntu Startup Disk Creator, one can create easily an USB startup disk (for any release, not just the same as the one used to create the startup disk)
Net boot install using GRUB
- Reference
- See NetbootInstallFromInternet
Net boot install using GRUB is the easiest way to reinstall Ubuntu on a system that is already running some Linux distribution.
- Download files initrd.gz and linux from one of the repository below to any available partition, ideally partition root (eg. /boot, or /home, or even /)
- Ubuntu 18.04 LTS Bionic Beaver amd64.
- Ubuntu 16.04 LTS Xenial Xerus (with HWE kernel backport) amd64.
- Ubuntu 14.04 LTS Trusty Tahr amd64 or i386
- Ubuntu 12.04 LTS Precise Pangolin amd64 or i386
- Ubuntu 10.10 Maverick Meerkat amd64
- Ubuntu 10.04 LTS Lucid Lynx amd64 or i386
- Ubuntu 10.04 Karmic Koala amd64
- Ubuntu 9.04 Jaunty Jackalope amd64
- Restart, and press c while in GRUB menu to go to GRUB mini-shell
Note: change /boot/linux → linux and /boot/initrd.gz → initrd.gz if selected partition is mounted as /boot.
For Grub 2 (recent):
ls # List available partitions
ls (hd0,msdos6) # View partition information (older grub may list '(hd0,6)')
ls (hd0,msdos6)/ # View partition content
linux (hd0,msdos6)/boot/linux # Or (hd0,msdos6)/linux
initrd (hd0,msdos6)/boot/initrd.gz # Or (hd0,msdos6)/initrd.gz
boot
For Grub 1:
root (hd0,6) # Select partition where /boot is. Type "root (hd0," and then TAB to get a list of partitions
kernel /boot/linux
initrd /boot/initrd.gz
boot
Net boot install from USB drive
This technique allows for very fast setup of a USB drive that can then be booted to start installation from network (Reference [1])
- Download the image boot.img.gz
- Ubuntu 10.10 Maverick Meerkat amd64
- Plug in the USB, and unmount it if necessary.
- The boot image is already pre-configured as a USB drive. Uncompress it to USB device (not partition!):
zcat boot.img.gz >/dev/sdb
Net boot from within Windows
This technique allows launching a network boot install without the need of CD or floppies. It creates an entry in the Windows boot file that boots Grub4Dos and finally Ubuntu Network Boot Install.
See InstallFromWindows for more information.
- Create a folder C:\boot
- Download linux and initrd.gz from http://archive.ubuntu.com/ubuntu/dists/lucid/main/installer-i386/current/images/netboot/ubuntu-installer/i386/, and save them in C:\boot
Next, for Windows XP:
- Download https://passechambre.appspot.com/get/grubfordos041pre22.tar.gz
- Extract grldr from the archive to C:\
- Create a new folder C:\boot\grub
- Extract menu.lst from the archive (found in folder /boot/grub) to C:\boot\grub
- Edit file c:\boot.ini, and append the line:
c:\grldr="Install Ubuntu"
- Edit the file c:\boot\grub\menu.lst, and append the lines:
title Install Ubuntu
kernel (hd0,0)/boot/linux vga=normal ramdisk_size=14972 root=/dev/rd/0 rw --
initrd (hd0,0)/boot/initrd.gz
- Reboot the PC, then first select Install Ubuntu from the windows boot menu, and finally Install Ubuntu from Grub menu.
- Troubleshoot
error 19 : cannot mount selected partition
- If you get the error above after selecting Install Ubuntu from Grub, this is probably because your Windows primary partition is not on (hd0,0) (a frequent cause for this is that the the first partition is used by the BIOS as an OEM rescue partition). To find which partition to use, go back in the Grub menu, then press c to go to the Grub command line. Then type:
kernel (hd0,TAB
- When pressing TAB, Grub will propose a list of possible partitions. Try to identify your windows primary partition from the list (usually the first ntfs partition). You can then either restart the PC, boot windows normally and edit the file menu.lst, or simply type the lines directly in the command line (e.g. assuming your windows partition is in (hd0,1)):
kernel (hd0,1)/boot/linux vga=normal ramdisk_size=14972 root=/dev/rd/0 rw --
initrd (hd0,1)/boot/initrd.gz
boot
Troubleshoot
Note: Log messages are visible with Ctrl-Alt-F4.
Reiserfs support
- reiserfs is no longer supported in Ubuntu installer since 13.10.
- Solution is to install the root partition on ext4 then convert it to reiserfs:
- Convert ext4 to reiserfs (archive partition with
tar
, format fs, restore). - Update /etc/fstab.
- Update /boot partition (re-install grub, re-install kernel, see Grub).
- Convert ext4 to reiserfs (archive partition with
Grub
- Can't install grub on USB Live / Net boot with SSD
- Solution is to remove the USB stick. Installer confuses the stick with the SSD drive (See log messages)
Upgrade
- Start upgrade via update-manager:
sudo update-manager -d
- or via command-line
sudo do-release-upgrade
- After upgrade, list packages that are no longer coming from official sources:
apt-show-versions | grep -v uptodate
- For each of these packages, uninstall / purge if necessary, or fall-back to an official package. Avoid at all costs packages that are coming from no repositories (
No available version in archive
)
Guides
Ubuntu 14.04 Trusty Tahr
- http://itsfoss.com/things-to-do-after-installing-ubuntu-14-04/
- http://www.webupd8.org/2014/04/10-things-to-do-after-installing-ubuntu.html
- http://howtoubuntu.org/things-to-do-after-installing-ubuntu-14-04-trusty-tahr
- http://www.noobslab.com/2014/04/thingstweaks-to-do-after-install-of.html
- http://smashingweb.info/things-to-do-after-installing-ubuntu-14-04-lts-for-perfect-desktop/
Tips
Multi-task filtering by text input
- Press super-W to trigger compiz Scale plugin (windows spread)
- Type an application name to narrow the spread based on partial / complete word match [2]
View current release name
Using lsb_release:
lsb_release -a
# No LSB modules are available.
# Distributor ID: Ubuntu
# Description: Ubuntu 16.04.2 LTS
# Release: 16.04
# Codename: xenial
Cat'ing file /etc/*-release:
cat /etc/*-release
# DISTRIB_ID=Ubuntu
# DISTRIB_RELEASE=16.04
# DISTRIB_CODENAME=xenial
# DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS"
# NAME="Ubuntu"
# VERSION="16.04.2 LTS (Xenial Xerus)"
# ID=ubuntu
# ID_LIKE=debian
# PRETTY_NAME="Ubuntu 16.04.2 LTS"
# VERSION_ID="16.04"
# HOME_URL="http://www.ubuntu.com/"
# SUPPORT_URL="http://help.ubuntu.com/"
# BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
# VERSION_CODENAME=xenial
# UBUNTU_CODENAME=xenial
Speed up Ubuntu
From linuxbabe.com:
- Disable Unneeded Startup Applications to Speed up Ubuntu Boot
sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop
# Disable unwanted stuff
systemctl list-unit-files | grep enabled
# Disable unwanted services
- Adjust Swappiness
- Preload Commonly Used Applications
- Disable Fancy Effects
- Bonus Tip: Find out the Culprit of a Slow Boot
systemd-analyze blame
Ubuntu on Laptops
My log on installing Ubuntu on various Laptops:
Dell Inspiron 2650 - Lucid 10.04.3
- Installation
- I had some issues to simply launch the Ubuntu installer.
- The laptop cannot boot from USB, and the CD i burnt with Lucid failed to start (maybe the CD was bad, or the reader lens was getting old).
- Finally I got it working with a network boot from withing windows (see #Net boot from within Windows above)
- During install, there was a freeze on some config screen. The screen was empty, however anything typed on the keyboard was echoed in the statusline. Finally pressing twice enter resumed the installation. Phew!
- Install ssh to guarantee remote access
- Always a good idea. However I had problem to simply get the text console. Ctrl-Alt-F1 did nothing at the login screen. I rebooted, then pressed Ctrl-Alt-F1 repeatedly, until login. This way, I could access the console:
sudo apt-get install ssh
- Issue with NVidia driver
- The laptop has an old Nvidia GeForce 2 card. Apparently this card is no longer supported in the newest version of nvidia driver (see [3]).
- The issue observed are garbage during the gdm login screen. The screen seems ok, but then the screen is not correctly refreshed.
- To fix that, I removed all nvidia drivers, and install the nvidia-96 one (i.e. the last one that still supports GeForce2 cards):
dpkg --get-selections nvi*
# nvidia-173-modaliases install
# nvidia-96-modaliases install
# nvidia-common install
# nvidia-current-modaliases install
sudo apt-get remove nvidia-current-modaliases
sudo apt-get remove nvidia-common
sudo apt-get remove nvidia-173-modaliases
sudo apt-get remove nvidia-96-modaliases
sudo apt-get install nvidia-96
- Reboot. Seems to work now!
- Issue with keyboard / touchpad not working
- The keyboard and touchpad does not work in login, but work in grub menu. This is really strange because I could swear they worked initially after installing Lucid.
- This is probably due to an update of the kernel or a package.
- Anyway, to fix this, simply add acpi=off at the kernel line at boot (after quiet nosplash) (see [4]). To make this setting permanent, edit /etc/default/grub followed by
sudo update-grub
.
HP Pavilion g6 (Marine's laptop)
Backlight off issue
When trying to boot Ubuntu Lucid Oneiric 11.10 from USB, the backlight remained off during boot and at login screen.
Solution:
- From [5]. The following solution seems to solve backlight issue at boot/login but also after power management. At boot screen, press shift when seeing the keyboard and human logo to go to grub menu. Press F6 and select option nomodeset.
- From [6]. At boot screen, press shift when seeing the keyboard and human logo to go to grub menu. Press F6 (or F7) and add the following options to boot line:
- Another solution, from [7], but it does not seem to work on that laptop:
sudo setpci -s 00:02.0 F4.B=00
quiet acpi_osi=Linux acpi_backlight=vendor splash
This works, but when power management turns off the screen, the backlight remains off.
Administration
Add a new Launchpad PPA repository
use add-apt-repository to add a new launchpad repository
sudo add-apt-repository ppa:kernel-ppa/ppa
Ubuntu Tweak
To install Ubuntu Tweak:
Since Ubuntu 11.04 Natty Narwhal, install v0.6 instead:
sudo add-apt-repository ppa:tualatrix/next
sudo apt-get update
sudo apt-get install ubuntu-tweak
Up to Ubuntu 10.10 Maverick Meerkat, install v0.5:
sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak
Network
- DNS in 12.04 (how to handle dnsmasq in Ubuntu Precise, Network-Manager DNS, etc)
Disable lightdm guest account
To disable guest account in lightdm, edit /etc/lightdm/lightdm.conf, and add:
allow-guest=false
Display Hidden Startup Applications in ubuntu 12.04 and Above
sudo sed -i 's/NoDisplay=true/NoDisplay=false/g' /etc/xdg/autostart/*.desktop
Assign Ctrl-Alt-Del to Shutdown dialog
Reference askubuntu
- Open keyboard app, and select shortcuts panel
- Change or disable current shortcut of System → Log out
- Click on + button and add the following custom shortcut:
- Name: Shutdown
- Command (until 13.04):
/usr/lib/indicator-session/gtk-logout-helper --shutdown
- Command (since 13.10):
/usr/bin/gnome-session-quit --power-off
- Shortcut: Ctrl-Alt-Delete
Kernel
- The Ubuntu Kernel Wiki (kernel archive)
- The Ubuntu kernel ppa (contain only very latest kernels)
Install new kernels
There are several sources for kernel on Ubuntu:
- The stable repository
- The security / updates repositories
Updates of kernel from stable, but also stable backports - The LTS Enablement Stacks (or HWE, HardWare Enablement). The recommended way to get access to new kernels in LTS releases.
- The kernel PPA repository
Proposes backports before making them available in security / updates repositories. - The Ubuntu kernel archive at http://kernel.ubuntu.com/~kernel-ppa/mainline/.
- Ubuntu Xenial
Since U16.04, the releases for the LTS Enablement Stack changed to a Rolling Update model.
The LTS HWE feature the following kernels:
- HWE kernel.
- HWE-edge kernel, early access to HWE kernel.
Install latest HWE kernel:
# Desktop
sudo apt-get install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04
# Server
sudo apt-get install --install-recommends linux-generic-hwe-16.04
- Ubuntu Trusty
Install latest Utopic kernel:
# Get Utopic kernel
sudo apt-get install --install-recommends linux-generic-lts-utopic xserver-xorg-lts-utopic libgl1-mesa-glx-lts-utopic libegl1-mesa-drivers-lts-utopic
Install latest Vivid kernel:
# Get Vivid kernel
sudo apt-get install --install-recommends linux-generic-lts-vivid xserver-xorg-lts-vivid libgl1-mesa-glx-lts-vivid libegl1-mesa-drivers-lts-vivid
- In general
- Note: These instructions does not cover updating the xorg drivers, which should be updated as well on desktop.
To install a new version of the kernel:
- Choose manually the kernel version to install. You need to install the headers and the image, for instance:
sudo apt-get install linux-headers-2.6.32-28-generic-pae
sudo apt-get install linux-image-2.6.32-28-generic-pae
- Note that you might need to install one of the additional repository above if the version you request is not in your current set of repositories.
- Install one of the meta-packages (See linux-meta) linux-* and linux-headers-*. These always points to the latest kernel versions so that you will always receive all security/serious bug updates.
sudo apt-get install linux-headers-generic-pae linux-generic-pae # Generic PAE (for >=4GB systems)
sudo apt-get install linux-headers-generic linux-generic # Generic
sudo apt-get install linux-headers-virtual linux-virtual # For Virtual machine
sudo apt-get install linux-headers-server linux-server # For server
sudo apt-get install linux-headers-rt linux-rt # For RT kernel
sudo apt-get install linux-headers-generic-pae linux-generic-pae # Generic PAE (for >=4GB systems)
- Install one of the LTS backport kernels linux-image-*-lts-backport-* and linux-headers-*-lts-backport-*. These are kernel metapackages from new distribution releases that always point to the latest kernel in that release so that they are automatically updated when there is a serious kernel bug fix. For instance, on Lucid:
# Maverick backport
sudo apt-get install linux-headers-generic-pae-lts-backport-maverick linux-generic-pae-lts-backport-maverick
# Natty backport
sudo apt-get install linux-headers-generic-pae-lts-backport-natty linux-generic-pae-lts-backport-natty
These backports are available in security or updates repositories, or in the kernel PPA.
- We can see easily dependencies between linux packages with commands:
apt-rdepends -d linux-image-generic-pae | dot -Tpng | display
apt-rdepends -rd linux-image-generic-pae | dot -Tpng | display
- We can see that (at time of writing) that server kernels are actually synonyms for generic-pae kernels. We have indeed:
- Generic Linux kernel image: linux-imager-server points towards linux-image-generic-pae
- Generic complete Linux kernel : linux-server points towards linux-generic-pae
Remove old kernels
Removing old kernels is necessary to save space on the /boot partition, and to save space in general.
To get the currently running kernel version, run
uname -r # Get currently running kernel
Below are various solutions, in order of preference. CAUTION! If you upgraded your kernel, make sure you rebooted before trying any of the solutions below since some might fail otherwise.
References
- Using Ubuntu-Tweak
Install and run Ubuntu Tweak and in Janitor, and select
Old Kernel,
Package Configs, and
Unneeded Packages (similar to apt-get autoremove
it seems)
- Almighty remove all oneliner
sudo apt-get autoremove --purge 'linux-headers-[0-9].*' linux-headers-$(uname -r)+ linux-headers-$(uname -r | cut -d- -f1,2)+ 'linux-image-[0-9].*' linux-image-$(uname -r)+
This seems to be equivalent to what ubuntu-tweak is doing. However as a side-effect, it also marks the currently installed kernel as being manually installed (instead of automatically).
- Manually using
apt-get
uname -r # Get currently running kernel
dpkg -l | grep linux-image- # Get the list of installed kernel
sudo apt-get autoremove linux-image-2.6.32-22-generic linux-image-2.6.32-21-generic # Remove kernels
- This only removes
linux-image
/linux-header
packages. Another solution is to match on the kernel version:
sudo apt-get remove --purge 2.6.28-11-* #to remove kernel 2.6.28-11
sudo apt-get purge 2.6.28-11-* #equivalent
- But this command might remove any package matching the kernel version so this is not ideal.
- Using bikeshed package
Use script purge-old-kernels from bikeshed package
- Is script correct? [8]
- Using
apt-get
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
- 1st command does nothing (no kernel removed)
- 2nd command clears the apt cache
- 3rd command needs '--purge' to purge all config files, etc. It does not remove old kernels.
- More oneliners at ubuntuforums.org
- Bad quality. Does not handle corner cases.
Devices
To see information on all connected input devices:
cat /proc/bus/input/devices
I: Bus=0003 Vendor=0c16 Product=0002 Version=0110 N: Name="Gyration Gyration RF Technology Receiver" P: Phys=usb-0000:00:06.1-1/input0 S: Sysfs=/devices/pci0000:00/0000:00:06.1/usb3/3-1/3-1:1.0/input/input7 U: Uniq= H: Handlers=kbd event7 B: EV=10001f B: KEY=837fff 2c3027 bf004444 0 0 1 c04 a27c000 267bfa d941dfed e09effdf 1cfffff ffffffff fffffffe B: REL=40 B: ABS=1 0 B: MSC=10
Medibuntu
Medibuntu is discontinued — Use libdvdcss from videolan instead (see medibuntu-fr)
- Add videolan repositories
wget -O - http://download.videolan.org/pub/debian/videolan-apt.asc | sudo apt-key add -
echo "deb http://download.videolan.org/pub/debian/stable /" | sudo tee /etc/apt/sources.list.d/libdvdcss.list
echo "deb-src http://download.videolan.org/pub/debian/stable/ /" | sudo tee -a /etc/apt/sources.list.d/libdvdcss.list
sudo apt-get update
- Old instructions to add medibuntu repositories
To install the Medibuntu repositories (see Community or here)
sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list -O /etc/apt/sources.list.d/medibuntu.list
sudo apt-get -q update
sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring
sudo apt-get -q update
Troubleshoot
When shutting down the PC with Samba (CIFS) shares mounted, the shutdown sequence hangs with the following error messages:
CIFS VFS: server not responding CIFS VFS: no response for cmd 50 mid xxx
This is apparently a bug that is creeping in Ubuntu since a long time ago. Basically there are 2 possible fixes (as in [9], [10], [11]):
The one I use, proposed by Daniel Ellis here [[12]]:
sudo mv /etc/rc0.d/S31umountnfs.sh /etc/rc0.d/K31umountnfs.sh
sudo mv /etc/rc0.d/S40umountfs /etc/rc0.d/K40umountfs
sudo mv /etc/rc6.d/S31umountnfs.sh /etc/rc6.d/K31umountnfs.sh
sudo mv /etc/rc6.d/S40umountfs /etc/rc6.d/K40umountfs
Another one (not tried yet):
sudo ln -s /etc/init.d/umountnfs.sh /etc/rc0.d/K15umountnfs.sh
sudo ln -s /etc/init.d/umountnfs.sh /etc/rc6.d/K15umountnfs.sh
Troubleshooting 'System program problem detected'
- We may get this message while logging in. This message indicates that a system program crashed, but unfortunately there are no other details.
- We look at var/crash/ to get more information. There we see a file named _usr_sbin_aptd.1000.crash.
- Opening the file we see
...
ExecutablePath: /usr/sbin/aptd
...
ProcCmdline: /usr/bin/python /usr/sbin/aptd
...
DBusException: org.freedesktop.DBus.Error.AccessDenied: Connection ":1.90" is not allowed to own the
service "org.debian.apt" due to security policies in the configuration file
- So basically the program aptd cannot run because user do not have the right permission. aptd is used to allow package management from user space.
- The policy file is /etc/dbus-1/system.d/org.debian.apt.conf. File format is given by dbus-daemon manual page. We can fix the policy issue as follows:
--- a/dbus-1/system.d/org.debian.apt.conf
+++ b/dbus-1/system.d/org.debian.apt.conf
@@ -7,9 +7,5 @@
<policy user="root">
<allow own="org.debian.apt"/>
</policy>
- <policy group="sudo">
- <allow own="org.debian.apt"/>
- </policy>
-
<policy context="default">
<allow send_interface="org.debian.apt"/>
<allow send_interface="org.debian.apt.transaction"/>
--- a/dbus-1/system.d/org.freedesktop.PackageKit-aptd.conf
+++ b/dbus-1/system.d/org.freedesktop.PackageKit-aptd.conf
@@ -13,9 +13,5 @@
<policy user="root">
<allow own="org.freedesktop.PackageKit"/>
</policy>
- <policy group="sudo">
- <allow own="org.freedesktop.PackageKit"/>
- </policy>
-
<!-- Allow anyone to call into the service - we'll reject callers using PolicyKit -->
<policy context="default">
- However that fix might open a security vulnerability. Checking the history of the file org.debian.apt.conf, we see that there was no change in that file since last install, and so the fix above is most probably not the correct one.
Desktop showing contents of Home Folder
Solution is to replace / create the file ~/.config/user-dirs.dirs with as content [13]:
# This file is written by xdg-user-dirs-update
# If you want to change or add directories, just edit the line you're
# interested in. All local changes will be retained on the next run
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
# absolute path. No other format is supported.
#
XDG_DESKTOP_DIR="$HOME/Desktop"
XDG_DOWNLOAD_DIR="$HOME/Downloads"
XDG_TEMPLATES_DIR="$HOME/"
XDG_PUBLICSHARE_DIR="$HOME/"
XDG_DOCUMENTS_DIR="$HOME/Documents"
XDG_MUSIC_DIR="$HOME/Music"
XDG_PICTURES_DIR="$HOME/Pictures"
XDG_VIDEOS_DIR="$HOME/Videos"
Unity
Themes
MacBuntu 16.04
- Theme
- Uninstall previous packages if any
sudo apt purge mac-icons-v3 mac-ithemes-v3 mbuntu-bscreen-v3 mbuntu-lightdm-v3
- Download macbuntu packages from Noobslab repo [14]:
sudo add-apt-repository ppa:noobslab/macbuntu
sudo apt-get update
sudo apt-get install macbuntu-os-icons-lts-v7
sudo apt-get install macbuntu-os-ithemes-lts-v7
sudo apt-get install macbuntu-os-bscreen-lts-v7
- Use
unity-tweak
to select macbuntu theme and icons.
- Unity and Compiz tweaks
- We use Hot Corners to
Spread all Windows
in upper right corner, and toShow Workspaces
in lower right corner (via Unity Tweak Tool → Hotcorners). - We use a
4
horizontal by1
vertical workspace (via Unity Tweak Tool → Workspace Settings). - We use Window Spread. We enable Icons on previews, and keep the default shortcuts, i.e.
Super-W
for Start windows spread, andSuper-Shift-W
for Start windows spread for all windows (via Unity Tweak Tool → Window Spread). - We disable the Dash, i.e. disable shortcut for Key to show the menu bar while pressed, and disable Key to show the HUD when tapped (via CompizConfig Settings Manager → Ubuntu Unity Plugin).
- We disable Unity Switcher.
- We enable Static Application Switcher, with
Alt-Tab
andShift-Alt-Tab
for Next Window and Prev Window; andAlt-Tab
andShift-Alt-Tab
for Next Window (All windows) and Prev Window (All windows) (via CompizConfig Settings Manager → Static Application Switcher). - We enable Ring Switcher for easy switching between windows on different workspace. We use
Super-Tab
andShift-Super-Tab
for Next Window Key (All Workspaces) and Next Window Key (All Workspaces); For completeness we also setCtrl-Super-Tab
andShift-Ctrl-Super-Tab
for Next Window Key and Prev Window Key (via CompizConfig Settings Manager → Ring Switcher). - experimental. Use Application Switcher instead of the Static Application Switcher and Ring Switcher combo. We use
Alt-Tab
andShift-Alt-Tab
for Next Window and Prev Window; andSuper-Tab
andShift-Super-Tab
for Next Window (All windows) and Prev Window (All windows). We enable Auto-Rotate and Set background color (via CompizConfig Settings Manager → Ring Switcher).
MacBuntu 14.04
My configuration:
The mighty MacBuntu 14.04 theme from NoobSlab! Installation log:
- Wallpaper: edit as necessary.
- Docky: not installed
- Theme, icon, cursors: Mbuntu-x, Mbuntu-xl, Mac-cursors (via unity tweak tool, see below)
sudo add-apt-repository ppa:noobslab/themes sudo apt-get update sudo apt-get install mac-ithemes-v3 sudo apt-get install mac-icons-v3 # To uninstall: # cd /usr/share/icons/mac-cursors && sudo ./uninstall-mac-cursors.sh # sudo apt-get remove mac-ithemes-v3 mac-icons-v3
- Mbuntu splash:
sudo add-apt-repository ppa:noobslab/themes sudo apt-get update sudo apt-get install mbuntu-bscreen-v3 # To uninstall: # sudo apt-get autoremove mbuntu-bscreen-v3
- Mbuntu theme for LightDM — not done anymore
sudo add-apt-repository ppa:noobslab/themes sudo apt-get update sudo apt-get install mbuntu-lightdm-v3 # To uninstall: # sudo apt-get remove mbuntu-lightdm-v3
- Edit /etc/lightdm/lightdm.conf to enable this webkit theme:
diff --git a/lightdm/lightdm.conf b/lightdm/lightdm.conf
-greeter-session=unity-greeter
+greeter-session=lightdm-webkit-greeter
- Indicator synapse:
sudo add-apt-repository ppa:noobslab/apps sudo apt-get update sudo apt-get install indicator-synapse
- Replace
Ubuntu Desktop
: Not done - Replace Overlay Scroll-bars with Normal: Not done
- Remove White Dots and Ubuntu Logo from Lock Screen:
sudo xhost +SI:localuser:lightdm
sudo su lightdm -s /bin/bash
gsettings set com.canonical.unity-greeter draw-grid false;exit
sudo mv /usr/share/unity-greeter/logo.png /usr/share/unity-greeter/logo.png.backup
# To uninstall:
# sudo xhost +SI:localuser:lightdm
# sudo su lightdm -s /bin/bash
# gsettings set com.canonical.unity-greeter draw-grid true;exit
# sudo mv /usr/share/unity-greeter/logo.png.backup /usr/share/unity-greeter/logo.png
- Apple Logo in Launcher:
wget -O launcher_bfb.png http://drive.noobslab.com/data/Mac-14.04/launcher-logo/apple/launcher_bfb.png
sudo mv launcher_bfb.png /usr/share/unity/icons/
# To uninstall:
# wget -O launcher_bfb.png http://drive.noobslab.com/data/Mac-14.04/launcher-logo/ubuntu/launcher_bfb.png
# sudo mv launcher_bfb.png /usr/share/unity/icons/
- Auto-hide Unity Launcher: done
- Install Unity Tweak Tool to change Themes & Icons
sudo apt-get install unity-tweak-tool
- Install Monochrome icons for Libreoffice:
sudo apt-get install libreoffice-style-sifr
- After installation go to LibreOffice menu select "Tools" > "Options" > "LibreOffice" > "View" and select "Sifr" under "Icon size and style"
- (Optional) Mac fonts:
wget -O mac-fonts.zip http://drive.noobslab.com/data/Mac-14.04/macfonts.zip sudo unzip mac-fonts.zip -d /usr/share/fonts; rm mac-fonts.zip sudo fc-cache -f -v
- Default font: Lucida Sans 9
- Document font: Lucida Sans 10
- Monospace font: Lucida Console Semi-Condensed 10
- Window title font: Luncida Sans Unicode Bold 10
- Fixes
- Ubuntu Tweak → Tweaks → Unity → Restore launcher opacity to defaults (0.67).
MacBuntu 10.04
The mighty Macbuntu 10.04 theme! Reverted changes:
- Fonts — see below.
- Terminal — Colors select Use colors from system theme (was set to Gray on black built-in schemes). Keep transparent background 95%.
- Panel — add back System Monitor. We don't add back the bottom task panel.
- In Configuration Editor, /apps/metacity/general/button_layout: menu:minimize,maximize,close
- Appearance
(before Macbuntu) Fonts — Application → Tahoma 9; Document→ Sans 8; Desktop → Sans 8; Title → Sans Bold 9; Fixed width → Monospace 8- (after Macbuntu) Fonts — Application → Lucida Grande 9; Document→ Lucida Grande 9; Desktop → Lucida Grande 9; Title → Lucida Grande 10; Fixed width → Lucida Console 9 (originally Lucida Console 10)
- Fonts — rename ~/.fonts.conf to ~/.fonts.conf.macbuntu to disable macbuntu hinting settings override.
- Appearance
- Wallpaper, edit as necessary.
- Keyboard Layout (System-Wide)
- Layout: Belgium (default) + USA, no separate layout
Custlayout Belgium (file /usr/share/X11/xkb/symbols/be) to allow AltGr-; → '<' and AltGr-: → '>', and support Greek letters with AltGr-Shift. - Options: Capslock as an additional ESC key,
- Keyboard Shortcuts
- Window List Panel (see here)
- Window List Content → Show windows from all workspaces
- Restoring Minimized Windows → Restore to native workspace
- Fonts
- System fonts (/usr/local/share/fonts):
- Added BitStream Vera 1.10
- Added jsMath fonts (Linux variant, darkness 20 file, see here)
- Added all jsMath extra fonts (dark version from this page)
- User fonts (~/.fonts):
- Added Tahoma
Shortcut | Action | Remark |
---|---|---|
Super-E | Home Folder | Hack Super is mapped to Win keys not needed anymore it seems |
Compiz
My configuration:
- Compiz
- General Option - Move Window: SuButton2
because AButton3 is used in OpenOffice to move columns / rows - Static Application Switcher: Use AAlt for Next Window (current workspace)
- Scale: Multi-Output Mode → On all output devices, darken background, Emblem for overlay icon
- Ring Switcher: Enabled + Use SuTab for Next Windows (All Workspaces) + Allow Mouse Selection
- Enhanced Zoom Desktop: Disabled
- Negative: Disabled
- Desktop Wall: enabled Edge Flip Move.
- Put : disabled Put Pointer, enabled Put To Next Output (Superz) selected Avoid Offscreen.
Shortcut | Action | Remark |
---|---|---|
SASpace SuButton3 |
General Options - Window Menu | |
CALeft CARight |
Desktop Wall - Move | |
SCALeft SCARight |
Desktop Wall - Move with window | |
Sus | Expo Key | Also known as Start workspace switcher. Was SSus |
AF7 | Move Window | |
Suz | Windows Put To Next Output | |
AF8 SuButton2 |
Resize Window | |
SuTab SSuTab |
Ring Switcher | (All Workspaces) |
Suw Sua / TopLeft / TopRight |
Scale windows | Current viewport All windows |
ATab SATab |
Static application switcher | Current viewport |
SuAlt | Ubuntu Unity Plugin Key to show the HUD when tapped |