Forum Stats

  • 3,827,877 Users
  • 2,260,836 Discussions
  • 7,897,402 Comments

Discussions

Oracle Linux - Solving a few GUI annoyances...

David Gilpin-Oracle
David Gilpin-Oracle Principal Product Manager, Oracle Linux and VirtualizationFrisco, TXPosts: 51 Employee
edited Feb 6, 2019 1:50PM in Oracle Linux

image

Introduction

It's always a good idea to run production workloads on Oracle Linux instances that do not have a GUI installed. Here are some reasons:

  • Reduces the chance that an issue in the GUI impacts the production workload
  • Fewer packages are installed, so there are fewer packages for potential exploits--and fewer packages to patch!
  • Without a GUI there may be less resources consumed (CPU, Memory)

There are some use cases for Oracle Linux where a GUI might be helpful, especially when running as a Virtual Machine in Oracle VirtualBox:

  • Performing a demonstration of Linux based software on a Windows or Mac laptop
  • A developer using a Windows or Mac laptop that is doing Linux Development with an Integrated Development Environment
  • A remote X Window capable VM for accessing graphical software running on a server (Example: running the Oracle Universal Installer remotely)

There are a few annoyances when running Oracle Linux in a GUI. These annoyances are inherited from upstream. This document highlights these annoyances and shows workarounds for them.

Automatic check for updates - performance hit

By default, when Oracle Linux with a GUI is booted--and has access to the Internet, it automatically checks to see if any updates are needed. If so, the GUI will present an icon on the top menu bar indicating the need to update the OS. At face value this sounds good.

However, when Oracle Linux with a GUI is deployed as a VM, resources (CPU, Memory, Disk I/O, Network I/O) are shared among the Virtual Machines AND the Host, so they tend to be scarce--especially on a laptop. While this patch check process is running, the performance of the VM will be very sluggish, and the host disk will show high activity as the process (which uses yum) is very disk intensive. If you had fired up this VM to do a quick demo, this performance degradation can severely impact the demo performance for several minutes.

Another annoyance: This automatic patch check process grabs the yum lock. If you attempt to use the yum command while the automatic update check is in process, you will get a yum lock error.

This annoyance is not limited to Oracle Linux. The Internet is filled with CentOS and RHEL users complaining about the same issue.

When Oracle Linux is not installed with a GUI, this automatic patch check process does not occur.

The culprit is a package called PackageKit, which by default will fire up after a boot and do a yum patch check. It can be turned off to stop this annoyance.

Oracle Linux 6

By default in Oracle Linux 6, PackageKit will check for updates Daily. The actual time of the check is randomized but typically occurs within the first hour after the system is booted. This can make for an "interesting" situation if the yum check process (fired off by PackageKit) occurs in the middle of your demo!

To disable this behavior for all users, as a root user open /etc/yum/pluginconf.d/refresh-packagekit.conf with a text editor and change "enabled=1" to "enabled=0"

Oracle Linux 7

To disable PackageKit from running, enter the following 3 commands as a root user:

# systemctl stop packagekit# systemctl disable packagekit# systemctl mask packagekit

Note: systemctl mask replaces the /usr/lib/systemd/system/packagekit.service unit file with a symbolic link to /dev/null. This ensures that systemd cannot restart PackageKit.

Gnome top left hot corner

With Oracle Linux 7, the default desktop GUI is Gnome. Here is a partial screenshot of the Gnome Desktop (the default red background has been changed)

2019-01-25 14_48_51-Window.jpg

There is a default hotspot in the top left corner. If you have your Pointing Device in VirtualBox set to PS/2 Mouse, or you are using Oracle Linux with GUI on "real" hardware with your mouse--when you move your mouse to the upper left corner of the screen, the desktop will change into the Gnome Activities view:

2019-01-25 14_47_59-Window.jpg

If you are trying to run some application software or perform a demo, this sudden change in view can be quite distracting. Once in the Activities view, you have to figure out how to get out of it to return to the Gnome Desktop (the solution is to press the Esc key.)

The Gnome Activities view can easily be displayed by pressing what Gnome calls the "Super" key. On most keyboards this is the "Windows" key.

Since the Activities view is only a key press away, it's easy to disable the hot top left corner hotspot and eliminate this annoyance.

Enter the following command as a root user to enable the  ol7_optional_latest repository:

# yum-config-manager --enable ol7_optional_latest

Now install a gnome extension by entering the following command as a root user:

# yum install gnome-shell-extension-no-hot-corner

Restart Gnome by logging out then log back in.

Click Applications - Accessories - Tweaks. In the Tweaks menu click the Extensions Tab.

On the Extensions menu, find No topleft hot corner and turn it ON (highlighted in red on the image below)

2019-01-25 14_42_22-Window.jpg

Close the Tweaks menu by clicking the X in the upper right of the Tweaks menu. The tweak extension takes effect immediately.

Gnome auto window maximize

Another default Gnome setting will automatically maximize any window that you bring close to the upper left or upper right of the screen. If you are trying to rearrange some windows on a small VirtualBox screen, which is running on a small host laptop screen--having the window suddenly fill the screen can be annoying. It can easily be disabled.

Run this one command while logged in as the normal user:

$ gsettings set org.gnome.shell.extensions.classic-overrides edge-tiling false

Repeat this command for each user necessary.