Failed to create display (No such file or directory)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Failed to create display (No such file or directory)

8,838 Views
leima
Contributor III

OS: fsl-yocto-L4.9.11_1.0.0

Disro: wayland 

Image: fsl-image-validation-qt5-imx

Soc: imx6q

When I run the qt example app "texture"(actually any gui program) from the ssh login, there will be an error: Failed to create display (No such file or directory).

I found that weston running on tty7, if I stop weston: systemctrl stop weston, 

and then run the command: weston --tty=[1~7] &, the qt example works fine.

So how to configure the init weston run correctly?

weston.service:

[Unit]
Description=Weston Wayland Compositor (on tty7)
RequiresMountsFor=/run
Conflicts=getty@tty7.service plymouth-quit.service
After=systemd-user-sessions.service getty@tty7.service plymouth-quit-wait.service

[Service]
User=root
PermissionsStartOnly=true

# Log us in via PAM so we get our XDG & co. environment and
# are treated as logged in so we can use the tty:
PAMName=login

# Grab tty7
UtmpIdentifier=tty7
TTYPath=/dev/tty7
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes

# stderr to journal so our logging doesn't get thrown into /dev/null
StandardOutput=tty
StandardInput=tty
StandardError=journal

EnvironmentFile=-/etc/default/weston

# Weston does not successfully change VT, nor does systemd place us on
# the VT it just activated for us. Switch manually:
ExecStartPre=/usr/bin/chvt 7
ExecStart=/usr/bin/weston-launch -- --log=/var/log/weston.log $OPTARGS

IgnoreSIGPIPE=no

[Install]
WantedBy=multi-user.target

Labels (3)
Tags (2)
0 Kudos
1 Reply

5,629 Views
joanxie
NXP TechSupport
NXP TechSupport

one can refer to the document as below, tell you  how to build and run the weston on the imx6, hope helpful for you

https://community.nxp.com/docs/DOC-95380 

0 Kudos