Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

I have Xubuntu 14.04 and I want create persistent symbolic links for my USB printers. In other hand, I can't write to these devices:

$ ls -l /dev/usb/lp*
crw-rw---- 1 root lp 180, 0 jun 25 14:17 /dev/usb/lp0
crw-rw---- 1 root lp 180, 1 jun 25 14:17 /dev/usb/lp1
crw-rw---- 1 root lp 180, 2 jun 25 14:17 /dev/usb/lp2
  • How i can change this permission to 666?
  • How can i create the persistent symbolic links using:

    sudo gedit /lib/udev/rules.d/70-printers.rules

    This is its contents:

    # Low-level USB device add trigger
    ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="07", ATTR{bInterfaceSubClass}=="01", TAG+="udev-configure-printer", RUN+="udev-configure-printer add %p"
    # Low-level USB device remove trigger
    ACTION=="remove", SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:0701*:*", RUN+="udev-configure-printer remove %p"
    # printer1
    SUBSYSTEM=="usb", ATTRS{serial}=="3uL8tBCQUl2hMhoY12Vf", SYMLINK+="caliente"
    # printer2
    SUBSYSTEM=="usb", ATTRS{serial}=="JGHE24ikKU7plwR8x3c6", SYMLINK+="bar"
    # printer3
    SUBSYSTEM=="usb", ATTRS{serial}=="xVc0EQQd3nZzq6ziv8SS", SYMLINK+="fria"

    As the current state, The symbolic links which are created:

    ls -l /dev/bar 
    lrwxrwxrwx 1 root root 15 jun 25 14:12 /dev/bar -> bus/usb/003/002

    But when i try to print in the command line i get this:

    echo "hi" >> /dev/bar
    bash: /dev/bar: Permission denied

    I hope someone can help me!

share|improve this question
Well to change crw-rw---- 1 root lp 180, 0 jun 25 14:17 /dev/usb/lp0, i go to sudo gedit /lib/udev/rules.d/50-udev-default.rules to the line KERNEL=="lp[0-9]*", GROUP="lp", MODE="0777" and add the last part MODE="0777" and now i got ls -l /dev/usb/lp* crwxrwxrwx 1 root lp 180, 0 jun 25 20:48 /dev/usb/lp0 but i need the symbolic link permission to be persistence with the printer name. – elgastelum Jun 26 '14 at 3:00

1 Answer 1

  1. In Xubuntu 14.04 you need create a rules file for printers in /etc/udev/rules.d/

    $ sudo nano 90-printers.rules
  2. In this file add the follow code:

    ACTION=="remove", GOTO="persistent_printer_end"
    SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id"
    ENV{ID_TYPE}!="printer", GOTO="persistent_printer_end"
    ENV{ID_SERIAL}=="?*", SYMLINK+="lp/printers/$env{ID_BUS}-$env{ID_SERIAL}"

Then you can see the new and persistent symbolic links in the following paths:

$ ls -l /dev/lp/printers
lrwxrwxrwx 1 root root 13 jul 21 14:42 usb-Jolimark_USB_Printer_JGHE24ikKU7plwR8x3c6 -> ../../usb/lp2
lrwxrwxrwx 1 root root 13 jul 21 14:42 usb-Jolimark_USB_Printer_MQrvZsOINprsF6dIEor9 -> ../../usb/lp0
lrwxrwxrwx 1 root root 13 jul 21 14:42 usb-Jolimark_USB_Printer_xVc0EQQd3nZzq6ziv8SS -> ../../usb/lp1

These point to the following paths:

$ ls -l /dev/usb/lp*
crw-rw---- 1 root lp 180, 0 jul 21 14:42 /dev/usb/lp0
crw-rw---- 1 root lp 180, 1 jul 21 14:42 /dev/usb/lp1
crw-rw---- 1 root lp 180, 2 jul 21 14:42 /dev/usb/lp2
share|improve this answer
Thank you elgastelum for sharing this. I don't work much with printers. I would ask you if you still need to tune this udev rule I may help. If it works well, you can accept your own .answer. See – Sneetsher Jun 7 at 21:06

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.