Install gnome on windows

Содержание
  1. Запуск графической оболочки Linux Bash в Windows 10
  2. VcXsrv Windows X Server
  3. Известные проблемы и их решения
  4. Ta180m / WSL 2 GNOME Desktop.md
  5. This comment has been minimized.
  6. AnishDe12020 commented Nov 11, 2020
  7. This comment has been minimized.
  8. Ta180m commented Nov 11, 2020
  9. This comment has been minimized.
  10. longtnhe140627 commented Nov 11, 2020
  11. This comment has been minimized.
  12. ErnieBernie10 commented Nov 12, 2020
  13. This comment has been minimized.
  14. AnishDe12020 commented Nov 12, 2020
  15. This comment has been minimized.
  16. ErnieBernie10 commented Nov 18, 2020
  17. This comment has been minimized.
  18. mikebiondi commented Nov 23, 2020
  19. This comment has been minimized.
  20. 0Vipin0 commented Nov 28, 2020 •
  21. This comment has been minimized.
  22. ArmandXiao commented Jan 1, 2021
  23. This comment has been minimized.
  24. ArmandXiao commented Jan 1, 2021
  25. This comment has been minimized.
  26. greerda commented Jan 2, 2021
  27. This comment has been minimized.
  28. NarutoUA commented Jan 2, 2021
  29. This comment has been minimized.
  30. danielkrajnik commented Jan 4, 2021 •
  31. This comment has been minimized.
  32. MeowcaTheoRange commented Jan 24, 2021
  33. This comment has been minimized.
  34. slashtechno commented Jan 27, 2021
  35. This comment has been minimized.
  36. slashtechno commented Jan 28, 2021
  37. This comment has been minimized.
  38. marksustin commented Jan 28, 2021
  39. This comment has been minimized.
  40. slashtechno commented Jan 28, 2021
  41. This comment has been minimized.
  42. marksustin commented Jan 29, 2021
  43. This comment has been minimized.
  44. marksustin commented Jan 29, 2021
  45. This comment has been minimized.
  46. slashtechno commented Jan 29, 2021
  47. This comment has been minimized.
  48. beanorx commented Feb 2, 2021
  49. This comment has been minimized.
  50. elias-rincon commented Feb 7, 2021
  51. This comment has been minimized.
  52. AFalseHuman commented Feb 7, 2021
  53. This comment has been minimized.
  54. nazaruuyee commented Feb 20, 2021
  55. This comment has been minimized.
  56. johentsch commented Feb 21, 2021
  57. This comment has been minimized.
  58. jrunestone commented Mar 12, 2021 •
  59. This comment has been minimized.
  60. slashtechno commented Mar 12, 2021
  61. This comment has been minimized.
  62. somyaSarathi commented Mar 13, 2021
  63. This comment has been minimized.
  64. diramazioni commented Mar 15, 2021 •
  65. This comment has been minimized.
  66. ThatsNiceGuy commented Mar 22, 2021
  67. This comment has been minimized.
  68. nikospamp commented Mar 27, 2021 •
  69. This comment has been minimized.
  70. bossbeagle1509 commented Mar 30, 2021
  71. This comment has been minimized.
  72. fengmao31 commented Mar 30, 2021
  73. This comment has been minimized.
  74. Ekaitxue commented Apr 1, 2021 •
  75. This comment has been minimized.
  76. Ekaitxue commented Apr 1, 2021 •
  77. This comment has been minimized.
  78. S4my4k commented Apr 3, 2021
  79. This comment has been minimized.
  80. bossbeagle1509 commented Apr 3, 2021
  81. This comment has been minimized.
  82. muhammadadnanzaib commented Apr 8, 2021
  83. This comment has been minimized.
  84. engnilsonsp commented Apr 8, 2021
  85. This comment has been minimized.
  86. bossbeagle1509 commented Apr 8, 2021
  87. This comment has been minimized.
  88. muhammadadnanzaib commented Apr 8, 2021
  89. This comment has been minimized.
  90. engnilsonsp commented Apr 8, 2021

Запуск графической оболочки Linux Bash в Windows 10

В первую очередь необходимо установить Linux Bash в Windows 10. Инструкция по установке Linux Bash описана в следующей статье:

Для установки Ubuntu из Microsoft Store предлагаем выбрать версию Ubuntu 18.04 LTS в операционной системе Windows 10 May 2019 Update (версия 1903).

Параметры установленного дистрибутива Linux расположены в меню Windows Параметры > Приложения > Приложения и возможности. Из списка установленных программ выберите Ubuntu 18.04 и нажмите на Дополнительные параметры.

Так же открыть параметры Ubuntu 18.04 можно нажав правой кнопкой мыши по значку Ubuntu 18.04 в меню Пуск, в открывшемся меню выбираем Дополнительно > Параметры приложения.

Параметры установленного Линукс дистрибутива в Windows 10 (версия 1903):

Расположена файловая система Ubuntu на локальном диске С по следующему адресу:

Таким образом можно получить доступ к нужным файлам и папкам Linux.

После установки и первоначальной настройки системы нужно обновить систему и установить рабочее окружение.

Обновление системы и установленных пакетов:

Установка рабочего окружения и пакета программ Ubuntu (Gnome):

Меняем права доступа к папке кэша:

Далее в систему Windows 10 нам нужно установить приложение для обеспечения оконной системы Linux, которая отвечает за построение и отображение графического интерфейса.

VcXsrv Windows X Server

Таких программ несколько. Предлагаем выбрать активно развивающуюся программу VcXsrv Windows X Server. Устанавливаем с настройками по умолчанию.

После запуска программы VcXsrv Windows X Server в окне Display Settings есть выбор отображения интерфейса оконной системы Linux. В нашем случае отлично работал вариант с большим оконным режимом (One large window). Там же в настройках Display number выставляем значение 0 (если возникнут проблем с запуском интерфейса, то значение нужно изменить, кроме того нужно будет изменить и значение в команде запуска).

Далее оставляем настройки по умолчанию. По окончанию настройки у нас запустится пустое окно.

Переходим в запущенную Linux систему, у нас она открыта в виде командной строки и вводим следующие команды:

Читайте также:  Определение рабочего стола windows

Для дальнейших запусков графического окружения нужно вводить команду выше, при этом программа VcXsrv Windows X Server должна быть предварительно открыта.

Также создайте сценарий оболочки start-ubuntu (имя файла необязательно):

Сделайте скрипт оболочки исполняемым:

Запустить скрипт оболочки:

Известные проблемы и их решения

Из недостатков, с которыми столкнулись, отметим следующие: проблема с правами доступа различных приложений и системных функций. В качестве решения можно систему запустить с правами root. В целях безопасности не рекомендуется запускать систему с полными правами администратора, но если есть в этом необходимость, то запустить можно следующим образом: после того как открыли приложение VcXsrv и Linux систему, которая открылась в виде командной строки, нужно ввести команду: sudo su , затем вводим команду для запуска графического окружения:

Теперь нам будут доступны ранее неработающие функции системы, например, русификация и работа некоторых расширений Gnome.

Так же мы столкнулись с тем, что предустановленный браузер Firefox не устанавливает дополнения. Можно воспользоваться другим браузером, например, браузером Opera. В режиме суперпользователя запускать его нужно с помощью терминала командой: opera --no-sandbox.

Система установится на английском языке, установка другого языка доступна только под системой с правами администратора (sudo su). Установить русский язык в систему можно следующими командами:

После этого в настройках системы Ubuntu нужно выбрать и активировать установленный русский язык.

Ta180m / WSL 2 GNOME Desktop.md

WSL 2 GNOME Desktop

Think Xfce looks dated? Want a conventional Ubuntu experience? This tutorial will guide you through installing Ubuntu’s default desktop environment, GNOME.

GNOME is one of the more complex — and that means more difficult to run — desktop environments, so for years people couldn’t figure out how to run it on WSL 2. On WSL 1 it could only run using very complicated methods that didn’t transfer to well WSL 2. Any forlorn attempts to run it on WSL 2 only resulted in a smoldering heap of error messages.

But now you can!

  • WSL 2
  • Ubuntu 20.04 (other distros not tested)
  • An X server for Windows, such as VcXsrv
  • Basic knowledege on how to run GUI apps with WSL 2 (not required but highly recommended)

You’ve been regularly updating your distro, haven’t you?

Install GNOME: (maybe go eat a snack while it’s installing?)

And paste this in at the end and save:

If you try to start GNOME now, you’ll get a lot of errors. Something along the lines of this, but a ton more errors:

The trick is to enable systemd : (note that this does break a lot of stuff such as Visual Studio Code Remote)

Now shut down WSL 2: (run this in Windows)

First, fire up your X server on Windows. Make sure you let it through your firewall and disable access control.

Now, start up Ubuntu again and start GNOME:

If you don’t get any error messages, you should be good. Wait a few seconds for GNOME to start up.

Now you have a great GUI desktop and you won’t need any intensive virtual machines anymore!

  • The settings app and app store think you are not connected to the internet yet you can ping google.com ?
  • You can disable the screensaver with gsettings set org.gnome.desktop.session idle-delay 0 .
  • You can also try KDE Plamsa using a similar method! Just sudo apt install kde-plasma-desktop instead and start it with startplasma-x11 .

If you can’t get this to work, try Xfce.

If you still can’t get it to work, you can ask for help on an online forum such as r/bashonubuntuonwindows.

This comment has been minimized.

Copy link Quote reply

AnishDe12020 commented Nov 11, 2020

I am getting an error saying Authorization required, but no authorization protocol specified

This comment has been minimized.

Copy link Quote reply

Ta180m commented Nov 11, 2020

This comment has been minimized.

Copy link Quote reply

longtnhe140627 commented Nov 11, 2020

I am getting an error saying Authorization required, but no authorization protocol specified

type: sudo su
then enter your password then run gnome-session

This comment has been minimized.

Copy link Quote reply

ErnieBernie10 commented Nov 12, 2020

I am able to run gnome-session without errors, but nothing shows up on my xserver.

This comment has been minimized.

Copy link Quote reply

AnishDe12020 commented Nov 12, 2020

I got it to work through RDP (Remote Desktop Protocol)

This comment has been minimized.

Copy link Quote reply

ErnieBernie10 commented Nov 18, 2020

I am able to run gnome-session without errors, but nothing shows up on my xserver.

Anyone with this issue. Try running VcXsrv with -ac command arguments. That worked for me.

This comment has been minimized.

Copy link Quote reply

mikebiondi commented Nov 23, 2020

I was so excited to try this, I didn’t check to see I was really on wsl2. It turns out I’m using WSL1. There’s no easy way to back this out without digging through the script. Why update /etc/bash.bashrc instead of just the local .bashrc? Doing it on a local .bashrc means I can create another account and play around with it before commiting.

Читайте также:  С windows temp kaspersky

This comment has been minimized.

Copy link Quote reply

0Vipin0 commented Nov 28, 2020 •

Can’t get it working. Installation was successfully completed but when I ran the script, it throws me this error.

hwclock: Cannot access the Hardware Clock via any known method.

This error pops up.

This comment has been minimized.

Copy link Quote reply

ArmandXiao commented Jan 1, 2021

Fantastic!

  • Ubuntu 20.04 works perfectly fine with WSL2
  • I tried with 18.04 and nothing, no error yet nothing shown

This comment has been minimized.

Copy link Quote reply

ArmandXiao commented Jan 1, 2021

I am able to run gnome-session without errors, but nothing shows up on my xserver.

Are u Using Ubuntu20.04 LTS? Which version are u using?

  • My 18.04 LTS fails but 20.04 LTS works

This comment has been minimized.

Copy link Quote reply

greerda commented Jan 2, 2021

I followed direction and didn’t work for me — I get nothing. Maybe a youtube video?

This comment has been minimized.

Copy link Quote reply

NarutoUA commented Jan 2, 2021

I followed direction and didn’t work for me — I get nothing. Maybe a youtube video?

execute in wsl:
export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk ‘‘):0

This comment has been minimized.

Copy link Quote reply

danielkrajnik commented Jan 4, 2021 •

Tried it on Ubuntu 18.04 and after restarting windows wsl2 exits immediately after launching it:

nsenter: failed to parse pid: ‘191
192′

EDIT: it’s working again. I restarted it again a couple of times, restarted Lxss service, but not sure what exactly repaired it.

This comment has been minimized.

Copy link Quote reply

MeowcaTheoRange commented Jan 24, 2021

I keep getting Sleeping for 1 second to let systemd settle .

Try uninstalling your ubuntu application via Settings and reinstalling via Windows Store

This comment has been minimized.

Copy link Quote reply

slashtechno commented Jan 27, 2021

How do you set up the X server?

This comment has been minimized.

Copy link Quote reply

slashtechno commented Jan 28, 2021

Sorry I keep commenting, I still get Sleeping for 1 second to let systemd settle

This comment has been minimized.

Copy link Quote reply

marksustin commented Jan 28, 2021

Sorry I keep commenting, I still get Sleeping for 1 second to let systemd settle

@MeowcaTheoRange already replied you. Did you try following the steps?

This comment has been minimized.

Copy link Quote reply

slashtechno commented Jan 28, 2021

I reset the application through settings (cleared all app data) and did all the steps again.

Do I need to uninstall?

This comment has been minimized.

Copy link Quote reply

marksustin commented Jan 29, 2021

I reset the application through settings (cleared all app data) and did all the steps again.

Do I need to uninstall?

Not sure it’ll help, but I think you should try

This comment has been minimized.

Copy link Quote reply

marksustin commented Jan 29, 2021

How do you set up the X server?

Do you know the answer now?

This comment has been minimized.

Copy link Quote reply

slashtechno commented Jan 29, 2021

How do you set up the X server?

Do you know the answer now?

This comment has been minimized.

Copy link Quote reply

beanorx commented Feb 2, 2021

This comment has been minimized.

Copy link Quote reply

elias-rincon commented Feb 7, 2021

It’s online again

This comment has been minimized.

Copy link Quote reply

AFalseHuman commented Feb 7, 2021

Unable to init server: Could not connect: Connection refused

(gnome-session-check-accelerated:6054): Gtk-WARNING **: 11:04:51.973: cannot open display: :0
Unable to init server: Could not connect: Connection refused

(gnome-session-check-accelerated:6055): Gtk-WARNING **: 11:04:52.234: cannot open display: :0
gnome-session-binary[6044]: WARNING: software acceleration check failed: Child process exited with code 1
gnome-session-binary[6044]: CRITICAL: We failed, but the fail whale is dead. Sorry.

This Error Keeps Showing When I DO gnome-session

I followed the systemd trick but still not working .

This comment has been minimized.

Copy link Quote reply

nazaruuyee commented Feb 20, 2021

don’t forget to add microsoft package repository first when install dotnet-runtime-5.0
when done, just type wsl genie -s in cmd.
If waiting systemd. too long, just open the distro and type again genie -s (make sure hostname in distro added with (hostname)-wsl). Then just type «ps -ef», when you see systemd in PID 1, you’re good to go.

This comment has been minimized.

Copy link Quote reply

johentsch commented Feb 21, 2021

I am able to run gnome-session without errors, but nothing shows up on my xserver.

Anyone with this issue. Try running VcXsrv with -ac command arguments. That worked for me.

Got the same problem: Type gnome-session and nothing happens. Tried your fix by running «C:\Program Files\VcXsrv\xlaunch.exe» -ac , is that what you meant? Didn’t change anything 🙁 Trying this with Ubuntu 20.04.2 LTS running 5.4.72-microsoft-standard-WSL2 kernel.

Читайте также:  Kyocera 2235dn драйвер windows 10

This comment has been minimized.

Copy link Quote reply

jrunestone commented Mar 12, 2021 •

I was hoping for this one, alas, also just getting a black screen with or without different arguments and settings. No errors from gnome-session.
EDIT: Got it working! I had to disable the Windows firewall for the «Public» network.

This comment has been minimized.

Copy link Quote reply

slashtechno commented Mar 12, 2021

Could this please be turned into an automated script? Even better, can this be tuned into a repository.

This comment has been minimized.

Copy link Quote reply

somyaSarathi commented Mar 13, 2021

I’m getting this error. What should I do?

This comment has been minimized.

Copy link Quote reply

diramazioni commented Mar 15, 2021 •

EDIT: Got it working! I had to disable the Windows firewall for the «Public» network.
@jrunestone me too. you knoiw a better way without having to disable the entire firewall?

nvm on windows firewall you can make an exception ticking the public network for vcxsrv

This comment has been minimized.

Copy link Quote reply

ThatsNiceGuy commented Mar 22, 2021

works for me but is it possible for audio to be supported?

This comment has been minimized.

Copy link Quote reply

nikospamp commented Mar 27, 2021 •

@kerningium Did you manage to find a solution? I am facing the same problem

Edit

Deleting ubuntu from PC and re-installing them solved this error.

Edit 2

Don’t forget to use -ac as argument. Vcxsrv -ac

This comment has been minimized.

Copy link Quote reply

bossbeagle1509 commented Mar 30, 2021

Everything works fine, except that fairly often, the x server window freezes and I have to close it and run gnome-session and VcXsrv again, Any ideas as to why ?

This comment has been minimized.

Copy link Quote reply

fengmao31 commented Mar 30, 2021

This comment has been minimized.

Copy link Quote reply

Ekaitxue commented Apr 1, 2021 •

Everything works, no errors at all. But no gnome in any xming window pops up. Absolutely nothign happens

This comment has been minimized.

Copy link Quote reply

Ekaitxue commented Apr 1, 2021 •

with some tweaks everything worked wonderfully just start your xserver with -ac (btw i switched from xming to vcxsrv)

This comment has been minimized.

Copy link Quote reply

S4my4k commented Apr 3, 2021

This comment has been minimized.

Copy link Quote reply

bossbeagle1509 commented Apr 3, 2021

I was able to use the internet smoothly after I installed firefox with sudo apt install firefox .

This comment has been minimized.

Copy link Quote reply

muhammadadnanzaib commented Apr 8, 2021

awesom tutorial, very easy to follow. Got it running in the first go,

This comment has been minimized.

Copy link Quote reply

engnilsonsp commented Apr 8, 2021

When I start Ubuntu, the window closes. And by the «Windows Terminal», this message appears:
Cannot execute daemonize to start systemd.
[processo encerrado com o código 1]

And stops the prompt. Can you help?

This comment has been minimized.

Copy link Quote reply

bossbeagle1509 commented Apr 8, 2021

When I start Ubuntu, the window closes. And by the «Windows Terminal», this message appears:
Cannot execute daemonize to start systemd.
[processo encerrado com o código 1]

And stops the prompt. Can you help?

Try sudo apt-get install -y daemonize

This comment has been minimized.

Copy link Quote reply

muhammadadnanzaib commented Apr 8, 2021

I hope this helps.

This comment has been minimized.

Copy link Quote reply

engnilsonsp commented Apr 8, 2021

Well, I find some possible help:

Looks like daemonize wasn’t found for some reason.

You should be able to log into WSL by typing «wsl -u root» in cmd or powershell.
Check if daemonize is installed by typing «which daemonize».
I assume you’ll have no output (I have «/usr/bin/daemonize» for example).
If you do have some output, please post it in a reply.
You can either install daemonize or disable the startup script.

To install daemonize type:
«sudo apt-get install daemonize»
Do note however, that it’s quite likely that the other things the script tried to install failed.
You can run the script again in that case. Remember to sudo it.

If you want to disable the systemd start script, do the following:
Enter in «nano /etc/bash.bashrc»
Put a # on the start of the line that says «source /usr/sbin/start-systemd-namespace»
To enable the systemd start script again, simply remove the newly added #
.
By Xideta, commented on 10 Aug 2020 —> DamionGans/ubuntu-wsl2-systemd-script#37

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.

Оцените статью