Score:1

How to fix Error: Can't open display: (null) on "Ubuntu for Windows 10" Terminal

tn flag

I am using this windows terminal, and when trying to execute

echo hello world | xclip -sel clip

for example, I receive Error:

Can't open display: (null)

error.

I installed

sudo apt-get install xorg

Also tried export DISPLAY=:0 (and also 1)

but the xclip gives me the same error.

Please advise.

Thanks!

Someone avatar
my flag
Explain your question Are you in a terminal without any display manager like - recovery mode or Alt + ctrl + f5 mode then you need to install a display manager like gdm3 or lightdm.?
dushkin avatar
tn flag
I simply use this windows terminal for Ubuntu. So, you say I need to install gdm3 or lightdm? Isn't the xorg enough? I install gdm3 and tried the echo command again : still getting the same error
Someone avatar
my flag
Nope its not also why are you using ubuntu terminal in windows it is not really good to use it in windows because it may malfunction.
hr flag
"Ubuntu on Windows allows you to use Ubuntu Terminal and run Ubuntu **command line utilities** including bash, ssh, git, apt and many more." See [What's the easiest way to run GUI apps on Windows Subsystem for Linux as of 2018?](https://askubuntu.com/questions/993225/whats-the-easiest-way-to-run-gui-apps-on-windows-subsystem-for-linux-as-of-2018)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.