Results 1 to 6 of 6

Thread: lcdproc - problem running as ordinary user.

  1. #1
    Join Date
    Jun 2008
    Location
    Queensland, Australia
    Posts
    125

    Default lcdproc - problem running as ordinary user.

    I'm trying to get lcdproc running on my mythtv box.

    I have the LCDd daemon loading and running correctly as a start-up service.

    The lcdproc client also works, but only if it is run as root. I believe that it should be able to run as an ordinary user.

    Suspecting some permissions issue, I chmod'd the /dev/lcd0 device to 666. This did not fix the problem.

    Some info: openSUSE 11.3 (i32) with distribution kernel. lcdproc 0.5.4 compiled from source. Using the imonlcd device.

    I have also posted on the lcdproc mailing list, but am suspicious that some openSUSE-specific permission issue may be the culprit.

    If any lcdproc users have had greater success, I'd like to hear from you.

    Any assistance appreciated

    Paul

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,683
    Blog Entries
    4

    Default Re: lcdproc - problem running as ordinary user.

    How is the LCD connected to the computer? If through a parallel port and the program does IN and OUT instructions after doing ioperm(), then root permission is needed by the program.

    Another possibility is apparmor.

  3. #3
    Join Date
    Jun 2008
    Location
    Queensland, Australia
    Posts
    125

    Default Re: lcdproc - problem running as ordinary user.

    Hi Ken,

    The LCD connects by USB. I have disabled apparmor. I made the device /dev/lcd0 everyone read and writable. Maybe I need to do something at the USB device level. I'd have thought that with the server / client framework which lcdproc employs, a userspace client would be able to operate without root privilege. Paul

  4. #4
    Join Date
    Feb 2010
    Location
    Germany
    Posts
    4,654

    Default Re: lcdproc - problem running as ordinary user.

    prhunt wrote:
    > The LCD connects by USB.

    I see you already changed the permissions on the /dev/... so this is a bit a
    blind shot now, but not much work to test. For serial communication over an
    usb device one usualy has to be member of dialout.
    Can you simply try to add yourself to the dialout group, logout and login
    again to make it effective and check it?

    --
    PC: oS 11.3 64 bit | Intel Core2 Quad Q8300@2.50GHz | KDE 4.6.2 | GeForce
    9600 GT | 4GB Ram
    Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.6.0 | nVidia
    ION | 3GB Ram

  5. #5
    Join Date
    Jun 2008
    Location
    Queensland, Australia
    Posts
    125

    Default Re: lcdproc - problem running as ordinary user.

    Quote Originally Posted by martin_helm View Post
    prhunt wrote:[color=blue]
    For serial communication over an
    usb device one usualy has to be member of dialout.
    Can you simply try to add yourself to the dialout group, logout and login
    again to make it effective and check it?
    Thanks Martin. This device does not seem to be a rs232-over-usb type device.

    What I am going to try is creating a udev rule to set permissions for the device, and then try running both the lcdproc server daemon and client as my ordinary user.

    Otherwise, it looks like I will need to work with sudo.

    regards, Paul

  6. #6
    Join Date
    Jun 2008
    Location
    Queensland, Australia
    Posts
    125

    Default Re: lcdproc - problem running as ordinary user.

    A little development.

    The lcd client, lcdproc, will run for a non-root user if it is launched as a foreground task, not as a daemon.

    lcdproc, by default, will daemonize when run. I found, when I was able to invoke some stderr warnings from the LDCd server, that lcdproc was promptly disconnecting from the server. If I run it as
    $ lcdproc -f
    (which keeps the program running as a foreground task) then it operates as expected.

    I have experimented with:
    $ lcdproc &
    and
    $ nohup lcdproc
    Anyway, I think this takes me closer to a working solution with MythTV (mythlcdserver).

    Paul

Posting Permissions

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