1

I am a beginner at Ubuntu. I am wanting to install my-udev-notify, and I was able to follow these instructions in the README.md file:

Installation
------------

- unpack archive somewhere in your system
- copy file ./stuff/my-udev-notify.rules to /etc/udev/rules.d

However, when I came across this:

- modify paths in it: change /path/to/my-udev-notify/my-udev-notify.sh to
real path to the my-udev-notify.sh script (where you unpacked it).

I was confused. I tried looking up how to modify paths, but I have seen some different answers, and I am not sure how to correctly perform this task in this situation. Please let me know what I should do and fully explain what the terminal commands that are necessary to perform this task do step-by-step.

  • Give me the name of the archive and the location where it is: the exact path to the folder. Something like Home/Downloads or wherever it is. Then I'll post you a step by step answer for your issue... – Neni Aug 8 '16 at 17:33
  • @Neni The unpacked archive directory is /home/imnebuddy/Software/Other/Compressed/my-udev-notify/dfrank-my-udev-notify-0d78b20a38e8/my-udev-notify.sh, and the location path needed to be changed is /path/to/my-udev-notify/my-udev-notify.sh. I followed the installation instructions exactly as said above. – NAE Aug 11 '16 at 22:05
1

Copy my-udev-notify.rules to /etc/udev/rules.d and open it with gedit using gksudo, you may install gksu first:

sudo apt-get install gksu
sudo cp -iv ./stuff/my-udev-notify.rules /etc/udev/rules.d
gksudo gedit /etc/udev/rules.d/my-udev-notify.rules

Once opened, just replace in both lines /path/to/my-udev-notify/my-udev-notify.sh with your path /home/imnebuddy/Software/Other/Compressed/my-udev-notify/dfrank-my-udev-notify-0‌​d78b20a38e8/my-udev-notify.sh. You can do it with Copy-Paste.

Save and Exit.

Now copy the cofiguration file as described in README.md and edit it. Replace /path/to/some/sound_file with the paths to the sound files in the sound directory which is located in the same directory as the stuff directory. At the end, reboot your system:

sudo cp -iv ./stuff/config_example/my-udev-notify.conf /etc/my-udev-notify.conf
gksudo gedit /etc/my-udev-notify.conf
sudo reboot
0

It sounds like perhaps it's saying to modify the path in a configuration file that you installed, since it says "modify paths in it"; presumably, "it" is referring to the previously mentioned file, probably /etc/udev/rules.d since it was the last file mentioned. You need to edit this file using an editor such as gedit. If it is in the/etc/udev directory, which is owned by root, then you will need to run gedit using the gksudo command:

  gksudo gedit /etc/udev/rules.d 

This is a common way for programs to read their own configuration settings. The path is only for the system to find executable files.

However, if you need to modify the path, here's a general guideline on how to do it...

Where to modify the path

For shells affecting only a specific user (such as yourself), ~/.profile seems to be the correct place to modify it. For all users, I believe it needs to be set in /etc/profile.

How to modify it

PATH=$PATH:/path/to/be/added
export PATH
  • So how would I type the commands to indicate the unpacked location and the "real path"? I see /path/to/be/added, but that is only one location. Don't I need to type both directories in some way for this modification to work? – NAE Aug 11 '16 at 21:57
  • @NAE: What 2 directories are you referring to? I only see it wanting one, the path to the file "my-udev-notify.sh"; it doesn't know where that was put by you. "/path/to/be/added" is only a made up example; you don't put that anywhere, you put "/home/imnebuddy/Software/....". By the way, if I were you, I'd choose an easier path. :-) – Marty Fried Aug 12 '16 at 1:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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