can't edit /etc/default/ rcS.

Asked by Richard M Brown

I am trying to address a problem with the clock on a dual boot system, windows vista and ubuntu 14.04
the solution I am trying requires edit /etc/default/ rcS. that is my problem
I used sudo -i to su then tried
Warning: unknown mime-type for "/etc/default/" -- using "application/octet-stream"
Warning: unknown mime-type for "rcS" -- using "application/octet-stream"
Error: no write permission for file "/etc/default/"
Error: no "edit" mailcap rules found for type "application/octet-stream"

in the meantime I must reset the system clock for both oss every time I boot.

I just upgraded to ubuntu 14.04

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

There seems to be an extra space character.

The file name is "/etc/default/rcS" not "/etc/default/ rcS"

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

sudo -i gets you to a root prompt not 'su'. su is the command to switch user. It is not a user itself.

Is the need to edit the file to fix the time issue?

Revision history for this message
Richard M Brown (richardmbrown) said :
#3

 (Is the need to edit the file to fix the time issue)
yes. need to set time to local instead of utc

> To: <email address hidden>
> From: <email address hidden>
> Subject: Re: [Question #249200]: can't edit /etc/default/ rcS.
> Date: Sat, 24 May 2014 09:41:41 +0000
>
> Your question #249200 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/249200
>
> actionparsnip requested more information:
> sudo -i gets you to a root prompt not 'su'. su is the command to switch
> user. It is not a user itself.
>
> Is the need to edit the file to fix the time issue?
>
> --
> To answer this request for more information, you can either reply to
> this email or enter your reply at the following page:
> https://answers.launchpad.net/ubuntu/+question/249200
>
> You received this question notification because you asked the question.

Revision history for this message
Richard M Brown (richardmbrown) said :
#4

re retried using the following
root@StorekeeperL:/etc/default# edit etc/default/rcS
Warning: unknown mime-type for "etc/default/rcS" -- using "application/octet-stream"
Error: no write permission for file "etc/default/rcS"

> To: <email address hidden>
> From: <email address hidden>
> Subject: Re: [Question #249200]: can't edit /etc/default/ rcS.
> Date: Sat, 24 May 2014 08:11:52 +0000
>
> Your question #249200 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/249200
>
> Status: Open => Answered
>
> Manfred Hampl proposed the following answer:
> There seems to be an extra space character.
>
> The file name is "/etc/default/rcS" not "/etc/default/ rcS"
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/ubuntu/+question/249200/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/ubuntu/+question/249200
>
> You received this question notification because you asked the question.

Revision history for this message
Best Manfred Hampl (m-hampl) said :
#5

Try again:
Open a terminal and issue the command

gksudo gedit /etc/default/rcS

If that fails again, please provide the output of the following terminal commands

ls -l /etc/default/rcS
file /etc/default/rcS
tail /etc/default/rcS

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#6

Or simply add the commands to run in /etc/rc.local

You need to add them above the 'exit 0' line and they will run as root.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#7

If the command takes a long time to run or runs indefinitely then background the commands you add with an ampersand. Otherwise the boot will hang

Revision history for this message
Richard M Brown (richardmbrown) said :
#8

Thanks Manfred Hampl, that solved my question.