Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Linux ******* Linux

  1. #1
    Rob
    Rob is offline
    Maximum Bitrate Rob's Avatar
    Join Date
    Aug 2001
    Location
    Missing In Action
    Posts
    779

    Unhappy Linux ******* Linux

    I'm trying to out put data on the printer port in Linux and I keep getting "you do not have permission to access this port, you must be in root"

    Now I've logged on as root and it works fine. I tried to set the permission via chomd 666 /dev/lp0 . This worked fine for the serial ports.

    Any ideas what I'm doing wrong?

    Rob
    And you say people actually pay money for M$ Windows?
    www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
    Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

  2. #2
    Newbie laxrox's Avatar
    Join Date
    Oct 2001
    Location
    Eugene, Oregon, USA
    Posts
    46

    Post

    It sounds like the parport code is checking the UID of the process and not the access mask inode for access rights. So, no matter what the access mask is for the device inode entry, unless you are UID 0, you are not getting access to that device. This is just a guess based on how you describe the error.

  3. #3
    Rob
    Rob is offline
    Maximum Bitrate Rob's Avatar
    Join Date
    Aug 2001
    Location
    Missing In Action
    Posts
    779

    Post

    Found out what I'm doing wrong, and I thought I'd let you all know, so you don't make the same mistake.

    I'm using the OUTB function, which bypasses the Kernel. And you can bypass the Kernel unless your in root.

    So setting the permissions makes no difference. Simple

    Rob
    And you say people actually pay money for M$ Windows?
    www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
    Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

  4. #4
    Rob
    Rob is offline
    Maximum Bitrate Rob's Avatar
    Join Date
    Aug 2001
    Location
    Missing In Action
    Posts
    779

    Post

    Which leads to my next question, how do you write to the parallel port without bypassing the Kernel

    Rob
    And you say people actually pay money for M$ Windows?
    www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
    Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

  5. #5
    Maximum Bitrate
    Join Date
    Mar 2001
    Location
    Cincinnati, Ohio
    Posts
    729

    Post

    You don't,
    you have to pass stuff to the kernel first.
    Atleast thats how I understand it.
    Clarion 200watt head unit w/ Aux in.
    Kicker 800watt 4 channel amp
    In a 96 Grand Prix SE.

  6. #6
    Rob
    Rob is offline
    Maximum Bitrate Rob's Avatar
    Join Date
    Aug 2001
    Location
    Missing In Action
    Posts
    779

    Post

    It can be done thru the Kernel, using the lp port drivers, but no one ever uses the drivers as they can't work out how!

    I've mastered the art of writting to the serial ports thru the kernel, by using the drivers for /dev/ttys0 etc.

    But I can get /dev/lp0 to do anything.

    Rob
    And you say people actually pay money for M$ Windows?
    www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
    Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

  7. #7
    Constant Bitrate samael's Avatar
    Join Date
    May 2001
    Location
    new zealand
    Posts
    130

    Post

    dont you just open /dev/lptx , where x is which par port your working on , as a *FILE , then just read/write to that?
    stupid quote # 1 : "i dont do drugs , i only ever smoke pot when i'm coming down" , Me , 6 september , 2001.

  8. #8
    Maximum Bitrate
    Join Date
    Mar 2001
    Location
    Cincinnati, Ohio
    Posts
    729

    Post

    THat sounds just insane enough to work!!!
    No, I'm kidding. But Linux does do some wierd crap, like when I read from my tv card, xawtv reads the file /dev/video1
    Clarion 200watt head unit w/ Aux in.
    Kicker 800watt 4 channel amp
    In a 96 Grand Prix SE.

  9. #9
    Maximum Bitrate
    Join Date
    Mar 2001
    Location
    Cincinnati, Ohio
    Posts
    729

    Post

    I know who would know
    on irc, use us.slashet.org
    and goto #lcdproc
    They created a Linux LPT LCD program.
    They would know how to write to a Parrallel port.
    Clarion 200watt head unit w/ Aux in.
    Kicker 800watt 4 channel amp
    In a 96 Grand Prix SE.

  10. #10
    Rob
    Rob is offline
    Maximum Bitrate Rob's Avatar
    Join Date
    Aug 2001
    Location
    Missing In Action
    Posts
    779

    Post

    Two points, when I said
    And you can bypass the Kernel unless your in root.
    I ment to say

    And you [/B]can't[B] bypass the Kernel unless your in root.

    That might make some more sense.

    Second,

    Samael

    That's what I'm trying to to do, you wouldn't know where I could find an example piece of code, to out put say 255.

    Cheers

    Rob
    And you say people actually pay money for M$ Windows?
    www.mp3mini.co.uk (Does what it says on the URL) www.openclassic.co.uk (The new car, with zero rust!) www.rob-web.co.uk (My other site)
    Total re-design underway: on the whole progress is very slow as the car is taking up too much time :)

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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