How to Set Up Autostart for Discord and Steam on Ubuntu?

0
15
Asked By ChillPenguin42 On

I'm giving Linux another shot, specifically Ubuntu 24.04, after a decade away from it. Everything's going well overall, but I can't seem to get Discord and Steam to auto-start when I log in. Both apps have an option to enable this, but it doesn't seem to work—Discord's slider moves but does nothing, and Steam's slider won't budge at all.

I've tried using the Startup Applications tool but I'm uncertain where to direct it since I can't find an easy executable file for either app, and I can't right-click pinned shortcuts to see the file paths. I've explored `/usr/share/applications` and even `~/snap`, but there's nothing useful there either.

I'm really stuck on figuring out where these programs are or how to set them to launch without leaving a Terminal window open.

Edit: After posting, I managed to get Discord working by creating a .desktop file based on another app's file, as I discovered that I could run it by just typing "discord" in the Terminal. However, I still don't know where to locate the actual files for these apps or how to do it properly for apps without an easy Terminal command. Additionally, I'm having similar trouble with Spotify, which won't start minimized and doesn't respond to the set options either. Any help would be greatly appreciated!

2 Answers

Answered By LinuxNinja88 On

Great job getting Discord to work! To find the executable file paths, you can check the application's properties by right-clicking on its icon in the application menu. This will usually give you the option to see more details, including the command to launch it. If that doesn't work, you can also try running the command `which discord` in the Terminal. This enables you to find where it's installed.

Also, about setting icons: you can set them in your .desktop file, but you’ll need the right icon name or a direct path to the image file. If it's not displaying correctly, double-check the path you’re using.

Answered By TechGuru123 On

Instead of relying solely on Startup Applications, try creating a simple shell script to launch your apps. To do this, create a `.sh` file, like you could use `~/startup_apps.sh`, and add your commands there. Make sure to give it executable permissions with `chmod +x ~/startup_apps.sh`. In the Startup Applications, add a custom command pointing to this script.

For Discord, your script could look like this:
`#!/bin/bash`
`sleep 5 && discord`
Just remember to put the correct executable commands as necessary for Steam and Spotify too.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.