Linux enables applications to be automatically started only in a specific desktop environment

Source: Internet
Author: User

By default, software you have added or automatically added to the boot menu will be started in all desktop environments.

Have you ever thought about making an application automatically start in a specific desktop environment? For example, mailnag is a gnome shell mail notifier. If you use it in unity, a very ugly dialog box will be displayed. This article describes how to enable an application to automatically start in a specific desktop environment, such as gnome, unity, and KDE. By using this method, you can enable mailnag to automatically start only when you log on to Gnome.

Compile the. desktop file automatically.~ /. Config/autostart Or /Etc/xdg/autostart.

Add

Onlyshowin = gnome; or

Onlyshowin = unity;

You can add

Onlyshowin = gnome; unity;

You can also use the notshowin command to disable a software from being started in a specific desktop environment.

This method is also applicable to menu editing./Usr/share/Applications. Desktop file.

For gnome, if onlyshowin = gnome is addedGnome ShellAndGnome classic (fallback)Are started.

If you only want to start it under GNOME fallback, you can add

Autostartcondition = gnome3 if-session gnome-Fallback

For gnome shell, replace gnome-Fallback with Gnome

The above method must be used in all applications, because some software will overwrite. Desktop files, such as Dropbox and gmailwatcher.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.