Score:0

Run pygame app at startup in Ubuntu Mate

jp flag

I'm trying to make a digital frame software with pygame and python, and want the app to run at the startup of the machine when you can see the taskbar and the system is ready to load windows.

I've tried nearly 6 ways of doing this during the last week, but none worked. I am already tired, and I would like someone to tell me how should I do it.

So.... HOW DO I DO THAT!!!!!????

ChanganAuto avatar
us flag
Please edit and describe what those 6 ways were, what were the expected results and what happened instead.
Score:0
zw flag

You have to create desktop-file for this application (or its script) and then copy this desktop-file to ~/.config/autostart/.

Or directly

mkdir -p ~/.config/autostart/
cat <<EOF > ~/.config/autostart/pygame.desktop # copy from this line to EOF, then paste
#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Exec=/path/to/pygame/frame # or python /path/to/pygame/frame
Name=PyGame Python Frame
EOF

Or using GUI tools like Startup Applications - gnome-session-properties in GNOME or mate-session-properties in MATE.

Then reboot.

JMIDEV avatar
jp flag
I'm sorry to have already somehow found the solution 1 minute after I made the question and you wrote this very long thing, I'm really sorry. The thing is that I was SOOO dumb to take a look at the control center of the OS, and see that THERE WAS A OPTION CALLED "APPS AT STARTUP"!!! I just entered "python3 [PATH]" and it goddamly worked!!! Again thanks a lot.
N0rbert avatar
zw flag
You can always can accept above answer if it helped @JMIDEV.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.