Нужно поднять терминальный сервер для использования chrome.
Поставил lxde и xrdp с http://scarygliders.net/x11rdp-o-matic-information/.
+
Добавляем в /etc/X11/Xsession после set -e
## Для корретного определения локали
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
fi
## Для корретной работы переключения раскладок клавиатуры по control + shift
setxkbmap -layout «us,ru(winkeys)» -model «pc105″ -option «grp:ctrl_shift_toggle,grp_led:scroll»
Все хорошо. Цепляюсь на 3389 и захожу в lxde, но раскладка только русская и не меняется. Если добавлять все подряд dpkg-reconfigure locales тоже толку нет.
log - [WARN ] local keymap file for 0x0419 found and dosen't match built in keymap, using local keymap file
Подскажите как оживить мультирасладочность.
Конфиги:
cat /etc/X11/Xsession
#!/bin/sh
#
# /etc/X11/Xsession
#
# global Xsession file -- used by display managers and xinit (startx)
# $Id: Xsession 967 2005-12-27 07:20:55Z dnusinow $
set -e
## Для корретного определения локали
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
fi
## Для корретной работы переключения раскладок клавиатуры по control + shift
setxkbmap -layout "us,ru(winkeys)" -model "pc105" -option "grp:ctrl_shift_toggle,grp_led:scroll"
PROGNAME=Xsession
message () {
# pretty-print messages of arbitrary length; use xmessage if it
# is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi
}
message_nonl () {
# pretty-print messages of arbitrary length (no trailing newline); use
# xmessage if it is available and $DISPLAY is set
MESSAGE="$PROGNAME: $*"
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
if [ -n "$DISPLAY" ] && which xmessage > /dev/null 2>&1; then
echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | xmessage -center -file -
fi
}
errormsg () {
# exit script with error
message "$*"
exit 1
}
internal_errormsg () {
# exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
# One big call to message() for the sake of xmessage; if we had two then
# the user would have dismissed the error we want reported before seeing the
# request to report it.
errormsg "$*" \
"Please report the installed version of the \"x11-common\"" \
"package and the complete text of this error message to" \
"<debian-x@lists.debian.org>."
}
# initialize variables for use by all session scripts
OPTIONFILE=/etc/X11/Xsession.options
SYSRESOURCES=/etc/X11/Xresources
USRRESOURCES=$HOME/.Xresources
SYSSESSIONDIR=/etc/X11/Xsession.d
USERXSESSION=$HOME/.xsession
USERXSESSIONRC=$HOME/.xsessionrc
ALTUSERXSESSION=$HOME/.Xsession
ERRFILE=$HOME/.xsession-errors
# attempt to create an error file; abort if we cannot
if (umask 077 && touch "$ERRFILE") 2> /dev/null && [ -w "$ERRFILE" ] &&
[ ! -L "$ERRFILE" ]; then
chmod 600 "$ERRFILE"
elif ERRFILE=$(tempfile 2> /dev/null); then
if ! ln -sf "$ERRFILE" "${TMPDIR:=/tmp}/xsession-$USER"; then
message "warning: unable to symlink \"$TMPDIR/xsession-$USER\" to" \
"\"$ERRFILE\"; look for session log/errors in" \
"\"$TMPDIR/xsession-$USER\"."
fi
else
errormsg "unable to create X session log/error file; aborting."
fi
exec >>"$ERRFILE" 2>&1
echo "$PROGNAME: X session started for $LOGNAME at $(date)"
# sanity check; is our session script directory present?
if [ ! -d "$SYSSESSIONDIR" ]; then
errormsg "no \"$SYSSESSIONDIR\" directory found; aborting."
fi
# Attempt to create a file of non-zero length in /tmp; a full filesystem can
# cause mysterious X session failures. We do not use touch, :, or test -w
# because they won't actually create a file with contents. We also let standard
# error from tempfile and echo go to the error file to aid the user in
# determining what went wrong.
WRITE_TEST=$(tempfile)
if ! echo "*" >>"$WRITE_TEST"; then
message "warning: unable to write to ${WRITE_TEST%/*}; X session may exit" \
"with an error"
fi
rm -f "$WRITE_TEST"
# use run-parts to source every file in the session directory; we source
# instead of executing so that the variables and functions defined above
# are available to the scripts, and so that they can pass variables to each
# other
SESSIONFILES=$(run-parts --list $SYSSESSIONDIR)
if [ -n "$SESSIONFILES" ]; then
set +e
for SESSIONFILE in $SESSIONFILES; do
. $SESSIONFILE
done
set -e
fi
exit 0
# vim:set ai et sts=2 sw=2 tw=80:
cat /etc/xrdp/startwm.sh
#!/bin/sh
#if [ -r /etc/default/locale ]; then
# . /etc/default/locale
# export LANG LANGUAGE
#fi
##. /etc/X11/Xsession
export LANG=ru_RU.UTF-8
. /etc/X11/Xsession
startlxde
cat /etc/xrdp/startwm.sh.sample
#!/bin/sh
#start the window manager
wm_start()
{
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
fi
# debian
if [ -r /etc/X11/Xsession ]; then
. /etc/X11/Xsession
exit 0
fi
# el
if [ -r /etc/X11/xinit/Xsession ]; then
. /etc/X11/xinit/Xsession
exit 0
fi
# suse
if [ -r /etc/X11/xdm/Xsession ]; then
. /etc/X11/xdm/Xsession
exit 0
fi
xterm
}
#Execution sequence for interactive login shell
#Following pseudo code explains the sequence of execution of these files.
#execute /etc/profile
#IF ~/.bash_profile exists THEN
# execute ~/.bash_profile
#ELSE
# IF ~/.bash_login exist THEN
# execute ~/.bash_login
# ELSE
# IF ~/.profile exist THEN
# execute ~/.profile
# END IF
# END IF
#END IF
pre_start()
{
if [ -f /etc/profile ]
then
. /etc/profile
fi
if [ -f ~/.bash_profile ]
then
. ~/.bash_profile
else
if [ -f ~/.bash_login ]
then
. ~/.bash_login
else
if [ -f ~/.profile ]
then
. ~/.profile
fi
fi
fi
return 0
}
#When you logout of the interactive shell, following is the
#sequence of execution:
#IF ~/.bash_logout exists THEN
# execute ~/.bash_logout
#END IF
post_start()
{
if [ -f ~/.bash_logout ]
then
. ~/.bash_logout
fi
return 0
}
#. /etc/environment
#export PATH=$PATH
#export LANG=$LANG
# change PATH to be what your environment needs usually what is in
# /etc/environment
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
#export PATH=$PATH
# for PATH and LANG from /etc/environment
# pam will auto process the environment file if /etc/pam.d/xrdp-sesman
# includes
# auth required pam_env.so readenv=1
pre_start
wm_start
post_start
exit 1
cat /etc/xrdp/sesman.ini
[Globals]
ListenAddress=127.0.0.1
ListenPort=3350
EnableUserWindowManager=1
UserWindowManager=startwm.sh
DefaultWindowManager=startwm.sh
[Security]
AllowRootLogin=1
MaxLoginRetry=4
TerminalServerUsers=tsusers
TerminalServerAdmins=tsadmins
# When AlwaysGroupCheck = false access will be permitted
# if the group TerminalServerUsers is not defined.
AlwaysGroupCheck = false
[Sessions]
. /etc/X11/Xsession
## X11DisplayOffset - x11 display number offset
# Type: integer
# Default: 10
X11DisplayOffset=10
## MaxSessions - maximum number of connections to an xrdp server
# Type: integer
# Default: 0
MaxSessions=50
## KillDisconnected - kill disconnected sessions
# Type: integer
# Default: 0
# if 1, true, or yes, kill session after 60 seconds
KillDisconnected=0
## IdleTimeLimit - when to disconnect idle sessions
# Type: integer
# Default: 0
# if not zero, the seconds without mouse or keyboard input before disconnect
# not complete yet
IdleTimeLimit=0
## DisconnectedTimeLimit - when to kill idle sessions
# Type: integer
# Default: 0
# if not zero, the seconds before a disconnected session is killed
# min 60 seconds
DisconnectedTimeLimit=0
## Policy - session allocation policy
# Type: enum [ "Default" | "UBD" | "UBI" | "UBC" | "UBDI" | "UBDC" ]
# Default: Xrdp:<User,BitPerPixel> and Xvnc:<User,BitPerPixel,DisplaySize>
# "UBD" session per <User,BitPerPixel,DisplaySize>
# "UBI" session per <User,BitPerPixel,IPAddr>
# "UBC" session per <User,BitPerPixel,Connection>
# "UBDI" session per <User,BitPerPixel,DisplaySize,IPAddr>
# "UBDC" session per <User,BitPerPixel,DisplaySize,Connection>
Policy=Default
[Logging]
LogFile=xrdp-sesman.log
LogLevel=DEBUG
EnableSyslog=1
SyslogLevel=DEBUG
[X11rdp]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp
param5=-uds
[Xvnc]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp
param5=-localhost
param6=-dpi
param7=96
[Xorg]
param1=-config
param2=xrdp/xorg.conf
param3=-logfile
param4=/dev/null
param5=-noreset
param6=-ac
param7=-nolisten
param8=tcp
[Chansrv]
# drive redirection, defaults to xrdp_client if not set
FuseMountName=thinclient_drives
[SessionVariables]
PULSE_SCRIPT=/etc/xrdp/pulse/default.pa
cat /etc/xrdp/xrdp.ini
[globals]
# xrdp.ini file version number
ini_version=1
bitmap_cache=yes
bitmap_compression=yes
port=3389
allow_channels=true
max_bpp=32
fork=yes
# minimum security level allowed for client
# can be 'none', 'low', 'medium', 'high', 'fips'
crypt_level=high
# security layer can be 'tls', 'rdp' or 'negotiate'
# for client compatible layer
security_layer=rdp
# X.509 certificate and private key
# openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 365
certificate=
key_file=
# regulate if the listening socket use socket option tcp_nodelay
# no buffering will be performed in the TCP stack
tcp_nodelay=yes
# regulate if the listening socket use socket option keepalive
# if the network connection disappear without close messages the connection will be closed
tcp_keepalive=yes
#tcp_send_buffer_bytes=32768
#tcp_recv_buffer_bytes=32768
#
# colors used by windows in RGB format
#
blue=009cb5
grey=dedede
#black=000000
#dark_grey=808080
#blue=08246b
#dark_blue=08246b
#white=ffffff
#red=ff0000
#green=00ff00
#background=626c72
#autorun=xrdp1
#hidelogwindow=yes
# when true, userid/password *must* be passed on cmd line
# require_credentials=yes
bulk_compression=yes
# You can set the PAM error text in a gateway setup (MAX 256 chars)
#pamerrortxt=change your password according to policy at http://url
new_cursors=yes
allow_multimon=true
# fastpath - can be set to input / output / both / none
use_fastpath=both
#
# configure login screen
#
# Login Screen Window Title
#ls_title=My Login Title
# top level window background color in RGB format
ls_top_window_bg_color=009cb5
# width and height of login screen
ls_width=350
ls_height=430
# login screen background color in RGB format
ls_bg_color=dedede
# optional background image filename (bmp format).
#ls_background_image=
# logo
# full path to bmp-file or file in shared folder
ls_logo_filename=
ls_logo_x_pos=55
ls_logo_y_pos=50
# for positioning labels such as username, password etc
ls_label_x_pos=30
ls_label_width=60
# for positioning text and combo boxes next to above labels
ls_input_x_pos=110
ls_input_width=210
# y pos for first label and combo box
ls_input_y_pos=220
# OK button
ls_btn_ok_x_pos=142
ls_btn_ok_y_pos=370
ls_btn_ok_width=85
ls_btn_ok_height=30
# Cancel button
ls_btn_cancel_x_pos=237
ls_btn_cancel_y_pos=370
ls_btn_cancel_width=85
ls_btn_cancel_height=30
[Logging]
LogFile=xrdp.log
LogLevel=DEBUG
EnableSyslog=1
SyslogLevel=DEBUG
# LogLevel and SysLogLevel could by any of: core, error, warning, info or debug
[channels]
# Channel names not listed here will be blocked by XRDP.
# You can block any channel by setting its value to false.
# IMPORTANT! All channels are not supported in all use
# cases even if you set all values to true.
# You can override these settings on each session type
# These settings are only used if allow_channels=true
rdpdr=true
rdpsnd=true
drdynvc=true
cliprdr=true
rail=true
xrdpvr=true
tcutils=true
# for debugging xrdp, in section xrdp1, change port=-1 to this:
# port=/tmp/.xrdp/xrdp_display_10
# for debugging xrdp, add following line to section xrdp1
# chansrvport=/tmp/.xrdp/xrdp_chansrv_socket_7210
[xrdp1]
name=sesman-X11rdp
lib=libxup.so
username=ask
password=ask
ip=127.0.0.1
port=-1
xserverbpp=24
code=10
# You can override the common channel settings for each session type
#channel.rdpdr=true
#channel.rdpsnd=true
#channel.drdynvc=true
#channel.cliprdr=true
#channel.rail=true
#channel.xrdpvr=true
cat /etc/xrdp/xrdp_keyboard.ini
#
# RDP Keyboard <-> X11 Keyboard layout map
#
# How this file works:
# 1. load the file and scan each section to find matching "keyboard_type"
# and "keyboard_subtype" based on the values received from the client.
# If not found, then jump to default section.
# 2. in the selected section, look for "rdp_layouts" and "layouts_map".
# Based on the "keylayout" value from the client, find the right x11
# layout value.
# 3. model/variant are inferred based on the "keyboard_type" and
# "keyboard_subtype", but they can be overridden.
#
#
# RDP Keyboard Type (http://msdn.microsoft.com/en-us/library/cc240563.aspx)
#
# 0 is not a valid value
#
# 1 - IBM PC/XT or compatible (83-key) keyboard
# 2 - Olivetti "ICO" (102-key) keyboard
# 3 - IBM PC/AT (84-key) or similar keyboard
# 4 - IBM enhanced (101- or 102-key) keyboard
# 5 - Nokia 1050 and similar keyboards
# 6 - Nokia 9140 and similar keyboards
# 7 - Japanese keyboard
#
# RDP Keyboard Subtype is vendor dependent. XRDP defines as follows:
#
# 0 is not a valid value
#
# 1 - Standard
# 2 - FreeRDP JP keyboard
# 3 - Macintosh
# ... - < any vendor dependent subtype >
#
# The list can be augmented.
#
# default
[default]
# keyboard_type and keyboard_subtype is not readed for default section. It
# is only as a place holder to keep consistency. Default model/variant are
# platform dependent, and could be overridden if needed.
keyboard_type=0
keyboard_subtype=0
# user could override variant and model, but generally they should be inferred
# automatically based on keyboard type and subtype
#variant=
#model=
# A list of supported RDP keyboard layouts
rdp_layouts=default_rdp_layouts
# The map from RDP keyboard layout to X11 keyboard layout
layouts_map=default_layouts_map
[default_rdp_layouts]
rdp_layout_us=0x00000409
rdp_layout_ru=0x00000419
# <rdp layout name> = <X11 keyboard layout value>
[default_layouts_map]
rdp_layout_us=us
rdp_layout_ru=ru
# if two sections have the same keyboard_type and keyboard_subtype, then
# the latter could override the former.
[rdp_keyboard_mac]
keyboard_type=4
keyboard_subtype=3
rdp_layouts=default_rdp_layouts
layouts_map=rdp_layouts_map_mac
[rdp_keyboard_jp]
keyboard_type=7
keyboard_subtype=2
rdp_layouts=default_rdp_layouts
layouts_map=default_layouts_map
[rdp_layouts_map_mac]
rdp_layout_us=us
rdp_layout_ru=ru