Linux serverlinux web serverNETWORK ADMINISTRATIONS

How To Autostart Programs On Linux

How do you “autostart” programs on Linux? While the big desktop environments (like GNOME and Plasma) simplify this, knowing how to setup your autostart programs is especially important for standalone window manager users. While there are a number of ways to do this, I’m going to show you the two ways that I use.

WANT TO SUPPORT THE CHANNEL?
💰 Patreon: https://www.patreon.com/distrotube
💳 Paypal: https://www.youtube.com/redirect?event=channel_banner&redir_token=QUFFLUhqazNocEhiaGFBT1l1MnRHbnlIcHFKbXJWVnpQd3xBQ3Jtc0tsLVZJc19YeFlwZ2JqbXVOa3g0Skw4TVhTV2otNm1tM3A1bUNnamh3S2V6OGQtLTBnSjBxYTlvUXMxeEVIS3o4US10NENHMUQ3STk2a01FOFBhUnZjZFctMEhFUTg1TVctQmFfVUdxZXJ4TDl0azlYNA&q=https%3A%2F%2Fwww.paypal.com%2Fcgi-bin%2Fwebscr%3Fcmd%3D_donations%26business%3Dderek%2540distrotube%252ecom%26lc%3DUS%26item_name%3DDistroTube%26no_note%3D0%26currency_code%3DUSD%26bn%3DPP%252dDonationsBF%253abtn_donateCC_LG%252egif%253aNonHostedGuest
🛍️ Amazon: https://amzn.to/2RotFFi
👕 Teespring: https://teespring.com/stores/distrotube

DONATE CRYPTO:
💰 Bitcoin: 1Mp6ebz5bNcjNFW7XWHVht36SkiLoxPKoX
🐶 Dogecoin: D5fpRD1JRoBFPDXSBocRTp8W9uKzfwLFAu
📕 LBC: bMfA2c3zmcLxPCpyPcrykLvMhZ7A5mQuhJ

DT ON THE WEB:
🕸️ Website: http://distrotube.com/
📁 GitLab: https://gitlab.com/dwt1
🗨️ Mastodon: https://fosstodon.org/@distrotube
👫 Reddit: https://www.reddit.com/r/DistroTube/
📽️ LBRY/Odysee: https://odysee.com/@DistroTube:2

FREE AND OPEN SOURCE SOFTWARE THAT I USE:
🌐 Brave Browser – https://brave.com/dis872
📽️ Open Broadcaster Software: https://obsproject.com/
🎬 Kdenlive: https://kdenlive.org
🎨 GIMP: https://www.gimp.org/
🎵 Audacium: http://audacium.xyz/
💻 VirtualBox: https://www.virtualbox.org/
🗒️ Doom Emacs: https://github.com/hlissner/doom-emacs

Your support is very much appreciated. Thanks, guys!

source

by DistroTube

linux web server

42 thoughts on “How To Autostart Programs On Linux

  • Thank you, my friend! It is equal in Windows, just Win+R shell:startup to acess the folder

  • Is there a way to do this with Hyprland?

  • This is really great information thank you Derek. I want to start the proper screen resolution for each window manager and this clearly explained it.

  • G. Nome sound so wrong 😂 I don’t know official name but I just assumed it was like the English word gnome with silent G

  • can i do this with steam big picture moad

  • the problem with linux is ive been looking for 45min on how to start synergy on boot up and its 1 check box in windows.

  • No details of what's in the .desktop file.

  • I still after watching all these videos on how to do it can't get terminal to open up and run bpytop on startup on Linux Mint. Seems simple, but yeaaahh. I created a .desktop file for it and put in:
    [Desktop Entry]
    Type=Application
    Name=bpytop
    Exec=bpytop
    StartupNotify=false
    Terminal=true

    and put it in the .config/autostart directly. It shows up in the gui when turning on and off autostart items, but it doesn't seem to run. Even after making it executable. Shrug.

  • How do you get new programs to run? Do you have to make them executable first, and what is the right way to do that?

  • that's exactly what i need how do i auto-start a terminal program in Linux inside mi desktop environment

  • autostart doesn't exist here, i'm using void linux btw

  • How to autostart programs if we are using a raspberrypi lite?? Kindly guide

  • Create a desktop shortcut for the app from the menu and copy it 🤪

  • I want application to auto start without need to login in the system.

  • Well, .desktop files have an option to run commands in the terminal so, yes, you can put the Htop desktop file in your autostart folder and it will work.

    If you're using a GUI desktop file editor it should be a checkbox saying "run in terminal", if editing it manually with a text editor, it's a line saying "Terminal=true" (or "false").

  • Create a "oneshot" .service file. /etc/systemd/system/<name>.service

    systemctl enable <name>.service

  • Could you add this wallpaper to your wallpapers GitLab repo please?

  • Does it have to be .desktop files, or can it be soft links? Because these desktop files already exist, no? I know they're small, but they get updated when you update, and copying them around always seems to cause problems, like icon file names being changed, etc.

  • Hey DT how do you handle with programs/software not made for Tiling Window Manager. Like: MegaSync, Steam, Flameshot, etc ?

  • Does anyone know how to open a program in qtile but in the selected workspace?

  • Awesome, I've found that the on screen keyboard starts up as a background process on login for me, never use it so will see if I can stop it.

  • Semi Newbie with a question. Curious if there is way to dictate which workspaces a program opens up in. I would like to group certain apps to certain desktops. I realise that it's probably different per WM but I wanted to know if its doable at all.

  • What about `/etc/init.d` or the `/etc/rc*` scripts and directories? How do you decide between using these, or the autostart files you mentioned in this video?

  • Even on tiling wm we rely on premade solution like exec_always on i3

  • DT, how are you? A been using linux for 10 years or more, another way not discussed very much among users and maybe you can talk about it is creating auto run scripts using systemd and init.d as it is very easy and insane powerfull. I used them a lot as they run in sudo mode you can do lot of things during linux initialization. Good vibes, i see some of your videos some times, good contribution to the linux comunity from your side Regards!

  • KDE user here. I love how simple the autostart program is 😁 autostart my dock, my Konsole, my Backup application. Nothing more, nothing less. No kruft, all easy.
    Thanks for showing us some more ways to make it work on other desktops!

  • Hey @DistroTube for starting the Emacs daemon I'd consider a systemd unit since you'd have a lot of control over it to restart the daemon in cases like major updates to the Doom plugins for instance.

  • There actually many other way to auto strart things. The two main solution are the systemd service management (if you have systemd of course) and the crontab for task scheduling. In fact crontab is more powerful than that. You can schedule script execution per week month day or per hour minutes and seconds. And also schedule task on reboot shutdown and things like that.

  • Hey DT, what’s your take on ed the Unix line editor?

  • This is bloat. I just insert "program &" to my ~/.xinitrc

  • Been using Linux (Thank you God!!) for year now and I know how to "startup" auto-start. Tq DT.

  • I really like that shirt, can you give the link ?

  • I will make EKOS – Emacs King OS, here the features.

    Muli ISO – KDE, XMonad, BSPWM, i3WM, EXWM
    Super Easy – It will have a keybinding sheet that can be pulled with one key or button on the bar, all programs will be documented on the wiki too.
    Just works – It will be Fedora based prob, stable, up to date packages also.
    No proprietary software – Free operating system.

    Software:
    Fish shell
    Emacs (optional)
    Ungoogled Chromium
    Neomutt
    SCIM
    Dmenu/Rofi
    Etc..Etc..

    Combo DTOS LARBS.

Comments are closed.