Error: Can't open display: ssvnc-viewer (vncviewer) local connection to QEMU host with -vnc option enabled

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Error: Can't open display: ssvnc-viewer (vncviewer) local connection to QEMU host with -vnc option enabled

Denis Lapshin-2
Trying to connect to QEMU 4.1.0 with VNC server enabled by
$ doas vncviewer -rawlocal 127.0.0.1:0

All the time receive 'Error: Can't open display' by vncviewer
(ssvnc-viewer package installed on OpenBSD 6.6) when connect to QEMU
machine which run on the same localhost and QEMU VNC server listens on

$ doas netstat -an | grep 5900
tcp 0 0 127.0.0.1.5900 *.* LISTEN

$ doas qemu-system-x86_64 -vnc 127.0.0.1:0 -k en-us -monitor pty \
-m 2048 -object memory-backend-file,id=mem,size=2048M,\
mem-path=/tmp/qemu-mem,share=on \
-numa node,memdev=mem -cdrom linux.iso \
-boot -d -name linux linux.qcow2

But I can connect by telnet localhost 5900 successfully.
Anyway there is no any TCP connection to 127.0.0.1:5900 from vncviewer
unfortunately.

Reply | Threaded
Open this post in threaded view
|

Re: Error: Can't open display: ssvnc-viewer (vncviewer) local connection to QEMU host with -vnc option enabled

Stuart Henderson
On 2020-01-24, Denis <[hidden email]> wrote:
> Trying to connect to QEMU 4.1.0 with VNC server enabled by
> $ doas vncviewer -rawlocal 127.0.0.1:0

For the love of cthulhu don't run that crap as root.

> All the time receive 'Error: Can't open display' by vncviewer
> (ssvnc-viewer package installed on OpenBSD 6.6) when connect to QEMU
> machine which run on the same localhost and QEMU VNC server listens on

That is vncviewer not being able to connect to your X display, which
will be happening because you're running it as a different uid with doas.


Reply | Threaded
Open this post in threaded view
|

Re: Error: Can't open display: ssvnc-viewer (vncviewer) local connection to QEMU host with -vnc option enabled

Denis Lapshin-2
Crap works as expected. Should be run from unprivileged user only.

On 1/25/2020 2:34 PM, Stuart Henderson wrote:

> On 2020-01-24, Denis <[hidden email]> wrote:
>> Trying to connect to QEMU 4.1.0 with VNC server enabled by
>> $ doas vncviewer -rawlocal 127.0.0.1:0
>
> For the love of cthulhu don't run that crap as root.
>
>> All the time receive 'Error: Can't open display' by vncviewer
>> (ssvnc-viewer package installed on OpenBSD 6.6) when connect to QEMU
>> machine which run on the same localhost and QEMU VNC server listens on
>
> That is vncviewer not being able to connect to your X display, which
> will be happening because you're running it as a different uid with doas.
>
>