Archives For Ubuntu 18.04

Linux Kernel

Ubuntu 18.04.2 was released a day ago with new HWE stack (newer kernel and X packages backported from Ubuntu 18.10), here’s how to install (or remove) it in current Ubuntu 18.04 machines.

While regular system update does only upgrade to Ubuntu 18.04.2, you need to manually do following steps to install the new hardware enablement stacks.

1. Open terminal either via Ctrl+Alt+T keyboard shortcut or by searching for ‘terminal’ from application menu:

2. When terminal opens, run command to install the new Hardware Enablement stacks, including Linux Kernel 4.18, and X stack back-ported from Ubuntu 18.10:

sudo apt install xserver-xorg-hwe-18.04

Type user password (no asterisk feedback) and hit Enter to continue.

Once installed, restart your computer and enjoy!

How to Remove New LTS Enablement Stack in Ubuntu 18.04:

For choice, you can easily remove the new X stack by running following command in terminal:

sudo apt remove xserver-xorg-*-hwe-18.04

Then you have to install back the old X packages via command:

sudo apt install xorg

gnome shell

This quick tutorial is going to show you how to add a ‘Show Desktop‘ icon into left dock launcher in Ubuntu 18.10 or Ubuntu 18.04.

The ‘Show Desktop‘ button was dropped since Ubuntu switched to Gnome 3 Desktop. To add it back, you can manually create show desktop shortcut icon and add it to panel (dock).

As you may know, the keyboard shortcuts Ctrl+Alt+d or Super+d do the function hide or show all opened app windows. And following steps will create a ‘show desktop’ shortcut icon simulates the keyboard press (Super+d) via xdotool.

NOTE that following steps don’t work on Wayland session, since xdotool simulates X11 keyboard/mouse input events.

1. Open terminal (Ctrl+Alt+T) and install xdotool:

sudo apt-get install xdotool

Type your user password (no asterisks feedback) when it prompts and hit Enter to continue.

2. Then create the show desktop shortcut icon and edit it via command:

gedit ~/.local/share/applications/show-desktop.desktop

When the file opens, paste following lines and save it.

[Desktop Entry]
Type=Application
Name=Show Desktop
Icon=desktop
Exec=xdotool key --clearmodifiers Super+d

3. Finally search for ‘show desktop’ in application menu, then right lick and select ‘add to favorites’:

That’s it. Enjoy!

Ubuntu 18.04

Ubuntu 18.10 Cosmic Cuttlefish was finally released today. Here’s how to upgrade from Ubuntu 18.04 to Ubuntu 18.10.

Ubuntu 18.10 is a short-term release with 9 months support. It features Linux 4.18 kernel, X.Org Server 1.20.1, Mesa 18.2.2, and new default desktop theme ‘Yaru’.

Preparation:

Before getting started, you need to do some preparations:

  1. Backup your bookmarks, documents, and other important data.
  2. It’s recommended to remove proprietary drivers and use the open-source drivers instead.
  3. Purge or remove third-party PPA repositories (Software & Updates -> Other Software)

To upgrade to Ubuntu 18.10:

1. Open Software & Updates and navigate to Updates tab.

Then select “For any version” from the drop-down menu of ‘Notify me of a new Ubuntu version’

2. Install all available system updates by running commands in terminal (Ctrl+Alt+T):

sudo apt-get update && sudo apt-get dist-upgrade

Type your user password (no asterisks feedback) when it prompts and hit Enter to continue.

3. Start Update Manager and you’ll see Ubuntu 18.10 available for upgrade (Restart first if required):

sudo update-manager -c

4. Click the Upgrade button and confirm in the next release note dialog:

The upgrading process starts and it may take a few hours depends on your device and internet speed.

gnome shell

This quick tutorial is for those who want to pin application shortcut icons to the default Gnome Desktop in Ubuntu 18.04, while you can’t drag and drop icons from applications menu to the desktop.

1. First, open Gnome Tweaks (if not available, install it via Ubuntu Software) and navigate to Desktop tab and enable ‘Show icons’ on desktop.

2. Open Files (Nautilus file browser) and navigate to Other Locations -> Computer -> usr -> share -> applications.

There drag and drop any application shortcut to the desktop.

Click to run the desktop icon, and select ‘Trust and Launch’. The shortcut icon will display correctly once the application launches.

To remove a desktop shortcut, simply move the icon to trash. Only the shortcut will be removed, not the original item.

That’s it. Enjoy!

gnome shell

The default Gedit text editor in Ubuntu 18.04 always opens file in a new window, even though there’s already an existing instance. And there’s no easy option to change the behavior.

Thanks to fossfreedom, you can re-built Gedit pakages so to always open files in new tabs in the same gedit window.

1. Open terminal either via Ctrl+Alt+T shortcut key or by searching for ‘terminal’ from software launcher.

2. When terminal opens, paste the command below and hit run to install the building tools:

sudo apt-get install devscripts build-essential fakeroot

3. Launch Software & Updates, and click enable download Source code from Ubuntu repositories.

4. In user downloads, create a build folder and navigate to the directory.

cd ~/Downloads/ && mkdir build && cd build

5. Download the gedit source code via command:

sudo apt-get update; apt-get source gedit

Type your password (no asterisks feedback) when it prompts

6. Next edit the source file gedit-app.c:

cd gedit-* && gedit gedit/gedit-app.c

When the file opens, add new line return TRUE; as the picture shows (line 320 for Ubuntu 18.04):

7. Give a unique package name by editing the debian/changelog file.

gedit debian/changelog

8. Finally rebuild the gedit via commands:

sudo apt-get build-dep gedit

debuild -i -us -uc -b

The commands will take a few minutes building the gedit text editor packages.

9. At last, install the new packages via command and enjoy!

cd ~/Downloads/build/ && sudo dpkg -i gedit*.deb

In addition, you may lock the changes so it won’t be overwritten after installing system updates.

And it can be done easily via Synaptic package manager (available in Ubuntu Software). Simply search for ‘gedit’ and choose lock version for gedit and gedit-common packages one by one.