Before asking my question I want to state: I have tried my darnedest to look this up on my own and am falling short on answers. I installed xubuntu on an old laptop that I have automatically logging in and have got pico8 running perfectly fine and to my liking. HOWEVER! I want pico 8 to start immediately after the login happens. I have looked up such things as "running scripts on start up ubuntu" and "how to run a script after login ubuntu" and have gotten many suggestions. one suggestion was to edit the init.d file. I added my script and it appeared to work. HOWEVER! the keyboard, mouse, and external monitor did not work. I assume the script ran before some hardware initialization or something, I don't know. This issue essentially bricked my xubuntu install, as when I restarted it, it would no longer respond to any user inputs. I reimaged my laptop again and am running running a fresh install with pico 8 working again. Here is my question: How can I have pico 8 run after the computer turns on, boots up, and automatically logs into the default account? I am not really a linux newbie, but this is a particularly frustrating gap in my knowledge that perhaps I am not using the correct search terms for. Sorry for the wall of text.
Gnome has a "startup applications" GUI thing where you can add an entry. I don't know if XFCE has anything like that, but it would be the easiest way to do this.
EDIT: it looks like you can just put a .desktop file in ~/.config/autostart and XFCE will run it: https://wiki.archlinux.org/index.php/xfce#Autostart
I tried both solutions suggested. Kittenm4ster, I wasn't able to get that one to work, but thank you for the suggestion, if all else fails, I might revisit this idea. Rmueglitz, this almost worked, but for some reason when I rebooted to test, pico-8 started, but it wasn't showing up on the screen. Maybe I have some setting out of whack. Can you post the line you used in your /etc/rc.local? I will put mine in after work when I have access to my machine again. Thanks again for your help, both of you!
the rc local starts out of the console so there is no x11 but pico 8 uses the sdl lib is sdl2 installed???
and have you tried to boot in console and run pico 8 if this gets the same problem its the systhem and not the rc.local i remember a tool that can startup services in terms of time(every fryday you want your game to start at 12??? something like that) i can ask a friend for info. . .
the code in my rc.local simply was :
i wanted the system to shutdown if i end pico
the program is named "cronjob" but i dont know it
im in germany all tutorials i found are in german so maby you should google it :-)
The solutions based on desktop autostart do not answer what is asked here: that system is about starting helpers (in the notification bar for example) when a desktop session starts, so you would have X server, menu, task bar, etc.
Answers with rc.local or xinitrc do what is asked: when the system goes from basic boot to user session start, pico-8 is started directly. (The complications come from graphics config, depending on the screen used, and the need to add proper shutdown after pico-8 exits.)
I also could start pico-8 with the /etc/rc.local:
./pico8 -pixel_perfect 1 -home /home/guido/pico-8/home -root_path /home/guido/pico-8/home/carts -desktop /home/guido/pico-8 1>/dev/null 2>/dev/null &
or put these lines in /home/guido/start_pico8.sh and call it via the reboot-option of cron:
does work here with raspbian-buster-lite_2019-09-26
[Please log in to post a comment]