Run leafpad on local X Desktop or on remote X server, input chinese characters (zh_CN.UTF-8, IBus)
147
You can run leafpad on local X Desktop or on remote X server, and input chinese characters (zh_CN.UTF-8, IBus) . I just build this image to test if I can input chinese characters from a remote X server to a docker X application, and ... the anwser is "yes". It means that I can run my Eclipse IDE in the same way.
1. # docker run --rm -e DISPLAY=$DISPLAY -v /tmp/.X11-unix:/tmp/.X11-unix --entrypoint "leafpad" mjc77/leafpad:zh
1. on Docker server:
# docker run -d -p 50001:22 mjc77/leafpad:zh
2. on remote X server ( zh_CN.UTF-8, IBus ):
$ ssh -X [email protected] -p 50001 "source /root/.bashrc; leafpad"
(password : uestc)
FROM debian:8.8
RUN apt-get update;
apt-get -y install ssh xauth locales fonts-wqy-zenhei leafpad;
echo "146 462\n3\n" | dpkg-reconfigure locales;
mkdir /var/run/sshd;
sed "s/\(PermitRootLogin\) without-password/\1 yes/g" /etc/ssh/sshd_config > /tmp/aa;
cat /tmp/aa > /etc/ssh/sshd_config;
echo "uestc\nuestc\n" | passwd root;
echo "export GTK_IM_MODULE=ibus XMODIFIERS=@im=ibus QT_IM_MODULE=ibus LANG=zh_CN.UTF-8 LANGUAGE=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8" >> /root/.bashrc;
echo "export GTK_IM_MODULE=ibus XMODIFIERS=@im=ibus QT_IM_MODULE=ibus LANG=zh_CN.UTF-8 LANGUAGE=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8" >> /root/.profile
ENV GTK_IM_MODULE=ibus XMODIFIERS=@im=ibus QT_IM_MODULE=ibus
LANG=zh_CN.UTF-8 LANGUAGE=zh_CN.UTF-8 LC_ALL=zh_CN.UTF-8
EXPOSE 22
ENTRYPOINT [ "/usr/sbin/sshd", "-D" ]
Content type
Image
Digest
Size
123.6 MB
Last updated
over 9 years ago
docker pull mjc77/leafpad:zh