clarkee
Posts: 8
Joined: Thu Nov 01, 2018 4:20 pm

Trying to save edited file

Sun Nov 04, 2018 4:35 pm

I am trying to edit the keyboard layout in the file "/etc/default/keyboard".
Neither the Text Editor nor the nano editor will allow me to save the changes.
I would appreciate some help. Thanks

drgeoff
Posts: 9743
Joined: Wed Jan 25, 2012 6:39 pm

Re: Trying to save edited file

Sun Nov 04, 2018 4:38 pm

Open the file as root user, ie superuser.

Code: Select all

sudo nano /etc/default/keyboard
Last edited by drgeoff on Sun Nov 04, 2018 4:39 pm, edited 1 time in total.

User avatar
buja
Posts: 498
Joined: Wed Dec 31, 2014 8:21 am
Location: Netherlands

Re: Trying to save edited file

Sun Nov 04, 2018 4:38 pm

The file "/etc/default/keyboard" is owned by root, so you have to open it with root rights to save any changes:

Code: Select all

sudo nano /etc/default/keyboard

clarkee
Posts: 8
Joined: Thu Nov 01, 2018 4:20 pm

Re: Trying to save edited file

Sun Nov 04, 2018 5:04 pm

Thanks.

I tried using sudo. But I can't find the command to save the file. ctl x and ctl o do not work for me.

gordon77
Posts: 4116
Joined: Sun Aug 05, 2012 3:12 pm

Re: Trying to save edited file

Sun Nov 04, 2018 5:18 pm

With nano ctl&x followed by y for yes should work.

clarkee
Posts: 8
Joined: Thu Nov 01, 2018 4:20 pm

Re: Trying to save edited file

Sun Nov 04, 2018 6:25 pm

nope - it should - but it doesn't - i know the keyboard layout works for ctl characters.
thank anyhow

pcmanbob
Posts: 6646
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Trying to save edited file

Sun Nov 04, 2018 6:34 pm

What actually happens if you ctrl o or ctrl x ?

Does it ask you if you want to save the file ?

Does it then save the file and exit or do you get an error message ?

You need to tell us exactly what happens and any error messages you get so we can understand what's happening.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

Return to “Beginners”