From 90b4dc1e1d73582df0071ea996f9cad6ab957115 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Fri, 02 Nov 2012 13:41:28 +0000 Subject: Use Xephyr when running under X Only the display manager can authenticate a new X session with systemd. In a non authenticated session pulseaudio doesn't work and probably other stuff. --- (limited to 'scripts') diff --git a/scripts/get-screen-dpi b/scripts/get-screen-dpi new file mode 100755 index 0000000..8165920 --- /dev/null +++ b/scripts/get-screen-dpi @@ -0,0 +1,6 @@ +#!/usr/bin/python + +from gi.repository import Gtk + +settings = Gtk.Settings.get_default() +print settings.get_property('gtk-xft-dpi') / 1024 diff --git a/scripts/shell/start-sugar b/scripts/shell/start-sugar index 3ac2f09..a345eef 100755 --- a/scripts/shell/start-sugar +++ b/scripts/shell/start-sugar @@ -4,6 +4,8 @@ shelldir=`dirname "$0"` scriptsdir=`dirname "$shelldir"` rootdir=`dirname "$scriptsdir"` display=`$scriptsdir/find-free-display` +screen_dpi=`$scriptsdir/get-screen-dpi` +xephyr_options="-dpi $screen_dpi" if [ -f $rootdir/config ]; then source $rootdir/config @@ -23,8 +25,12 @@ if [ ! -z $SUGAR_PROFILE ]; then fi fi -if [ -z $RUN_IN_WINDOW ]; then +if [ -z $DISPLAY ]; then xinit $scriptsdir/xinitrc -- $display else - xinit $scriptsdir/xinitrc -- /usr/bin/Xephyr $display + if [ -z $RUN_IN_WINDOW ]; then + xephyr_options="$xephyr_options -fullscreen" + fi + + xinit $scriptsdir/xinitrc -- /usr/bin/Xephyr $display $xephyr_options fi -- cgit v0.9.1