DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Popular
  3. Open Source
  4. Make Windows Green Again (Part 3)

Make Windows Green Again (Part 3)

Following along from importing an OpenSUSE Linux distro with Docker, now it's time to further configure your environment and get graphics support up and running.

Hannes Kuhnemund user avatar by
Hannes Kuhnemund
·
Feb. 20, 17 · Tutorial
Like (2)
Save
Tweet
Share
4.31K Views

Join the DZone community and get the full member experience.

Join For Free

Welcome to Part 3 of “Make Windows Green Again.” After we discussed in Part 1 of this blog series how to get openSUSE Leap running within WSL, and furthermore in Part 2 how to fix the user environment and installing additional software, openSUSE Linux already helps you accomplish a lot with the system. However, running some console apps like vi, awk, Midnight Commander (mc) may be sufficient for some of us, but what about graphics support?

…

“Hold off for a second,” you might think. Linux and graphics, really? “Most definitely” would be my answer. And here I’m not really thinking of gimp (for which a Windows version is in existence anyway) yet, but a proper console/terminal application to begin with; other than the Windows 10 supplied bash. Admittedly, the latter one already allows to use shortcuts like “CTRL+R” for searching through the command history, “ESC .” for printing the last argument of the command that was executed earlier (if you typed “ls -la + ENTER” then “ESC .” will add “-la” to your current command line), “CTRL+L” to clear the screen, and many more. But if we want to have a real Linux terminal, we want to use something like xterm, eterm, and the like.

Unfortunately, the Windows and Linux graphics systems are not compatible right away. That’s not a problem because the Linux graphics system is Open Source and smart people made it available for Windows too. In order to run graphical Linux applications on Windows, we’d need to install a so-called “X Server” for Windows. I’m using the Xming X Window System Server for Windows (https://sourceforge.net/projects/xming/) but with your favorite Internet search engine, you’ll find plenty of other ones. When using a different one, you’d need to be careful as setup might be different from my step by step guide when using Xming.

  1. Navigate to https://sourceforge.net/projects/xming/ and download Xming (currently version 6.9.0-31)
  2. Locate the downloaded setup file and double-click to start the installation (I’m using default options when asked for)
  3. Confirm that you want to start Xming at the end of the installation

If everything went fine you should see a new tray icon and when hovering over with the mouse pointer it shows important information we need to provide to openSUSE inside WSL. So make note of that, most importantly are the numbers “:0.0” (or simply take the below screenshot if my information is identical to yours).

xming

Before moving forward we better configure Xming using the tool XLaunch. The reason is that I like to ensure that Xming is always started when my Windows starts. So let’s run XLaunch (Windows Key, type "XLaunch" and hit ENTER) and click through all settings without any change. At the end click the “Save Configuration” button and save the configuration to the Desktop. As the next step, follow the instruction of this link. Although it’s a description for Windows 8.1, it is working with Windows 10 too.

Finally, there are only two things left to configure in openSUSE, so start it up (Windows Key, type “bash” and hit ENTER) and enter those two commands:

  1. ~$ echo "export DISPLAY=:0.0" >> .bashrc

    (This command tells the openSUSE Linux to use the “:0.0 display” upon startup, which is provided by Xming)
  2. sudo zypper install xterm

    (In order to have xterm installed, confirm with Y)

Now close the SUSE bash, open it again and type “xterm.” The xterm application window should now appear on your Windows 10 desktop. Isn’t that cool?

xming2

You can now install and use any graphical tool that comes with openSUSE. Let me know in the comments which are the ones you tried out.

In the next part of this article, I’m going to discuss a bug (and a potential solution to fix it) which we found within WSL. It’s going to be quite technical (we are going to use tools like strace and gdb), but certainly interesting for everyone out there who’s wondering about the details behind the curtain.

Linux (operating system) OpenSUSE Open source Command (computing) application Desktop (word processor) IT Bash (Unix shell)

Published at DZone with permission of Hannes Kuhnemund, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • What Is Policy-as-Code? An Introduction to Open Policy Agent
  • Web Application Architecture: The Latest Guide
  • Secrets Management
  • Apache Kafka vs. Memphis.dev

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: