LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2021, 05:05 PM   #1
gabriel.ipc
LQ Newbie
 
Registered: Nov 2021
Posts: 4

Rep: Reputation: Disabled
Deleted Compose file at /usr/share/X11/locale/en_US.UTF-8/


Hey!

So, i am quite new to Linux, so I am sorry in advance for my newbie's mess.

Language is English, the keyboard layout is US International with dead keys

I installed Parrot OS (I just kind of liked the logo and name).
There was a problem though, I need to type many Latin characters and every time I typed '+c I kept getting "ć" instead of "ç".

So I started to look around the internet and got into the Compose file at /usr/share/X11/locale/en_US.UTF-8

Stupidly, I started to just change things there, eventually it was fairly messed up.

I though "well, no worries, I should just delete the file, the system is probably going to realise it is missing and create it fresh with the default key sequence"

Then:

$ sudo rm -rf Compose
$ reboot

Well.... I was wrong.

Now I cannot type accented letters at all, mostly... weirdly, for some reason far beyond me, Firefox actually keeps recognizing dead keys and accentuating letters (any reason why?)

I went digging in the internet, and tried:

$ sudo apt --reinstall install libx11-dev
$ reboot

No luck.

I also found this with the entire compose key sequences.

I thought, "Ha, well well, problem solved, huh? I just need to create a file, copy all that sequence and paste it on the file... clever me "

$ nano Compose (in the /en_US.UTF-8 folder)
ctr+shit+v
saved, exited
$ reboot

No luck there again.

I am really sorry for all this newbie messing around. I though I would just reinstall the entire distro and be done with it, but then again, I was like... aaah, I reeealy want to solve this though.

Any good souls out there know a way?

Thank you all very very much in advance!
Cheers
 
Old 11-08-2021, 06:37 PM   #2
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
On Fedora that file is provided by libX11-common. If parrot has a similar package then you were close and a reinstall of the proper libX11 package should recover the correct file for you.

Maybe try a
Code:
sudo apt --reinstall install libx11-common
or similar to recover.

In the future, before changing a system provided file you should always make a backup copy before you alter the file. If something goes wrong you then have a backup that can be restored.

Last edited by computersavvy; 11-08-2021 at 06:40 PM.
 
1 members found this post helpful.
Old 11-08-2021, 08:48 PM   #3
gabriel.ipc
LQ Newbie
 
Registered: Nov 2021
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thank you very much computersavvy!

Your answer made it clear I had to reinstall libx package.

I tried out libx11-common, but it returned: "E: Unable to locate package libx11-common". It kind of made sense, considering parrot os comes from Debian.

But with your guidance I went out looking for parrot os packages. Found all their names here.
I had already tried:
Code:
sudo apt --reinstall install libx11-dev
But tried it again nway, along with:

Code:
sudo apt --reinstall install libx11-6
sudo apt --reinstall install libx11-data
sudo apt --reinstall install libx11-doc
sudo apt --reinstall install libx11-xcb-dev
I just picked everything without perl in the name, the reason for that is truly odd (I remembered when I played Ragnarok Online I eventually started to use a bot to play it while I slept ##I know, shame on me## and the bot used a perl software for displaying the visual game... Knowing the X system has something to do with visuals, window, things we see in the screen, I kind of linked the two things and I concluded perl packages might just not do anything for my problem at hand, that is why I left them out).

After that, and just to be sure, I did:
Code:
sudo apt upgrade
Then
Code:
reboot
The Compose file was back!!!! Hip Hip Hurrayy!

I just had to remove the keyboard layout and add it back again in the system settings, ta-da! Latin accented letters are back! áéíóú!

Okay, now I still have got to figure out how to '+c = ç instead of the current "ć", but that is another topic.

I honestly don't know which package actually brought the file back. I am itching to delete it again and reinstall one-by-one to find out. But only after making a backup copy just like you recommended, of course. Learning to backup the hardway is a good lesson.

Thank you very much again for directing me on the right path!
 
Old 11-09-2021, 03:34 AM   #4
shruggy
Senior Member
 
Registered: Mar 2020
Posts: 3,670

Rep: Reputation: Disabled
For the future, to see what package a file on your system belongs to, run
Code:
dpkg -S /usr/share/X11/locale/en_US.UTF-8
 
1 members found this post helpful.
Old 11-09-2021, 12:44 PM   #5
gabriel.ipc
LQ Newbie
 
Registered: Nov 2021
Posts: 4

Original Poster
Rep: Reputation: Disabled
Thanks a lot shruggy!

I did that and found out the package that restores Compose file is libx11-data. Quite clever!

Thank you all again!

Last edited by gabriel.ipc; 11-09-2021 at 04:05 PM.
 
Old 11-09-2021, 04:10 PM   #6
gabriel.ipc
LQ Newbie
 
Registered: Nov 2021
Posts: 4

Original Poster
Rep: Reputation: Disabled
Although it was not the topic of the post, this problem only began because I was trying to remap the keyboard layout so when typing '+c I could get ç instead of ć.

If by any chance someone arrives here looking for that problem, I found the solution on the internet, in this forum, here. Basically:

Code:
$ sudo gedit ~/.XCompose
This will create an empty file in the home directory called XCompose and open it for you to edit.

In the file copy and paste:

Code:
include "%S/en_US.UTF-8/Compose"
<dead_acute> <C> : "Ç"
<dead_acute> <c> : "ç"
Save it, then:
Code:
$ reboot
After that whenever one types '+c he'll get "ç"!

I might be wrong, but I think this XCompose file makes preferential key sequences for the keyboard. I'm guessing that first line is basically telling the file to use all the sequences in the file /usr/share/X11/locale/en_US.UTF-8/Compose except when conflicted by the following key sequences bellow it.

Well well, took some time, but it is now working like magic!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory xXShadicXx11 Linux - Newbie 2 02-10-2019 09:18 AM
Forcing utility output in specific locale (LANG=en_US.UTF-8) davidlt Linux - Newbie 1 01-17-2012 05:59 AM
locale setting, problem with en_US.UTF-8 pru Linux - Software 4 04-18-2008 04:07 AM
Help needed with font installation on Debian 3.1 with locale all set to en_US.UTF-8 PhantmShado Linux - Software 1 02-20-2006 03:50 PM
locale is en_US.UTF-8, but gnome turns out to chinese envirement donkey301 Debian 1 03-02-2005 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration