SUSE Blog

Make Windows green again – Part 3

Hannes Kühnemund

By: Hannes Kühnemund

February 3, 2017 3:49 pm

Reads:4,476

Comments:9

Score:4.6

Print/PDF

img_5690

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 alike.

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. For this blog 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 fine 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. Reason is 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 blog 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.

Table of contents:

5 votes, average: 4.60 out of 55 votes, average: 4.60 out of 55 votes, average: 4.60 out of 55 votes, average: 4.60 out of 55 votes, average: 4.60 out of 5 (5 votes, average: 4.60 out of 5)
You need to be a registered member to rate this post.
Loading...

Tags: , ,
Categories: Enterprise Linux, openSUSE, SUSE Linux Enterprise Server, Technical Solutions

Disclaimer: As with everything else in the SUSE Blog, this content is definitely not supported by SUSE (so don't even think of calling Support if you try something and it blows up).  It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.

9 Comments

  1. By:cshe

    Despite my clumsy typing (meaning I have to do things 3 times, like removing and re-installing bash) and messing up the rest of the commands there is an Xwindow facility on my machine.

    The work that has gone into this is quite overwhelming to someone as ham-fisted as me.

    Thank you for making it possible for me.

    • By:Hannes Kühnemund

      Hey cshe,

      always glad to be of help. I still remember my first steps with Linux back in 1999 (I guess). Back then there were no tutorials available whatsoever and it was ultimately hard to get Linux running.

      I hope this blog series will make it much easier to consume Linux – it was high time.

  2. By:ewilcox

    I am new to SUSE, although I am relatively familiar with other Linux distributions. How do I find out which packages are available? Is there a graphical package manager I can use? Such an app would be a good addition to this post, and would prove very helpful for users not familiar with SUSE.

    Ernie

    • By:Hannes Kühnemund

      Hi Ernie,

      there are two ways to get up to speed.

      1) if you are familiar with other Linux distributions, using the command “cnf”, which is an abbreviation for command not found might be be best choice. In case cnf is not installed, install it with “sudo zypper install command-not-found”.

      Once you have it running, you can run “cnf python” for example in order to see which package you’d need to install via zypper to get the python command (binary) installed and available in the system. Of course, you can use “cnf yxz” on any Linux command known to you.

      2) Alternatively, you can search by package name, via “sudo zypper se “. In case of python, a “sudo zypper se python” will list all packages that have python in the name. You can install those then by executing “sudo zypper in “.

      Hope that helps.

      • By:Hannes Kühnemund

        Unfortunately, the back end mutilated my reply, so section 2) should state:

        2) Alternatively, you can search by package name, via “sudo zypper se [package]“. In case of python, a “sudo zypper se python” will list all packages that have python in the name. You can install those then by executing “sudo zypper in [packagename]“.

  3. By:mweiss2

    Any idea how to get this problem solved:

    I am trying to use evince but get this error:

    ** (evince:95): WARNING **: Couldn’t connect to accessibility bus: Failed to connect to socket /tmp/dbus-4nFM1xBJCv: Connection refused

  4. By:vjunior1981

    Hi!

    I changed ubuntu for opensuse but got this messages when installing some packages:

    (32/36) Installing: containerd-0.2.5+gitr569_2a5e70c-8.1.x86_64 …………………………………………………………………………………………………………………………………………..[done]Additional rpm output:
    Failed to connect to bus: No such file or directory
    Updating /etc/sysconfig/containerd…

    Any clue about solve it? Did some research but found nothing.

    Regards
    Vitor Jr.

Comment

RSS