How to Fix ‘gedit’ Error on Windows Subsystem for Linux?

Windows Subsystem for Linux (WSL) is a compatibility layer used to run binary executables that are native to Linux on Windows 10 or Windows Server 2009. It is available only on the 64-bit architecture of the Windows 10 1603 version and later. Also, it provides support for the Windows Server 2019. In the earlier versions of the layer only an Ubuntu image was available but not SUSE images have also been introduced.

Error Message “gedit Error”

This feature is used by numerous users and is quite popular among the software development community. However, quite recently, a lot of reports have been coming in of a “gedit Error” on the WSL. This error is triggered while trying to use the gedit feature and it might include an error code as well. In this article, we will discuss the reason due to which this error is triggered and provide viable solutions to rectify the issue.

What Causes the “gedit Error” on WSL?

After receiving numerous reports from multiple users, we decided to investigate the issue and devised a solution to fix it. Also, we looked into the reason due to which this error is triggered and listed it below.

  • Accessibility Bug: There is a known bug that is quite common in this feature. While trying to use any accessibility feature, this bug is triggered and it prevents the user from editing using the “gedit” feature.

Now that you have a basic understanding of the nature of the problem, we will move on towards the solution. Make sure to implement the steps carefully to avoid conflict.

Solution: Disabling Accessibility Features

The Accessibility Features possesses a known bug which prevents the editing process using “gedit”. Therefore, in this step, we will be completely disabling the Accessibility feature by editing a configuration file. For that:

  1. Navigate to the following address and locate the “~/ .bashrc” file.
    C:\Users\USERNAME\AppData\Local\Packages\CanonicalGroupLimited.UbuntuonWindows_79rhkp1fndgsc\LocalState\rootfs\home\{LINUXUSER}\

    If the file isn’t in the above-mentioned address, it should probably be in the following address.

    C:\Users\USERNAME\AppData\Local\Lxss\home\USERNAME
  2. Open the file with “Notepad” or “Notepad++“.
  3. Enter the following line into the file.
    export NO_AT_BRIDGE=1
    Entering the command
  4. Click on “File” and select “Save“.
    Clicking on “File” and selecting “Save”
  5. Close the document and check to see if the issue persists.
ABOUT THE AUTHOR

Kevin Arrows


Kevin Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.