Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
(leafpad:7467): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
This is locale problem, maybe of the perl script. I read many doc found on googling. But can't find my solution.
On running;
$ sudo /etc/init.d/httpd.vmware start
Code:
Starting httpd.vmware:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_HK.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Similar warning popup
$ sudo aptitude install locales
my solve my problem. I haven't tried yet.
Previously I also suffered locale problem on this server. I tried to fix the problem, resulting in the server crashed finally. This is a fresh installation, not complete yet. Therefore I have to proceed with caution.
Locale problems should be ignored. If you wait a minute, does window appear?
Just repeated following steps. This time ran rox, the file manager, instead of leafpad.
On server:-
$ echo $LC_ALL ; echo $LANG
Code:
en_HK.UTF-8
$ export LC_ALL=C; export LANG=C
No complaint
$ strace -f -o rox.strace rox
Code:
(rox:4987): Gtk-WARNING **: Could not find the icon 'mime-text:plain'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases
(process:4994): Gdk-Warning **: locale not supported by C library
(rox:4994): Gtk-Warning ** Locale not supported by C library.
Using the fallback 'C' locale.
(rox:4994): Gtk-Warning ** cannot open display:
It waited for at least 3 minutes before the last line popup.
Yes, it works seamlessly with remote rox displayed locally.
Performed further 2 tests:-
1)
Test-1
a)
server to another desktop F7 on 192.168.0.12
$ ssh -Y satimis@192.168.0.12 nautilus
It worked w/o problem with remote nautilus displayed locally.
b)
desktop F7 to server
$ ssh -Y satimis@192.168.0.10 rox
with the same result unable to display remote rox locally. Server can be ssh-connected.
2)
Test-2
Installed localeconf on server.
$ cat /etc/environment
Code:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
LANG="en_US.UTF-8"
### BEGIN DEBCONF SECTION FOR localeconf
# Do not edit within this region if you want your changes to be preserved
# by debconf. Instead, make changes before the "### BEGIN DEBCONF SECTION
# FOR localeconf" line, and/or after the "### END DEBCONF SECTION FOR
# localeconf" line.
LANG=C
### END DEBCONF SECTION FOR localeconf
LANG=C added.
$ sudo /etc/init.d/httpd.vmware start
Code:
Starting httpd.vmware:
the problem on starting VMWare solved.
After rebooting the server and running;
$ sudo /etc/init.d/httpd.vmware start
Code:
Password:
Starting httpd.vmware:
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_HK.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
"On server through SSH" - I meant, what is in $DISPLAY when you 'ssh -X' from client to server and check inside ssh session.
About VMWare - what is your goal? To defeat chaos or to have it running? In the latter I think that setting the environment variable in the beginning of the script will be enough (perl should work somehow, and script itself will not be able to tell the difference once variable is set)
"On server through SSH" - I meant, what is in $DISPLAY when you 'ssh -X' from client to server and check inside ssh session.
On server, repeat following steps:-
$ echo $LC_ALL ; echo $LANG
Code:
en_HK.UTF-8
$ export LC_ALL=C; export LANG=C
No complaint
$ echo $DISPLAY
Code:
:0.0
$ strace -f -o rox.strace rox
start rox window
On desktop:-
$ ssh -X satimis@192.168.0.10
server connected. "ls" displayed remote data locally
$ echo $DISPLAY
Code:
localhost:10:0
It displays different output compared with that run on server?
Quote:
About VMWare - what is your goal? To defeat chaos or to have it running? In the latter I think that setting the environment variable in the beginning of the script will be enough (perl should work somehow, and script itself will not be able to tell the difference once variable is set)
I'm building a virtual machine on this server. In the midway I needed to transfer some files from server to the desktop PC for storage and found the ssh problem. Before the server crashed (this is a new installation, not completed yet - 2nd round on building virtural machine), ssh worked both ways, with X forwarded. The only problem was same file-manager being needed for transferring files with drag-n-drop. That is the whole story.
$ perl -version
Code:
This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
I found the cause of problem. It is the firewall "iptables" which stops X forwarding.
On server after running;
$ sudo iptables -F
On desktop;
$ ssh -X satimis@192.168.0.10 rox
Code:
satimis@192.168.0.10's password:
(process:5282): Gdk-WARNING **: locale not supported by C library
(rox:5282): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
(rox:5285): Gtk-WARNING **: Could not find the icon 'mime-text:plain'. The 'hicolor' theme
was not found either, perhaps you need to install it.
You can get a copy from:
http://icon-theme.freedesktop.org/releases
(leafpad:5286): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
(leafpad:5287): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
remote rox displayed locally. Files can be evoked. I don't know why it displays a misleading warning there fooling around us.
Before the server crashed I ran another firewall script. I'm now running following scripts;
$ cat /etc/rc.local
Code:
#
# INPUT
#
# allow all incoming traffic from the management interface NIC
# as long as it is a part of an established connection
iptables -I INPUT 1 -j ACCEPT -d MGMT_NIC_IP -m state --state
RELATED,ESTABLISHED
# allow all ssh traffic to the management interface NIC
iptables -I INPUT 2 -j ACCEPT -p TCP -d MGMT_NIC_IP --destination-port 22
# allow all VMware MUI HTTP traffic to the management interface NIC
iptables -I INPUT 3 -j ACCEPT -p TCP -d MGMT_NIC_IP --destination-port 8222
# allow all VMware MUI HTTPS traffic to the management interface NIC
iptables -I INPUT 4 -j ACCEPT -p TCP -d MGMT_NIC_IP --destination-port 8333
# allow all VMware Authorization Daemon traffic to the management
interface NIC
iptables -I INPUT 5 -j ACCEPT -p TCP -d MGMT_NIC_IP --destination-port 902
# reject all other traffic to the management interface NIC
iptables -I INPUT 6 -j REJECT -d MGMT_NIC_IP --reject-with
icmp-port-unreachable
#
# OUTPUT
#
# allow all outgoing traffic from the management interface NIC
# if it is a part of an established connection
iptables -I OUTPUT 1 -j ACCEPT -s MGMT_NIC_IP -m state --state
RELATED,ESTABLISHED
# allow all DNS queries from the management interface NIC
iptables -I OUTPUT 2 -j ACCEPT -s MGMT_NIC_IP -p UDP --destination-port 53
# reject all other traffic from localhost
iptables -I OUTPUT 3 -j REJECT -s 127.0.0.1 --reject-with
icmp-port-unreachable
# reject all other traffic from the management interface NIC
iptables -I OUTPUT 4 -j REJECT -s MGMT_NIC_IP --reject-with
icmp-port-unreachable
MGMT_NIC_IP = server_IP
On server;
Restart iptables
$ sudo /etc/rc.local restart
No complaint
On desktop running
$ ssh -X satimis@server_IP rox
Code:
ssh: connect to host server_IP port 22: Connection refused
$ ssh -X server_IP
Code:
ssh: connect to host server_IP port 22: Connection refused
It did not work
Again on server
$ sudo nano /etc/ssh/sshd_config
adding "ListenAddress 192.168.0.11" (router IP)
$ cat /etc/ssh/sshd_config
Code:
....
Port 22
ListenAddress 192.168.0.10
ListenAddress 192.168.0.11
....
$ sudo /etc/init.d/ssh restart
Again on desktop
$ ssh -X satimis@server_IP rox
Code:
ssh: connect to host server_IP port 22: Connection refused
$ ssh -X server_IP
Code:
ssh: connect to host server_IP port 22: Connection refused
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
Well, the warnings were not misleading for me - I knew they have nothing to do with the problem. About iptables - did you check what rules take precedence in iptables, first specified or last specified? About VMWare - so does creating a shell script 'httpd.vmware' with contents
About iptables - did you check what rules take precedence in iptables, first specified or last specified?
Nothing else. The content listed on my previous posting is the complete script on /etc/rc.local.
I created an executable file on /etc/network/if-up.d/iptables.start
and copid the complete script on the file. Each time on starting the network iptables started as well.
Quote:
About VMWare - so does creating a shell script 'httpd.vmware' with contents
Distribution: approximately NixOS (http://nixos.org)
Posts: 1,900
Rep:
I meant that you move old httpd.vmware perl script to httpd.vmware.perl
About precedence - yu issue multiple commands for every chain. Are sure about the order?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.