1

I have installed Ubuntu for Windows 10 Subsystem (WSL2) following all the steps in the official information page. When I click Ubuntu from the start menu of Windows 10, it outputs this:

Welcome to Ubuntu 20.04 LTS (GNU/Linux 4.19.104-microsoft-standard x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Sat Aug  8 17:13:27 CEST 2020

  System load:  0.35               Processes:             8
  Usage of /:   0.5% of 250.98GB   Users logged in:       0
  Memory usage: 1%                 IPv4 address for eth0: 172.25.240.158
  Swap usage:   0%
   
0 updates can be installed immediately.
0 of these updates are security updates.
  
The list of available updates is more than a week old.
To check for new updates run: sudo apt update

This message is shown once once a day. To disable it please create the
/home/iskandar/.hushlogin file.
iskandar@iskandarbasal-dell-2019:~$

My question is: How can I proceed to get the home interface of Ubuntu and use it from a graphical interface? Where can I create the file which is indicated in the above message?

BeastOfCaerbannog
  • 12,964
  • 10
  • 49
  • 77
iskandar
  • 11
  • 1
  • 1
  • 3
  • 2
    WSL dosn't have a GUI. If you need a GUI install a real Ubuntu to a VirtualBox. – Pilot6 Aug 08 '20 at 15:43
  • 2
    As I don't use Windows, I have no idea if [this](https://x410.dev/cookbook/wsl/setting-up-wsl-for-linux-gui-apps/) actually works. I do know that GUI isn't supported with WSL, but it looks like one can make it work with some effort. I have no idea how the results will be. Given that it's not designed to do so, it may end up as some unstable system that's a pain in the butt to maintain. As @Pilot6 said, use a VM. Even if you can make it work, you might not want to. – KGIII Aug 08 '20 at 15:49
  • 1
    Also, that file disables the logon message as some people don't like the clutter. You should be able to run the following command to create the file `touch /home/iskandar/.hushlogin` or you can use a quicker version of the same command: `touch ~/.hushlogin` as the curly symbol is short for your user's home directory and the `touch` command creates the empty file that disables the login message. If you want the login message back, you can always delete the file using the `rm` command using the following: `rm /home/iskandar/.hushlogin` but be careful with `rm` as there is no recycle bin – mchid Aug 08 '20 at 16:11

1 Answers1

2

By default WSL comes without a Desktop Envirnoment or a window system.


There is way though you can run GUI apps by installing an X Server.

There is an article in microsoft techcommunity site covering that here.

The author provides steps by installing VcXsrv Windows X Server and exporting the "DISPLAY" variable

export DISPLAY="`grep nameserver /etc/resolv.conf | sed 's/nameserver //'`:0"

( You will need to add that command to /etc/bash.bashrc to make it permanent )

GeoMint
  • 785
  • 1
  • 7
  • 29