After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 449159 - can't access apps via gksu on ubuntu feisty
can't access apps via gksu on ubuntu feisty
Status: RESOLVED NOTGNOME
Product: at-spi
Classification: Platform
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: At-spi maintainer(s)
At-spi maintainer(s)
: 565536 719554 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-06-19 15:17 UTC by Mike Pedersen
Modified: 2018-08-28 03:20 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20



Description Mike Pedersen 2007-06-19 15:17:45 UTC
Note that the following assumes that the correct .orbitrc exists in /root.
1.  run orca
2.  enter orca preferences and on the general page check the check box to disable gksu keyboard grab.  After that simply press OK
3.  From the application launch menu press enter on "users and groups. 
4.  enter your password.
From this point on nothing is spoken.  If I enter "users and groups" via sudo from a terminal prompt I get speech and braille as expected.
Comment 1 Ariel Rios 2007-06-19 17:33:26 UTC
Please change product to at-spi.

ariel
Comment 2 Li Yuan 2008-11-27 06:27:59 UTC
The reason for gksu is not accessible is there is not main loop in gksu. Thus gksu doesn't reply to all CORBA calls. Here is the trace of gksu, it is blocked at read. To fix the problem, we need a main loop in gksu.


(gdb) bt
  • #0 __kernel_vsyscall
  • #1 read
    from /lib/tls/i686/cmov/libc.so.6
  • #2 _IO_file_underflow
    from /lib/tls/i686/cmov/libc.so.6
  • #3 _IO_default_uflow
    from /lib/tls/i686/cmov/libc.so.6
  • #4 __uflow
    from /lib/tls/i686/cmov/libc.so.6
  • #5 _IO_getline_info
    from /lib/tls/i686/cmov/libc.so.6
  • #6 _IO_getline
    from /lib/tls/i686/cmov/libc.so.6
  • #7 fgets
    from /lib/tls/i686/cmov/libc.so.6
  • #8 gksu_sudo_full
    from /usr/lib/libgksu2.so.0
  • #9 gksu_run_full
    from /usr/lib/libgksu2.so.0
  • #10 ??
  • #11 __libc_start_main
    from /lib/tls/i686/cmov/libc.so.6
  • #12 ??

Comment 3 Li Yuan 2008-11-27 06:35:12 UTC
A bug has been filed to gksu. https://savannah.nongnu.org/bugs/index.php?24952
Comment 4 Nagappan Alagappan 2009-02-11 23:20:07 UTC
Li, I don't see any code updated in gksu source tree for more than 4 years now. Am I missing something ? Will there be any updates from their side ?
Comment 5 Nagappan Alagappan 2009-02-12 00:37:24 UTC
Looks like new gksu-polkit has g_main_loop implementation, I just browsed through the code.

http://live.gnome.org/gksu
git://git.debian.org/~kov/gksu-polkit.git/

When I try to run

nags@nalagappan:~/work/gksu-polkit$ gksu-polkit synaptic

** (gksu-polkit:15841): WARNING **: Error: Process /lib/dbus-1.0/dbus-daemon-launch-helper received signal 6

and the program exits
Comment 6 Gustavo Noronha (kov) 2009-02-12 18:50:51 UTC
(In reply to comment #4)
> Li, I don't see any code updated in gksu source tree for more than 4 years now.
> Am I missing something ? Will there be any updates from their side ?
> 

The code actually lives in http://svn.debian.org/; it is not quite active at the moment,
but I think it has had quite some changes in these 4 years. I decided gksu required
a redesign to get around this kind of limitation, and that's why I started gksu-policykit.
Comment 7 Gustavo Noronha (kov) 2009-02-12 18:54:34 UTC
(In reply to comment #5)
> Looks like new gksu-polkit has g_main_loop implementation, I just browsed
> through the code.
> 
> http://live.gnome.org/gksu
> git://git.debian.org/~kov/gksu-polkit.git/
> 
> When I try to run
> 
> nags@nalagappan:~/work/gksu-polkit$ gksu-polkit synaptic
> 
> ** (gksu-polkit:15841): WARNING **: Error: Process
> /lib/dbus-1.0/dbus-daemon-launch-helper received signal 6
> 
> and the program exits
> 

How are you testing this? Have you built gksu-polkit yourlsef, and ran make install?
Can you try using the package which now exists in Debian unstable, if you are running
a Debian-based distribution? Also, can you make sure you have the following files?:

/usr/share/PolicyKit/policy/gksu.policy
/etc/dbus-1/system.d/gksu-polkit.conf
/usr/share/dbus-1/system-services/org.gnome.Gksu.service

Also, for gksu-polkit to work correctly with orca we will probably need to teach it about
what environment variables it needs to forward to the privileged program.
Comment 8 Nagappan Alagappan 2009-02-12 19:36:02 UTC
(In reply to comment #7)
> How are you testing this? Have you built gksu-polkit yourlsef, and ran make
> install?

Yes, I compiled from source and installed it

> Can you try using the package which now exists in Debian unstable, if you are
> running
> a Debian-based distribution? Also, can you make sure you have the following
> files?:

I don't find this package in Ubuntu 8.10.

> 
> /usr/share/PolicyKit/policy/gksu.policy
Exist
> /etc/dbus-1/system.d/gksu-polkit.conf
Doesn't exist
> /usr/share/dbus-1/system-services/org.gnome.Gksu.service
Exist
> 
> Also, for gksu-polkit to work correctly with orca we will probably need to
> teach it about
> what environment variables it needs to forward to the privileged program.
> 

Sure, I will be glad to test on this :)
Comment 9 Gustavo Noronha (kov) 2009-02-13 00:45:51 UTC
(In reply to comment #8)
> > Can you try using the package which now exists in Debian unstable, if you are
> > running
> > a Debian-based distribution? Also, can you make sure you have the following
> > files?:
> 
> I don't find this package in Ubuntu 8.10.

I don't think Ubuntu imported that package yet. You can get them here:

http://packages.debian.org/sid/libgksu-polkit0
http://packages.debian.org/sid/gksu-polkit

> > /etc/dbus-1/system.d/gksu-polkit.conf
> Doesn't exist

You can try the package, or see if you can find it at /usr/etc/dbus-1/syste.d/ and move it there, please? 

Maybe I should find a nice BTS for gksu polkit at this time =).
Comment 10 Nagappan Alagappan 2009-02-13 01:23:00 UTC
> I don't think Ubuntu imported that package yet. You can get them here:
> 
> http://packages.debian.org/sid/libgksu-polkit0
> http://packages.debian.org/sid/gksu-polkit

Will try this little later

> > > /etc/dbus-1/system.d/gksu-polkit.conf
> > Doesn't exist
> 
> You can try the package, or see if you can find it at /usr/etc/dbus-1/syste.d/
> and move it there, please? 

Moved

> 
> Maybe I should find a nice BTS for gksu polkit at this time =).
> 

nags@nalagappan:~$ gksu-polkit synaptic

** (gksu-polkit:3706): WARNING **: Error: Failed to execute child process "synaptic" (No such file or directory)

nags@nalagappan:~$ which synaptic
/usr/sbin/synaptic
nags@nalagappan:~$ gksu-polkit /usr/sbin/synaptic

When I try to install some package using synaptic, I get something like this in Synaptic UI console:

dpkg: dpkg - error: PATH is not set.

E: Sub-process /usr/bin/dpkg returned an error code (2)
A package failed to install.  Trying to recover:

nags@nalagappan:~$ ps ax | grep syn
 3782 pts/8    S+     0:00 gksu-polkit /usr/sbin/synaptic
 3808 ?        Sl     0:06 /usr/sbin/synaptic
 4081 pts/9    S+     0:00 grep syn

I tried with other applications, like gedit, vmware-netcfg (this internally uses gksu), seems things are working perfectly fine (except synaptic package installation) !!!

When I use 'sudo synaptic' package gets installed successfully. Guess some path settings has to be done ?

Selecting previously deselected package 3dchess.
(Reading database ... 282910 files and directories currently installed.)
Unpacking 3dchess (from .../3dchess_0.8.1-15_i386.deb) ...
Processing triggers for menu ...
Processing triggers for man-db ...
Setting up 3dchess (0.8.1-15) ...

Processing triggers for menu ...

Thanks

PS: Will try to package for other distributions using openSUSE build service. We need this functionality for older versions like Ubuntu 7.04 to 8.10 / openSUSE 10.3 to 11.1 / Mandriva 2008 / 2009 and RHEL 5.x
Comment 11 Nagappan Alagappan 2009-02-13 01:25:09 UTC
(In reply to comment #10)
> I tried with other applications, like gedit, vmware-netcfg (this internally
> uses gksu), seems things are working perfectly fine (except synaptic package
> installation) !!!

I mean to say, I tried with gksu-polkit and things are working perfectly fine :)

Sorry for the spam.

Thanks
Comment 12 Nagappan Alagappan 2009-02-13 01:37:01 UTC
*** Bug 565536 has been marked as a duplicate of this bug. ***
Comment 13 Nagappan Alagappan 2009-02-13 02:53:47 UTC
(In reply to comment #9)
> I don't think Ubuntu imported that package yet. You can get them here:
> 
> http://packages.debian.org/sid/libgksu-polkit0
> http://packages.debian.org/sid/gksu-polkit
> 

Both the links point to same source code gksu-polkit ? I could not see libgksu-polkit0, Guess I'm wrong !?!
Comment 14 Gustavo Noronha (kov) 2009-02-13 14:30:31 UTC
(In reply to comment #13)
> Both the links point to same source code gksu-polkit ? I could not see
> libgksu-polkit0, Guess I'm wrong !?!
> 

The source package is gksu-polkit, yeah. Both binary packages are generated from it.
Comment 15 Gustavo Noronha (kov) 2009-02-13 14:35:29 UTC
(In reply to comment #10)
> nags@nalagappan:~$ gksu-polkit /usr/sbin/synaptic
> 
> When I try to install some package using synaptic, I get something like this in
> Synaptic UI console:
> 
> dpkg: dpkg - error: PATH is not set.
> 
> E: Sub-process /usr/bin/dpkg returned an error code (2)
> A package failed to install.  Trying to recover:

Nham... so Ubuntu's dbus daemon doesn't have PATH set in its environment. I believe I will have gksu-server set a default path of /sbin:/bin:/usr/sbin:/usr/bin. Try adding the following to the end of /usr/share/gksu-polkit-1/environment/common.variables:

[PATH]
Policy=send

And try again, please. This is a work-around - it will make gksu set the user's path in the application's environment.

> I tried with other applications, like gedit, vmware-netcfg (this internally
> uses gksu), seems things are working perfectly fine (except synaptic package
> installation) !!!

Awesome! So orca was able to work with an application executed through gksu-polkit?
Comment 16 Nagappan Alagappan 2009-02-13 21:27:30 UTC
(In reply to comment #15)

> Nham... so Ubuntu's dbus daemon doesn't have PATH set in its environment. I
> believe I will have gksu-server set a default path of
> /sbin:/bin:/usr/sbin:/usr/bin. Try adding the following to the end of
> /usr/share/gksu-polkit-1/environment/common.variables:
> 
> [PATH]
> Policy=send
> 
> And try again, please. This is a work-around - it will make gksu set the user's
> path in the application's environment.

This fixes the issue of installing / uninstalling packages. But still I need to give the complete path of application, if its not in user PATH, say something like /usr/sbin/synaptic, we have to use complete path.

> 
> Awesome! So orca was able to work with an application executed through
> gksu-polkit?
> 

Yes, I tried with accerciser :) and everything seems working fine :)

Thanks for your kind help and detailed info
Comment 17 Gustavo Noronha (kov) 2009-02-14 11:24:09 UTC
Yeah, thi(In reply to comment #16)
> This fixes the issue of installing / uninstalling packages. But still I need to
> give the complete path of application, if its not in user PATH, say something
> like /usr/sbin/synaptic, we have to use complete path.

Yeah, giving the complete path will still be required. Messing with the user's PATH is not something gksu is in a good position to do. Still, the user can add /usr/sbin to their PATH, or use a menu item, so I don't think this is much of a problem.

> > 
> > Awesome! So orca was able to work with an application executed through
> > gksu-polkit?
> > 
> 
> Yes, I tried with accerciser :) and everything seems working fine :)
> 
> Thanks for your kind help and detailed info


Awesome! 

Comment 18 André Klapper 2012-02-26 10:44:36 UTC
[Resetting QA Contact to newly introduced "at-spi-maint@gnome.bugs". 
Reason: So far it was impossible to watch changes in at-spi bug reports without following all the specific persons (Li Yuan, Bill Haneman, Jeff Wai, ...) and also their activity outside of at-spi reports.

IMPORTANT: Anyone interested in following all bug activity (including all maintainers) must watch the "at-spi-maint@gnome.bugs" dummy user by adding it to the 'Users to watch' list under Preferences->Email preferences. This is also the default procedure nowadays in GNOME when setting up new products.]
Comment 19 André Klapper 2013-08-14 10:07:53 UTC
[Mass-resetting default assignee, see bug 705890. Please reclaim this bug report by setting the assignee to yourself if you still plan to work on this. Thanks!]
Comment 20 Joanmarie Diggs (IRC: joanie) 2013-11-29 14:09:22 UTC
*** Bug 719554 has been marked as a duplicate of this bug. ***
Comment 21 Mike Gorse 2018-08-28 03:20:50 UTC
Trying to clean up bugzilla in preparation to gitlab.
This doesn't look like an AT-SPI issue per se, and it isn't clear if it is still relevant, so closing.
If something needs fixing in AT-SPI itself, then please reopen.