New upstream version 2.1.3
This commit is contained in:
22
data/99-debian-dimbor.conf
Normal file
22
data/99-debian-dimbor.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
# kill warnings
|
||||
COMMAND_START_CDE="/bin/false"
|
||||
COMMAND_START_KDE="/bin/false"
|
||||
COMMAND_START_GNOME="/bin/false"
|
||||
|
||||
# my settings
|
||||
DISPLAY_BASE=4000
|
||||
WIN_CP_CONVERT_CHAIN=">cp1252 cp1251>"
|
||||
#ENABLE_DIRECT_NATIVE_PA_CHECK="1"
|
||||
|
||||
|
||||
NX_LOG_LEVEL=1
|
||||
SESSION_LOG_CLEAN=0
|
||||
COMMAND_XTERM="/usr/bin/xfce4-terminal --hide-menubar --geometry 80x40"
|
||||
#AGENT_EXTRA_OPTIONS_X="-nolisten tcp -dpi 120"
|
||||
#AGENT_EXTRA_OPTIONS_X="-forcenx"
|
||||
|
||||
EXTERNAL_PROXY_IP="192.168.1.86"
|
||||
|
||||
ENABLE_ROOTLESS_TERMINATE_SESSION="1"
|
||||
NODE_APP_WAIT_TIMEOUT="2"
|
||||
APP_WAIT_MAP="1c8.sh:1cv8s;test.sh:xfce4-terminal"
|
||||
2
data/Xkbmap
Normal file
2
data/Xkbmap
Normal file
@@ -0,0 +1,2 @@
|
||||
-layout en_US,ru(winkeys)
|
||||
-option grp:ctrl_shift_toggle,grp_led:scroll
|
||||
222
data/Xsession
Executable file
222
data/Xsession
Executable file
@@ -0,0 +1,222 @@
|
||||
#!/bin/bash -login
|
||||
#
|
||||
# Copyright (C) 2002-2006 Dmitry V. Levin <ldv@altlinux.org>
|
||||
#
|
||||
# Traditional X session start script.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
#
|
||||
|
||||
PROG="${0##*/}"
|
||||
|
||||
if [ -z "$DISPLAY" ]; then
|
||||
echo "$PROG: \$DISPLAY undefined." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Emulate which(1) internally.
|
||||
absolute()
|
||||
{
|
||||
local WHICH
|
||||
|
||||
[ -n "$1" ] || return 1
|
||||
WHICH="$(type -p "$1")" || return 1
|
||||
[ "$WHICH" != "${WHICH##/}" ] || return 1
|
||||
[ -x "$WHICH" ] || return 1
|
||||
|
||||
printf %s "$WHICH"
|
||||
}
|
||||
|
||||
SourceIfNotEmpty()
|
||||
{
|
||||
local f="$1"
|
||||
shift
|
||||
[ -s "$f" ] && . "$f" "$@"
|
||||
}
|
||||
|
||||
RunIfExecutable()
|
||||
{
|
||||
local f="$1"
|
||||
shift
|
||||
f="$(absolute "$f")" && [ -x "$f" ] && "$f" "$@"
|
||||
}
|
||||
|
||||
ExecIfExecutable()
|
||||
{
|
||||
local f="$1"
|
||||
shift
|
||||
f="$(absolute "$f")" && [ -x "$f" ] && exec "$f" "$@"
|
||||
}
|
||||
|
||||
f="$HOME/.xsession-errors"
|
||||
[ -z "${DISPLAY##:*}" ] && f="$f$DISPLAY" || f="$f-$DISPLAY"
|
||||
|
||||
# Redirect errors to a file.
|
||||
for errfile in "$f" "$HOME/.xsession-errors"; do
|
||||
if install -m600 /dev/null "$errfile" 2>/dev/null; then
|
||||
exec &>"$errfile"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
unset f
|
||||
|
||||
echo "Running $PROG[$$] $*"
|
||||
|
||||
if [ $# -ge 1 ]; then
|
||||
# Clean up after xbanner.
|
||||
RunIfExecutable freetemp
|
||||
else
|
||||
# ALT default background and cursor.
|
||||
xsetroot -solid "#666699"
|
||||
xsetroot -cursor_name left_ptr
|
||||
fi
|
||||
|
||||
if [ -n "$LANGUAGE" ]; then
|
||||
try_lang="$LANGUAGE"
|
||||
elif [ -n "$LANG" ]; then
|
||||
try_lang="$LANG"
|
||||
else
|
||||
try_lang=
|
||||
fi
|
||||
|
||||
Xrdb()
|
||||
{
|
||||
if [ -s "$1" ]; then
|
||||
xrdb -merge "$1"
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
MergeResources()
|
||||
{
|
||||
local f
|
||||
for f in "$@"; do
|
||||
Xrdb "$f"
|
||||
local found=
|
||||
local n
|
||||
for n in `printf %s "$try_lang" |tr : ' '`; do
|
||||
n1="${n%.*}"
|
||||
n2="${n1%_*}"
|
||||
Xrdb "$f.$n2" && found=1
|
||||
Xrdb "$f.$n1" && found=1
|
||||
Xrdb "$f.$n" && found=1
|
||||
[ -z "$found" ] || break
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
# Merge in defaults and keymaps.
|
||||
if [ -d /etc/X11/Xresources ]; then
|
||||
Xresources_d=$(ls /etc/X11/Xresources)
|
||||
MergeResources $Xresources_d "$HOME/.Xresources" "$HOME/.Xdefaults"
|
||||
else
|
||||
MergeResources /etc/X11/Xresources "$HOME/.Xresources" "$HOME/.Xdefaults"
|
||||
fi
|
||||
|
||||
TryXBrowser()
|
||||
{
|
||||
local n
|
||||
for n in "$@"; do
|
||||
if n=`absolute "$n"`; then
|
||||
export BROWSER="$n"
|
||||
break
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
TryTextBrowser()
|
||||
{
|
||||
local n
|
||||
for n in "$@"; do
|
||||
if n=`absolute "$n"`; then
|
||||
export BROWSER="xvt -e $n"
|
||||
break
|
||||
fi
|
||||
done
|
||||
return 0
|
||||
}
|
||||
|
||||
# We need to set default browser.
|
||||
# Window manager may redefine this setting.
|
||||
if [ -z "$BROWSER" ] || [ ! -x "$BROWSER" ]; then
|
||||
TryXBrowser xbrowser mozilla firefox konqueror
|
||||
fi
|
||||
|
||||
if [ -z "$BROWSER" ] || [ ! -x "$BROWSER" ]; then
|
||||
TryTextBrowser browser links lynx
|
||||
fi
|
||||
|
||||
if [ -z "$BROWSER" ] || [ ! -x "$BROWSER" ]; then
|
||||
export BROWSER=
|
||||
fi
|
||||
|
||||
export HELP_BROWSER="$BROWSER"
|
||||
|
||||
# Source shell scripts from user ~/.xprofile
|
||||
SourceIfNotEmpty "$HOME"/.xprofile "$@"
|
||||
|
||||
# Run system scripts from /etc/X11/xinit.d/
|
||||
for f in /etc/X11/xinit.d/*; do
|
||||
# Don't run *.rpm* and *~ scripts
|
||||
[ "${f%.rpm*}" = "$f" -a "${f%\~}" = "$f" ] || continue
|
||||
|
||||
if [ -x "$f" ]; then
|
||||
"$f" &
|
||||
fi
|
||||
done
|
||||
|
||||
# Run user scripts from ~/.xsession.d/
|
||||
for f in "$HOME"/.xsession.d/*; do
|
||||
# Don't run *.rpm* and *~ scripts
|
||||
[ "${f%.rpm*}" = "$f" -a "${f%\~}" = "$f" ] || continue
|
||||
|
||||
if [ -x "$f" ]; then
|
||||
"$f" &
|
||||
fi
|
||||
done
|
||||
|
||||
unset f
|
||||
|
||||
RunIfExecutable /etc/nxserver/fixkeyboard
|
||||
|
||||
RunIfExecutable /etc/X11/xinit/xrandrrc
|
||||
RunIfExecutable /etc/X11/xinit/fixkeyboard
|
||||
RunIfExecutable /etc/X11/xinit/XIM
|
||||
|
||||
CMD=""
|
||||
#ssh-agent doesnt start
|
||||
[ -z "$SSH_AGENT_PID" ] && CMD="$CMD /usr/bin/ssh-agent"
|
||||
[ -z "$DBUS_SESSION_BUS_ADDRESS" ] && CMD="$CMD /usr/bin/dbus-launch --exit-with-session"
|
||||
|
||||
if [ $# -ge 1 ]; then
|
||||
$CMD "$@"
|
||||
else
|
||||
# Try user defined action.
|
||||
RunIfExecutable "$HOME/.xsession"
|
||||
RunIfExecutable "$HOME/.Xclients"
|
||||
|
||||
# Try WM Selector.
|
||||
RunIfExecutable wm-select
|
||||
|
||||
# Try WM Manager.
|
||||
RunIfExecutable wmselect
|
||||
|
||||
# Try default from runwm.
|
||||
runwm default
|
||||
fi
|
||||
19
data/fixkeyboard
Executable file
19
data/fixkeyboard
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
# Startup script called from /etc/X11/Xsession and /etc/X11/xdm/Xsetup_0
|
||||
# to adjust keyboard.
|
||||
|
||||
usermodmap="$HOME/.Xmodmap"
|
||||
userxkbmap="$HOME/.Xkbmap"
|
||||
|
||||
sysmodmap=/etc/nxserver/Xmodmap
|
||||
sysxkbmap=/etc/nxserver/Xkbmap
|
||||
|
||||
if xdpyinfo |fgrep -qs XKEYBOARD; then
|
||||
[ -s "$sysxkbmap" ] && setxkbmap `cat "$sysxkbmap"`
|
||||
[ -s "$userxkbmap" ] && setxkbmap `cat "$userxkbmap"`
|
||||
fi
|
||||
|
||||
[ -s $sysmodmap ] && xmodmap "$sysmodmap"
|
||||
[ -s $usermodmap ] && xmodmap "$usermodmap"
|
||||
|
||||
exit 0
|
||||
8
data/logrotate
Normal file
8
data/logrotate
Normal file
@@ -0,0 +1,8 @@
|
||||
/var/log/nxserver.log {
|
||||
rotate 4
|
||||
size=1M
|
||||
notifempty
|
||||
missingok
|
||||
sharedscripts
|
||||
copytruncate
|
||||
}
|
||||
11
data/sudoers.conf
Normal file
11
data/sudoers.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
Defaults:nx targetpw,passwd_tries=1,timestamp_timeout=0.3,umask=0777
|
||||
nx ALL= (%users) /bin/bash -c /usr/bin/nxnode *
|
||||
|
||||
User_Alias ADMINS = %nxadmin
|
||||
User_Alias USERS = %users
|
||||
|
||||
ADMINS ALL= NOPASSWD: /bin/bash -c /usr/bin/nxserver --admin
|
||||
USERS ALL= NOPASSWD: /usr/sbin/lpadmin
|
||||
|
||||
USERS ALL= NOPASSWD: /sbin/mount.cifs
|
||||
USERS ALL= NOPASSWD: /bin/umount
|
||||
22
data/terminate-suspend-nx.sh
Executable file
22
data/terminate-suspend-nx.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
[ -e /etc/sysconfig/freenx-server ] && . /etc/sysconfig/freenx-server
|
||||
|
||||
SESSION_TTL=${SESSION_TTL:-3600}
|
||||
nxdir="/var/lib/nxserver/db/running"
|
||||
nxserver="/usr/bin/nxserver"
|
||||
if [ -d "$nxdir" -a $SESSION_TTL -gt 0 ] ; then
|
||||
for f in `ls $nxdir` ; do
|
||||
sessiontype=`cat $nxdir/$f | grep status | cut -d= -f2`
|
||||
user=`cat $nxdir/$f | grep userName | cut -d= -f2`
|
||||
sessiontime=`cat $nxdir/$f | grep creationTime | cut -d= -f2`
|
||||
sessionid=`cat $nxdir/$f | grep sessionId | cut -d= -f2`
|
||||
criticaltime=$(expr `date +%s` - $SESSION_TTL)
|
||||
if [ $sessiontime -lt $criticaltime ] ; then
|
||||
if [ $sessiontype = "Suspended" ] ; then
|
||||
$nxserver --terminate $sessionid
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
Reference in New Issue
Block a user