Bug 878352

Summary: mate-session-manager doesn't support AutostartCondition well
Product: [Fedora] Fedora Reporter: Akira TAGOH <tagoh>
Component: imsettingsAssignee: Akira TAGOH <tagoh>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 18CC: dan.mashal, i18n-bugs, leigh123linux, rdieter, tagoh
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-15 02:36:19 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Akira TAGOH 2012-11-20 09:01:01 UTC
Description of problem:
After logging into MATE on f18 TC9, the input method won't work because of /etc/xdg/autostart/imsettings-start.desktop has "AutostartCondition=GNOME3 if-session gnome-fallback" line. after getting rid of this line it works back. however it works on GNOME, KDE, XFCE and LXDE without any modification. I failed to find out any document for AutostartCondition and I'm not quite sure what is correct behavior on it though, it's the fact other desktops interpret it as I expected. so it might be a bug in mate-session-manager I suppose.

Version-Release number of selected component (if applicable):
mate-session-manager-1.4.0-8.fc18.x86_64

How reproducible:
always

Steps to Reproduce:
1.login MATE with CIJK locale say
2.
3.
  
Actual results:
ibus is not running

Expected results:
ibus is running

Additional info:

Comment 1 leigh scott 2012-11-20 10:01:28 UTC
Please make sure you have updated all your mate packages to the versions listed here before filing any more reports

 https://admin.fedoraproject.org/updates/FEDORA-2012-17936

Comment 2 Akira TAGOH 2012-11-20 11:58:35 UTC
Ah, okay. seems mirror I'm using was broken. and I see you think this isn't a bug even. thanks.

Comment 3 leigh scott 2012-11-20 13:23:40 UTC
(In reply to comment #2)
>  and I see you think this isn't a bug even. thanks.


It's more a symptom on the beta freeze,  this would have been pushed to stable.

https://admin.fedoraproject.org/updates/FEDORA-2012-17936

Once everything is pushed it will work, perhaps I should add a version requirement on mate-desktop.

Comment 4 Akira TAGOH 2012-11-21 02:07:49 UTC
Well, if you are sure it was a known bug and fixed in the latest, CURRENTRELEASE would be best choice to indicate the status of bug or DUPLICATE if there are any bugs in bugzilla that can be referenced FWIW. otherwise I see it _is_ expected behavior a.k.a. NOTABUG, but anyway.

Comment 5 Akira TAGOH 2012-11-21 04:00:06 UTC
tried with mate-session-manager-1.5.0-1.fc18.x86_64. it doesn't spawn imsettings-switch via imsettings-start.desktop. i.e. no input methods available on MATE. this report is still valid. reopening.

Comment 6 leigh scott 2012-11-21 08:58:00 UTC
(In reply to comment #5)
> tried with mate-session-manager-1.5.0-1.fc18.x86_64. it doesn't spawn
> imsettings-switch via imsettings-start.desktop. i.e. no input methods
> available on MATE. this report is still valid. reopening.


Did you try rebuilding imsettings against the new mate libs

Comment 7 Akira TAGOH 2012-11-21 09:47:24 UTC
Please read the original report carefully again. rebuilding doesn't help because it's the issue in how MATE handles AutostartCondition in .desktop file.

From reading the code of mate-session-manager, it seems disabling all of autostart files which contains _unknown_ keywords. it may be conservative way but unfortunately it caused this.

Comment 8 leigh scott 2012-11-21 10:08:25 UTC
(In reply to comment #5)
> tried with mate-session-manager-1.5.0-1.fc18.x86_64. it doesn't spawn
> imsettings-switch via imsettings-start.desktop. i.e. no input methods
> available on MATE. this report is still valid. reopening.

You expect it to start with this AutostartCondition?

Exec=imsettings-switch -n -q -x 
Terminal=false
AutostartCondition=GNOME3 if-session gnome-fallback


Well that will only start for a gnome-fallback session

Comment 9 leigh scott 2012-11-21 10:10:56 UTC
re-assigned to imsettings

Comment 10 leigh scott 2012-11-21 10:17:50 UTC
Welcome to the gnome-3.6 changes that suck

I had a similar issue on cinnamon with gnome-screensaver

https://github.com/linuxmint/Cinnamon/issues/1271

Comment 11 Akira TAGOH 2012-11-21 10:24:55 UTC
Do you have any pointers it _is_ correct behavior? if so, I have to file bugs to other desktops as I wrote in Comment#0.

at least I couldn't find any documents out about AutostartCondition. so I tested it on other desktops to see how they behaves on it. and I see same behavior there, except MATE. thus, I decided to file this to MATE because it may be most likely a bug in MATE then.

Comment 12 leigh scott 2012-11-21 10:39:17 UTC
(In reply to comment #11)
> Do you have any pointers it _is_ correct behavior? if so, I have to file
> bugs to other desktops as I wrote in Comment#0.
> 

It's the correct behaviour for mate-session-manager

https://github.com/mate-desktop/mate-session-manager/issues/10


> at least I couldn't find any documents out about AutostartCondition. so I
> tested it on other desktops to see how they behaves on it. and I see same
> behavior there, except MATE. thus, I decided to file this to MATE because it
> may be most likely a bug in MATE then.

I doubt gnome-shell uses /etc/xdg/autostart/imsettings-start.desktop to start imsettings.
As for KDE, XFCE and LXDE do they actually use it or do they have there own startup files?


As I read this

AutostartCondition=GNOME3 if-session gnome-fallback

it says only start for gnome fallback session, am I wrong?

Comment 13 Akira TAGOH 2012-11-21 11:02:32 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Do you have any pointers it _is_ correct behavior? if so, I have to file
> > bugs to other desktops as I wrote in Comment#0.
> > 
> 
> It's the correct behaviour for mate-session-manager
> 
> https://github.com/mate-desktop/mate-session-manager/issues/10

I was asking for a pointer that "AutostartCondition...." in imsettings-start.desktop only start for a gnome-fallback session as you said at Comment#8. not what MATE developers recommends how to manage the user session on MATE.

plus, this isn't something can be added into the session management because it's just an one time process at the startup time to invoke the input method through DBus.

> I doubt gnome-shell uses /etc/xdg/autostart/imsettings-start.desktop to
> start imsettings.

They don't. they don't even need imsettings to have the input method anymore, but on fallback mode. this is why it has such line.

> As for KDE, XFCE and LXDE do they actually use it or do they have there own
> startup files?

Yes, they do. and No, they don't have any own startup files.

> As I read this
> 
> AutostartCondition=GNOME3 if-session gnome-fallback
> 
> it says only start for gnome fallback session, am I wrong?

on _GNOME3_. yes.
You are not GNOME3 right. so it shouldn't be applied. plus, if it has OnlyShowIn=GNOME or GNOME3, you're right. it should be exclusive. but it doesn't have it nor even NotShowIn. so should be inclusive IMHO.

Comment 14 leigh scott 2012-11-21 13:31:12 UTC
I have looked at the issue more, indeed it doesn't autostart.
I then tried starting it from a terminal and it still doesn't start ibus


imsettings-switch -n -q -x


There are no errors running this command

I launch im-chooser and it offers to start ibus, these are the warnings in ~/.xsession-errors

** (im-chooser:1468): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

** (main.py:1909): WARNING **: Couldn't register with accessibility bus: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

Comment 15 Akira TAGOH 2012-11-22 02:30:26 UTC
(In reply to comment #14)
> I have looked at the issue more, indeed it doesn't autostart.
> I then tried starting it from a terminal and it still doesn't start ibus

It depends on your locale. we are running ibus by default for certain languages only so far. see /etc/X11/xinit/xinitrc.d/50-xinput.sh

> I launch im-chooser and it offers to start ibus, these are the warnings in
> ~/.xsession-errors
> 
> ** (im-chooser:1468): WARNING **: Couldn't register with accessibility bus:
> Did not receive a reply. Possible causes include: the remote application did
> not send a reply, the message bus security policy blocked the reply, the
> reply timeout expired, or the network connection was broken.
> 
> ** (main.py:1909): WARNING **: Couldn't register with accessibility bus: Did
> not receive a reply. Possible causes include: the remote application did not
> send a reply, the message bus security policy blocked the reply, the reply
> timeout expired, or the network connection was broken.

Well, this is because no at-spi2-registryd is running. and this is similar reason that MATE incompletely support AutostartCondition. see /etc/xdg/autostart/at-spi-dbus-bus.desktop how it's brought up.

Comment 16 leigh scott 2012-11-24 15:01:00 UTC
Will my pull request help this issue?

https://github.com/mate-desktop/mate-session-manager/pull/13

as for this AutostartCondition I see no gain in porting it.


http://git.gnome.org/browse/gnome-session/commit/gnome-session/gsm-autostart-app.c?id=58ebdfac223e6246323a6fcc452221a7581ed868

Comment 17 Akira TAGOH 2012-11-26 02:33:18 UTC
That helps only for at-spi issue as that condition depends on gsettings. MATE needs to do further work to deal with (if|unless)-session, and the case when it is non-MATE desktops.

Comment 18 Dan Mashal 2013-01-11 23:38:49 UTC
Tagoh,

Ping me on IRC when you get a chance.

Comment 19 Akira TAGOH 2013-01-15 02:36:19 UTC
Sorry for not updating. by Bug#887951, I've reverted this change in imsettings and  doesn't have AutostartCondition stuff anymore. so closing this. thanks.

Comment 20 Akira TAGOH 2013-01-15 02:37:07 UTC
This was reverted in imsettings-1.5.1-2.fc18 and already pushed into stable.