Ubuntu things
Table of Contents
- disable hud-service
- Configuring Secure Boot after upgrade
- empty the trash using terminal
- How to Enable Nautilus Typeahead Find in Ubuntu 18.04 LTS
- AMD Ryze segment test
- Overclock Your AMD Ryzen CPU On Linux
- Conky: Monitoring CPU freq in real time
- Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x64
- Install/Uninstall Java(JDK, JRE)
- cc
disable hud-service
- removes - the execute mode
# 64 bit Users sudo chmod -x /usr/lib/x86_64-linux-gnu/hud/hud-service sudo killall hud-service # 32 bit Users sudo chmod -x /usr/lib/indicator-appmenu/hud-service sudo killall hud-service
OR 2. Optimize it
The HUD is related to the Unity Launcher. For example it analyzes the
files you are using and offers them when you press Super
.
installing Compiz Config Settings Manager (ccsm) and disabled all effects and set "Enable Low Graphics Mode" in "Ubuntu Unity Plugin":
sudo apt-get install compizconfig-settings-manager ccsm
Configuring Secure Boot after upgrade
Your system has UEFI Secure Boot enabled. UEFI Secure Boot is not compatible with the use of third-party drivers.
The system will assist you in disabling UEFI Secure Boot. To ensure that this change is being made by you as an authorized user, and not by an attacker, you must choose a password now and then use the same password after reboot to confirm the change.
If you choose to proceed but do not confirm the password upon reboot, Ubuntu will still be able to boot on your system but these third-party drivers will not be available for your hardware.
three way choice:
- turn off secure boot (fairly easy),
- lose 3rd party driver functionality (unacceptable)
- or sign the drivers yourself (super complicated).
You are correct. The Canonical Kernel Team has enabled
EFI_SECURE_BOOT_SIG_ENFORCE
in the new 3.19 Ubuntu kernel.
That prevents from loading unsigned third party modules if UEFI Secure Boot is enabled.
The easiest way to fix this issue is to disable Secure Boot in UEFI (BIOS) settings.1
In most cases you can get into UEFI settings using grub menu. Press ESC button on booting, get into grub menu and select System Setup. Secure Boot option should be in "Security" or "Boot" section of the UEFI.
You can get into UEFI directly, but it depends on your hardware. Read your computer manual to see how to get there. It may be Del, or F2 on boot, or something else.
An alternative way is to disable Secure Boot using mokutil
.
sudo apt install mokutil sudo mokutil --disable-validation
It will require to create a password. The password should be at least 8 charachters long. After you reboot, UEFI will ask if you want to change security settings. Choose "Yes".
Then you will be asked to enter the previously created password. Some UEFI firmware asks not for the full password, but to enter some charachters of it, like 1st, 3rd, etc. Be carefull. Some people do not undrestand this.
Disabling Secure Boot is also Dell's recommended solution: http://en.community.dell.com/techcenter/os-applications/f/4613/p/19985774/20925748#20925748
sign2
As Anthony Wong says, when you install a DKMS package you are compiling the package yourself, thus, Canonical cannot sign the module for you.
However, you can definitely use Secure Boot, however this is exactly the use case where Secure Boot is trying to protect you from yourself because it cannot know whether you trust a module or don't.
By default, there is a Platform Key (PK) on your UEFI machine, which is the ultimately trusted Certificate Authority for loading code in your processor.
GRUB, or shim, or other boot mechanisms can be digitally signed by a KEK which is trusted by the root CA (PK), and thus your computer can, without any configuration, boot software like Ubuntu Live USB/DVDs.
On Ubuntu 16.04 the kernel is built with CONFIG_MODULE_SIG_FORCE=1
,
which means that the kernel will enforce modules to be signed by a
trusted key in the platform. Take into consideration that the UEFI
platform by default contains a PK that you do not have any control
over, and thus you cannot sign binaries with a key recognized by your
own machine.
Some people bash and rant against that, but there is really no better way (from a security standpoint) than it being yourself who enrolls the new key you want.
If your boot system uses shim, you can use something called a Machine Owner's Key database, and enroll your key as a MOK (You can do that with mokutil). If you don't, you can also enroll your key in the UEFI database as a signing key.
After you enroll your key, you can sign your DKMS-built package with your MOK (there should be a perl script at /usr/src/kernels/$(uname -r)/scripts/sign-file), and after it is signed, you can load it into the kernel.
Granted, someone should make more visual instructions on this, and probably even make a wizard or a better DKMS standard to allow keys to be taken into consideration, but this is what we have as of now.
empty the trash using terminal
rm -rf ~/.local/share/Trash/*
How to Enable Nautilus Typeahead Find in Ubuntu 18.04 LTS
sudo add-apt-repository ppa:lubomir-brindza/nautilus-typeahead sudo apt dist-upgrade # Review the changes the command proposes and, if you’re happy to proceed, nautilus -r
Undo the change
sudo apt install ppa-purge sudo ppa-purge ppa:lubomir-brindza/nautilus-typeahead
AMD Ryze segment test
Overclock Your AMD Ryzen CPU On Linux
Conky: Monitoring CPU freq in real time
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64, Ubuntu 16.04LTS-x643
if /boot is not 100% full and apt is working
- Check the current kernel version
$ uname -r
- Remove the OLD kernels
List the old kernel
$ sudo dpkg --list 'linux-image*'|awk '{ if ($1=="ii") print $2}'|grep -v `uname -r`
You will get the list of images something like below:
linux-image-3.19.0-25-generic linux-image-3.19.0-56-generic linux-image-3.19.0-58-generic linux-image-3.19.0-59-generic linux-image-3.19.0-61-generic linux-image-3.19.0-65-generic linux-image-extra-3.19.0-25-generic linux-image-extra-3.19.0-56-generic linux-image-extra-3.19.0-58-generic linux-image-extra-3.19.0-59-generic linux-image-extra-3.19.0-61-generic
Now its time to remove old kernel one by one as
$ sudo apt-get purge linux-image-3.19.0-25-generic $ sudo apt-get purge linux-image-3.19.0-56-generic $ sudo apt-get purge linux-image-3.19.0-58-generic $ sudo apt-get purge linux-image-3.19.0-59-generic $ sudo apt-get purge linux-image-3.19.0-61-generic $ sudo apt-get purge linux-image-3.19.0-65-generic
When you're done removing the older kernels, you can run this to remove ever packages you won't need anymore:
$ sudo apt-get autoremove
And finally you can run this to update grub kernel list:
$ sudo update-grub
Install/Uninstall Java(JDK, JRE)
UNINSTALL ORACLE JDK
- Remove The Link
$ sudo update-alternatives --remove "java" "/usr/lib/jvm/jdk[version]/bin/java" $ sudo update-alternatives --remove "javac" "/usr/lib/jvm/jdk[version]/bin/javac" $ sudo update-alternatives --remove "javaws" "/usr/lib/jvm/jdk[version]/jre/bin/javaws"
- Remove The Package
$ sudo rm -r /usr/lib/jvm/jdk[version]
UNINSTALL OPENJDK
- remove Openjdk only
$ sudo apt-get remove openjdk*
- remove Openjdk along with dependencies,
$ sudo apt-get remove --auto-remove openjdk*
# remove Openjdk and it’s configuration files $ sudo apt-get purge openjdk* # remove Openjdk along with dependencies and it’s configuration files $ sudo apt-get purge --auto-remove openjdk*
Install Oracle Java
Go to Oracle Java website (https://www.oracle.com/technetwork/java/javase/downloads/index.html) to download JDK or JRE.
sudo mkdir /opt/jdk sudo tar -zxf jdk-8u5-linux-x64.tar.gz -C /opt/jdk sudo update-alternatives --install /usr/bin/java java /opt/jdk/jdk1.8.0_05/bin/java 100 sudo update-alternatives --install /usr/bin/javac javac /opt/jdk/jdk1.8.0_05/bin/javac 100