Freedesktop's autostart makes (almost) impossible having both KDE4 and GNOME installed in the same machine

Bug #255342 reported by Javier Cabezas

This bug report was converted into a question: question #41534: Freedesktop's autostart makes (almost) impossible having both KDE4 and GNOME installed in the same machine.

18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KDE Base
Invalid
Medium
gnome-session
Invalid
Medium
kdebase (Mandriva)
New
Undecided
Unassigned
kdebase (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I found some annoyances while trying the new KDE 4.1 in Ubuntu Intrepid:

- When I started the KDE4 session, many applications launched automatically (AWN was especially annoying since it does not behaves well with the KDE 4 compositor). They are located in ~/.config/autostart so you cannot enable/disable them in a session-specific way. Therefore, I had to backup this directory and remove the GNOME-only entries.

- When I switched back to my GNOME session, some KDE applications launched automatically (Kwallet, etc.) so I had to repeat the previous step but removing the links to KDE applications this time.

Currently, every time I want to check the progress of the newly released KDE packages I have to modify the contents of the directory, change the session, modify the directory again and switch back to the GNOME session. That is preventing people from having both Desktop Environments installed in the same machine or using isolated applications from the other Desktop Environment.

How could this be fixed?

Revision history for this message
Dariel Dato-on (odd-rationale) wrote :

I believe that KDE has its own Autostart directory (~/.kde/Autostart or ~/.kde4/Autostart). Try sym-linking the KDE stuff there.

Hope that helps!

Changed in kdebase:
status: New → Invalid
Revision history for this message
Harald Sitter (apachelogger) wrote :

Also see advanced options in KDE's autostart configuration module.

Revision history for this message
In , Eduardo Durany Fernández (edurany) wrote :

Version: (using KDE 4.1.1)
Installed from: Unspecified

Stop gnome and kde 4 autostart mess

Case one:
Steps to reproduce:

1) Mark an entry in gnome-session to not autostart
2) Login in kde4

Expected behavior:
Kde4 does not autostart that app

Current behavior:
Kde4 autostarts the app

Case two:
Steps to reproduce:

1) Mark an entry in kde to not autostart
2) Login in gnome

Expected behavior:
Gnome shows the app in gnome-session and does not autostart it

Current behavior:
Gnome does not show the app in gnome-session

I would like to list every autostart entries in gnome and kde. Mark them to autostart only in gnome, only in kde or in both.

Same bug in gnome:
http://bugzilla.gnome.org/show_bug.cgi?id=551700

Related bugs:
http://bugzilla.gnome.org/show_bug.cgi?id=548339
https://bugs.kde.org/show_bug.cgi?id=163582

Revision history for this message
Adam Williamson (awilliamson) wrote :

Someone complained about the same thing in Mandriva:

http://forum.mandriva.com/viewtopic.php?p=548286#548286

Looks like an upstream issue.

Revision history for this message
Adam Williamson (awilliamson) wrote :
Changed in kdebase:
status: Unknown → New
Changed in gnome-session:
status: Unknown → New
Revision history for this message
volapyk (volapyk) wrote :

KDE will autostart programs added to sessions in Gnome. The files are located in ~./config/autostart like the OP mentions. It is possible to disable the entries in "system settings/advanced/autostart" in KDE4, BUT this will edit the files in ~./config/autostart and thereby remove the entries from Gnome sessions.

So in short. I have the exact same problems. For more details see the first link posted by Adam Williamson.

Revision history for this message
In , Adamw-c (adamw-c) wrote :

Additional comments: KDE has a 'private' autostart directory, ~/.kde/Autostart . GNOME does not.

The OnlyShowIn keyword can be used; in the context of autostart it will make the app only start in a particular DE. OnlyShowIn=KDE will make it only autostart in KDE, OnlyShowIn=GNOME will make it only autostart in GNOME.

So all the bits are there for both KDE and GNOME to behave sensibly by default and to present a simple interface to configure this.

IMHO, by default, when you set an app to autostart in either KDE or GNOME, it should be set to *only* autostart in that environment. I think that's the behavior most users expect.

Extra links to reports of this issue:

http://forum.mandriva.com/viewtopic.php?p=548286
https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/255342

Revision history for this message
Javier Cabezas (javier-cabezas) wrote :

There should be an easy way to select in which sessions (managed by autostart compliant session managers) each program/service should be started.

Revision history for this message
In , Eduardo Durany Fernández (edurany) wrote :

When Gnome disables an autostart entry, it adds the flag "X-GNOME-Autostart-enabled=false". Kde does not understand this flag.

When Kde disables an autostart entry, it adds the flag "Hidden=true". The problem is that Gnome uses this flag to mark autostart entries deleted. From gnome-sessions source:

/* Two possible cases:
* a) We want to remove a system wide startup desktop file.
* We can't do that, so we will create a user desktop file
* with the hidden flag set.
* b) We want to remove a startup desktop file that is both
* system and user. So we have to mark it as hidden.
*/

I think Gnome and Kde hackers need to reach agreement here.

Revision history for this message
In , Adamw-c (adamw-c) wrote :

If what I wrote above is true - "OnlyShowIn=KDE will make it only autostart in KDE, OnlyShowIn=GNOME will make it only autostart in GNOME" - then the obvious solution is to use the OnlyShowIn key, which is a standard one, not an extension like X-GNOME-Autostart-enabled.

Revision history for this message
In , Eduardo Durany Fernández (edurany) wrote :

Yes, but if you put "OnlyShowIn=kde" gnome will not list that entry.
I would like to list every autostart entries in Gnome and Kde and to enable, disable or delete them. But maybe people would like another thing.

I think "Hidden" should be used only to deleted entries so we need another flag such as "Autostart-enable" to enable/disable them.

A similar problem occurs with menu entries. With Gnome i can enable or disable menu entries without delete them. I think Gnome uses "NoDisplay" flag to do this. Kde can not do this (http://bugs.kde.org/show_bug.cgi?id=93689).

What about an "Enable" flag to resolve both cases?

Revision history for this message
In , volapyk (volapyk) wrote :

I'm using OnlyShowIn=GNOME atm in Mandriva to solve this problem. It seems to be working perfectly.

I support using the OnlyShowIn key, like Adam suggests. I don't need to have KDE autostart entries listed in Gnome. I'm not really sure I want to either.

Any solution is fine with me though. As long as it's simple.

Revision history for this message
In , Eduardo Durany Fernández (edurany) wrote :

Well, after some research...

GNOME (gnome-session):

Show:
It shows autostart entries in /etc/xdg/autostart and in $HOME/.config/autostart.
It does not show entries with "Hidden=true", "NotShowIn=gnome" or "OnlyShowIn=kde".

Enable/Disable (user):
It sets "X-GNOME-Autostart-enabled" flag true or false.

Enable/Disable (system):
It creates a user desktop file with "X-GNOME-Autostart-enabled" flag.

Delete (user):
It deletes the desktop file.

Delete (system):
It creates a user desktop file with "Hidden=true".

KDE (systemsettings):

Show:
It only shows autostart entries in $HOME/.config/autostart.
It shows entries with "Hidden=true" or "OnlyShowIn=gnome" (but it does not exec them).

Enable/Disable (user):
It sets "Hidden" flag true or false.

Delete (user):
It deletes the desktop file.

I like gnome-sessions behavior, but obviously "X-GNOME-Autostart-enabled" flag should be standardized.
This is a very annoying bug and i am sure every people would like to see similar behavior in both programs. I can't do much more with this. Thanks for reading.

Revision history for this message
In , Adamw-c (adamw-c) wrote :

Great info, Eduardo. I'll duplicate it in the GNOME bug, if you don't mind.

Changed in gnome-session:
status: New → Invalid
Changed in gnome-session:
importance: Unknown → Medium
status: Invalid → Unknown
Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 252663 has been marked as a duplicate of this bug. ***

Changed in kdebase:
importance: Unknown → Medium
Changed in gnome-session:
status: Unknown → Invalid
Revision history for this message
In , Andrew-crouthamel (andrew-crouthamel) wrote :

Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!

Changed in kde-baseapps:
status: New → Incomplete
Revision history for this message
In , Andrew-crouthamel (andrew-crouthamel) wrote :

Dear Bug Submitter,

This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand.

Thank you for helping us make KDE software even better for everyone!

Changed in kde-baseapps:
status: Incomplete → New
Changed in kde-baseapps:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.