Raspberry Pi: “Can’t open file to write”

I had just received my first Raspberry Pi and was excited to get it booted up but I ran in to a couple of problems setting up the keyboard.

 Below is the information I used to fix me Raspberry Pi keyboard issues. I hope you find this information helpful in troubleshooting your own Raspberry setup and configuration. 🙂

Raspberry Pi Keyboard set to UK instead of US

The very first problem I encountered with setting up my Raspberry Pi was that the the default keyboard setting was set to UK but I needed it to be US.

I’d found out that the solution was editing the Raspberry Pi keyboard config file that is located in the etc\default\keyboard file.

Can’t Edit the Keyboard Config File

The second problem I ran in to was that I couldn’t edit the keyboard file to change the settings.

Starting the GUI from the Command Line

I’d found the solution to this issue was starting the GUI and using that to set the keyboard layout. To start the GUI, enter this command: sudo startx

> sudo startx

Setting the Raspberry Pi Keyboard Layout via the GUI

You’ll need to use the GUI to set the keyboard layout.

Raspberry Pi Keyboard Configuration

Hope this helps!

~Cyber Abyss

Author: Rick Cable / AKA Cyber Abyss

A 16 year US Navy Veteran with 25+ years experience in various IT Roles in the US Navy, Startups and Healthcare. Founder of FinditClassifieds.com in 1997 to present and co-founder of Sports Card Collector Software startup, LK2 Software 1999-2002. For last 7 years working as a full-stack developer supporting multiple agile teams and products in a large healthcare organization. Part-time Cyber Researcher, Aspiring Hacker, Lock Picker and OSINT enthusiast.