How do you rename files in /etc/rc5.d ?

Asked by jim5930

I have problems with code "-100" errors for my USB hardware ports as Ubuntu is loading. Linuxguestions Senior member "AUS9" asked me to rename the bluetooth file in the above directory, but the rename option is grayed in the pull down menu and I don't know what is meant by "use root powers". The readme fle in this directory says the same thing that "AUS9" is asking me to do, but I don't know how to do it. I am new to Ubuntu and Linux as I started in Dec. 2008 and have little experience with the Linux Shell commands.

Here is what "AUS9" ask me to do:
when you boot into ubuntu...use root powers to edit the run level for /etc/rc5.d/....find *bluetooth and change the number from S to K
otherwise if nothing found...go into /etc/init.d and find the daemon for bluetooth and make it non-executable

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu nautilus Edit question
Assignee:
No assignee Edit question
Solved by:
jim5930
Solved:
Last query:
Last reply:
Revision history for this message
kernowyon (kernowyon) said :
#1

To edit a file which needs "root" type permissions in Ubuntu, you would use the sudo command.

So for example, to edit a file called foo in /etc/rc5.d, you would use a comand such as -

sudo nano /etc/rc5.d/foo

When you hit enter, you will be asked for your password - note that as you type it, nothing will appear on screen (for security) - just hit enter once you have typed the password and you will be presented with the file for editing. I used nano as my editing program there, but you could use gedit or whichever editor you are happy with.

To make a file non-executable (lets use the foo file again) via the command line, use

sudo chmod -x /etc/rc5.d/foo

Mark

Revision history for this message
Octavio (torn-acl) said :
#2

1. open a terminal (applications->accessories->terminal)

2. once inside the terminal change to the /etc/rc5.d directory by typing: cd /etc/rc5.d

3. then get the name of your file by typing: ls *bluetooth

4. your bluetooth file name should be displayed (I'll use the name 'S25bluetooth' as an example to continue)

6. to change the name to 'K' type: sudo mv S25bluetooth K25bluetooth

This will ask you for your password, type it in and it should rename your file. Again, I'm using the name 'S25bluetooth' as an example your file name will probably be different.

Revision history for this message
kernowyon (kernowyon) said :
#3

As this is presumably a GUI runlevel thing, I would look at /etc/rc2.d - Ubuntu uses runlevel 2 for the GUI.

Revision history for this message
jim5930 (jim5930) said :
#4

kernowyon

Using nano or gedit shows no text or any thing else. I saved the file and saved it again with the same name except for the "k" for "s" substitution. These two new files are 1 byte files without any icon for a file type. Should I delete the real file? This file does exist and it is 4524 bytes of something.

Using the chmod, I got this message:
"chmod: cannot access `/etcrc5.d/s25bluetooth': No such file or directory"

Octavio

Using the move (as rename, my guess), I got something similar to the chmod:
"mv: cannot stat `s25bluetooth': No such file or directory"

Revision history for this message
jim5930 (jim5930) said :
#5

After completion of my 5/12 report that indicated I couldn't do those things that were requested of me, this problem was corrected upon restarting the computer, so maybe something was done.

The hunting for a USB blue tooth during Ubuntu startup is gone and the long wait for Grub menu is also gone without any corrections to Grub software by me.

Thank you very much for your help.