![]() ![]() If you need access to graphical elements (for example, you are making a dashboard with Tkinter), you will need to wait until the X Window System has started before running your program. If you want to do it just for you use ~/.config/autostart, ( ) you might need to create that directory with "mkdir ~/.config/" and then "emacs ~/.Save and exit with ctrl + x, followed by y when prompted to save, and then enter. If you want to do that use "sudo" (documented elsewhere on stack exchange and the internet). You may want this, but the system is trying to protect other users on your system and only allows root to make changes to everyone. Any changes made to it will apply to all users. ![]() With that out of the way, why isn't your solution of modifying xdg working? It's because '/etc/xdg/autostart' is a system configuration directory. Xdg is probably the right place as it has all you need ( a gui, a user session) while being common (xdg will still work if you switch window managers, probably) You want to add something to this process, you can do it at the kernel level (bad idea), at they systemd level (probably not right unless its a daemon), at the x11 level (still probably bad as you still don't have a user session yet), or at the xdg or lxde level. ![]() The kernel boots, then starts systemd, which then starts x11 (and a lot of other stuff), x11 starts xdg (and some other stuff, I think), lxde is started by either x11 or xdg I'm not sure which. There are a number of issues here, first when you are looking at tutorials recognize that Linux distros are built in layers, for simplicity let's say your "layer stack" looks like this: kernel, systemd, x11, xdg, lxde. How can I get my GUI script to run on startup with Raspbian 10 (buster)? Here's what I type into terminal: $ nano /etc/xdg/autostart/gui.desktopĪnd a new file pops up, but at the bottom I get the warning I have also tried calling my script in /etc/rc.local but it did nothing. For me, autostart is in /etc/xdg/autostart and when I try to create a new file here using nano in the terminal, I get the message and it doesn't save my file. desktop file in /home/pi/.config/autostart but I don't have a. ![]() I have tried modifying autostart folder, but it is not in the same location as it was in previous Raspbian versions and doesn't seem to be working the way it used to. My Raspi runs on Raspbian 10 (buster), which has made things difficult since I can only find tutorials for Raspbian 8 or so. It is currently set up to automatically log in as user on startup, but if that makes the process more difficult I can change that. I have designed a GUI that I want to run as soon as I turn on my Raspberry Pi. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |