Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$display not set #265

Closed
WanMMao opened this issue Sep 1, 2023 · 3 comments
Closed

$display not set #265

WanMMao opened this issue Sep 1, 2023 · 3 comments

Comments

@WanMMao
Copy link

WanMMao commented Sep 1, 2023

General information:

  • OS name: Debian GNU/Linux
  • OS version: sid
  • OS architecture: 64 bits
  • Resolutions:
    • Monitor 1: 1920x1080
  • Python version: _3.8.0
  • MSS version: 9.0.1

info:
I will start the Python script in rc. local
this code is as follows:
image

error info is $display not set
May I ask what the reason is

Please help me check what the reason is

@BoboTiG
Copy link
Owner

BoboTiG commented Sep 1, 2023

It seems similar to #263 but with rc.local. I do not have the exact answer, but you should be able to find in on internet.
I will be happy to know the answer too :)

@WanMMao
Copy link
Author

WanMMao commented Sep 1, 2023

rc.local

If I don't start in rc.local, the code is normal, and this issue only occurs when I start in rc.local. I am confused

@WanMMao
Copy link
Author

WanMMao commented Sep 4, 2023

os.environ['DISPLAY']=':0'
os.environ['Xauthority']='/home/username/.Xauthority'

use the code

I solved the problem

@BoboTiG BoboTiG closed this as completed Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants