Awesome wm doesn`t assume correct locale - locale

I upgraded my Ubuntu to bionic (from xenial) recently and everything seems to work just fine, except that locale in awesome doesn't seem to work. In Ubuntu`s default window manager I configured it and it worked as expected.
In awesome, however, none of the locale-related command I run seems to change my locale. In localectl command, it does show what would be the correct locale, System Locale: LANG=pt_BR.UTF-8, but in the locale command, LANG=en_US.UTF-8 and nothing seems to change that (granted, export LANG=en_US.UTF-8 does, but it doesn't help).
This is a pain, as I need a host of keys that don`t show up in en_US.
I would appreciate any help. Thanks in advance.

Related

how to modify or check my $CMAKE_PREFIX_PATH?

I'm trying to install some development platform on Ubuntu 20.04. Here is what was said on the install-manual:
check the screenshot here :D
I'm not sure what to do now. It seems that I should modify the $CMAKE_PREFIX_PATH by creating a "nrp_variable" in the .bashrc file. But I don't know the syntax, which could achieve it correctly.
CMAKE_PREFIX_PATH is environment variable and you can just run printenv CMAKE_PREFIX_PATH to see content.
Also to solve issue try running command in green box.

Language keeps returning to the default settings in Linux Xfce

I am using the Linux Xfce machine provided for us by our professor which has Turkish keyboard layout. Every time I change the language, it changes for a while and then return back to the Turkish layout again, even if I remove the Turkish layout form the system!!
Is there any way to solve this problem? Any help would be appreciated.
The problem disappeared after running the following commands:
sudo apt-get install x11-xkb-utils
setxkbmap us
echo "setxkbmap us" >> ~/.bashrc
I found the answer here

Backspace in zsh fails to work in quite the strange way

I'm on a fresh Virtualbox install of CentOS 6.4.
After installing zsh 5.0.2 from source using ./configure --prefix=/usr && make && make install and setting it as the shell with chsh -s /usr/bin/zsh, everything is good.
Then some time after, after installing python it seems, it starts acting strange.
Happens with PuTTY and iTerm2 over SSH, does not happen on the raw terminal through Virtualbox.
typing something, then erasing it: rather than removing the char and moving the cursor back, the cursor moves forward.
Typing Ctrl+V then Backspace repeatedly prints out this repeating pattern '^#?'
Running cat from zsh works fine. Prints out '^H' if I type that, backspaces like normal if I type normal backspace.
Surely someone's seen this before and knows exactly what the hell it is.
I'm not positive yet, but it seems that installing oh-my-zsh can fix this. But I really want to know what the specific issue is here.
OK , I suggest you try
export TERM=xterm
in your .zshrc configuration
the Changing into Zsh caused the bug.
sigh I knew I solved this before.
It's too damn easy to forget things.
The solution is to compile and apply the proper terminfo data with tic, as I have a custom config with my terminal clients, xterm-256color-italic, that confuses zsh.
There appear to be other ways to configure this stuff too; I basically just need it to be properly set up so italics work everywhere (including in tmux) so hopefully I can figure out how to do this more portably than I am currently.
I encounter the same problem when I manually install ZSH without root, when the backspace turns to blankspace but still functions as Backspace. Finally, I find it is because "ncurses" is not installed well.
tic: error while loading shared libraries: libncurses.so.6: cannot open shared object file: No such file or directory
? tic could not build /home/user/ceph-data/soft/ncurses-6.1/share/terminfo
After I reinstall the "ncurses", the problem of ZSH backspace is solved. Just for your information.
my $TERM is xterm-256color, by the way.

How do I pass an environment variable to a Netbeans Makefile on Ubuntu?

I'm using Netbeans on Linux (Ubuntu 9.04) to build a C project.
How do I pass in an environment variable so that's it's visible to the Makefile?
If I do a normal export MYVAR="xyz" and then run make from the command line this works fine of course.
But Netbeans doesn't seems to use the .bashrc environment, so if I click "build" in Netbeans, the make fails.
Interestingly, the problem doesn't seem to occur on MacOSX - I've added the variable to ~/.MacOSX/environment.plist, and that value is visible to Netbeans.
I found this post which suggested modifying ~/netbeans-6.8/etc/netbeans.conf. I've tried this, by adding -J-DMYVAR=xyz to the end of netbeans_default_options, ie:
netbeans_default_options="-J-client -J-Xverify:none -J-Xss2m -J-Xms32m -J-XX:PermSize=32m -J-XX:MaxPermSize=200m -J-Dapple.laf.useScreenMenuBar=true -J-Dsun.java2d.noddraw=true -J-DMYVAR=xyz"
But this didn't seem to work.
Edit:
This answer is possibly not valid for Unity-based flavours of Ubuntu.
The issue is actually nothing to do with NetBeans - it's related to the Ubuntu (ie Gnome) Launcher.
As this blog post explains, you need to add variables to the rather obscure ~/.gnomerc (No Mercy? :) file in order for them to be passed to applications started with Launcher!
So just edit ~/.gnomerc and add the variables as you would to ~/.bashrc, eg:
export MYVAR="xyz"
and logout/login.

How can I set LANG to ascii?

I'm accessing an Ubuntu machine using PuTTY, and using gcc.
The default LANG environment variable on this machine is set to en_NZ.UTF-8, which causes GCC to think PuTTY is capable of displaying UTF-8 text, which it doesn't seem to be.
Maybe it's my font, I don't know - it does this:
foo.c:1: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â at end of input
If I set it with export LANG=en_NZ, then this causes GCC to behave correctly, I get:
foo.c:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input
but this then causes everything else to go wrong. For example
man foo
man: can't set the locale; make sure $LC_* and $LANG are correct
I've trawled Google and I can't for the life of me find out what I have to put in there for it to just use ASCII. en_NZ.ASCII doesn't work, nor do any of the other things I can find.
Thanks
LANG=en_NZ is correct. However, you must make locale files for en_NZ.
For Ubuntu, edit /var/lib/locales/supported.d/local and add en_NZ ISO-8859-1 to the file. If your system is another distribution (including Debian), the location will be different. Look at /usr/sbin/locale-gen and see where it stores this info.
Afterwards, run locale-gen to create the en_NZ locale file. Hope this helps!
Putty can display utf - I think it is in appearance -> translation (or something, I don't have access to it right now).
For Debian 5.0 Lenny:
aptitude install locales
If that's already installed:
dpkg-reconfigure locales

Resources