Este conteúdo não está disponível no idioma selecionado.
Chapter 2. Setting up startup applications in GNOME
In the GNOME desktop environment, you can add applications to start automatically upon logging in, meaning that the application launches automatically every time you log into your GNOME desktop session.
2.1. Launching an application automatically on login
You can set applications to launch automatically on login using the Tweaks tool. Tweaks is a tool to customize the GNOME Shell environment for a particular user.
Prerequisites
-
You have installed
gnome-tweaks
on your system. For more details, see Installing software in GNOME - You have installed the application that you want to launch at login.
Procedure
- Open Tweaks. For more details see Launching applications in GNOME.
Select Startup Applications in the left side bar.
Click the plus sign button (
).Select an application from the list of available applications and click
.
Verification
- Open Tweaks.
- Select Startup Applications in the left side bar.
List of applications launched at start will be present in the center section.
Additional resources
- For more information about lauching applications, see Launching applications in GNOME
2.2. Enabling startup applications for another user in GNOME
You can set up a startup application to run for specific users on a system. This will automatically start the specified application for the target user when they log in.
Prerequisites
- Administrative access.
Procedure
-
Locate the
.desktop
file in the/usr/share/applications/
directory that corresponds to the application you want to start automatically. As the
root
user, copy the.desktop
file to the/home/<targetuser>/.config/autostart/
directory:# cp /usr/share/applications/<yourapp>.desktop /home/<targetuser>/.config/autostart/
Replace
<yourapp>
with the name of your application. Replace<targetuser>
with the username.Ensure that the
.desktop
file is owned by the target user and has the correct permissions:# chown <targetuser>:<targetuser> /home/<targetuser>/.config/autostart/<yourapp>.desktop # chmod 644 /home/<targetuser>/.config/autostart/<yourapp>.desktop
Replace
<targetuser>
with the username. Replace<yourapp>.desktop
with the.desktop
file you copied.
Verification
-
The target user should log out of their GNOME session and log back in. The application specified in the
.desktop
file should start automatically.
2.3. Enabling system-wide startup applications for all users in GNOME
You can set up a startup application to run for all users on a system by placing the .desktop
file in a system-wide directory that is accessible to all users. This will automatically start the specified application for every user who logs in.
Prerequisites
- Administrative access.
Procedure
-
Locate the
.desktop
file in the/usr/share/applications/
directory that corresponds to the application you want to start automatically. As the
root
user, copy the.desktop
file to the/etc/xdg/autostart/
directory:# cp /usr/share/applications/<yourapp>.desktop /etc/xdg/autostart/
Replace
<yourapp>
with the name of your application.Ensure that the
.desktop
file has the correct permissions to be read by all users:# chmod 644 /etc/xdg/autostart/<yourapp>.desktop
Replace
<yourapp>.desktop
with the.desktop
file you copied.
Verification
-
Users on the system should log out of their sessions and log back in. The application specified in the system-wide
.desktop
file should start automatically.