When using a KVM (Keyboard, Video, Mouse) switch to control multiple computers, it can be frustrating when your open applications are moved to different workspaces each time you switch between computers. This can disrupt your workflow and cause confusion. Fortunately, there is a way to stop apps from moving Linux workspaces when switching KVM. In this article, we will guide you through the process.
Understanding the Issue
Before we delve into the solution, let's understand why this issue occurs. When you switch between computers using a KVM switch, the operating system treats it as if you have physically disconnected and reconnected your keyboard and mouse. As a result, Linux automatically moves the active window to a different workspace, which can be frustrating.
Preventing Apps from Moving Workspaces
To prevent apps from moving workspaces when switching KVM, we need to make a few changes to your Linux settings. Follow the steps below:
Step 1: Open Terminal
Launch the Terminal on your Linux system. You can do this by searching for "Terminal" in the applications menu or by using the keyboard shortcut Ctrl+Alt+T.
Step 2: Edit the Xorg Configuration File
In the Terminal, enter the following command to open the Xorg configuration file in a text editor:
sudo nano /etc/X11/xorg.conf
If the file doesn't exist, you can create it by running the following command:
sudo touch /etc/X11/xorg.conf
This will open the file in the Nano text editor, which is a simple and beginner-friendly editor.
Step 3: Add the InputClass Section
In the Xorg configuration file, add the following lines:
Section "InputClass"
Identifier "KVM Switch Workaround"
MatchIsKeyboard "on"
Option "Ignore" "on"
EndSection
This section instructs Linux to ignore keyboard events when it comes to moving windows between workspaces.
Step 4: Save and Exit
After adding the InputClass section, save the changes by pressing Ctrl+O and then press Enter. To exit the text editor, press Ctrl+X.
Step 5: Restart Your Computer
To apply the changes, you need to restart your computer. Save any unsaved work and click on the power icon in the top-right corner of your screen. Select "Restart" and wait for your computer to reboot.
Verifying the Changes
Once your computer restarts, you can verify if the changes were successful. Open multiple applications on different workspaces and switch between them using your KVM switch. You should notice that the windows no longer move to different workspaces when you switch between computers.
By following the steps outlined in this article, you can prevent apps from moving Linux workspaces when switching KVM. This will help you maintain a consistent and uninterrupted workflow, saving you time and frustration. If you encounter any issues or have further questions, feel free to consult the references below or seek assistance from a technical support professional.
References
| Number | Source |
|---|---|
| 1 | Example.com |
| 2 | Example.com |