Pop!_OS Tiling – Always Float

I’m a fan of tiling window managers. Pop!_OS introduced tiling windows, known as Pop Shell, in version 20.04. While the Pop implementation is not as powerful and functional as a tiling windows manager, like i3 or Awesome, it’s a great start but needs some improvements. In my post, Pop!_OS Switch Workspaces with Super + Number, I recommend adding keyboard mapping to move between workspaces easier.

Some windows don’t work well in tiling mode. The Settings and Calculator applications work better as floating windows

Calculator opening in tiling mode
Calculator opening as a floating window.

The Pop Shell team is working on improvements for managing a combination of floating and tiling windows. In the meantime, you can define specific windows to open in floating mode by default. The .config/pop-shell/config.json file below defines the Settings window, “Gnome-control-center”, and Calculator, “Gnome-calculator”, to open in floating mode.

{
"float": [
{
"class": "Gnome-control-center",
"title": ""
},
{
"class": "Gnome-calculator",
"title": ""
}
],
"log_on_focus": false
}

Currently, only the window class is required in config.json.

How to determine the window class

Finding a window class is simple. Open the application (window). Also open the terminal. In the terminal, run the command: xprop | grep WM_CLASS, then click on the window you want the class for. Back in the terminal you will see the class information. Use the second string as the class.

My Config

{
"float": [
{
"class": "Gnome-control-center",
"title": ""
},
{
"class": "Gnome-calculator",
"title": ""
},
{
"class": "zoom",
"title": ""
},
{
"class": "Org.gnome.Nautilus",
"title": ""
}
],
"log_on_focus": false
}

Moving Forward

In the future, I expect a user interface control will be used to update this config.json file. In the meantime, it’s easy enough to update it manually.

Your first Linux distro should be Pop!_OS

For developers, I recommend using Pop!_OS as your first Linux distribution. After using MacOS for fifteen years, my first Linux experience was with Pop!_OS, and I’ve explored other Debian and Arch-based distros. I’m currently using Pop!_OS and EndevourOS.

Pop!_OS is an excellent transition distribution for developers moving to Linux for the following reasons:

Made by developers for developers.

Pop!_OS is maintained by System 76, a leading manufacturer of professional hardware designed to run Linux. In the hands of System76, there is a focus on performance, reliability, and usability for the developer. System76 descried Pop!_OS as “an operating system for STEM and creative professionals who use their computer as a tool to discover and create.”

Hardware Support

While Pop!_OS comes pre-installed on System76 computers, it will install on any (Linux friendly) computer. While there are distributions designed to run well on old, underpowered hardware, I have found Pop!_OS to be lightweight enough to perform well on a broad range of hardware. I’m currently running it on a System76 Laptop, custom-built tower, and the good old classic Thinkpad T420. Pop!_OS also supports modern, cutting edge hardware and is often the choice of gamers.

Premium Interface

As a recovering Mac “fan boy”, I appreciate an operating system that looks and feels premium. Before switching to Linux, I had the impression that Linux would look and feel old. While some Linux desktop environments look old, many, like Pop!_OS and Elementary, are beautiful. Out of the box, without customization, Pop!_OS is not a step down from Mac OS.

No Clutter

The Pop!_OS desktop is clutter-free. No dock. No Menu. Just a status bar at the top of the window. This minimal interface can be a jarring when coming from Windows and macOS. I now appreciate the OS getting out my way and valuable screen space is reserved reserved for my work.

While it’s possible to add a macOS like dock (with Dash to Dock), I encourage people to use op!_OS defaults for a few weeks before making changes. As I mentioned earlier, Pop!_OS is made by developers; the default settings are purposeful.

Pop Store

While Pop!_OS comes with very few applications installed, the Pop Store provides one-click installation of hundreds of applications. From Slack and VS Code to photo editors, video editors, office tools, and games. The Pop Shop catalog has grown a lot in two years. It supports APT, and Flatpack installs.

Pop Store

Tiling Window Manager

Pop!_OS introduced a “tiling window” like feature with version 20.04. With tiling window mode on, windows don’t overlap. When a window opens, it splits the space with the existing windows. Without tiling windows mode on, Pop!_OS works like macOS and Windows, with floating windows. Windows are resized by you and can overlap. Tiling windows allow you to maximize screen space and increase productivity using keyboard shortcuts.

Tiled Windows – Browser, file manager and terminal.

Pop!_OS also supports Workspaces, which are virtual desktops. The combination of Tiling Windows, Workspaces makes for a powerful combination. (I make a minor tweak to the keyboard shortcuts to switch workspaces with Super + Number.)

Tiling Windows on Dual Monitors

In Summary

Switching to Linux can be challenging. Choosing a Linux distribution that looks and works great out of the box makes the transition easier. In my experience, Pop!_OS ‘just works’, allowing you to get comfortable in the Linux world.

Pop!_OS Switch Workspaces with Super + Number

About Titling Windows

Pop!_OS introduced a “tiling window” like feature with version 20.04. With tiling window mode on, windows don’t overlap. When a window opens, it splits the space with the existing windows. Tiling windows allow you to maximize screen space and increase productivity using keyboard shortcuts.

Pop!_OS Tiling Settings

Pop!_OS also supports Workspaces, which are virtual desktops. The combination of Tiling Windows, Workspaces and dual monitors makes for a powerful combination.

I like to setup Workspace 1 for communication with e-mail and chat clients (Slack, Telegram, Mattermost…). Workspace 2 for developments with terminals, IDE, and browsers. Workspace 3 for documentation with text editors, note taking apps and browsers.

Dual monitors with tiling windows.

Keyboard Bindings

Pop!_OS has a set of keyboard shortcuts to navigate between windows and workspaces. I find them inadequate when it comes to switching between Windows and Workspaces. With the additional keyboard bindings below you can switch between Workspaces using SuperKey + Number.

Pop!_OS Tiling Shortcuts

SuperKey + 1 switches to workspace 1 and SuperKey + 2 to workspace 2, etc… up to 9. Add the Shift key, and the current focus window moves it to the workspace.

This minor change to Pop!_OSs titling window keyboard shortcuts make it far more usable.

Copy and paste the code below at the terminal.


gsettings set org.gnome.mutter dynamic-workspaces false
gsettings set org.gnome.desktop.wm.preferences num-workspaces 8

gsettings set org.gnome.shell.keybindings switch-to-application-1  []
gsettings set org.gnome.shell.keybindings switch-to-application-2  []
gsettings set org.gnome.shell.keybindings switch-to-application-3  []
gsettings set org.gnome.shell.keybindings switch-to-application-4  []
gsettings set org.gnome.shell.keybindings switch-to-application-5  []
gsettings set org.gnome.shell.keybindings switch-to-application-6  []
gsettings set org.gnome.shell.keybindings switch-to-application-7  []
gsettings set org.gnome.shell.keybindings switch-to-application-8  []
gsettings set org.gnome.shell.keybindings switch-to-application-9  []

gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-1  "['<Super>1']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-2  "['<Super>2']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-3  "['<Super>3']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-4  "['<Super>4']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-5  "['<Super>5']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-6  "['<Super>6']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-7  "['<Super>7']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-8  "['<Super>8']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-9  "['<Super>9']"
gsettings set org.gnome.desktop.wm.keybindings switch-to-workspace-10 "['<Super>0']"

gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-1  "['<Super><Shift>1']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-2  "['<Super><Shift>2']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-3  "['<Super><Shift>3']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-4  "['<Super><Shift>4']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-5  "['<Super><Shift>5']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-6  "['<Super><Shift>6']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-7  "['<Super><Shift>7']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-8  "['<Super><Shift>8']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-9  "['<Super><Shift>9']"
gsettings set org.gnome.desktop.wm.keybindings move-to-workspace-10 "['<Super><Shift>0']

Resources

Thank you to Jibar Ali Ouassao for this solution in the Pop Shell repo issue queue.

Shared Keyboard and Mouse

I have two Linux computers at my desk. A (closed) laptop connected to a monitor and a home grown tower connected to two monitors. Three monitors in all. I frequently switch between these computers and control them with one keyboard and mouse.

For the past few years, I’ve been using a Logitech wireless keyboard (K780) and mouse (M585) that support multiple computers. One computer is connected to the keyboard and mouse via a wireless dongle, and the other is connected via Bluetooth. A set of keys switches the keyboard between computer, and a button switches the mouse. While the switching works most of the time, sometimes there is a delay. It’s frustrating when keystrokes are delayed or missing.

I recently switched to a wired keyboard and mouse and control the switching with software KVM (Keyboard Video Mouse). After using this for a week, I wish I had made this change sooner. Barrier is an open-source solution that works on Linux, Mac and Windows.

This solution is for sharing a single keyboard and mouse with multiple computers. Each computer requires a monitor.

After installation, you set up one computer as the server, and others as clients. On the Barrier server, you add a screen for each client computer using it’s machine name and position it relative to the server screen. For example, my computer called “pop-os” is to the left of “rebel-tower”.

On the client machines, you identify the address of the Barrier server.

After Barrier is running on the clients and server, when working on rebel-tower and moving the mouse off the screen to the left, the mouse will begin moving on the pop-os screen. Wherever the mouse is active, the keyboard is active. You move the mouse to the computer you want to type on. This implementation is more natural to use than pushing keys and buttons, and it’s fast and smooth.

I have not used any of Barrier’s advanced settings, maybe someday. You can define keystrokes to switch computers and activate advanced functionality. Barrier’s Linux version does not support drag and drop between computers, but Mac and Windows is supported. While this feature could be useful, it’s not critical for me.

I’m always surprised by the quality and abundance of open source Linux applications.

Moving to VIM

After 30 years in front of the keyboard, I decided to refine my craft and learn to touch type. It’s been about a month, and I’m improving. Keeping my fingers on “home keys” got me thinking about how often I remove them to touch the mouse. All these keys at my finger tips and they are almost useless for navigation within a file. Hello Vim.

I’ve used Vim for editing text files on a server for years. I knew the basics: insert mode, save, and exit. One of the powerful features of Vim is its modes. The two primary modes are Normal and Insert. When in normal mode, the keys are used to navigate, copy and paste, find, and much more. You don’t need to mouse or cursor keys; in fact, you shouldn’t be using them. To modify text, you enter insert mode, which is the only mode in most text editors. The capabilities of Vim are mind-blowing.

To get started, I watched several videos on Youtube and began a slow transition. While it’s a gradual transition, you will see the benefits quickly. I hope to replaced VS Code with Vim someday. I love the idea of using the same tool proficiently on a desktop, VPS, or Raspberry Pi.

How to get started

My recommendation:

  1. Vim Mode – using your existing IDE, such as VS Code, adding a Vim extension to give you basic Vim workflow and key bindings. This is a good bridge from where you are today to Vim 100%.
  2. Six Part Series – Recently, Youtuber, The Primeagan, released an excellent six part series to learn Vim. His videos are educational and entertaining. Watch video 1 and don’t moved to the second video until you don’t need to think about basic navigation keys. I’m not through them all yet.
  3. Explore – There are many Vim tutorial available online. You them to explore the capabilities of Vim to do things easier and faster.

Linux Content

Most of my education and entertainment (aka content) comes from podcasts and YouTube. My Linux journey started from those sources and continues today. While this list is fluid, in February 2020 my podcast and YouTube subscriptions include, in no particular order:

Podcasts

  • Linux for Everyone – Host, Jason, recently switched to Linux and has the switcher insight into Linux. He is a talented writer and entertainer.
  • Ask Noah Show – Weekly tech radio show with a Linux slant.
  • Destination Linux – A podcast from techies that love Linux.
  • Going Linux – Long time show (380+ episodes), a discussion format, much like my show TalkingDrupal.com. It’s just a good listen.

YouTube

  • Big Daddy Linux – A weekly live show and “spotlight” interviews with people in the Linux world.
  • Distro Tube – In depth videos about all things Linux.
  • Chris Titus Tech – Another switcher that shares how-to and review videos.
  • Joe Collins – Also known as EzeeLinux, educated on a broad range of Linux topics. His channel is a great resource learning in plain English.
  • Luke Smith – An open source, privacy guy. Simple and insightful.
  • LearnLinuxTV – A well rounded show about a variety of software and hardware topics.

Faster Drupal Development on Linux

Local Drupal development has moved to docker based environments with solutions like Lando and DDEv. With these tools, it’s fast and easy to spin up a local environment and manage many projects. The days of MAMP and WAMP are (long) gone.

Here’s the problem, Mac OS is the dominant development platform for Drupal developers, and Docker runs terribly on it. Docker interacts differently with macOS than it does with Linux. The source code on the host computer is shared with Docker containers. The multiple layers of communication between Docker and the macOS file system make file-sharing very slow. While Docker’s direct access to the Linux file system makes it very fast. This video, Improving Docker Desktop File Sharing Performance, from DockerCon 18 describes this issue in detail.

The file-sharing performance issue became apparent when working with a colleague to set up a new Drupal 8 website build. I was shocked to see the local build process taking over 8 minutes on my colleague’s computer and less than 30 seconds on my computer.

Benchmarks

In an unscientific way, with some help from my friends, I tested the build process on a few Macs and Linux computers with different hardware specs. Each computer had Docker and Lando installed. The website is a Drupal 8 Standard profile with Acquia’s BLT. The test is simple, run the BLT artifact build, blt artifact:build

Below are the results of this test.

ComputerSpecsOSArtifact:build
ThinkPad T420 (2011)i5 (2 cores), 8GB RAM, SSDLinux (Endevour OS)20 seconds
Custom Build (2020)Ryzen i7 (8 cores), 32GB, SSDLinux (Endevour OS)7 seconds
Macbook Air (2018)i5 (2 cores), 8GB RAM, SSDmacOS Catalina8+ minutes
MacBook Pro (2015)i7 (4 cores), 16GB RAM, SSDmacOS Mojave6 minutes

Solutions

There are some potential solutions. Lando has an undocumented Mac-only feature called “Turbo Mode”. Reviewing the issue thread, there are mixed results with this implementation. Turbo Mode had little impact on my test case shaving off 30 to 60 seconds. A 5% to 10% improvement is good, but when comparing it to performance on Linux, there is no practical improvement. Others have seen better improvements with Turbo Mode. This approach is easy to implement and worth exploring, but Turbo Mode hasn’t made it’s way into Lando as a supported feature. Use with caution.

Some tweaks can be made to your Docker configuration. Increasing the default RAM usage from 2GB to 4GB is a starting point. You can also limit the number of shared folders Docker watches, by default, the entire /Users folder is included. I tested the memory upgrade and limited the shared folders to only the necessary application folders. Similar to the results with Turbo Mode, they were minimal for my test case. You may have more promising results. There are many online resources with recommendations to improve performance, search “Docker Mac performance”.

The beauty of using Lando is simplicity, which starts to diminish with lots of OS based tweaks. I suspect more research and testing could result in better performance on Mac. BUT, using Linux for Drupal development with Docker will get you the best performance by far, with ease. It’s that simple.

My first computer build

Over the past two years, I switched from Mac to Linux. I’ve also been breathing life into old computers with upgrades and Linux. With some projects coming up that need more computing power, I decided to build a desktop. After some research, advice from friends, posting questions on forums, and watching many YouTube videos, I built the courage to get started.

I didn’t have a budget, per se, but didn’t want to spend more than necessary. I decided to go with an eight core AMD CPU instead of Intel. A middle of the road GPU. A motherboard and power supply that will handle growth. All wrapped in a low-end case.

Parts

  • AMD Ryzen 7 2700 CPU
  • MSI x470 Gaming Plus Motherboard
  • AMD Radeon RX 580 GPU
  • Corsair 32GB (2x16GB) 3200MHz DDR4 DRAM
  • 500MB m.2 SATA Drive
  • ROSEWILL ATX Mid Tower Gaming Computer Case
  • Rosewill ARC Series 750W Power Supply

The Build

A pile of parts, where to begin? I had different advice on where to start. I put the CPU, heat sync, RAM, and m.2 on the motherboard first. I then attached the motherboard to the case. I then installed the GPU and plugged the case cables for the front panel buttons and ports into the motherboard. The last step, connect the power supply.

Due to inexperience, I made some minor mistakes and struggled through a few steps.

DDR4 RAM comes in different sizes, 260 pin SO-DIMM for laptops, and a larger 288 pin DIMM for desktops. I assumed the 32GB SO-DIMM I already had could be used in the new computer. I noticed the issue when unboxing the motherboard. I quickly sold the SO-DIMMS on eBay and purchased the proper RAM

DDR4 SIMM and SO-DIMM

When attaching the motherboard to the case, there was no mention in the instructions of ‘stand-off’ screws, which raise the motherboard off the side of the case. I tightened down the motherboard directly on the case without stand-offs. Recognizing a twisted motherboard is likely not correct, I found the answer with a Google search. Luckily, no damage was done. Stand-offs installed.

Stand-offs

After checking and double-checking that everything was plugged in properly, the moment of truth arrived, pushing the button. The lights came on, the fans started spinning, but nothing appeared on the screen. I removed the GPU and plugged the screen into the onboard HDMI port. Again nothing. I feared that I didn’t install the CPU correctly. It turned out I plugged the CPU fan into power for the system fan, as you seen in the photo below.

x470 Motherboard with Ryzen 7 and CPU Fan.

The next step, install Linux. I then discovered the system did not recognize the m.2 500GB drive. Following recommendations from an MSI forum, I re-seated the m.2. No luck. I then updated the BIOS. As a rookie, I felt nervous about doing this step, but it was easy enough. No luck. I also reset the CMOS. No luck. Then I moved the m.2 to the second m.2 location, and it worked. This could be an issue with the motherboard, but is more likely an issue with my understanding of the configuration. I need to do more research on this.

Up and running.

Wrapping Up

My new desktop is up and running with Endevour OS. It runs great. With three case fans, power supply fan and CPU fan, I’m surprised at how quiet the computer is. I have a few tasks remaining.

  • Cable management – cables are hanging everywhere inside the case, I need to organize them better.
  • M.2 – Figure why the m.2 doesn’t work in the first m.2 slot.
  • Fans – I need to understand where the fans power should be plugged into. The motherboard has spots for pump fans and system fans. I suspect there is a way to control fans for optimum use.
  • Wireless and Bluetooth – I need to order a card for wireless and bluetooth.

This was a fun project and great learning experience.

Resources

Destination Linux – The Destination Linux Network is a great Linux resource. They have great podcasts and a supportive community.

Carey Holzman – Carey is a professional computer technician. His YouTube channel is a good resource for learning about computer builds and repairs.

My Friends – Tim and Nic have experience building computers and were supportive in answering my many questions.

Mac Mini (mid-2011) on Linux

When Apple released MacOS Majove in 2018, the minimum hardware requirements abandon lots of great hardware. While the hardware is still usable, macOS and Apple software cannot be updated to their current releases. That sucks.

This post outlines the process of moving a Mac Mini (mid-2011) to Linux.

Mac Mini

The Mac Mini I’m rescuing is a mid-2011 with i5-2415M, 2GB RAM and 500GB HDD, running macOS High Sierra (version 10.13). It’s dreadfully slow. The goal is to use this machine as a general purpose computer in a classroom for high school students.

In addition to changing the operating system from macOS to Linux, the RAM will be upgraded to 8MB and 550GB hard drive replaced with 128GB SSD.

Steps

The overall steps:

  1. Order new hardware
  2. Upgrade RAM and Hard disk drive (HDD)
  3. Install Linux

Upgrade

I use Crucial’s website to help determine the parts I can upgrade. Using the model of the computer you’re working on, Crucial will show you the options for memory, hard drive, and SSD upgrades. I often buy the parts on Amazon.

For this upgrade, I used:

  • Memory : Crucial – 8GB Kit (2x4GB) DDR3L – 1333 SODIMM ~$60 USD
  • Solid State Drive (SSD) : Crucial – BX500 2.5 SSD 120GB ~$22 USD

Upgrading this Mac mini is straight-forward. It was built in the days when ‘upgrade-ability’ was built into the hardware design. Finding a YouTube video to guide you through the steps of taking the Mac Mini apart is very helpful. I used this video from MacSales.

The parts inside the Mac mini fit just right. The first time I did one of these upgrades, the SSD wasn’t aligned properly which prevented the wifi from fitting, and the screw holes did not align. Take your time and don’t force anything.

Installing Linux

I’ve been using Elementary OS for a few weeks, and I’m impressed. I appears to be a good distribution choice for someone coming from MAC. While my day-to-day distribution is currently Pop_OS!, I’m going to give Elementary a try with this upgrade.

Installing Linux is the same basic process for any distribution.

  • Download .iso file from the distribution’s website.
  • Create a bootable USB Drive with the .iso. There are utilities to do that with; I use Etcher.
  • Boot the target computer from the USB Drive and follow the prompts.

Elementary OS has the details of these steps outlined on the installation page of their website.

Wifi

I expected to have issues with wifi. In my experience, when installing Linux on Macs from this era, wifi does not work out of the box. I was pleasantly surprised the Elementary install screen recognized the wifi card and connected to it, and downloaded the latest software update.. After the installation was complete and the computer rebooted, the wifi card was no longer recognized. I needed to install drivers. As in the past, running the following command from the terminal fixes the issue:

sudo apt-get install firmware-b43-installer

Up and running

This upgrade was simple and straight-forward. It’s a fun project for someone that has no experience with hardware upgrades or Linux.

Benchmarks

This is my first experience running any type of benchmark. I used GeekBench on the Mac Mini before and after the upgrade. I don’t have much insight into what these numbers mean; I expect to in the future. But my hands-on benchmark tells me this computer runs as fast as much newer hardware and is totally usable.

Before – MacOS w/2GB RAM and HDD

Pre-upgrade full report available on GeekBench

After – Elementary OS w/8GB RAM and SSD

Post-upgrade full report available on GeekBench

Conclusion

The performance of this Mac Mini would have improved with only the hardware upgrades (without switching to Linux). But on Linux, the performance is really good.

A more important point is that Apple abandoned this Mac Mini. When Mojave was released in 2018, the minimum hardware requirements are:

  • MacBook: Early 2015 or newer
  • MacBook Air: Mid 2012 or newer
  • MacBook Pro: 2012 or newer, Retina display not needed
  • Mac Mini: Late 2012 or newer
  • iMac: Late 2012 or newer

Struck at High-Sierra, this computer would only receive security updates, moving forward. Many software applications cannot be updated either. After switching to Linux, this computer can run the latest operating system and applications available on Linux.

I did this upgrade for my friend, Chris. I look forward to see what experience he has in the classroom with Elementary OS.

(It took me 3x longer to write this post than it did to save that Mac mini)