Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I need to edit /etc/lirc/lircd.conf

Problem is it is owned by root, and I can only open it as read only.

How can I open it for editing ? Please note I'm new to Linux.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

If you are in the sudoers file, you can edit the file by typing sudo vim /etc/lirc/lircd.conf (sudo) into your console. Another way is to just become root in your current shell: su root (su) once you are root, then you can edit the file normally.

share|improve this answer
    
forgot to mention I'm using ubuntu, gui :) –  JL. Oct 20 '10 at 14:59
1  
If you want to edit it via a gui, open up a shell and type gksudo gedit /etc/lirc/lircd.conf Most linux distributions don't allow you to log in as root via the GUI by default, so you have to use a shell to promote yourself to root. –  Madison S Oct 20 '10 at 15:03
2  
I don't think it's very wise to suggest a "complete linux noob" to use vim to edit a file? –  Mussnoon Oct 20 '10 at 15:08
    
Another point, ubuntu 10.10 seems to create a root account for you, but never mentions the password for it. So when prompted for password from a SU root, I have no idea what the password is. –  JL. Oct 20 '10 at 15:10
    
Default root password: nixcraft.com/ubuntu-debian/… You can also change it by typing sudo passwd root –  Madison S Oct 20 '10 at 15:14

Hold down Alt and press F2, it'll invoke the "run" dialog. Type in "gksu gedit /etc/lirc/lircd.conf" (without the quotes) [mind the forward slash / as opposed to the backslash \ that you typed in your question]. It'll ask for root password. Enter password and hit enter. It'll open the file. Make changes and save file (click button or do Ctrl+S).

share|improve this answer

Ubuntu: Easy (And Quick) Ways To Open Any Files As Root

share|improve this answer
    
Thanks but this is still a bit over my head, being a day 1 noob. Anyways, I don't think Linux is really ready for noobs yet. its a pitty. –  JL. Oct 20 '10 at 15:11
2  
Anyone who's a noob to computers finds windows or mac os difficult too I'm sure. If you haven't used linux before, then you just discover you have to do things in it entirely differently than your previous os (esp windows). It's just different. Not too difficult. Try to unlearn your previous ways and start afresh. And it'll be just fine. And just so I'm not mistaken for an expert of any sort, I'm very much a noob. –  Mussnoon Oct 20 '10 at 15:20

Your Answer

 
discard

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.