Skip to content

Instantly share code, notes, and snippets.

@chayanforyou
Created August 20, 2022 06:26
Show Gist options
  • Save chayanforyou/33b60cd130dd357095f9073d6a018445 to your computer and use it in GitHub Desktop.
Save chayanforyou/33b60cd130dd357095f9073d6a018445 to your computer and use it in GitHub Desktop.
Make Discord auto start on Ubuntu 20.04 & 22.04

The Discord app on linux ubuntu desktop does not start the app. But you can make it auto start by following this steps.

  • Open Applications and search for Startup Applications

  • Then click Add an input box will open, put the following information and Save.
    Name: Discord
    Command: /usr/bin/discord --tray
    

Now when you power on your PC the Discord app will open automecally on startup.

@Al3xAda
Copy link

Al3xAda commented May 31, 2023

ty for the help<3

@texeltexel2009
Copy link

Much appreciated!

@dinwwwh
Copy link

dinwwwh commented Sep 10, 2023

Thank you, brother. ###.

@Saiban0
Copy link

Saiban0 commented Oct 10, 2023

Thanks bro!

@Lochneska
Copy link

Hey guys, just as an addition to this guide, if you have discord installed through flatpak like I did and this didn't work for you, the command is "flatpak run com.discordapp.Discord" instead, the rest of the guide is the same. :)

@chayanforyou
Copy link
Author

Hey guys, just as an addition to this guide, if you have discord installed through flatpak like I did and this didn't work for you, the command is "flatpak run com.discordapp.Discord" instead, the rest of the guide is the same. :)

Thanks for sharing 😎

@divad1196
Copy link

Hi,
You can also just create a symlink of the .desktop file in ~/.config/autostart which is more accurate.
The .desktop file position will change depending on the installation (flatpak, snap, .deb, ...), the possible lookup folders are references in $XDG_DATA_DIRS

So, a one liner to run in the terminal is:

ln -s "$(find $(echo $XDG_DATA_DIRS | tr ':' ' ') -iname '*discord*.desktop' 2>/dev/null | head -n 1)" ~/.config/autostart

@buithehoa
Copy link

buithehoa commented Jan 8, 2024

Hi, You can also just create a symlink of the .desktop file in ~/.config/autostart which is more accurate. The .desktop file position will change depending on the installation (flatpak, snap, .deb, ...), the possible lookup folders are references in $XDG_DATA_DIRS

So, a one liner to run in the terminal is:

ln -s "$(find $(echo $XDG_DATA_DIRS | tr ':' ' ') -iname '*discord*.desktop' 2>/dev/null | head -n 1)" ~/.config/autostart

This is a much better solution. Thank you, @divad1196

@MohammedZ666
Copy link

MohammedZ666 commented Feb 19, 2024

The above cmd didn't minimize the client, this did for me:
discord --start-minimized

@ElectronicLED
Copy link

Thanks man!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment