From 0ae5b45428bd168ffe5c745719190d53cb507455 Mon Sep 17 00:00:00 2001 From: "jinhyung.jo" Date: Thu, 21 May 2015 22:46:33 +0900 Subject: [PATCH] VIGS: sync up to the latest Change-Id: Ifdc0eaace4b4f5a82e15f5a7baf84ed4ff1bbb88 Signed-off-by: Jinhyung Jo --- conf-i386-vigs/input.conf | 16 ++++++++-------- conf-i386-vigs/module.conf | 1 + i386-common/Xorg.sh | 1 + i386-common/startx | 40 +++++++++++++++++++++++++++++++--------- i386-common/xinitrc | 12 +++++++++++- i386-common/xkeysymbol.map | 8 ++++++++ i386-common/xorg.service | 13 +++++++++++++ i386-common/xresources.service | 15 +++++++++++++++ i386-common/xserver | 8 ++++---- packaging/xf86-misc-vigs.spec | 13 ++++++++++++- 10 files changed, 104 insertions(+), 23 deletions(-) create mode 100644 i386-common/xkeysymbol.map create mode 100644 i386-common/xorg.service create mode 100644 i386-common/xresources.service diff --git a/conf-i386-vigs/input.conf b/conf-i386-vigs/input.conf index 1133724..7c1e72e 100644 --- a/conf-i386-vigs/input.conf +++ b/conf-i386-vigs/input.conf @@ -7,18 +7,18 @@ Section "InputClass" EndSection Section "InputClass" - Identifier "evdev pointer catchall" - MatchIsTablet "on" + Identifier "evdev touchscreen catchall" + MatchIsTouchScreen "on" MatchDevicePath "/dev/input/event*" - Driver "evdev" + Driver "evdevmultitouch" + Option "MultiTouch" "10" EndSection Section "InputClass" - Identifier "evdev touchscreen catchall" - MatchIsTouchScreen "on" - MatchDevicePath "/dev/input/event*" - Driver "evdevmultitouch" - Option "MultiTouch" "10" + Identifier "evdev pointer catchall" + MatchIsTablet "on" + MatchDevicePath "/dev/input/event*" + Driver "evdev" EndSection Section "InputClass" diff --git a/conf-i386-vigs/module.conf b/conf-i386-vigs/module.conf index 05b566c..6450989 100644 --- a/conf-i386-vigs/module.conf +++ b/conf-i386-vigs/module.conf @@ -1,5 +1,6 @@ Section "Module" SubSection "xdbg" + Option "dlog" "true" Option "log_path" "/var/log/Xorg.0.log2" EndSubSection EndSection diff --git a/i386-common/Xorg.sh b/i386-common/Xorg.sh index 79a0def..b6ff0aa 100755 --- a/i386-common/Xorg.sh +++ b/i386-common/Xorg.sh @@ -1,2 +1,3 @@ export HOME=/root export DISPLAY=:0 +export XDG_RUNTIME_DIR=/tmp diff --git a/i386-common/startx b/i386-common/startx index d8e579d..9166ab1 100755 --- a/i386-common/startx +++ b/i386-common/startx @@ -14,22 +14,44 @@ for scriptlet in $(find /etc/X11/arch-preinit.d ! -type d); do test -x "$scriptlet" && . "$scriptlet" done +if [ -e /etc/emulator/opengl-es-setup-yagl-env.sh ]; then + /etc/emulator/opengl-es-setup-yagl-env.sh +fi + +#remove previous Xorg.0.log file +if [ -e /var/log/Xorg.0.log ]; then + rm /var/log/Xorg.0.log +fi + +#remove previous Xorg.0.log.old file +if [ -e /var/log/Xorg.0.log.old ]; then + rm /var/log/Xorg.0.log.old +fi + if [ -e ~/.xinitrc ]; then - XINITRC=~/.xinitrc + XINITRC=~/.xinitrc else - XINITRC=/etc/X11/xinitrc + XINITRC=/etc/X11/xinitrc fi XSERVER_OPTIONS=" ${DISPLAY} ${OTHER_OPTIONS} ${XORG_CONF} " if [ "$1" = "--gdb" ]; then - gdb --args Xorg ${XSERVER_OPTIONS} + /usr/bin/gdb --args /usr/bin/Xorg ${XSERVER_OPTIONS} else - if [ "$1" = "--only" ]; then - - Xorg ${XSERVER_OPTIONS} & - else - xinit ${XINITRC} -- /usr/bin/Xorg ${XSERVER_OPTIONS} & - fi + if [ "$1" = "--only" ]; then + export XSERVER_WAIT_MS=100000 + + /usr/bin/Xorg ${XSERVER_OPTIONS} & + else + export WMRC=/etc/X11/wmrc + export WMUSERID=`/usr/bin/id -u app` + export WMGROUPID=`/usr/bin/id -g app` + export WMUSER=app + export WMUSERHOME=/opt/home/app + export XSERVER_WAIT_MS=100000 + + /usr/bin/xinit ${XINITRC} -- /usr/bin/Xorg ${XSERVER_OPTIONS} & + fi fi diff --git a/i386-common/xinitrc b/i386-common/xinitrc index 6f2501d..181c7fe 100755 --- a/i386-common/xinitrc +++ b/i386-common/xinitrc @@ -1,3 +1,13 @@ #!/bin/sh -/usr/bin/scim -d & +/usr/bin/xmodmap /etc/X11/Xmodmap + +# set dpi +if [ -x /usr/bin/xrdb ]; then + if [ -e ~/.Xresources ]; then + /usr/bin/xrdb -load -nocpp ~/.Xresources + else + /usr/bin/xrdb -load -nocpp /etc/X11/Xresources + fi +fi + diff --git a/i386-common/xkeysymbol.map b/i386-common/xkeysymbol.map new file mode 100644 index 0000000..e67347d --- /dev/null +++ b/i386-common/xkeysymbol.map @@ -0,0 +1,8 @@ +KEY_POWER,XF86PowerOff +KEY_MENU,XF86Send +KEY_HOME,XF86Phone +KEY_BACK,XF86Stop +KEY_CAMERA,XF86WebCam +KEY_CONFIG,XF86Pictures +KEY_VOLUMEDOWN,XF86AudioLowerVolume +KEY_VOLUMEUP,XF86AudioRaiseVolume diff --git a/i386-common/xorg.service b/i386-common/xorg.service new file mode 100644 index 0000000..ac5e885 --- /dev/null +++ b/i386-common/xorg.service @@ -0,0 +1,13 @@ +[Unit] +Description=xserver +DefaultDependencies=no +After=systemd-udev-trigger.service opt.mount smack-default-labeling.service + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/startx +EnvironmentFile=/run/tizen-mobile-env + +[Install] +WantedBy=basic.target diff --git a/i386-common/xresources.service b/i386-common/xresources.service new file mode 100644 index 0000000..60f93b9 --- /dev/null +++ b/i386-common/xresources.service @@ -0,0 +1,15 @@ +[Unit] +Description=Xresources +After=tizen-runtime.target +Requires=tizen-runtime.target +ConditionFileIsExecutable=/usr/bin/xrdb + +[Service] +Type=oneshot +EnvironmentFile=/run/tizen-mobile-env +ExecStart=/usr/bin/xrdb -load -nocpp /etc/X11/Xresources +ExecStartPost=/bin/mkdir -p /tmp/hibernation +ExecStartPost=/bin/touch /tmp/hibernation/xresources_ready + +[Install] +WantedBy=multi-user.target diff --git a/i386-common/xserver b/i386-common/xserver index 40f2667..73995dd 100755 --- a/i386-common/xserver +++ b/i386-common/xserver @@ -8,7 +8,7 @@ export PATH=/bin:/usr/bin/:/sbin:/usr/sbin case "$1" in start) is_running=`ps ax | awk '{ print \$5 }' | grep Xorg` || true - if [ "${is_running}" = "" ]; then + if [ "${is_running}" = "" ]; then echo "Starting Xorg server..." /usr/bin/startx else @@ -17,8 +17,8 @@ case "$1" in ;; restart|reload|force-reload) - is_running=`ps ax | awk '{ print \$5 }' | grep Xorg` || true - if [ "${is_running}" != "" ]; then + is_running=`ps ax | awk '{ print \$5 }' | grep Xorg` || true + if [ "${is_running}" != "" ]; then $0 stop || true sleep 3 fi @@ -27,7 +27,7 @@ case "$1" in stop) is_running=`ps ax | awk '{ print \$5 }' | grep Xorg` || true - if [ "${is_running}" != "" ]; then + if [ "${is_running}" != "" ]; then echo "Stopping Xorg server..." killall -9 Xorg else diff --git a/packaging/xf86-misc-vigs.spec b/packaging/xf86-misc-vigs.spec index 5888bbe..d20e319 100644 --- a/packaging/xf86-misc-vigs.spec +++ b/packaging/xf86-misc-vigs.spec @@ -1,5 +1,5 @@ Name: xf86-misc-vigs -Summary: X.Org X11 X server misc files for vigs +Summary: X.Org X11 X server configuration files for vigs Version: 0.1.0 Release: 1 ExclusiveArch: %ix86 @@ -55,6 +55,13 @@ ln -s /etc/rc.d/init.d/xresources %{buildroot}/etc/rc.d/rc4.d/S80xresources cp -Rd conf-i386* %{buildroot}/etc/X11/ +mkdir -p %{buildroot}%{_libdir}/systemd/system/basic.target.wants +install -m 0644 i386-common/xorg.service %{buildroot}%{_libdir}/systemd/system/xorg.service +ln -s ../xorg.service %{buildroot}%{_libdir}/systemd/system/basic.target.wants/xorg.service +mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants +install -m 0644 i386-common/xresources.service %{buildroot}%{_libdir}/systemd/system/xresources.service +ln -s ../xresources.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/xresources.service + %post mkdir -p /etc/X11/xorg.conf.d for i in /etc/X11/conf-i386-vigs/*; do @@ -84,3 +91,7 @@ done %dir /etc/X11/arch-preinit.d /etc/X11/arch-preinit.d/* /etc/X11/conf-i386-vigs/* +%{_libdir}/systemd/system/xorg.service +%{_libdir}/systemd/system/basic.target.wants/xorg.service +%{_libdir}/systemd/system/xresources.service +%{_libdir}/systemd/system/multi-user.target.wants/xresources.service -- 2.7.4