This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
rc.local Auto Start Py DISPLAY error
I'm sorry for my bad english

    DISPLAY =: 0 sudo  python /root/system/ loadserver

error : 

+ test -f /etc/ssh/ssh_host_dsa_key
+ DISPLAY =: 0 sudo python /root/system/ loadserver
/etc/rc.local: 21: /etc/rc.local: DISPLAY: not found

    sudo  python /root/system/ loadserver


+ test -f /etc/ssh/ssh_host_dsa_key
+ sudo python /root/system/ loadserver
[1421:1421:0708/] Gtk: cannot open display:
+ exit 0
Cut Your Engergy Bill Dramatically By Doing This:
You might allow the root to access the display, but it's a security hole.
So your the command should do
xhost +localhost ## or even
xhost +root
Also it's too early to start programs, related to Xorg, by rc.local. It's mostly sure that Xorg is not yet available.
Then I'd suggest you to go through the ~/.local/autostart, or even better in your ~/.xinitrc, if it's intended for your own user case. Otherwise to place the script on the /etc/X11/xinit/xinitrc.d for a global use case.
For other cases, which are not Xorg related, you might set up a systemd service to be started in relation to other services. Then that won't need you to run as administrator, but it will be cared by the system.
Light blue words might be a link. Have you try to click on them? Big Grin

Forum Jump:

Users browsing this thread: 1 Guest(s)