We are moving! New user registrations to this forum is now closed. Posting here will be disabled eventually. Please go to the new community for your Snakeoil OS support and other discussions. (June 03)

New community website: https://community.snakeoil-os.net (June 03)

Join us in the new community by Creating a new account. (June 04)


Anybody know anything about /etc/udev triggers for autoripping?
#1
SO I can't seem to get my udev script to work in order to start up abcde for auto ripping.  

my udev rule is in a file called: 

/etc/51-autoripcd.rules

and it contains the following line

    SUBSYSTEM=="block", KERNEL=="sr0", ACTION--"change",  RUN+="/usr/bin/cdautoinsert &"

which should run the following script /usr/bin/cdautoinsert if a CD is inserted:

   #!/bin/bash

   PATH=/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin  

   /bin/abcde -NVP | tee /var/log/abcde-auto.log  

   exit

I can only get this script to run if I run it directly with sudo.  I can't seem to get it to start on CD insert or without sudo from the command line. Part of that I realize is a permissions thing,  but I can't seem to get to any of it on inserting a CD.

Anyone have any experience here?

tnx
73
Tim
Reply

#2
(11-Jul-2021, 01:29 AM)Coacharnold Wrote: SO I can't seem to get my udev script to work in order to start up abcde for auto ripping.  

my udev rule is in a file called: 

/etc/51-autoripcd.rules

and it contains the following line

    SUBSYSTEM=="block", KERNEL=="sr0", ACTION--"change",  RUN+="/usr/bin/cdautoinsert &"

which should run the following script /usr/bin/cdautoinsert if a CD is inserted:

   #!/bin/bash

   PATH=/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin  

   /bin/abcde -NVP | tee /var/log/abcde-auto.log  

   exit

I can only get this script to run if I run it directly with sudo.  I can't seem to get it to start on CD insert or without sudo from the command line. Part of that I realize is a permissions thing,  but I can't seem to get to any of it on inserting a CD.

Anyone have any experience here?

tnx
73
Tim

Hi Tim, I seem to recall that 'eject' needs to be installed for that to work. I may be wrong but that's first thought.
https://packages.ubuntu.com/search?keywords=eject
Reply

#3
Please try the following:
  1. Create a custom.service file similar to this
    Code:
    [Unit]
    Description=My custom startup script
    After=syslog.target network.target

    [Service]
    # run my_startup script as user root
    #
    User=root
    ExecStart=/bin/bash /home/xx/my_startup.sh

    [Install]
    WantedBy=multi-user.target
  2. Copy custom.service to /etc/systemd/system
  3. Reload the config: sudo systemctl daemon-reload
  4. Start the service: sudo systemctl start custom
  5. Check the service status: sudo systemctl status custom
  6. If all ok, enable the service so it runs automatically: sudo systemctl enable custom
More systemctl info here
https://www.digitalocean.com/community/t...-and-units
Reply



Bookmarks



Users browsing this thread:
1 Guest(s)

[-]
Our Sponsors

[-]
Welcome
You have to register before you can post on our site.

Username/Email:


Password:





[-]
Latest Threads
[split] Possible To Load Snakeoil OS in ...
Last Post: Snoopy8
Today 06:43 AM
» Replies: 14
» Views: 789
Snakeoil 1.4.3 (High End U3)
Last Post: hkphantomgtr
05-Jun-2025 03:58 PM
» Replies: 67
» Views: 5562
Android Firefox issues with forum
Last Post: agent_kith
03-Jun-2025 04:14 PM
» Replies: 20
» Views: 1022
Snakeoil with Ubuntu Desktop ?
Last Post: Snoopy8
02-Jun-2025 09:38 AM
» Replies: 8
» Views: 492
Add IR remote control using Flirc USB in...
Last Post: Snoopy8
31-May-2025 03:50 PM
» Replies: 5
» Views: 355
Work In Progress: 1.4.4
Last Post: hkphantomgtr
29-May-2025 11:44 PM
» Replies: 44
» Views: 2987
SQ difference - Raspberry Pi vs x86_64?
Last Post: Snoopy8
27-May-2025 02:16 PM
» Replies: 42
» Views: 3269
Snakeoil 1.4.0 (High End)
Last Post: aabman
25-May-2025 11:35 AM
» Replies: 93
» Views: 10160
new install issues
Last Post: carlodim
23-May-2025 09:56 AM
» Replies: 42
» Views: 2388
Is this project still alive?
Last Post: agent_kith
20-May-2025 03:11 PM
» Replies: 10
» Views: 616

[-]
SnakeoilOS Mission Statement

Our mission is to create a free to use computer OS that is easy to install, intuitive to operate and play music that will connect and engage with you emotionally.

SnakeoilOS gives you the freedom to spend more time on listening, enjoying and exploring music. Wasting time on computers is now a thing of the past! Everything is constantly evolving/improving. Please check back often for updates.

If you like this project, do show your support with a small token donation. All donations collected will be used to run this website, and for purchasing new equipment for the project.


Powered By MyBB, © 2002-2025. Theme © Melroy van den Berg.