Broken applications
FedoraForum.org - Fedora Support Forums and Community
Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17
  1. #1
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    234

    Broken applications

    I do both hardware and software. Two applications I have relied on are lshw-gui and usbview.

    The trouble started back at F22 when I had to start running lshw-gui with SUDO at the command line otherwise it wouldn't start up.

    I had to skip F23 so I can't say anything about that. At F24 lshw-gui could once again could be started from the icon, but usbview wouldn't start from the icon or from SUDO. In F25 neither lshw-gui nor usbview will start up at all. When I try either using SUDO now I get a message about X11. A gift from Wayland no doubt.

    Yes, I know I can get most of what I need to know from the command line, but that's painful compared to using the tools I used to use.

    I know I could switch to X11 at login, but I like moving forward and hate going back on a temporary basis. My guess is the the developers of lshw-gui and usbview are waiting to update their applications until Wayland is complete and stable.

    I know, I chose Fedora instead of one of the others because to wanted to have a current system. I know that exacts some pain sometimes; I will survive.

    I just want anyone who can help to know that these probably little known, little used, applications have some folks that depend on them and are eagerly waiting for their return to operation.

  2. #2
    Join Date
    Oct 2011
    Posts
    1,841

    Re: Broken applications

    Test Wayland, report bugs, use Xorg

    I think GUI applications that require elevated privileges needs to go through polkit as a security feature.
    Last edited by srakitnican; 14th March 2017 at 03:12 PM.

  3. #3
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    234

    Re: Broken applications

    I just checked and both usbview and lshw-gui have policies in /usr/share/polkit-1/actions. lshw has:

    <allow_active>auth_admin_keep</allow_active>

    and usbview has:

    <allow_active>auth_admin</allow_active>

    So I'm guessing they should be able to start from the icon since the account I use for this stuff has admin.

    I'm guessing that running Wayland is the active issue for F25. I just sent an e'mail to both the usbview and lshw-gui folks. I'm going to stick with Wayland. I'm just hoping these two applications don't go away permanently.

  4. #4
    Join Date
    Oct 2011
    Posts
    1,841

    Re: Broken applications

    I think it needs org.freedesktop.policykit.exec.allow_gui set to true. At least this is what gparted polkit configuration uses.

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE policyconfig PUBLIC
     "-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
     "http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
    <policyconfig>
    
      <action id="org.fedoraproject.pkexec.run-gparted">
        <description>Run the GParted program</description>
        <message>Authentication is required to run the GParted Partition Editor</message>
        <icon_name>gparted</icon_name>
        <defaults>
          <allow_any>auth_admin</allow_any>
          <allow_inactive>auth_admin</allow_inactive>
          <allow_active>auth_admin</allow_active>
        </defaults>
        <annotate key="org.freedesktop.policykit.exec.path">/usr/sbin/gparted</annotate>
        <annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
      </action>
    
    </policyconfig>
    The environment that PROGRAM will run it, will be set to a minimal known and safe environment in order to avoid injecting code through LD_LIBRARY_PATH or similar mechanisms. In addition the PKEXEC_UID environment variable is set to the user id of the process invoking pkexec. As a result, pkexec will not allow you to run X11 applications as another user since the $DISPLAY and $XAUTHORITY environment variables are not set. These two variables will be retained if the org.freedesktop.policykit.exec.allow_gui annotation on an action is set to a nonempty value; this is discouraged, though, and should only be used for legacy programs.
    Last edited by srakitnican; 14th March 2017 at 05:54 PM.

  5. #5
    Join Date
    Aug 2005
    Posts
    716

    Re: Broken applications

    I think this is just another example of this common bug
    https://fedoraproject.org/wiki/Commo...land-root-apps

    Also, see this discusion
    https://bugzilla.redhat.com/show_bug.cgi?id=1274451

  6. #6
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    234

    Re: Broken applications

    I just check in the usr/share/polkit-1/actions/org.fedoraproject.usbview.policy and found:

    <annotate key="org.freedesktop.policykit.exec.allow_gui">tru e</annotate>

    The extra space in the "tru e" seems to be an anomaly in the post. It's not in the policy file.

    So this is already set to a non-empty value. However USB View will not start.

  7. #7
    Join Date
    Oct 2011
    Posts
    1,841

    Re: Broken applications

    Yeah its probably what kldixon posted.

    I am curious, does the workaround from the wiki work in your case?
    xhost +si:localuser:root

  8. #8
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    234

    Re: Broken applications

    I just tried the workaround and it said that root had been added to the ACL. However when I tried starting USB View from the icon it would not start. When I tried it from the command line I got:

    [root@localhost table1pc2]# usbview
    No protocol specified
    Unable to init server: Could not connect: Connection refused

    (usbview.bin:2272): Gtk-WARNING **: cannot open display: :0
    [root@localhost table1pc2]#

  9. #9
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    234

    Re: Broken applications

    I got a reply from Greg. I think he's one of the guys that wrote usbview. He said that he's running usbview with Wayland and it works fine. He provided the following clue:

    All usbview needs is access to the specific debugfs file in /sys/kernel/debug/usb/devices. If that file requires root to read, well, then usbview needs that permission as well. I suggest you just change the permission of the file to allow anyone to read it and usbview will work just fine and not require root permissions. I run usbview under wayland just fine with that change.
    I started checking the access permissions starting at "sys" when I got to "kernel" I found that "debug" was set to "None" for "Group" and "Others". I have no idea why that would be. All the other folders in the path are set to "Access" for Group" and "Others". I tried using "chmod" to correct the situation, but I couldn't figure out how to set a folder for access; so I did:

    chmod ugo+rwx debug
    That set the folder for "Create & Delete" which is probably not the same thing as "Access".

    Also, at the end of the path, "devices" is not a folder; it's a file of 0 bytes.

    Any ideas?

  10. #10
    Join Date
    Dec 2012
    Location
    santa barbara, CA
    Posts
    918

    Re: Broken applications

    Quote Originally Posted by TablePC
    I just tried the workaround and it said that root had been added to the ACL. However when I tried starting USB View from the icon it would not start. When I tried it from the command line I got:
    In your own account shell, before you do su - into root, type this: xhost +
    once that's done, then su - , and execute your usbview.

  11. #11
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    234

    Re: Broken applications

    After doing xhost +, I don't need to be root to get usbview to run. it runs fine from my normal account. Then I discovered that xhost + persists, but figured out I can turn it off with xhost -. Thanks for the workaround. It's a little extreme, but it will let me work until there's a more elegant solution.

    Can help with the results I got on post #9?

    Thanks in advance for your continuing help on this.
    Last edited by TablePC; 15th March 2017 at 05:49 PM.

  12. #12
    Join Date
    Aug 2005
    Posts
    716

    Re: Broken applications

    /sys is not a real file system on a disk, it is a virtual filesystem generated directly by the kernel on demand, as is /proc.
    That is why the file appears to have zero size to ls.
    Just do:

    # cat /sys/kernel/debug/usb/devices

    and you will see what usbview is using.
    I had always presumed that you could not change the permissions in virtual files systems.
    Clearly I was wrong. However, I do not think any change will persist through a reboot.

    The 'access' Greg is refering to is read and execute access:

    # chmod 755 /sys/kernel/debug

    Then you should be able to read devices as a normal user:

    $ cat /sys/kernel/debug/usb/devices

    It would probably be wise to return the permissions to the default when you are done:

    # chmod 700 /sys/kernel/debug

  13. #13
    Join Date
    Dec 2012
    Location
    santa barbara, CA
    Posts
    918

    Re: Broken applications

    Quote Originally Posted by TablePC
    After doing xhost +, I don't need to be root to get usbview to run. it runs fine from my normal account. Then I discovered that xhost + persists, but figured out I can turn it off with xhost -. Thanks for the workaround. It's a little extreme, but it will let me work until there's a more elegant solution.

    u need to learn to use .Xauthority , that's the elegant (but oddly non-intuitive) way

  14. #14
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    234

    Re: Broken applications

    Thanks for telling me about /sys and /proc. You're right the permissions I set went back to their normal settings after I did a restart.

    Thanks for letting me know about Xauthority I found and printed the man pages for xauth. Now I'll go looking for a tutorial.

    Will xauthority persist as part of Wayland or will it be replaced once Wayland is fully implemented?

  15. #15
    Join Date
    Jan 2013
    Location
    New York state in USA
    Posts
    234

    Re: Broken applications

    As I started looking into how to use xauth. The first thing I found that there are no .xauthority files anywhere on this PC.

    What I did find in my home directory was .ICEauthority. This seems to be the same sort of thing containing mit-magic_cookies etc. So how does this work with xauth? If I make a .xauthority file in my home directory will that create conflicts?

    Can I implement the changes I need to make in the .ICEauthority file? If so, with what tool? It doesn't seem likely that xauth would work.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. F20 Show Applications is broken on my system
    By lsatenstein in forum Using Fedora
    Replies: 2
    Last Post: 21st December 2013, 05:08 PM
  2. (Corrupted?) Applications resemble VB6 applications
    By HomoFrustratus in forum Using Fedora
    Replies: 6
    Last Post: 19th November 2011, 06:23 PM
  3. Replies: 4
    Last Post: 7th May 2009, 07:19 PM
  4. List Of Great Applications...Over 100 Applications
    By David Vazquez in forum Using Fedora
    Replies: 1
    Last Post: 24th December 2008, 09:10 PM
  5. Replies: 0
    Last Post: 28th November 2006, 06:05 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •