3

I have created an application using webcam. here my application opens a window to display the image. I want to run that application on startup. if i put startup file in rc.local, it runs successfully at startup but not allowing to show window. it shows -

gtk warning cannot open display.

how to show window? please help me guys!!

0

1 Answer 1

3

If you're running LXDE (default on raspbian)

Add a .desktop file to your ~/.config/autostart directory (create one if not available) with 3 lines saying :

[Desktop Entry] 
Type=Application
Exec=python /path/to/your/application.py arguments

UPDATE: updated with Don Question's remark

Sign up to request clarification or add additional context in comments.

3 Comments

thanks for ur rply!! but im using python file. how to init in "Exec"?
consider python /path/to/your/application.py arguments
thanks don it worked... but I can able to access desktop. I need to run only this application and have to lock desktop and other files! is there any way?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.