Software & AppsOperating SystemLinux

Fixing Grey Panel Issue with Google Chrome and Chromium Browser in SSH X11 Forwarding

Ubuntu 17

When working with SSH X11 Forwarding, you may encounter an issue where Google Chrome and Chromium Browser display as a grey panel. This problem has been observed on Ubuntu 16.04 & 18.04 and LinuxMint 19.2 & 19.3, and it started with version 79 of Google Chrome. Other applications like Firefox and LibreOffice seem to work fine. This article will guide you through two potential solutions to this issue.

Quick Answer

To fix the grey panel issue with Google Chrome and Chromium Browser in SSH X11 Forwarding, you can try either setting certain environment variables (QT_X11_NO_MITSHM=1, _X11_NO_MITSHM=1, and _MITSHM=0) before running google-chrome, or using the launch flag --use-gl=swiftshader when launching Google Chrome. Both solutions have their pros and cons, so it’s recommended to try both and see which one works best for you.

Understanding the Issue

Before diving into the solutions, let’s understand the issue at hand. X11 forwarding via SSH allows you to run graphical applications remotely. This is particularly useful when you want to run a graphical application on a server but view it on your local machine. However, when forwarding Google Chrome or Chromium Browser, instead of displaying the browser, it shows a grey panel.

Solution 1: Setting Environment Variables

The first solution involves setting certain environment variables before running google-chrome from an SSH session. These variables are QT_X11_NO_MITSHM=1, _X11_NO_MITSHM=1, and _MITSHM=0.

Here is the command you need to run:

export QT_X11_NO_MITSHM=1
export _X11_NO_MITSHM=1
export _MITSHM=0
google-chrome

Let’s break down what each variable does:

  • QT_X11_NO_MITSHM=1: This disables the MIT-SHM extension for Qt applications. The MIT-SHM is a X11 extension that allows faster exchange of data between X Server and applications.
  • _X11_NO_MITSHM=1 and _MITSHM=0: These two variables also disable the MIT-SHM extension but for other types of applications.

It’s important to note that disabling the MIT-SHM extension may slow down the UI, as the extension is designed to speed up data exchange between the X Server and applications.

Solution 2: Using a Launch Flag

The second solution is to use a launch flag --use-gl=swiftshader when launching Google Chrome over X11. This flag forces Google Chrome to use SwiftShader, a software rasterizer, instead of GPU rendering.

Here is how you can launch Google Chrome with the flag:

google-chrome --use-gl=swiftshader

This solution bypasses the issue and doesn’t slow down the UI like the first solution. However, it might affect the browser’s performance in other ways, as it forces the browser to use software rendering instead of hardware acceleration.

Conclusion

The grey panel issue with Google Chrome and Chromium Browser in SSH X11 Forwarding can be resolved by either setting the mentioned environment variables or using the --use-gl=swiftshader launch flag. Both solutions have their pros and cons, so you might want to try both and see which one works best for you. Remember to always keep your system and applications updated to avoid such issues in the future.

What is SSH X11 Forwarding?

SSH X11 Forwarding is a feature that allows you to run graphical applications on a remote server and display them on your local machine. It enables you to use graphical user interfaces (GUI) for applications on a remote server without having to install the applications locally.

How can I enable SSH X11 Forwarding?

To enable SSH X11 Forwarding, you need to ensure that both the SSH server (on the remote machine) and the SSH client (on your local machine) are configured correctly. On the server side, you need to have the X11Forwarding option set to yes in the SSH server configuration file (/etc/ssh/sshd_config). On the client side, you need to use the -X or -Y flag when connecting to the remote server using SSH. For example, ssh -X user@remote_server.

Can I use SSH X11 Forwarding with any graphical application?

In theory, you can use SSH X11 Forwarding with any graphical application that is compatible with X11. However, some applications may not work well over a slow network connection due to the increased latency and bandwidth requirements. It’s best to test the performance of the application before relying on SSH X11 Forwarding for intensive graphical tasks.

Are there any security concerns with SSH X11 Forwarding?

SSH X11 Forwarding is generally considered secure because it encrypts the X11 traffic between the server and the client. However, it’s important to ensure that you trust the server you are connecting to, as it has access to your local X11 display. Additionally, you should be cautious about running untrusted applications over SSH X11 Forwarding, as they may have the ability to capture your display or perform malicious actions.

Can I use SSH X11 Forwarding on Windows?

Yes, you can use SSH X11 Forwarding on Windows by using an SSH client that supports X11 Forwarding, such as PuTTY or MobaXterm. You will also need an X server software installed on your Windows machine, such as Xming or VcXsrv, to display the forwarded graphical applications.

Will the solutions mentioned in the article work for other Linux distributions?

The solutions mentioned in the article should work for other Linux distributions as well, as long as they are running Google Chrome or Chromium Browser. However, it’s always a good idea to check the specific documentation or support forums for your Linux distribution to see if there are any known issues or alternative solutions available.

Leave a Comment

Your email address will not be published. Required fields are marked *