LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Newbee Emacs Question (https://www.linuxquestions.org/questions/linux-newbie-8/newbee-emacs-question-388027/)

rrrssssss 11-30-2005 04:05 PM

Newbee Emacs Question
 
Hello forum,

Does anybody know how to edit a file using emacs when emacs says the buffer is read only? The file to be edited seems to be +rwx and seems to be a sym-link.

I am an extreme newbee with emacs and still learning the ropes with Linux.

Thanks,
Roy S. Smith

Mad Scientist 11-30-2005 05:35 PM

Hi Roy,

What file is it that you are trying to edit? Could you perform a "ls -hl filename" and post the results? I'm not sure, but Emacs might give you trouble editing via symlink, as opposed to editing the original file itself. The symlink will likely have permissions of "rwxrwxrwx" whereas the original file could have different permissions. The "-l" behind the "ls" command will tell you where that symlink is pointing.

big_mac126 11-30-2005 11:43 PM

instead of using emacs (if you find it too different), check out gedit, kedit, or nedit (personal preference). You will likely have to install the latter depending on your system configuration.

rrrssssss 12-01-2005 12:31 AM

Thanks for the reply Mad Scientist,

Below is the terminal window's readout using the ls -hl command. I am trying to disable fstab-sync from HAL (Hardware Abstraction Layer) by replacing the word fstab-sync with the word false.

The instructions for disabling HAL are as follows:

DISABLING FSTAB-SYNC
Automatic updates of the /etc/fstab file by the fstab-sync program from
the HAL daemon can be disabled by changing the 50-fstab-sync.hal sym-
link in /etc/hal/device.d directory to point to /bin/false





[root@localhost hal]# dir
device.d hald.conf
[root@localhost hal]# ls -ls device.d
total 0
0 lrwxrwxrwx 1 root root 32 Nov 12 09:42 40-hal-hotplug-map.hal -> ../../../usr/lib/hal-hotplug-map*
0 lrwxrwxrwx 1 root root 28 Nov 12 09:42 50-fstab-sync.hal -> ../../../usr/sbin/fstab-sync*
[root@localhost hal]#

Thanks much,
Roy S. Smith

enemorales 12-01-2005 06:53 AM

[quote]
DISABLING FSTAB-SYNC
Automatic updates of the /etc/fstab file by the fstab-sync program from
the HAL daemon can be disabled by changing the 50-fstab-sync.hal sym-
link in /etc/hal/device.d directory to point to /bin/false
{/quote]

Hi,

You are not supposed to edit the file, but to make the symlink to point to other place. For that, you have to remove the link and then create a new one. This is done with the next two commands (in the ....device.d folder)

Code:

rm 50-fstab-sync.hal
ln -s /bin/false 50-fstab-sync.hal

HTH!

rrrssssss 12-01-2005 08:09 AM

Followup
 
Thank you enemorales,

I think I did the same thing by renaming the fstab-sync file in /usr/bin/sbin (before I read your response). So far, I haven't had any problems doing it this way plus, fstab-sync is disabled just the same.

I needed to disable fstab-sync so it would allow me to make changes in the fstab file without it automatically reverting it back to its original state (autoregenerate) upon reboot.

Roy S. Smith


All times are GMT -5. The time now is 04:43 AM.