Log In  

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.

P#70442 2019-12-01 07:44


have you tried the /etc/rc.local thats an option
in my case it works . . . but im using mint

P#70449 2019-12-01 15:01

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

P#70451 2019-12-01 15:52 ( Edited 2019-12-01 15:56)
:: Ioeatt

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!

P#70528 2019-12-03 14:12

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 :

/home/user/pico/pico8 -splore
sudo halt

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 :-)

P#70566 2019-12-04 11:56 ( Edited 2019-12-04 14:29)
:: Ioeatt

I believe you are thinking of cron. That was another solution I tried. I hadn't considered just booting to console. This might just be the solution I am looking for! Now that you typed it is just seems so obvious.

P#70567 2019-12-04 13:46
:: merwok

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.)

P#70571 2019-12-04 15:23
:: guidol

I also could start pico-8 with the /etc/rc.local:
cd /home/guido/pico-8
./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:
@reboot /home/guido/start_pico8.sh

does work here with raspbian-buster-lite_2019-09-26

P#71362 2019-12-24 09:20

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2020-08-12 00:13 | 0.028s | 2097k | Q:26