Merge lp:~noskcaj/ubuntu/utopic/xfce4-session/merge2 into lp:ubuntu/utopic/xfce4-session

Proposed by Jackson Doak
Status: Needs review
Proposed branch: lp:~noskcaj/ubuntu/utopic/xfce4-session/merge2
Merge into: lp:ubuntu/utopic/xfce4-session
Diff against target: 3065 lines (+76/-2639)
25 files modified
.pc/01_fix-xrdb-call.patch/scripts/xinitrc.in.in (+0/-192)
.pc/03_runtime-logind-support.patch/configure.ac (+0/-216)
.pc/03_runtime-logind-support.patch/xfce4-session/Makefile.am (+0/-143)
.pc/03_runtime-logind-support.patch/xfce4-session/xfsm-shutdown.c (+0/-818)
.pc/03_runtime-logind-support.patch/xfce4-session/xfsm-systemd.c (+0/-229)
.pc/03_runtime-logind-support.patch/xfce4-session/xfsm-systemd.h (+0/-55)
.pc/applied-patches (+0/-5)
.pc/xflock4-light-locker-support.patch/scripts/xflock4 (+0/-50)
.pc/xubuntu_ignore-gdm-lang.patch/xfce4-session/main.c (+0/-334)
.pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in (+0/-192)
.pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in.in (+0/-192)
configure.ac (+4/-4)
debian/changelog (+25/-0)
debian/patches/02_add-dm-tool-to-xflock4.patch (+0/-10)
debian/patches/02_add-light-locker-to-xflock4.patch (+10/-0)
debian/patches/series (+1/-1)
debian/patches/xflock4-light-locker-support.patch (+0/-21)
scripts/xflock4 (+1/-2)
scripts/xinitrc.in (+0/-6)
scripts/xinitrc.in.in (+1/-7)
xfce4-session/Makefile.am (+4/-2)
xfce4-session/main.c (+8/-0)
xfce4-session/xfsm-shutdown.c (+22/-57)
xfce4-session/xfsm-systemd.c (+0/-85)
xfce4-session/xfsm-systemd.h (+0/-18)
To merge this branch: bzr merge lp:~noskcaj/ubuntu/utopic/xfce4-session/merge2
Reviewer Review Type Date Requested Status
Daniel Holbach (community) Needs Fixing
Review via email: mp+231095@code.launchpad.net

Description of the change

Merge from debian

To post a comment you must log in.
Revision history for this message
Daniel Holbach (dholbach) wrote :

daniel@daydream:~/xfce4-session$ bzr merge lp:~noskcaj/ubuntu/utopic/xfce4-session/merge2
Unapplying quilt patches to prevent spurious conflicts
+N debian/patches/02_add-light-locker-to-xflock4.patch
 M debian/changelog
 M debian/patches/series
-D debian/patches/xflock4-light-locker-support.patch
Text conflict in debian/patches/series
Auf 1 Konflikte gestoßen.
daniel@daydream:~/xfce4-session$ bzr bd -- -S -us -uc -v4.11.0-1ubuntu1
Building using working tree
bzr: ERROR: There are conflicts in the working tree. You must resolve these before building.
daniel@daydream:~/xfce4-session$ cat debian/patches/series
01_fix-xrdb-call.patch
<<<<<<< TREE
02_runtime-logind-support.patch
=======
02_add-light-locker-to-xflock4.patch
03_runtime-logind-support.patch
>>>>>>> MERGE-SOURCE
xubuntu_ignore-gdm-lang.patch
xubuntu_set-xdg-current-desktop.patch
daniel@daydream:~/xfce4-session$

review: Needs Fixing

Unmerged revisions

83. By Jackson Doak

* Merge from Debian unstable, remaining Ubuntu changes:
  - debian/patches:
    + xubuntu_ignore-gdm-lang.patch: do not set $LANG to $GDM_LANG, there's
      already an xsession script to do that, and $GDM_LANG might not contain
      a valid locale code.
    + xubuntu_set-xdg-current-desktop.patch: added. Taken from xfce4-utils,
      export XDG_CURRENT_DESKTOP=XFCE, can be useful with alacarte and
      gnome-menus.
    + debian/patches/xubuntu_runtime-logind-support.patch:
      Check for logind support at runtime
  - Add startxfce4.user-session.upstart
* Drop xflock4-light-locker-support.patch, fixed in debian
* debian/patches:
  - 02_add-light-locker-to-xflock4 added, add light-locker support to
    xflock4 now that it's in Jessie. closes: #757649

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== removed directory '.pc/01_fix-xrdb-call.patch'
2=== removed directory '.pc/01_fix-xrdb-call.patch/scripts'
3=== removed file '.pc/01_fix-xrdb-call.patch/scripts/xinitrc.in.in'
4--- .pc/01_fix-xrdb-call.patch/scripts/xinitrc.in.in 2013-10-23 21:13:30 +0000
5+++ .pc/01_fix-xrdb-call.patch/scripts/xinitrc.in.in 1970-01-01 00:00:00 +0000
6@@ -1,192 +0,0 @@
7-#!/bin/sh
8-
9-# fix broken $UID on some system...
10-if test "x$UID" = "x"; then
11- if test -x /usr/xpg4/bin/id; then
12- UID=`/usr/xpg4/bin/id -u`;
13- else
14- UID=`id -u`;
15- fi
16-fi
17-
18-# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
19-# over "applications.menu" in all Xfce applications.
20-if test "x$XDG_MENU_PREFIX" = "x"; then
21- XDG_MENU_PREFIX="xfce-"
22- export XDG_MENU_PREFIX
23-fi
24-
25-# set DESKTOP_SESSION so that one can detect easily if an Xfce session is running
26-if test "x$DESKTOP_SESSION" = "x"; then
27- DESKTOP_SESSION="xfce"
28- export DESKTOP_SESSION
29-fi
30-
31-# $XDG_CONFIG_HOME defines the base directory relative to which user specific
32-# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
33-# or empty, a default equal to $HOME/.config should be used.
34-if test "x$XDG_CONFIG_HOME" = "x" ; then
35- XDG_CONFIG_HOME=$HOME/.config
36-fi
37-[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
38-
39-# $XDG_CACHE_HOME defines the base directory relative to which user specific
40-# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
41-# set or empty, a default equal to $HOME/.cache should be used.
42-if test "x$XDG_CACHE_HOME" = "x" ; then
43- XDG_CACHE_HOME=$HOME/.cache
44-fi
45-[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
46-
47-# set up XDG user directores. see
48-# http://freedesktop.org/wiki/Software/xdg-user-dirs
49-if which xdg-user-dirs-update >/dev/null 2>&1; then
50- xdg-user-dirs-update
51-fi
52-
53-# Modify libglade and glade environment variables so that
54-# it will find the files installed by Xfce
55-GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:@XFCE_GLADE_CATALOG_PATH@"
56-GLADE_PIXMAP_PATH="$GLADE_PIXMAP_PATH:@XFCE_GLADE_PIXMAP_PATH@"
57-GLADE_MODULE_PATH="$GLADE_MODULE_PATH:@XFCE_GLADE_MODULE_PATH@"
58-export GLADE_CATALOG_PATH
59-export GLADE_PIXMAP_PATH
60-export GLADE_MODULE_PATH
61-
62-# For now, start with an empty list
63-XRESOURCES=""
64-
65-# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
66-test -r "@_sysconfdir_@/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES @_sysconfdir_@/xdg/xfce4/Xft.xrdb"
67-test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"
68-
69-BASEDIR=$XDG_CONFIG_HOME/xfce4
70-if test -r "$BASEDIR/Xft.xrdb"; then
71- XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
72-elif test -r "$XFCE4HOME/Xft.xrdb"; then
73- mkdir -p "$BASEDIR"
74- cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
75- XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
76-fi
77-
78-# merge in X cursor settings
79-test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"
80-
81-# ~/.Xresources contains overrides to the above
82-test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
83-
84-# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
85-cat /dev/null $XRESOURCES | xrdb -nocpp -merge -
86-
87-# load local modmap
88-test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
89-
90-# run xfce4-session if installed
91-if which xfce4-session >/dev/null 2>&1; then
92-
93- # check if we start xfce4-session with ck-launch-session. this is only
94- # required for starting from a console, not a login manager
95- if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
96- if which ck-launch-session >/dev/null 2>&1; then
97- ck-launch-session xfce4-session
98- else
99- echo
100- echo "You have tried to start Xfce with consolekit support, but"
101- echo "ck-launch-session is not installed."
102- echo "Aborted startup..."
103- echo
104-
105- exit 1
106- fi
107- else
108- # start xfce4-session normally
109- xfce4-session
110- fi
111-
112- exit 0
113-fi
114-
115-##################
116-# IMPORTANT NOTE #
117-##################
118-
119-# Everything below here ONLY gets executed if you are NOT using xfce4-session
120-# (Xfce's session manager). If you are using the session manager, everything
121-# below is handled by it, and the code below is not executed at all. If you're
122-# not sure if you're using the session manager, type 'ps -e|grep xfce4-session'
123-# in a terminal while Xfce is running.
124-
125-##################
126-
127-# Use dbus-launch if installed.
128-if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
129- if which dbus-launch >/dev/null 2>&1; then
130- eval `dbus-launch --sh-syntax --exit-with-session`
131- # some older versions of dbus don't export the var properly
132- export DBUS_SESSION_BUS_ADDRESS
133- else
134- echo "Could not find dbus-launch; Xfce will not work properly" >&2
135- fi
136-fi
137-
138-# this is only necessary when running w/o xfce4-session
139-xsetroot -solid black -cursor_name watch
140-
141-# or use old-fashioned startup script otherwise
142-
143-xfsettingsd &
144-xfwm4 --daemon
145-
146-# start up stuff in $XDG_CONFIG_HOME/autostart/
147-if test -d "$XDG_CONFIG_HOME/autostart"; then
148- for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
149- grep -q -E "^Hidden=true" "$i" && continue
150- if grep -q -E "^OnlyShowIn=" "$i"; then
151- # need to test twice, as lack of the line entirely means we still run it
152- grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
153- fi
154- grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
155-
156- # check for TryExec
157- trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
158- if test "$trycmd"; then
159- which "$trycmd" >/dev/null 2>&1 || continue
160- fi
161-
162- cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
163- if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
164- $cmd &
165- fi
166- done
167-fi
168-
169-xfdesktop&
170-orage &
171-
172-panel=`which xfce4-panel`
173-case "x$panel" in
174- x|xno*)
175- ;;
176- *)
177- $panel
178- ret=$?
179- while test $ret -ne 0; do
180- xmessage -center -file - -timeout 20 -title Error <<EOF
181-A crash occured in the panel
182-Please report this to the xfce4-dev@xfce.org list
183-or on http://bugs.xfce.org
184-Meanwhile the panel will be restarted
185-EOF
186- cat >&2 <<EOF
187-A crash occured in the panel
188-Please report this to the xfce4-dev@xfce.org list
189-or on http://bugs.xfce.org
190-Meanwhile the panel will be restarted
191-EOF
192- $panel
193- ret=$?
194- done
195- ;;
196-esac
197-
198-xsetroot -bg white -fg red -solid black -cursor_name watch
199
200=== removed directory '.pc/03_runtime-logind-support.patch'
201=== removed file '.pc/03_runtime-logind-support.patch/configure.ac'
202--- .pc/03_runtime-logind-support.patch/configure.ac 2014-07-17 06:37:50 +0000
203+++ .pc/03_runtime-logind-support.patch/configure.ac 1970-01-01 00:00:00 +0000
204@@ -1,216 +0,0 @@
205-dnl
206-dnl This file was autogenerated from "configure.ac.in".
207-dnl Edit that file instead!
208-dnl
209-
210-dnl
211-dnl Copyright (c) 2003-2009
212-dnl The Xfce development team. All rights reserved.
213-dnl
214-dnl Written for Xfce by Benedikt Meurer <benny@xfce.org>.
215-dnl
216-
217-dnl Version information
218-m4_define([xfsm_version_major], [4])
219-m4_define([xfsm_version_minor], [10])
220-m4_define([xfsm_version_micro], [1])
221-m4_define([xfsm_version_nano], []) dnl leave this empty to have no nano version
222-m4_define([xfsm_version_build], [c0409d7])
223-m4_define([xfsm_version_tag], [])
224-m4_define([xfsm_version], [xfsm_version_major().xfsm_version_minor().xfsm_version_micro()ifelse(xfsm_version_nano(), [], [], [.xfsm_version_nano()])ifelse(xfsm_version_tag(), [git], [xfsm_version_tag()-xfsm_version_build()], [xfsm_version_tag()])])
225-
226-m4_define([xfsm_debug_default], [ifelse(xfsm_version_tag(), [git], [full], [minimum])])
227-
228-dnl Initialize autoconf
229-AC_COPYRIGHT([Copyright (c) 2003-2011
230- The Xfce development team. All rights reserved.
231-
232-Written for Xfce by Benedikt Meurer <benny@xfce.org>.])
233-AC_INIT([xfce4-session], [xfsm_version], [http://bugs.xfce.org/])
234-AC_PREREQ([2.59c])
235-AC_REVISION([$Id$])
236-AC_PROG_MAKE_SET()
237-
238-dnl Initialize automake
239-AM_INIT_AUTOMAKE([1.8 dist-bzip2 tar-ustar no-dist-gzip])
240-AC_CONFIG_HEADERS([config.h])
241-AM_MAINTAINER_MODE()
242-m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
243-
244-dnl Set helper path prefix
245-AC_ARG_WITH([helper-path-prefix],
246- [AC_HELP_STRING([--with-helper-path-prefix=PATH],
247- [Path prefix under which helper executables will be installed (default: $libdir)])],
248- [HELPER_PATH_PREFIX="$withval"],
249- [HELPER_PATH_PREFIX="$libdir"])
250-AC_SUBST([HELPER_PATH_PREFIX])
251-
252-dnl check for UNIX variants
253-AC_USE_SYSTEM_EXTENSIONS
254-AM_CONDITIONAL([HAVE_OS_CYGWIN], [test x"`uname | grep \"CYGWIN\"`" != x""])
255-if test x"`uname | grep \"CYGWIN\"`" != x""; then
256- AC_DEFINE([HAVE_OS_CYGWIN], [1], [Compiling under cygwin])
257-fi
258-
259-dnl check for basic programs
260-AC_PROG_CC()
261-AM_PROG_CC_C_O()
262-AC_PROG_INSTALL()
263-AC_PROG_INTLTOOL()
264-m4_ifdef([AC_PROG_SED], [AC_PROG_SED], [AC_CHECK_PROG(SED, sed, sed)])
265-
266-dnl check for libtool
267-LT_PREREQ([2.2.6])
268-LT_INIT([disable-static])
269-
270-dnl check for standard header files
271-AC_HEADER_STDC
272-AC_CHECK_HEADERS([asm/unistd.h errno.h fcntl.h limits.h \
273- netdb.h pwd.h signal.h stdarg.h sys/param.h sys/resource.h \
274- sys/socket.h sys/time.h sys/wait.h sys/utsname.h time.h \
275- unistd.h sys/param.h sys/user.h sys/sysctl.h math.h sys/types.h])
276-AC_CHECK_FUNCS([getaddrinfo gethostbyname gethostname getpwuid setsid \
277- sigaction strdup sync vfork])
278-
279-dnl Check for required libraries
280-AC_CHECK_LIBM
281-AC_SUBST(LIBM)
282-
283-dnl Check for X11 installed
284-XDT_CHECK_LIBX11_REQUIRE()
285-
286-dnl Check for session management support
287-XDT_CHECK_LIBSM()
288-
289-dnl Check for _IceTransNoListen
290-ac_LIBS="$LIBS"
291-LIBS="$LIBS $LIBSM_LDFLAGS $LIBSM_LIBS"
292-AC_CHECK_FUNCS([_IceTransNoListen])
293-LIBS="$ac_LIBS"
294-
295-dnl Check for i18n support
296-XDT_I18N([am ar ast az be bg bn bn_IN ca cs da de dz el en_GB eo es es_MX et eu fa fi fr gl gu he hi hr hu id is it ja ka kk ko lt lv mk mr ms nb nl nn pa pl pt pt_BR ro ru si sk sq sr sv ta te tr ug uk ur ur_PK vi zh_CN zh_TW ])
297-
298-dnl Check for required packages
299-XDT_CHECK_PACKAGE([LIBXFCE4UTIL], [libxfce4util-1.0], [4.9.0])
300-XDT_CHECK_PACKAGE([LIBXFCE4UI], [libxfce4ui-1], [4.9.0])
301-XDT_CHECK_PACKAGE([GTK], [gtk+-2.0], [2.20.0])
302-XDT_CHECK_PACKAGE([GMODULE], [gmodule-2.0], [2.24.0])
303-XDT_CHECK_PACKAGE([LIBWNCK], [libwnck-1.0], [2.30])
304-XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.1.0])
305-XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84])
306-XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0])
307-
308-dnl Check for polkit / systemd integration
309-XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100],
310- [systemd], [Systemd support (through polit)])
311-
312-dnl Check for debugging support
313-XDT_FEATURE_DEBUG([xfsm_debug_default])
314-
315-dnl Check for linker optimizations
316-XDT_FEATURE_LINKER_OPTS()
317-
318-dnl Check for iceauth
319-AC_PATH_PROG([ICEAUTH], [iceauth])
320-if test x"$ICEAUTH" != x""; then
321- AC_DEFINE_UNQUOTED([ICEAUTH_CMD], ["$ICEAUTH"], [path to iceauth])
322-else
323- AC_MSG_ERROR([iceauth missing, please check your X11 installation])
324-fi
325-
326-dnl Find a location for the session desktop file
327-AC_MSG_CHECKING([what xsession-prefix to use])
328-AC_ARG_WITH([xsession-prefix],
329- AC_HELP_STRING([--with-xsession-prefix=XSESSION_PREFIX], [What should be the prefix for the xsession .desktop file?]),
330- [], [with_xsession_prefix="/usr"])
331-XSESSION_PREFIX=$with_xsession_prefix
332-AC_SUBST([XSESSION_PREFIX])
333-AC_MSG_RESULT([$with_xsession_prefix])
334-
335-dnl Check for rm
336-AC_PATH_PROG([RM], [rm])
337-if test x"$RM" != x""; then
338- AC_DEFINE_UNQUOTED([RM_CMD], ["$RM"], [path to rm])
339-fi
340-
341-dnl Check for legacy session management
342-AC_ARG_ENABLE([legacy-sm],
343-AC_HELP_STRING([--enable-legacy-sm], [Enable X11R5 session management])
344-AC_HELP_STRING([--disable-legacy-sm], [Disable X11R5 session management]),
345- [], [enable_legacy_sm=yes])
346-AC_MSG_CHECKING([whether to enable X11R5 session management])
347-if test x"$enable_legacy_sm" != x"yes"; then
348- AC_MSG_RESULT([no])
349-else
350- AC_DEFINE([LEGACY_SESSION_MANAGEMENT], [1], [Define for X11R5 sm compat])
351- AC_MSG_RESULT([yes])
352-fi
353-
354-dnl check for linux/ioprio.h, and also check that the header actually
355-dnl works, as some kernels have bad headers. using AC_CHECK_HEADERS()
356-dnl prints a scary warning with a request to report a bug if it fails,
357-dnl but we do not want that.
358-AC_MSG_CHECKING([whether linux/ioprio.h exists and actually works])
359-AC_COMPILE_IFELSE([
360-AC_INCLUDES_DEFAULT
361-#include <linux/ioprio.h>
362- ], [linux_ioprio_works=yes], [linux_ioprio_works=no])
363-AC_MSG_RESULT([$linux_ioprio_works])
364-if test "x$linux_ioprio_works" = "xyes"; then
365- AC_DEFINE([HAVE_WORKING_LINUX_IOPRIO_H], [1],
366- [Defined if linux/ioprio.h not only exists, but works properly])
367-fi
368-
369-dnl check for location Xfce glade files were installed to
370-XFCE_GLADE_CATALOG_PATH="`pkg-config --variable glade_catalogdir libxfce4ui-1`"
371-XFCE_GLADE_PIXMAP_PATH="`pkg-config --variable glade_pixmapdir libxfce4ui-1`"
372-XFCE_GLADE_MODULE_PATH="`pkg-config --variable glade_moduledir libxfce4ui-1`"
373-AC_SUBST(XFCE_GLADE_CATALOG_PATH)
374-AC_SUBST(XFCE_GLADE_PIXMAP_PATH)
375-AC_SUBST(XFCE_GLADE_MODULE_PATH)
376-
377-AC_OUTPUT([
378-Makefile
379-doc/Makefile
380-engines/Makefile
381-engines/balou/Makefile
382-engines/balou/scripts/Makefile
383-engines/balou/themes/Makefile
384-engines/balou/themes/Default/Makefile
385-engines/mice/Makefile
386-engines/simple/Makefile
387-icons/Makefile
388-icons/48x48/Makefile
389-icons/128x128/Makefile
390-icons/scalable/Makefile
391-libxfsm/Makefile
392-libxfsm/xfce4-session-2.0.pc
393-po/Makefile.in
394-settings/Makefile
395-scripts/Makefile
396-scripts/xinitrc.in
397-xfce4-session/Makefile
398-xfce4-session-logout/Makefile
399-xfsm-shutdown-helper/Makefile
400-])
401-
402-dnl ***************************
403-dnl *** Print configuration ***
404-dnl ***************************
405-echo
406-echo "Build Configuration:"
407-echo
408-echo " * Debugging support: $enable_debug"
409-if test x"$enable_legacy_sm" = x"yes"; then
410-echo " * Legacy session management: yes"
411-else
412-echo " * Legacy session management: no"
413-fi
414-if test x"$GNOME_KEYRING_FOUND" = x"yes"; then
415-echo " * Gnome Keyring support: yes"
416-else
417-echo " * Gnome Keyring support: no"
418-fi
419-
420-echo
421
422=== removed directory '.pc/03_runtime-logind-support.patch/xfce4-session'
423=== removed file '.pc/03_runtime-logind-support.patch/xfce4-session/Makefile.am'
424--- .pc/03_runtime-logind-support.patch/xfce4-session/Makefile.am 2014-07-17 06:37:50 +0000
425+++ .pc/03_runtime-logind-support.patch/xfce4-session/Makefile.am 1970-01-01 00:00:00 +0000
426@@ -1,143 +0,0 @@
427-
428-AM_CPPFLAGS = \
429- -I$(top_builddir) \
430- -I$(top_srcdir) \
431- -DG_LOG_DOMAIN=\"xfce4-session\" \
432- -DLIBDIR=\"$(libdir)\" \
433- -DPACKAGE_LOCALE_DIR=\"$(localedir)\" \
434- -DSYSCONFDIR=\"$(sysconfdir)\" \
435- -DXFSM_SHUTDOWN_HELPER_CMD=\"$(HELPER_PATH_PREFIX)/xfce4/session/xfsm-shutdown-helper\" \
436- -DDBUS_API_SUBJECT_TO_CHANGE \
437- -DWNCK_I_KNOW_THIS_IS_UNSTABLE \
438- $(PLATFORM_CPPFLAGS)
439-
440-man_MANS = xfce4-session.1
441-
442-bin_PROGRAMS = xfce4-session
443-
444-xfce4_session_built_sources = \
445- xfsm-chooser-icon.h \
446- xfsm-client-dbus.h \
447- xfsm-manager-dbus.h \
448- xfsm-marshal.c \
449- xfsm-marshal.h
450-
451-xfce4_session_SOURCES = \
452- $(xfce4_session_built_sources) \
453- ice-layer.c \
454- ice-layer.h \
455- main.c \
456- sm-layer.c \
457- sm-layer.h \
458- xfsm-chooser.c \
459- xfsm-chooser.h \
460- xfsm-client.c \
461- xfsm-client.h \
462- xfsm-client-dbus.h \
463- xfsm-compat-gnome.c \
464- xfsm-compat-gnome.h \
465- xfsm-compat-kde.c \
466- xfsm-compat-kde.h \
467- xfsm-dns.c \
468- xfsm-dns.h \
469- xfsm-error.c \
470- xfsm-error.h \
471- xfsm-fadeout.c \
472- xfsm-fadeout.h \
473- xfsm-global.c \
474- xfsm-global.h \
475- xfsm-legacy.c \
476- xfsm-legacy.h \
477- xfsm-logout-dialog.c \
478- xfsm-logout-dialog.h \
479- xfsm-manager.c \
480- xfsm-manager.h \
481- xfsm-properties.c \
482- xfsm-properties.h \
483- xfsm-shutdown.c \
484- xfsm-shutdown.h \
485- xfsm-splash-screen.c \
486- xfsm-splash-screen.h \
487- xfsm-startup.c \
488- xfsm-startup.h \
489- xfsm-upower.c \
490- xfsm-upower.h
491-
492-if HAVE_SYSTEMD
493-xfce4_session_SOURCES += \
494- xfsm-systemd.c \
495- xfsm-systemd.h
496-else
497-xfce4_session_SOURCES += \
498- xfsm-consolekit.c \
499- xfsm-consolekit.h
500-endif
501-
502-xfce4_session_CFLAGS = \
503- $(LIBSM_CFLAGS) \
504- $(LIBX11_CFLAGS) \
505- $(LIBXFCE4UI_CFLAGS) \
506- $(DBUS_CFLAGS) \
507- $(DBUS_GLIB_CFLAGS) \
508- $(LIBWNCK_CFLAGS) \
509- $(SYSTEMD_CFLAGS) \
510- $(XFCONF_CFLAGS) \
511- $(GMODULE_CFLAGS) \
512- $(PLATFORM_CFLAGS)
513-
514-xfce4_session_LDFLAGS = \
515- -no-undefined \
516- $(PLATFORM_LDFLAGS)
517-
518-xfce4_session_LDADD = \
519- $(top_builddir)/libxfsm/libxfsm-4.6.la \
520- $(LIBSM_LDFLAGS) \
521- $(LIBSM_LIBS) \
522- $(LIBX11_LDFLAGS) \
523- $(LIBX11_LIBS) \
524- $(LIBXFCE4UI_LIBS) \
525- $(GMODULE_LIBS) \
526- $(DBUS_LIBS) \
527- $(DBUS_GLIB_LIBS) \
528- $(LIBWNCK_LIBS) \
529- $(SYSTEMD_LIBS) \
530- $(XFCONF_LIBS) \
531- -lm
532-
533-xfce4_session_DEPENDENCIES = \
534- $(top_builddir)/libxfsm/libxfsm-4.6.la
535-
536-if MAINTAINER_MODE
537-
538-xfsm-chooser-icon.h: $(srcdir)/xfsm-chooser-icon.png
539- $(AM_V_GEN) gdk-pixbuf-csource --static --raw --stream --name=xfsm_chooser_icon_data $< > $@
540-
541-xfsm-marshal.h: $(srcdir)/xfsm-marshal.list Makefile
542- $(AM_V_GEN) glib-genmarshal --prefix=xfsm_marshal --internal --header $< > $@
543-
544-xfsm-marshal.c: $(srcdir)/xfsm-marshal.list Makefile
545- $(AM_V_GEN) echo "#include <xfce4-session/xfsm-marshal.h>" > $@ \
546- && glib-genmarshal --prefix=xfsm_marshal --body $< >> $@
547-
548-xfsm-manager-dbus.h: $(srcdir)/xfsm-manager-dbus.xml
549- $(AM_V_GEN) dbus-binding-tool --mode=glib-server --prefix=xfsm_manager $< > $@
550-
551-xfsm-client-dbus.h: $(srcdir)/xfsm-client-dbus.xml
552- $(AM_V_GEN) dbus-binding-tool --mode=glib-server --prefix=xfsm_client $< > $@
553-
554-DISTCLEANFILES = \
555- $(xfce4_session_built_sources)
556-
557-BUILT_SOURCES = \
558- $(xfce4_session_built_sources)
559-
560-endif
561-
562-EXTRA_DIST = \
563- $(man_MANS) \
564- xfsm-chooser-icon.png \
565- xfsm-marshal.list \
566- xfsm-client-dbus.xml \
567- xfsm-manager-dbus.xml
568-
569-# vi:set ts=8 sw=8 noet ai nocindent syntax=automake:
570
571=== removed file '.pc/03_runtime-logind-support.patch/xfce4-session/xfsm-shutdown.c'
572--- .pc/03_runtime-logind-support.patch/xfce4-session/xfsm-shutdown.c 2014-07-17 06:37:50 +0000
573+++ .pc/03_runtime-logind-support.patch/xfce4-session/xfsm-shutdown.c 1970-01-01 00:00:00 +0000
574@@ -1,818 +0,0 @@
575-/*-
576- * Copyright (c) 2003-2004 Benedikt Meurer <benny@xfce.org>
577- * Copyright (c) 2011 Nick Schermer <nick@xfce.org>
578- * All rights reserved.
579- *
580- * This program is free software; you can redistribute it and/or modify
581- * it under the terms of the GNU General Public License as published by
582- * the Free Software Foundation; either version 2, or (at your option)
583- * any later version.
584- *
585- * This program is distributed in the hope that it will be useful,
586- * but WITHOUT ANY WARRANTY; without even the implied warranty of
587- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
588- * GNU General Public License for more details.
589- *
590- * You should have received a copy of the GNU General Public License
591- * along with this program; if not, write to the Free Software
592- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
593- * MA 02110-1301 USA.
594- *
595- * Parts of this file where taken from gnome-session/logout.c, which
596- * was written by Owen Taylor <otaylor@redhat.com>.
597- */
598-
599-#ifdef HAVE_CONFIG_H
600-#include <config.h>
601-#endif
602-
603-#ifdef HAVE_SYS_TYPES_H
604-#include <sys/types.h>
605-#endif
606-#ifdef HAVE_SYS_WAIT_H
607-#include <sys/wait.h>
608-#endif
609-#ifdef HAVE_SYS_RESOURCE_H
610-#include <sys/resource.h>
611-#endif
612-
613-#ifdef HAVE_STDLIB_H
614-#include <stdlib.h>
615-#endif
616-#ifdef HAVE_STRING_H
617-#include <string.h>
618-#endif
619-#ifdef HAVE_UNISTD_H
620-#include <unistd.h>
621-#endif
622-#ifdef HAVE_ERRNO_H
623-#include <errno.h>
624-#endif
625-#ifdef HAVE_SIGNAL_H
626-#include <signal.h>
627-#endif
628-
629-
630-#include <dbus/dbus-glib.h>
631-#include <dbus/dbus-glib-lowlevel.h>
632-#include <libxfce4util/libxfce4util.h>
633-#include <gtk/gtk.h>
634-
635-#include <libxfsm/xfsm-util.h>
636-
637-#include <xfce4-session/xfsm-shutdown.h>
638-#include <xfce4-session/xfsm-compat-gnome.h>
639-#include <xfce4-session/xfsm-compat-kde.h>
640-#include <xfce4-session/xfsm-fadeout.h>
641-#include <xfce4-session/xfsm-global.h>
642-#include <xfce4-session/xfsm-legacy.h>
643-#include <xfce4-session/xfsm-upower.h>
644-
645-#ifdef HAVE_SYSTEMD
646-#include <xfce4-session/xfsm-systemd.h>
647-#else
648-#include <xfce4-session/xfsm-consolekit.h>
649-#endif
650-
651-static void xfsm_shutdown_finalize (GObject *object);
652-static void xfsm_shutdown_sudo_free (XfsmShutdown *shutdown);
653-
654-
655-
656-struct _XfsmShutdownClass
657-{
658- GObjectClass __parent__;
659-};
660-
661-typedef enum
662-{
663- SUDO_NOT_INITIAZED,
664- SUDO_AVAILABLE,
665- SUDO_FAILED
666-}
667-HelperState;
668-
669-struct _XfsmShutdown
670-{
671- GObject __parent__;
672-
673-#ifdef HAVE_SYSTEMD
674- XfsmSystemd *systemd;
675-#else
676- XfsmConsolekit *consolekit;
677-#endif
678- XfsmUPower *upower;
679-
680- /* kiosk settings */
681- gboolean kiosk_can_shutdown;
682- gboolean kiosk_can_save_session;
683-
684- /* sudo helper */
685- HelperState helper_state;
686- pid_t helper_pid;
687- FILE *helper_infile;
688- FILE *helper_outfile;
689- guint helper_watchid;
690- gboolean helper_require_password;
691-};
692-
693-
694-
695-G_DEFINE_TYPE (XfsmShutdown, xfsm_shutdown, G_TYPE_OBJECT)
696-
697-
698-
699-static void
700-xfsm_shutdown_class_init (XfsmShutdownClass *klass)
701-{
702- GObjectClass *gobject_class;
703-
704- gobject_class = G_OBJECT_CLASS (klass);
705- gobject_class->finalize = xfsm_shutdown_finalize;
706-}
707-
708-
709-
710-static void
711-xfsm_shutdown_init (XfsmShutdown *shutdown)
712-{
713- XfceKiosk *kiosk;
714-
715-#ifdef HAVE_SYSTEMD
716- shutdown->systemd = xfsm_systemd_get ();
717-#else
718- shutdown->consolekit = xfsm_consolekit_get ();
719-#endif
720- shutdown->upower = xfsm_upower_get ();
721- shutdown->helper_state = SUDO_NOT_INITIAZED;
722- shutdown->helper_require_password = FALSE;
723-
724- /* check kiosk */
725- kiosk = xfce_kiosk_new ("xfce4-session");
726- shutdown->kiosk_can_shutdown = xfce_kiosk_query (kiosk, "Shutdown");
727- shutdown->kiosk_can_save_session = xfce_kiosk_query (kiosk, "SaveSession");
728- xfce_kiosk_free (kiosk);
729-}
730-
731-
732-
733-static void
734-xfsm_shutdown_finalize (GObject *object)
735-{
736- XfsmShutdown *shutdown = XFSM_SHUTDOWN (object);
737-
738-#ifdef HAVE_SYSTEMD
739- g_object_unref (G_OBJECT (shutdown->systemd));
740-#else
741- g_object_unref (G_OBJECT (shutdown->consolekit));
742-#endif
743- g_object_unref (G_OBJECT (shutdown->upower));
744-
745- /* close down helper */
746- xfsm_shutdown_sudo_free (shutdown);
747-
748- (*G_OBJECT_CLASS (xfsm_shutdown_parent_class)->finalize) (object);
749-}
750-
751-
752-
753-static void
754-xfsm_shutdown_sudo_free (XfsmShutdown *shutdown)
755-{
756- gint status;
757-
758- /* close down helper */
759- if (shutdown->helper_infile != NULL)
760- {
761- fclose (shutdown->helper_infile);
762- shutdown->helper_infile = NULL;
763- }
764-
765- if (shutdown->helper_outfile != NULL)
766- {
767- fclose (shutdown->helper_outfile);
768- shutdown->helper_outfile = NULL;
769- }
770-
771- if (shutdown->helper_watchid > 0)
772- {
773- g_source_remove (shutdown->helper_watchid);
774- shutdown->helper_watchid = 0;
775- }
776-
777- if (shutdown->helper_pid > 0)
778- {
779- waitpid (shutdown->helper_pid, &status, 0);
780- shutdown->helper_pid = 0;
781- }
782-
783- /* reset state */
784- shutdown->helper_state = SUDO_NOT_INITIAZED;
785-}
786-
787-
788-
789-static void
790-xfsm_shutdown_sudo_childwatch (GPid pid,
791- gint status,
792- gpointer data)
793-{
794- /* close down sudo stuff */
795- xfsm_shutdown_sudo_free (XFSM_SHUTDOWN (data));
796-}
797-
798-
799-
800-static gboolean
801-xfsm_shutdown_sudo_init (XfsmShutdown *shutdown,
802- GError **error)
803-{
804- gchar *cmd;
805- struct rlimit rlp;
806- gchar buf[15];
807- gint parent_pipe[2];
808- gint child_pipe[2];
809- gint n;
810-
811- /* return state if we succeeded */
812- if (shutdown->helper_state != SUDO_NOT_INITIAZED)
813- return shutdown->helper_state == SUDO_AVAILABLE;
814-
815- g_return_val_if_fail (shutdown->helper_infile == NULL, FALSE);
816- g_return_val_if_fail (shutdown->helper_outfile == NULL, FALSE);
817- g_return_val_if_fail (shutdown->helper_watchid == 0, FALSE);
818- g_return_val_if_fail (shutdown->helper_pid == 0, FALSE);
819-
820- /* assume it won't work for now */
821- shutdown->helper_state = SUDO_FAILED;
822-
823- cmd = g_find_program_in_path ("sudo");
824- if (G_UNLIKELY (cmd == NULL))
825- {
826- g_set_error_literal (error, 1, 0,
827- "The program \"sudo\" was not found");
828- return FALSE;
829- }
830-
831- if (pipe (parent_pipe) == -1)
832- {
833- g_set_error (error, 1, 0,
834- "Unable to create parent pipe: %s",
835- strerror (errno));
836- goto err0;
837- }
838-
839- if (pipe (child_pipe) == -1)
840- {
841- g_set_error (error, 1, 0,
842- "Unable to create child pipe: %s",
843- strerror (errno));
844- goto err1;
845- }
846-
847- shutdown->helper_pid = fork ();
848- if (shutdown->helper_pid < 0)
849- {
850- g_set_error (error, 1, 0,
851- "Unable to fork sudo helper: %s",
852- strerror (errno));
853- goto err2;
854- }
855- else if (shutdown->helper_pid == 0)
856- {
857- /* setup signals */
858- signal (SIGPIPE, SIG_IGN);
859-
860- /* setup environment */
861- g_setenv ("LC_ALL", "C", TRUE);
862- g_setenv ("LANG", "C", TRUE);
863- g_setenv ("LANGUAGE", "C", TRUE);
864-
865- /* setup the 3 standard file handles */
866- dup2 (child_pipe[0], STDIN_FILENO);
867- dup2 (parent_pipe[1], STDOUT_FILENO);
868- dup2 (parent_pipe[1], STDERR_FILENO);
869-
870- /* close all other file handles */
871- getrlimit (RLIMIT_NOFILE, &rlp);
872- for (n = 0; n < (gint) rlp.rlim_cur; ++n)
873- {
874- if (n != STDIN_FILENO && n != STDOUT_FILENO && n != STDERR_FILENO)
875- close (n);
876- }
877-
878- /* execute sudo with the helper */
879- execl (cmd, "sudo", "-H", "-S", "-p",
880- "XFSM_SUDO_PASS ", "--",
881- XFSM_SHUTDOWN_HELPER_CMD, NULL);
882-
883- g_free (cmd);
884- cmd = NULL;
885-
886- _exit (127);
887- }
888- else
889- {
890- /* watch the sudo helper */
891- shutdown->helper_watchid = g_child_watch_add (shutdown->helper_pid,
892- xfsm_shutdown_sudo_childwatch,
893- shutdown);
894- }
895-
896- /* read sudo/helper answer */
897- n = read (parent_pipe[0], buf, sizeof (buf));
898- if (n < 15)
899- {
900- g_set_error (error, 1, 0,
901- "Unable to read response from sudo helper: %s",
902- n < 0 ? strerror (errno) : "Unknown error");
903- goto err2;
904- }
905-
906- /* open pipe to receive replies from sudo */
907- shutdown->helper_infile = fdopen (parent_pipe[0], "r");
908- if (shutdown->helper_infile == NULL)
909- {
910- g_set_error (error, 1, 0,
911- "Unable to open parent pipe: %s",
912- strerror (errno));
913- goto err2;
914- }
915- close (parent_pipe[1]);
916-
917- /* open pipe to send passwords to sudo */
918- shutdown->helper_outfile = fdopen (child_pipe[1], "w");
919- if (shutdown->helper_outfile == NULL)
920- {
921- g_set_error (error, 1, 0,
922- "Unable to open parent pipe: %s",
923- strerror (errno));
924- goto err2;
925- }
926- close (child_pipe[0]);
927-
928- /* check if NOPASSWD is set in /etc/sudoers */
929- if (memcmp (buf, "XFSM_SUDO_PASS ", 15) == 0)
930- {
931- shutdown->helper_require_password = TRUE;
932- }
933- else if (memcmp (buf, "XFSM_SUDO_DONE ", 15) == 0)
934- {
935- shutdown->helper_require_password = FALSE;
936- }
937- else
938- {
939- g_set_error (error, 1, 0,
940- "Got unexpected reply from sudo shutdown helper");
941- goto err2;
942- }
943-
944- /* if we try again */
945- shutdown->helper_state = SUDO_AVAILABLE;
946-
947- return TRUE;
948-
949-err2:
950- xfsm_shutdown_sudo_free (shutdown);
951-
952- close (child_pipe[0]);
953- close (child_pipe[1]);
954-
955-err1:
956- close (parent_pipe[0]);
957- close (parent_pipe[1]);
958-
959-err0:
960- g_free (cmd);
961-
962- shutdown->helper_pid = 0;
963-
964- return FALSE;
965-}
966-
967-
968-
969-static gboolean
970-xfsm_shutdown_sudo_try_action (XfsmShutdown *shutdown,
971- XfsmShutdownType type,
972- GError **error)
973-{
974- const gchar *action;
975- gchar reply[256];
976-
977- g_return_val_if_fail (shutdown->helper_state == SUDO_AVAILABLE, FALSE);
978- g_return_val_if_fail (shutdown->helper_outfile != NULL, FALSE);
979- g_return_val_if_fail (shutdown->helper_infile != NULL, FALSE);
980- g_return_val_if_fail (type == XFSM_SHUTDOWN_SHUTDOWN
981- || type == XFSM_SHUTDOWN_RESTART, FALSE);
982-
983- /* the command we send to sudo */
984- if (type == XFSM_SHUTDOWN_SHUTDOWN)
985- action = "POWEROFF";
986- else if (type == XFSM_SHUTDOWN_RESTART)
987- action = "REBOOT";
988- else
989- return FALSE;
990-
991- /* write action to sudo helper */
992- if (fprintf (shutdown->helper_outfile, "%s\n", action) > 0)
993- fflush (shutdown->helper_outfile);
994-
995- /* check if the write succeeded */
996- if (ferror (shutdown->helper_outfile) != 0)
997- {
998- /* probably succeeded but the helper got killed */
999- if (errno == EINTR)
1000- return TRUE;
1001-
1002- g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
1003- _("Error sending command to shutdown helper: %s"),
1004- strerror (errno));
1005- return FALSE;
1006- }
1007-
1008- /* get responce from sudo helper */
1009- if (fgets (reply, sizeof (reply), shutdown->helper_infile) == NULL)
1010- {
1011- /* probably succeeded but the helper got killed */
1012- if (errno == EINTR)
1013- return TRUE;
1014-
1015- g_set_error (error, G_FILE_ERROR, g_file_error_from_errno (errno),
1016- _("Error receiving response from shutdown helper: %s"),
1017- strerror (errno));
1018- return FALSE;
1019- }
1020-
1021- if (strncmp (reply, "SUCCEED", 7) != 0)
1022- {
1023- g_set_error (error, G_FILE_ERROR, G_FILE_ERROR_FAILED,
1024- _("Shutdown command failed"));
1025-
1026- return FALSE;
1027- }
1028-
1029- return TRUE;
1030-}
1031-
1032-
1033-
1034-static XfsmPassState
1035-xfsm_shutdown_sudo_send_password (XfsmShutdown *shutdown,
1036- const gchar *password)
1037-{
1038- gchar buf[1024];
1039- gsize len_buf, len_send;
1040- gint fd;
1041- gsize len;
1042- gssize result;
1043- gint attempts;
1044- const gchar *errmsg = NULL;
1045-
1046- g_return_val_if_fail (shutdown->helper_state == SUDO_AVAILABLE, PASSWORD_FAILED);
1047- g_return_val_if_fail (shutdown->helper_outfile != NULL, PASSWORD_FAILED);
1048- g_return_val_if_fail (shutdown->helper_infile != NULL, PASSWORD_FAILED);
1049- g_return_val_if_fail (shutdown->helper_require_password, PASSWORD_FAILED);
1050- g_return_val_if_fail (password != NULL, PASSWORD_FAILED);
1051-
1052- /* write password to sudo helper */
1053- g_snprintf (buf, sizeof (buf), "%s\n", password);
1054- len_buf = strlen (buf);
1055- len_send = fwrite (buf, 1, len_buf, shutdown->helper_outfile);
1056- fflush (shutdown->helper_outfile);
1057- bzero (buf, len_buf);
1058-
1059- if (len_send != len_buf
1060- || ferror (shutdown->helper_outfile) != 0)
1061- {
1062- errmsg = "Failed to send password to sudo";
1063- goto err1;
1064- }
1065-
1066- fd = fileno (shutdown->helper_infile);
1067-
1068- for (len = 0, attempts = 0;;)
1069- {
1070- result = read (fd, buf + len, 256 - len);
1071-
1072- if (result < 0)
1073- {
1074- errmsg = "Failed to read data from sudo";
1075- goto err1;
1076- }
1077- else if (result == 0)
1078- {
1079- /* don't try too often */
1080- if (++attempts > 20)
1081- {
1082- errmsg = "Too many password attempts";
1083- goto err1;
1084- }
1085-
1086- continue;
1087- }
1088- else if (result + len >= sizeof (buf))
1089- {
1090- errmsg = "Received too much data from sudo";
1091- goto err1;
1092- }
1093-
1094- len += result;
1095- buf[len] = '\0';
1096-
1097- if (len >= 15)
1098- {
1099- if (g_str_has_suffix (buf, "XFSM_SUDO_PASS "))
1100- {
1101- return PASSWORD_RETRY;
1102- }
1103- else if (g_str_has_suffix (buf, "XFSM_SUDO_DONE "))
1104- {
1105- /* sudo is unlocked, no further passwords required */
1106- shutdown->helper_require_password = FALSE;
1107-
1108- return PASSWORD_SUCCEED;
1109- }
1110- }
1111- }
1112-
1113- return PASSWORD_FAILED;
1114-
1115- err1:
1116-
1117- g_printerr (PACKAGE_NAME ": %s.\n\n", errmsg);
1118- return PASSWORD_FAILED;
1119-}
1120-
1121-
1122-
1123-static gboolean
1124-xfsm_shutdown_kiosk_can_shutdown (XfsmShutdown *shutdown,
1125- GError **error)
1126-{
1127- if (!shutdown->kiosk_can_shutdown)
1128- {
1129- g_set_error_literal (error, 1, 0, _("Shutdown is blocked by the kiosk settings"));
1130- return FALSE;
1131- }
1132-
1133- return TRUE;
1134-}
1135-
1136-
1137-
1138-XfsmShutdown *
1139-xfsm_shutdown_get (void)
1140-{
1141- static XfsmShutdown *object = NULL;
1142-
1143- if (G_LIKELY (object != NULL))
1144- {
1145- g_object_ref (G_OBJECT (object));
1146- }
1147- else
1148- {
1149- object = g_object_new (XFSM_TYPE_SHUTDOWN, NULL);
1150- g_object_add_weak_pointer (G_OBJECT (object), (gpointer) &object);
1151- }
1152-
1153- return object;
1154-}
1155-
1156-
1157-
1158-gboolean
1159-xfsm_shutdown_password_require (XfsmShutdown *shutdown,
1160- XfsmShutdownType type)
1161-{
1162- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1163-
1164- /* the helper only handled shutdown and restart */
1165- if (type == XFSM_SHUTDOWN_SHUTDOWN || type == XFSM_SHUTDOWN_RESTART)
1166- return shutdown->helper_require_password;
1167-
1168- return FALSE;
1169-}
1170-
1171-
1172-
1173-XfsmPassState
1174-xfsm_shutdown_password_send (XfsmShutdown *shutdown,
1175- XfsmShutdownType type,
1176- const gchar *password)
1177-{
1178- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), PASSWORD_FAILED);
1179- g_return_val_if_fail (password != NULL, PASSWORD_FAILED);
1180-
1181- if ((type == XFSM_SHUTDOWN_SHUTDOWN || type == XFSM_SHUTDOWN_RESTART)
1182- && shutdown->helper_state == SUDO_AVAILABLE)
1183- return xfsm_shutdown_sudo_send_password (shutdown, password);
1184-
1185- return PASSWORD_FAILED;
1186-}
1187-
1188-
1189-
1190-gboolean
1191-xfsm_shutdown_try_type (XfsmShutdown *shutdown,
1192- XfsmShutdownType type,
1193- GError **error)
1194-{
1195- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1196-
1197- switch (type)
1198- {
1199- case XFSM_SHUTDOWN_SHUTDOWN:
1200- return xfsm_shutdown_try_shutdown (shutdown, error);
1201-
1202- case XFSM_SHUTDOWN_RESTART:
1203- return xfsm_shutdown_try_restart (shutdown, error);
1204-
1205- case XFSM_SHUTDOWN_SUSPEND:
1206- return xfsm_shutdown_try_suspend (shutdown, error);
1207-
1208- case XFSM_SHUTDOWN_HIBERNATE:
1209- return xfsm_shutdown_try_hibernate (shutdown, error);
1210-
1211- default:
1212- g_set_error (error, 1, 0, _("Unknown shutdown method %d"), type);
1213- break;
1214- }
1215-
1216- return FALSE;
1217-}
1218-
1219-
1220-
1221-gboolean
1222-xfsm_shutdown_try_restart (XfsmShutdown *shutdown,
1223- GError **error)
1224-{
1225- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1226-
1227- if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, error))
1228- return FALSE;
1229-
1230- if (shutdown->helper_state == SUDO_AVAILABLE)
1231- return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_RESTART, error);
1232- else
1233-#ifdef HAVE_SYSTEMD
1234- return xfsm_systemd_try_restart (shutdown->systemd, error);
1235-#else
1236- return xfsm_consolekit_try_restart (shutdown->consolekit, error);
1237-#endif
1238-}
1239-
1240-
1241-
1242-gboolean
1243-xfsm_shutdown_try_shutdown (XfsmShutdown *shutdown,
1244- GError **error)
1245-{
1246- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1247-
1248- if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, error))
1249- return FALSE;
1250-
1251- if (shutdown->helper_state == SUDO_AVAILABLE)
1252- return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_SHUTDOWN, error);
1253- else
1254-#ifdef HAVE_SYSTEMD
1255- return xfsm_systemd_try_shutdown (shutdown->systemd, error);
1256-#else
1257- return xfsm_consolekit_try_shutdown (shutdown->consolekit, error);
1258-#endif
1259-}
1260-
1261-
1262-
1263-gboolean
1264-xfsm_shutdown_try_suspend (XfsmShutdown *shutdown,
1265- GError **error)
1266-{
1267- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1268-
1269- return xfsm_upower_try_suspend (shutdown->upower, error);
1270-}
1271-
1272-
1273-
1274-gboolean
1275-xfsm_shutdown_try_hibernate (XfsmShutdown *shutdown,
1276- GError **error)
1277-{
1278- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1279-
1280- return xfsm_upower_try_hibernate (shutdown->upower, error);
1281-}
1282-
1283-
1284-
1285-gboolean
1286-xfsm_shutdown_can_restart (XfsmShutdown *shutdown,
1287- gboolean *can_restart,
1288- GError **error)
1289-{
1290- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1291-
1292- if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
1293- {
1294- *can_restart = FALSE;
1295- return TRUE;
1296- }
1297-
1298-#ifdef HAVE_SYSTEMD
1299- if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
1300-#else
1301- if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
1302-#endif
1303- return TRUE;
1304-
1305- if (xfsm_shutdown_sudo_init (shutdown, error))
1306- {
1307- *can_restart = TRUE;
1308- return TRUE;
1309- }
1310-
1311- return FALSE;
1312-}
1313-
1314-
1315-
1316-gboolean
1317-xfsm_shutdown_can_shutdown (XfsmShutdown *shutdown,
1318- gboolean *can_shutdown,
1319- GError **error)
1320-{
1321- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1322-
1323- if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
1324- {
1325- *can_shutdown = FALSE;
1326- return TRUE;
1327- }
1328-
1329-#ifdef HAVE_SYSTEMD
1330- if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))
1331-#else
1332- if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
1333-#endif
1334- return TRUE;
1335-
1336- if (xfsm_shutdown_sudo_init (shutdown, error))
1337- {
1338- *can_shutdown = TRUE;
1339- return TRUE;
1340- }
1341-
1342- return FALSE;
1343-}
1344-
1345-
1346-
1347-gboolean
1348-xfsm_shutdown_can_suspend (XfsmShutdown *shutdown,
1349- gboolean *can_suspend,
1350- gboolean *auth_suspend,
1351- GError **error)
1352-{
1353- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1354-
1355- if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
1356- {
1357- *can_suspend = FALSE;
1358- return TRUE;
1359- }
1360-
1361- return xfsm_upower_can_suspend (shutdown->upower, can_suspend,
1362- auth_suspend, error);
1363-}
1364-
1365-
1366-
1367-gboolean
1368-xfsm_shutdown_can_hibernate (XfsmShutdown *shutdown,
1369- gboolean *can_hibernate,
1370- gboolean *auth_hibernate,
1371- GError **error)
1372-{
1373- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1374-
1375- if (!xfsm_shutdown_kiosk_can_shutdown (shutdown, NULL))
1376- {
1377- *can_hibernate = FALSE;
1378- return TRUE;
1379- }
1380-
1381- return xfsm_upower_can_hibernate (shutdown->upower, can_hibernate,
1382- auth_hibernate, error);
1383-}
1384-
1385-
1386-
1387-gboolean
1388-xfsm_shutdown_can_save_session (XfsmShutdown *shutdown)
1389-{
1390- g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
1391- return shutdown->kiosk_can_save_session;
1392-}
1393
1394=== removed file '.pc/03_runtime-logind-support.patch/xfce4-session/xfsm-systemd.c'
1395--- .pc/03_runtime-logind-support.patch/xfce4-session/xfsm-systemd.c 2014-07-17 06:37:50 +0000
1396+++ .pc/03_runtime-logind-support.patch/xfce4-session/xfsm-systemd.c 1970-01-01 00:00:00 +0000
1397@@ -1,229 +0,0 @@
1398-/*-
1399- * Copyright (C) 2012 Christian Hesse
1400- *
1401- * This program is free software; you can redistribute it and/or modify
1402- * it under the terms of the GNU General Public License as published by
1403- * the Free Software Foundation; either version 2, or (at your option)
1404- * any later version.
1405- *
1406- * This program is distributed in the hope that it will be useful,
1407- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1408- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1409- * GNU General Public License for more details.
1410- *
1411- * You should have received a copy of the GNU General Public License
1412- * along with this program; if not, write to the Free Software
1413- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
1414- * MA 02110-1301 USA.
1415- */
1416-
1417-#include <config.h>
1418-
1419-#include <gio/gio.h>
1420-#include <polkit/polkit.h>
1421-#include <dbus/dbus-glib.h>
1422-#include <dbus/dbus-glib-lowlevel.h>
1423-
1424-#include <xfce4-session/xfsm-systemd.h>
1425-
1426-
1427-
1428-#define SYSTEMD_DBUS_NAME "org.freedesktop.login1"
1429-#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1"
1430-#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
1431-#define SYSTEMD_REBOOT_ACTION "Reboot"
1432-#define SYSTEMD_POWEROFF_ACTION "PowerOff"
1433-#define SYSTEMD_REBOOT_TEST "org.freedesktop.login1.reboot"
1434-#define SYSTEMD_POWEROFF_TEST "org.freedesktop.login1.power-off"
1435-
1436-
1437-
1438-static void xfsm_systemd_finalize (GObject *object);
1439-
1440-
1441-
1442-struct _XfsmSystemdClass
1443-{
1444- GObjectClass __parent__;
1445-};
1446-
1447-struct _XfsmSystemd
1448-{
1449- GObject __parent__;
1450-
1451- PolkitAuthority *authority;
1452- PolkitSubject *subject;
1453-};
1454-
1455-
1456-
1457-G_DEFINE_TYPE (XfsmSystemd, xfsm_systemd, G_TYPE_OBJECT)
1458-
1459-
1460-
1461-static void
1462-xfsm_systemd_class_init (XfsmSystemdClass *klass)
1463-{
1464- GObjectClass *gobject_class;
1465-
1466- gobject_class = G_OBJECT_CLASS (klass);
1467- gobject_class->finalize = xfsm_systemd_finalize;
1468-}
1469-
1470-
1471-
1472-static void
1473-xfsm_systemd_init (XfsmSystemd *systemd)
1474-{
1475- systemd->authority = polkit_authority_get_sync (NULL, NULL);
1476- systemd->subject = polkit_unix_process_new (getpid());
1477-}
1478-
1479-
1480-
1481-static void
1482-xfsm_systemd_finalize (GObject *object)
1483-{
1484- XfsmSystemd *systemd = XFSM_SYSTEMD (object);
1485-
1486- g_object_unref (G_OBJECT (systemd->authority));
1487- g_object_unref (G_OBJECT (systemd->subject));
1488-
1489- (*G_OBJECT_CLASS (xfsm_systemd_parent_class)->finalize) (object);
1490-}
1491-
1492-
1493-static gboolean
1494-xfsm_systemd_can_method (XfsmSystemd *systemd,
1495- gboolean *can_method,
1496- const gchar *method,
1497- GError **error)
1498-{
1499- PolkitAuthorizationResult *res;
1500- GError *local_error = NULL;
1501-
1502- *can_method = FALSE;
1503-
1504- res = polkit_authority_check_authorization_sync (systemd->authority,
1505- systemd->subject,
1506- method,
1507- NULL,
1508- POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE,
1509- NULL,
1510- &local_error);
1511-
1512- if (res == NULL)
1513- {
1514- g_propagate_error (error, local_error);
1515- return FALSE;
1516- }
1517-
1518- *can_method = polkit_authorization_result_get_is_authorized (res)
1519- || polkit_authorization_result_get_is_challenge (res);
1520-
1521- g_object_unref (G_OBJECT (res));
1522-
1523- return TRUE;
1524-}
1525-
1526-
1527-
1528-static gboolean
1529-xfsm_systemd_try_method (XfsmSystemd *systemd,
1530- const gchar *method,
1531- GError **error)
1532-{
1533- GDBusConnection *bus;
1534- GError *local_error = NULL;
1535-
1536- bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, error);
1537- if (G_UNLIKELY (bus == NULL))
1538- return FALSE;
1539-
1540- g_dbus_connection_call_sync (bus,
1541- SYSTEMD_DBUS_NAME,
1542- SYSTEMD_DBUS_PATH,
1543- SYSTEMD_DBUS_INTERFACE,
1544- method,
1545- g_variant_new ("(b)", TRUE),
1546- NULL, 0, G_MAXINT, NULL,
1547- &local_error);
1548-
1549- g_object_unref (G_OBJECT (bus));
1550-
1551- if (local_error != NULL)
1552- {
1553- g_propagate_error (error, local_error);
1554- return FALSE;
1555- }
1556-
1557- return TRUE;
1558-}
1559-
1560-
1561-
1562-XfsmSystemd *
1563-xfsm_systemd_get (void)
1564-{
1565- static XfsmSystemd *object = NULL;
1566-
1567- if (G_LIKELY (object != NULL))
1568- {
1569- g_object_ref (G_OBJECT (object));
1570- }
1571- else
1572- {
1573- object = g_object_new (XFSM_TYPE_SYSTEMD, NULL);
1574- g_object_add_weak_pointer (G_OBJECT (object), (gpointer) &object);
1575- }
1576-
1577- return object;
1578-}
1579-
1580-
1581-
1582-gboolean
1583-xfsm_systemd_try_restart (XfsmSystemd *systemd,
1584- GError **error)
1585-{
1586- return xfsm_systemd_try_method (systemd,
1587- SYSTEMD_REBOOT_ACTION,
1588- error);
1589-}
1590-
1591-
1592-
1593-gboolean
1594-xfsm_systemd_try_shutdown (XfsmSystemd *systemd,
1595- GError **error)
1596-{
1597- return xfsm_systemd_try_method (systemd,
1598- SYSTEMD_POWEROFF_ACTION,
1599- error);
1600-}
1601-
1602-
1603-
1604-gboolean
1605-xfsm_systemd_can_restart (XfsmSystemd *systemd,
1606- gboolean *can_restart,
1607- GError **error)
1608-{
1609- return xfsm_systemd_can_method (systemd,
1610- can_restart,
1611- SYSTEMD_REBOOT_TEST,
1612- error);
1613-}
1614-
1615-
1616-
1617-gboolean
1618-xfsm_systemd_can_shutdown (XfsmSystemd *systemd,
1619- gboolean *can_shutdown,
1620- GError **error)
1621-{
1622- return xfsm_systemd_can_method (systemd,
1623- can_shutdown,
1624- SYSTEMD_POWEROFF_TEST,
1625- error);
1626-}
1627
1628=== removed file '.pc/03_runtime-logind-support.patch/xfce4-session/xfsm-systemd.h'
1629--- .pc/03_runtime-logind-support.patch/xfce4-session/xfsm-systemd.h 2014-07-17 06:37:50 +0000
1630+++ .pc/03_runtime-logind-support.patch/xfce4-session/xfsm-systemd.h 1970-01-01 00:00:00 +0000
1631@@ -1,55 +0,0 @@
1632-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
1633- *
1634- * Copyright (C) 2012 Christian Hesse
1635- *
1636- * Licensed under the GNU General Public License Version 2
1637- *
1638- * This program is free software; you can redistribute it and/or modify
1639- * it under the terms of the GNU General Public License as published by
1640- * the Free Software Foundation; either version 2 of the License, or
1641- * (at your option) any later version.
1642- *
1643- * This program is distributed in the hope that it will be useful,
1644- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1645- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1646- * GNU General Public License for more details.
1647- *
1648- * You should have received a copy of the GNU General Public License
1649- * along with this program; if not, write to the Free Software
1650- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1651- */
1652-
1653-#ifndef __XFSM_SYSTEMD_H__
1654-#define __XFSM_SYSTEMD_H__
1655-
1656-typedef struct _XfsmSystemdClass XfsmSystemdClass;
1657-typedef struct _XfsmSystemd XfsmSystemd;
1658-
1659-#define XFSM_TYPE_SYSTEMD (xfsm_systemd_get_type ())
1660-#define XFSM_SYSTEMD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFSM_TYPE_SYSTEMD, XfsmSystemd))
1661-#define XFSM_SYSTEMD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFSM_TYPE_SYSTEMD, XfsmSystemdClass))
1662-#define XFSM_IS_SYSTEMD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFSM_TYPE_SYSTEMD))
1663-#define XFSM_IS_SYSTEMD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFSM_TYPE_SYSTEMD))
1664-#define XFSM_SYSTEMD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFSM_TYPE_SYSTEMD, XfsmSystemdClass))
1665-
1666-GType xfsm_systemd_get_type (void) G_GNUC_CONST;
1667-
1668-XfsmSystemd *xfsm_systemd_get (void);
1669-
1670-gboolean xfsm_systemd_try_restart (XfsmSystemd *systemd,
1671- GError **error);
1672-
1673-gboolean xfsm_systemd_try_shutdown (XfsmSystemd *systemd,
1674- GError **error);
1675-
1676-gboolean xfsm_systemd_can_restart (XfsmSystemd *systemd,
1677- gboolean *can_restart,
1678- GError **error);
1679-
1680-gboolean xfsm_systemd_can_shutdown (XfsmSystemd *systemd,
1681- gboolean *can_shutdown,
1682- GError **error);
1683-
1684-G_END_DECLS
1685-
1686-#endif /* __XFSM_SYSTEMD_H__ */
1687
1688=== removed file '.pc/applied-patches'
1689--- .pc/applied-patches 2014-07-21 16:51:03 +0000
1690+++ .pc/applied-patches 1970-01-01 00:00:00 +0000
1691@@ -1,5 +0,0 @@
1692-01_fix-xrdb-call.patch
1693-03_runtime-logind-support.patch
1694-xubuntu_ignore-gdm-lang.patch
1695-xubuntu_set-xdg-current-desktop.patch
1696-xflock4-light-locker-support.patch
1697
1698=== removed directory '.pc/xflock4-light-locker-support.patch'
1699=== removed directory '.pc/xflock4-light-locker-support.patch/scripts'
1700=== removed file '.pc/xflock4-light-locker-support.patch/scripts/xflock4'
1701--- .pc/xflock4-light-locker-support.patch/scripts/xflock4 2013-11-24 02:47:29 +0000
1702+++ .pc/xflock4-light-locker-support.patch/scripts/xflock4 1970-01-01 00:00:00 +0000
1703@@ -1,50 +0,0 @@
1704-#!/bin/sh
1705-#
1706-# xfce4
1707-#
1708-# Copyright (C) 1999, 2003 Olivier Fourdan (fourdan@xfce.org)
1709-# Copyright (C) 2011 Guido Berhoerster (guido+xfce.org@berhoerster.name)
1710-# Copyright (C) 2011 Jarno Suni (8@iki.fi)
1711-#
1712-# This program is free software; you can redistribute it and/or modify
1713-# it under the terms of the GNU General Public License as published by
1714-# the Free Software Foundation; either version 2 of the License, or
1715-# (at your option) any later version.
1716-#
1717-# This program is distributed in the hope that it will be useful,
1718-# but WITHOUT ANY WARRANTY; without even the implied warranty of
1719-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1720-# GNU General Public License for more details.
1721-#
1722-# You should have received a copy of the GNU General Public License
1723-# along with this program; if not, write to the Free Software
1724-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1725-#
1726-
1727-PATH=/bin:/usr/bin
1728-export PATH
1729-
1730-# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
1731-for lock_cmd in \
1732- "xscreensaver-command -lock" \
1733- "gnome-screensaver-command --lock"
1734-do
1735- $lock_cmd >/dev/null 2>&1 && exit
1736-done
1737-
1738-# else run another access locking utility, if installed
1739-for lock_cmd in \
1740- "xlock -mode blank" \
1741- "slock"
1742- do
1743- set -- $lock_cmd
1744- if command -v -- $1 >/dev/null 2>&1; then
1745- $lock_cmd >/dev/null 2>&1 &
1746- # turn off display backlight:
1747- xset dpms force off
1748- exit
1749- fi
1750-done
1751-
1752-# else access locking failed
1753-exit 1
1754
1755=== removed directory '.pc/xubuntu_ignore-gdm-lang.patch'
1756=== removed directory '.pc/xubuntu_ignore-gdm-lang.patch/xfce4-session'
1757=== removed file '.pc/xubuntu_ignore-gdm-lang.patch/xfce4-session/main.c'
1758--- .pc/xubuntu_ignore-gdm-lang.patch/xfce4-session/main.c 2013-07-01 19:35:39 +0000
1759+++ .pc/xubuntu_ignore-gdm-lang.patch/xfce4-session/main.c 1970-01-01 00:00:00 +0000
1760@@ -1,334 +0,0 @@
1761-/* $Id$ */
1762-/*-
1763- * Copyright (c) 2003-2006 Benedikt Meurer <benny@xfce.org>
1764- * Copyright (c) 2008 Brian Tarricone <bjt23@cornell.edu>
1765- * All rights reserved.
1766- *
1767- * This program is free software; you can redistribute it and/or modify
1768- * it under the terms of the GNU General Public License as published by
1769- * the Free Software Foundation; either version 2, or (at your option)
1770- * any later version.
1771- *
1772- * This program is distributed in the hope that it will be useful,
1773- * but WITHOUT ANY WARRANTY; without even the implied warranty of
1774- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1775- * GNU General Public License for more details.
1776- *
1777- * You should have received a copy of the GNU General Public License
1778- * along with this program; if not, write to the Free Software
1779- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
1780- * MA 02110-1301 USA.
1781- */
1782-
1783-#ifdef HAVE_CONFIG_H
1784-#include <config.h>
1785-#endif
1786-
1787-#ifdef HAVE_ERRNO_H
1788-#include <errno.h>
1789-#endif
1790-#ifdef HAVE_FCNTL_H
1791-#include <fcntl.h>
1792-#endif
1793-#ifdef HAVE_MEMORY_H
1794-#include <memory.h>
1795-#endif
1796-#ifdef HAVE_SIGNAL_H
1797-#include <signal.h>
1798-#endif
1799-#ifdef HAVE_STDLIB_H
1800-#include <stdlib.h>
1801-#endif
1802-#ifdef HAVE_STRING_H
1803-#include <string.h>
1804-#endif
1805-#ifdef HAVE_UNISTD_H
1806-#include <unistd.h>
1807-#endif
1808-
1809-#include <dbus/dbus-glib.h>
1810-#include <dbus/dbus-glib-lowlevel.h>
1811-
1812-#include <xfconf/xfconf.h>
1813-
1814-#include <gdk/gdkx.h>
1815-#include <gtk/gtk.h>
1816-
1817-#include <libxfce4util/libxfce4util.h>
1818-#include <libxfce4ui/libxfce4ui.h>
1819-
1820-#include <libxfsm/xfsm-util.h>
1821-
1822-#include <xfce4-session/ice-layer.h>
1823-#include <xfce4-session/sm-layer.h>
1824-#include <xfce4-session/xfsm-dns.h>
1825-#include <xfce4-session/xfsm-global.h>
1826-#include <xfce4-session/xfsm-manager.h>
1827-#include <xfce4-session/xfsm-shutdown.h>
1828-#include <xfce4-session/xfsm-startup.h>
1829-#include <xfce4-session/xfsm-error.h>
1830-
1831-static gboolean opt_disable_tcp = FALSE;
1832-static gboolean opt_version = FALSE;
1833-
1834-static GOptionEntry option_entries[] =
1835-{
1836- { "disable-tcp", '\0', 0, G_OPTION_ARG_NONE, &opt_disable_tcp, N_("Disable binding to TCP ports"), NULL },
1837- { "version", 'V', 0, G_OPTION_ARG_NONE, &opt_version, N_("Print version information and exit"), NULL },
1838- { NULL }
1839-};
1840-
1841-static void
1842-setup_environment (void)
1843-{
1844- const gchar *lang;
1845- const gchar *sm;
1846- gchar *authfile;
1847- int fd;
1848-
1849- /* check that no other session manager is running */
1850- sm = g_getenv ("SESSION_MANAGER");
1851- if (sm != NULL && strlen (sm) > 0)
1852- {
1853- g_printerr ("%s: Another session manager is already running\n", PACKAGE_NAME);
1854- exit (EXIT_FAILURE);
1855- }
1856-
1857- /* check if running in verbose mode */
1858- if (g_getenv ("XFSM_VERBOSE") != NULL)
1859- xfsm_enable_verbose ();
1860-
1861- /* pass correct DISPLAY to children, in case of --display in argv */
1862- g_setenv ("DISPLAY", gdk_display_get_name (gdk_display_get_default ()), TRUE);
1863-
1864- /* this is for compatibility with the GNOME Display Manager */
1865- lang = g_getenv ("GDM_LANG");
1866- if (lang != NULL && strlen (lang) > 0)
1867- {
1868- g_setenv ("LANG", lang, TRUE);
1869- g_unsetenv ("GDM_LANG");
1870- }
1871-
1872- /* check access to $ICEAUTHORITY or $HOME/.ICEauthority if unset */
1873- if (g_getenv ("ICEAUTHORITY"))
1874- authfile = g_strdup (g_getenv ("ICEAUTHORITY"));
1875- else
1876- authfile = xfce_get_homefile (".ICEauthority", NULL);
1877- fd = open (authfile, O_RDWR | O_CREAT, 0600);
1878- if (fd < 0)
1879- {
1880- fprintf (stderr, "xfce4-session: Unable to access file %s: %s\n",
1881- authfile, g_strerror (errno));
1882- exit (EXIT_FAILURE);
1883- }
1884- g_free (authfile);
1885- close (fd);
1886-}
1887-
1888-static void
1889-init_display (XfsmManager *manager,
1890- GdkDisplay *dpy,
1891- XfconfChannel *channel,
1892- gboolean disable_tcp)
1893-{
1894- gchar *engine;
1895-
1896- engine = xfconf_channel_get_string (channel, "/splash/Engine", "mice");
1897-
1898- splash_screen = xfsm_splash_screen_new (dpy, engine);
1899- g_free (engine);
1900- xfsm_splash_screen_next (splash_screen, _("Loading desktop settings"));
1901-
1902- gdk_flush ();
1903-
1904- sm_init (channel, disable_tcp, manager);
1905-
1906- /* gtk resource files may have changed */
1907- gtk_rc_reparse_all ();
1908-}
1909-
1910-
1911-static void
1912-xfsm_dbus_init (void)
1913-{
1914- DBusGConnection *dbus_conn;
1915- int ret;
1916- GError *error = NULL;
1917-
1918- xfsm_error_dbus_init ();
1919-
1920- dbus_conn = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
1921- if (G_UNLIKELY (!dbus_conn))
1922- {
1923- g_critical ("Unable to contact D-Bus session bus: %s", error ? error->message : "Unknown error");
1924- if (error)
1925- g_error_free (error);
1926- return;
1927- }
1928-
1929- ret = dbus_bus_request_name (dbus_g_connection_get_connection (dbus_conn),
1930- "org.xfce.SessionManager",
1931- DBUS_NAME_FLAG_DO_NOT_QUEUE,
1932- NULL);
1933- if (DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER != ret)
1934- {
1935- g_printerr ("%s: Another session manager is already running\n", PACKAGE_NAME);
1936- exit (EXIT_FAILURE);
1937- }
1938-}
1939-
1940-static void
1941-xfsm_dbus_cleanup (void)
1942-{
1943- DBusGConnection *dbus_conn;
1944-
1945- /* this is all not really necessary, but... */
1946-
1947- dbus_conn = dbus_g_bus_get (DBUS_BUS_SESSION, NULL);
1948- if (G_UNLIKELY (!dbus_conn))
1949- return;
1950-
1951- dbus_bus_release_name (dbus_g_connection_get_connection (dbus_conn),
1952- "org.xfce.SessionManager", NULL);
1953-}
1954-
1955-static gboolean
1956-xfsm_dbus_require_session (gint argc, gchar **argv)
1957-{
1958- gchar **new_argv;
1959- gchar *path;
1960- gint i;
1961- guint m = 0;
1962-
1963- if (g_getenv ("DBUS_SESSION_BUS_ADDRESS") != NULL)
1964- return TRUE;
1965-
1966- path = g_find_program_in_path ("dbus-launch");
1967- if (path == NULL)
1968- {
1969- g_critical ("dbus-launch not found, the desktop will not work properly!");
1970- return TRUE;
1971- }
1972-
1973- /* avoid rondtrips */
1974- g_assert (!g_str_has_prefix (*argv, "dbus-launch"));
1975-
1976- new_argv = g_new0 (gchar *, argc + 4);
1977- new_argv[m++] = path;
1978- new_argv[m++] = "--sh-syntax";
1979- new_argv[m++] = "--exit-with-session";
1980-
1981- for (i = 0; i < argc; i++)
1982- new_argv[m++] = argv[i];
1983-
1984- if (!execvp ("dbus-launch", new_argv))
1985- {
1986- g_critical ("Could not spawn %s: %s", path, g_strerror (errno));
1987- }
1988-
1989- g_free (path);
1990- g_free (new_argv);
1991-
1992- return FALSE;
1993-}
1994-
1995-int
1996-main (int argc, char **argv)
1997-{
1998- XfsmManager *manager;
1999- GError *error = NULL;
2000- GdkDisplay *dpy;
2001- XfconfChannel *channel;
2002- XfsmShutdownType shutdown_type;
2003- XfsmShutdown *shutdown_helper;
2004- gboolean succeed = TRUE;
2005-
2006- if (!xfsm_dbus_require_session (argc, argv))
2007- return EXIT_SUCCESS;
2008-
2009- xfce_textdomain (GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR, "UTF-8");
2010-
2011- /* install required signal handlers */
2012- signal (SIGPIPE, SIG_IGN);
2013-
2014- if (!gtk_init_with_args (&argc, &argv, "", option_entries, GETTEXT_PACKAGE, &error))
2015- {
2016- g_print ("%s: %s.\n", G_LOG_DOMAIN, error->message);
2017- g_print (_("Type '%s --help' for usage."), G_LOG_DOMAIN);
2018- g_print ("\n");
2019- g_error_free (error);
2020- return EXIT_FAILURE;
2021- }
2022-
2023- if (opt_version)
2024- {
2025- g_print ("%s %s (Xfce %s)\n\n", G_LOG_DOMAIN, PACKAGE_VERSION, xfce_version_string ());
2026- g_print ("%s\n", "Copyright (c) 2003-2012");
2027- g_print ("\t%s\n\n", _("The Xfce development team. All rights reserved."));
2028- g_print (_("Please report bugs to <%s>."), PACKAGE_BUGREPORT);
2029- g_print ("\n");
2030-
2031- return EXIT_SUCCESS;
2032- }
2033-
2034- if (!xfconf_init (&error))
2035- {
2036- xfce_dialog_show_error (NULL, error, _("Unable to contact settings server"));
2037- g_error_free (error);
2038- }
2039-
2040- /* fake a client id for the manager, so the legacy management does not
2041- * recognize us to be a session client.
2042- */
2043- gdk_set_sm_client_id (xfsm_generate_client_id (NULL));
2044-
2045- xfsm_dbus_init ();
2046-
2047- manager = xfsm_manager_new ();
2048- setup_environment ();
2049-
2050- channel = xfsm_open_config ();
2051-
2052- dpy = gdk_display_get_default ();
2053- init_display (manager, dpy, channel, opt_disable_tcp);
2054-
2055- if (!opt_disable_tcp && xfconf_channel_get_bool (channel, "/security/EnableTcp", FALSE))
2056- {
2057- /* verify that the DNS settings are ok */
2058- xfsm_splash_screen_next (splash_screen, _("Verifying DNS settings"));
2059- xfsm_dns_check ();
2060- }
2061-
2062- xfsm_splash_screen_next (splash_screen, _("Loading session data"));
2063-
2064- xfsm_startup_init (channel);
2065- xfsm_manager_load (manager, channel);
2066- xfsm_manager_restart (manager);
2067-
2068- gtk_main ();
2069-
2070- xfsm_startup_shutdown ();
2071-
2072- shutdown_type = xfsm_manager_get_shutdown_type (manager);
2073-
2074- /* take over the ref before we release the manager */
2075- shutdown_helper = xfsm_shutdown_get ();
2076-
2077- g_object_unref (manager);
2078- g_object_unref (channel);
2079-
2080- xfsm_dbus_cleanup ();
2081- ice_cleanup ();
2082-
2083- if (shutdown_type == XFSM_SHUTDOWN_SHUTDOWN
2084- || shutdown_type == XFSM_SHUTDOWN_RESTART)
2085- {
2086- succeed = xfsm_shutdown_try_type (shutdown_helper, shutdown_type, &error);
2087- if (!succeed)
2088- g_warning ("Failed to shutdown/restart: %s", ERROR_MSG (error));
2089- }
2090-
2091- g_object_unref (shutdown_helper);
2092-
2093- return succeed ? EXIT_SUCCESS : EXIT_FAILURE;
2094-}
2095
2096=== removed directory '.pc/xubuntu_set-xdg-current-desktop.patch'
2097=== removed directory '.pc/xubuntu_set-xdg-current-desktop.patch/scripts'
2098=== removed file '.pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in'
2099--- .pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in 2012-05-18 20:21:52 +0000
2100+++ .pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in 1970-01-01 00:00:00 +0000
2101@@ -1,192 +0,0 @@
2102-#!/bin/sh
2103-
2104-# fix broken $UID on some system...
2105-if test "x$UID" = "x"; then
2106- if test -x /usr/xpg4/bin/id; then
2107- UID=`/usr/xpg4/bin/id -u`;
2108- else
2109- UID=`id -u`;
2110- fi
2111-fi
2112-
2113-# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
2114-# over "applications.menu" in all Xfce applications.
2115-if test "x$XDG_MENU_PREFIX" = "x"; then
2116- XDG_MENU_PREFIX="xfce-"
2117- export XDG_MENU_PREFIX
2118-fi
2119-
2120-# set DESKTOP_SESSION so that one can detect easily if an Xfce session is running
2121-if test "x$DESKTOP_SESSION" = "x"; then
2122- DESKTOP_SESSION="xfce"
2123- export DESKTOP_SESSION
2124-fi
2125-
2126-# $XDG_CONFIG_HOME defines the base directory relative to which user specific
2127-# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
2128-# or empty, a default equal to $HOME/.config should be used.
2129-if test "x$XDG_CONFIG_HOME" = "x" ; then
2130- XDG_CONFIG_HOME=$HOME/.config
2131-fi
2132-[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
2133-
2134-# $XDG_CACHE_HOME defines the base directory relative to which user specific
2135-# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
2136-# set or empty, a default equal to $HOME/.cache should be used.
2137-if test "x$XDG_CACHE_HOME" = "x" ; then
2138- XDG_CACHE_HOME=$HOME/.cache
2139-fi
2140-[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
2141-
2142-# set up XDG user directores. see
2143-# http://freedesktop.org/wiki/Software/xdg-user-dirs
2144-if which xdg-user-dirs-update >/dev/null 2>&1; then
2145- xdg-user-dirs-update
2146-fi
2147-
2148-# Modify libglade and glade environment variables so that
2149-# it will find the files installed by Xfce
2150-GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:/usr/share/glade3/catalogs"
2151-GLADE_PIXMAP_PATH="$GLADE_PIXMAP_PATH:/usr/lib/glade3/modules"
2152-GLADE_MODULE_PATH="$GLADE_MODULE_PATH:/usr/share/glade3/pixmaps"
2153-export GLADE_CATALOG_PATH
2154-export GLADE_PIXMAP_PATH
2155-export GLADE_MODULE_PATH
2156-
2157-# For now, start with an empty list
2158-XRESOURCES=""
2159-
2160-# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
2161-test -r "@_sysconfdir_@/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES @_sysconfdir_@/xdg/xfce4/Xft.xrdb"
2162-test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"
2163-
2164-BASEDIR=$XDG_CONFIG_HOME/xfce4
2165-if test -r "$BASEDIR/Xft.xrdb"; then
2166- XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
2167-elif test -r "$XFCE4HOME/Xft.xrdb"; then
2168- mkdir -p "$BASEDIR"
2169- cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
2170- XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
2171-fi
2172-
2173-# merge in X cursor settings
2174-test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"
2175-
2176-# ~/.Xresources contains overrides to the above
2177-test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
2178-
2179-# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
2180-cat /dev/null $XRESOURCES | xrdb -nocpp -merge -
2181-
2182-# load local modmap
2183-test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
2184-
2185-# run xfce4-session if installed
2186-if which xfce4-session >/dev/null 2>&1; then
2187-
2188- # check if we start xfce4-session with ck-launch-session. this is only
2189- # required for starting from a console, not a login manager
2190- if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
2191- if which ck-launch-session >/dev/null 2>&1; then
2192- ck-launch-session xfce4-session
2193- else
2194- echo
2195- echo "You have tried to start Xfce with consolekit support, but"
2196- echo "ck-launch-session is not installed."
2197- echo "Aborted startup..."
2198- echo
2199-
2200- exit 1
2201- fi
2202- else
2203- # start xfce4-session normally
2204- xfce4-session
2205- fi
2206-
2207- exit 0
2208-fi
2209-
2210-##################
2211-# IMPORTANT NOTE #
2212-##################
2213-
2214-# Everything below here ONLY gets executed if you are NOT using xfce4-session
2215-# (Xfce's session manager). If you are using the session manager, everything
2216-# below is handled by it, and the code below is not executed at all. If you're
2217-# not sure if you're using the session manager, type 'ps -e|grep xfce4-session'
2218-# in a terminal while Xfce is running.
2219-
2220-##################
2221-
2222-# Use dbus-launch if installed.
2223-if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
2224- if which dbus-launch >/dev/null 2>&1; then
2225- eval `dbus-launch --sh-syntax --exit-with-session`
2226- # some older versions of dbus don't export the var properly
2227- export DBUS_SESSION_BUS_ADDRESS
2228- else
2229- echo "Could not find dbus-launch; Xfce will not work properly" >&2
2230- fi
2231-fi
2232-
2233-# this is only necessary when running w/o xfce4-session
2234-xsetroot -solid black -cursor_name watch
2235-
2236-# or use old-fashioned startup script otherwise
2237-
2238-xfsettingsd &
2239-xfwm4 --daemon
2240-
2241-# start up stuff in $XDG_CONFIG_HOME/autostart/
2242-if test -d "$XDG_CONFIG_HOME/autostart"; then
2243- for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
2244- grep -q -E "^Hidden=true" "$i" && continue
2245- if grep -q -E "^OnlyShowIn=" "$i"; then
2246- # need to test twice, as lack of the line entirely means we still run it
2247- grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
2248- fi
2249- grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
2250-
2251- # check for TryExec
2252- trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
2253- if test "$trycmd"; then
2254- which "$trycmd" >/dev/null 2>&1 || continue
2255- fi
2256-
2257- cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
2258- if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
2259- $cmd &
2260- fi
2261- done
2262-fi
2263-
2264-xfdesktop&
2265-orage &
2266-
2267-panel=`which xfce4-panel`
2268-case "x$panel" in
2269- x|xno*)
2270- ;;
2271- *)
2272- $panel
2273- ret=$?
2274- while test $ret -ne 0; do
2275- xmessage -center -file - -timeout 20 -title Error <<EOF
2276-A crash occured in the panel
2277-Please report this to the xfce4-dev@xfce.org list
2278-or on http://bugs.xfce.org
2279-Meanwhile the panel will be restarted
2280-EOF
2281- cat >&2 <<EOF
2282-A crash occured in the panel
2283-Please report this to the xfce4-dev@xfce.org list
2284-or on http://bugs.xfce.org
2285-Meanwhile the panel will be restarted
2286-EOF
2287- $panel
2288- ret=$?
2289- done
2290- ;;
2291-esac
2292-
2293-xsetroot -bg white -fg red -solid black -cursor_name watch
2294
2295=== removed file '.pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in.in'
2296--- .pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in.in 2013-10-23 21:13:30 +0000
2297+++ .pc/xubuntu_set-xdg-current-desktop.patch/scripts/xinitrc.in.in 1970-01-01 00:00:00 +0000
2298@@ -1,192 +0,0 @@
2299-#!/bin/sh
2300-
2301-# fix broken $UID on some system...
2302-if test "x$UID" = "x"; then
2303- if test -x /usr/xpg4/bin/id; then
2304- UID=`/usr/xpg4/bin/id -u`;
2305- else
2306- UID=`id -u`;
2307- fi
2308-fi
2309-
2310-# set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked
2311-# over "applications.menu" in all Xfce applications.
2312-if test "x$XDG_MENU_PREFIX" = "x"; then
2313- XDG_MENU_PREFIX="xfce-"
2314- export XDG_MENU_PREFIX
2315-fi
2316-
2317-# set DESKTOP_SESSION so that one can detect easily if an Xfce session is running
2318-if test "x$DESKTOP_SESSION" = "x"; then
2319- DESKTOP_SESSION="xfce"
2320- export DESKTOP_SESSION
2321-fi
2322-
2323-# $XDG_CONFIG_HOME defines the base directory relative to which user specific
2324-# configuration files should be stored. If $XDG_CONFIG_HOME is either not set
2325-# or empty, a default equal to $HOME/.config should be used.
2326-if test "x$XDG_CONFIG_HOME" = "x" ; then
2327- XDG_CONFIG_HOME=$HOME/.config
2328-fi
2329-[ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME"
2330-
2331-# $XDG_CACHE_HOME defines the base directory relative to which user specific
2332-# non-essential data files should be stored. If $XDG_CACHE_HOME is either not
2333-# set or empty, a default equal to $HOME/.cache should be used.
2334-if test "x$XDG_CACHE_HOME" = "x" ; then
2335- XDG_CACHE_HOME=$HOME/.cache
2336-fi
2337-[ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME"
2338-
2339-# set up XDG user directores. see
2340-# http://freedesktop.org/wiki/Software/xdg-user-dirs
2341-if which xdg-user-dirs-update >/dev/null 2>&1; then
2342- xdg-user-dirs-update
2343-fi
2344-
2345-# Modify libglade and glade environment variables so that
2346-# it will find the files installed by Xfce
2347-GLADE_CATALOG_PATH="$GLADE_CATALOG_PATH:@XFCE_GLADE_CATALOG_PATH@"
2348-GLADE_PIXMAP_PATH="$GLADE_PIXMAP_PATH:@XFCE_GLADE_PIXMAP_PATH@"
2349-GLADE_MODULE_PATH="$GLADE_MODULE_PATH:@XFCE_GLADE_MODULE_PATH@"
2350-export GLADE_CATALOG_PATH
2351-export GLADE_PIXMAP_PATH
2352-export GLADE_MODULE_PATH
2353-
2354-# For now, start with an empty list
2355-XRESOURCES=""
2356-
2357-# Has to go prior to merging Xft.xrdb, as its the "Defaults" file
2358-test -r "@_sysconfdir_@/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES @_sysconfdir_@/xdg/xfce4/Xft.xrdb"
2359-test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults"
2360-
2361-BASEDIR=$XDG_CONFIG_HOME/xfce4
2362-if test -r "$BASEDIR/Xft.xrdb"; then
2363- XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
2364-elif test -r "$XFCE4HOME/Xft.xrdb"; then
2365- mkdir -p "$BASEDIR"
2366- cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/
2367- XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb"
2368-fi
2369-
2370-# merge in X cursor settings
2371-test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb"
2372-
2373-# ~/.Xresources contains overrides to the above
2374-test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
2375-
2376-# load all X resources (adds /dev/null to avoid an empty list that would hang the process)
2377-cat /dev/null $XRESOURCES | xrdb -merge -
2378-
2379-# load local modmap
2380-test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
2381-
2382-# run xfce4-session if installed
2383-if which xfce4-session >/dev/null 2>&1; then
2384-
2385- # check if we start xfce4-session with ck-launch-session. this is only
2386- # required for starting from a console, not a login manager
2387- if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then
2388- if which ck-launch-session >/dev/null 2>&1; then
2389- ck-launch-session xfce4-session
2390- else
2391- echo
2392- echo "You have tried to start Xfce with consolekit support, but"
2393- echo "ck-launch-session is not installed."
2394- echo "Aborted startup..."
2395- echo
2396-
2397- exit 1
2398- fi
2399- else
2400- # start xfce4-session normally
2401- xfce4-session
2402- fi
2403-
2404- exit 0
2405-fi
2406-
2407-##################
2408-# IMPORTANT NOTE #
2409-##################
2410-
2411-# Everything below here ONLY gets executed if you are NOT using xfce4-session
2412-# (Xfce's session manager). If you are using the session manager, everything
2413-# below is handled by it, and the code below is not executed at all. If you're
2414-# not sure if you're using the session manager, type 'ps -e|grep xfce4-session'
2415-# in a terminal while Xfce is running.
2416-
2417-##################
2418-
2419-# Use dbus-launch if installed.
2420-if test x"$DBUS_SESSION_BUS_ADDRESS" = x""; then
2421- if which dbus-launch >/dev/null 2>&1; then
2422- eval `dbus-launch --sh-syntax --exit-with-session`
2423- # some older versions of dbus don't export the var properly
2424- export DBUS_SESSION_BUS_ADDRESS
2425- else
2426- echo "Could not find dbus-launch; Xfce will not work properly" >&2
2427- fi
2428-fi
2429-
2430-# this is only necessary when running w/o xfce4-session
2431-xsetroot -solid black -cursor_name watch
2432-
2433-# or use old-fashioned startup script otherwise
2434-
2435-xfsettingsd &
2436-xfwm4 --daemon
2437-
2438-# start up stuff in $XDG_CONFIG_HOME/autostart/
2439-if test -d "$XDG_CONFIG_HOME/autostart"; then
2440- for i in ${XDG_CONFIG_HOME}/autostart/*.desktop; do
2441- grep -q -E "^Hidden=true" "$i" && continue
2442- if grep -q -E "^OnlyShowIn=" "$i"; then
2443- # need to test twice, as lack of the line entirely means we still run it
2444- grep -E "^OnlyShowIn=" "$i" | grep -q 'XFCE;' || continue
2445- fi
2446- grep -E "^NotShowIn=" "$i" | grep -q 'XFCE;' && continue
2447-
2448- # check for TryExec
2449- trycmd=`grep -E "^TryExec=" "$i" | cut -d'=' -f2`
2450- if test "$trycmd"; then
2451- which "$trycmd" >/dev/null 2>&1 || continue
2452- fi
2453-
2454- cmd=`grep -E "^Exec=" "$i" | cut -d'=' -f2`
2455- if test "$cmd" && which "$cmd" >/dev/null 2>&1; then
2456- $cmd &
2457- fi
2458- done
2459-fi
2460-
2461-xfdesktop&
2462-orage &
2463-
2464-panel=`which xfce4-panel`
2465-case "x$panel" in
2466- x|xno*)
2467- ;;
2468- *)
2469- $panel
2470- ret=$?
2471- while test $ret -ne 0; do
2472- xmessage -center -file - -timeout 20 -title Error <<EOF
2473-A crash occured in the panel
2474-Please report this to the xfce4-dev@xfce.org list
2475-or on http://bugs.xfce.org
2476-Meanwhile the panel will be restarted
2477-EOF
2478- cat >&2 <<EOF
2479-A crash occured in the panel
2480-Please report this to the xfce4-dev@xfce.org list
2481-or on http://bugs.xfce.org
2482-Meanwhile the panel will be restarted
2483-EOF
2484- $panel
2485- ret=$?
2486- done
2487- ;;
2488-esac
2489-
2490-xsetroot -bg white -fg red -solid black -cursor_name watch
2491
2492=== modified file 'configure.ac'
2493--- configure.ac 2014-07-21 16:51:03 +0000
2494+++ configure.ac 2014-08-16 21:43:36 +0000
2495@@ -103,7 +103,7 @@
2496
2497 dnl Check for polkit / systemd integration
2498 XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100],
2499- [systemd], [Systemd support (through polkit)])
2500+ [systemd], [Systemd support (through polit)])
2501
2502 dnl Check for debugging support
2503 XDT_FEATURE_DEBUG([xfsm_debug_default])
2504@@ -207,10 +207,10 @@
2505 else
2506 echo " * Legacy session management: no"
2507 fi
2508-if test x"$SYSTEMD_FOUND" = x"yes"; then
2509-echo " * Systemd support (through polkit): yes"
2510+if test x"$GNOME_KEYRING_FOUND" = x"yes"; then
2511+echo " * Gnome Keyring support: yes"
2512 else
2513-echo " * Systemd support (through polkit): no"
2514+echo " * Gnome Keyring support: no"
2515 fi
2516
2517 echo
2518
2519=== modified file 'debian/changelog'
2520--- debian/changelog 2014-07-21 16:51:03 +0000
2521+++ debian/changelog 2014-08-16 21:43:36 +0000
2522@@ -1,3 +1,28 @@
2523+xfce4-session (4.10.1-8ubuntu1) utopic; urgency=medium
2524+
2525+ * Merge from Debian unstable, remaining Ubuntu changes:
2526+ - debian/patches:
2527+ + xubuntu_ignore-gdm-lang.patch: do not set $LANG to $GDM_LANG, there's
2528+ already an xsession script to do that, and $GDM_LANG might not contain
2529+ a valid locale code.
2530+ + xubuntu_set-xdg-current-desktop.patch: added. Taken from xfce4-utils,
2531+ export XDG_CURRENT_DESKTOP=XFCE, can be useful with alacarte and
2532+ gnome-menus.
2533+ + debian/patches/xubuntu_runtime-logind-support.patch:
2534+ Check for logind support at runtime
2535+ - Add startxfce4.user-session.upstart
2536+ * Drop xflock4-light-locker-support.patch, fixed in debian
2537+
2538+ -- Jackson Doak <noskcaj@ubuntu.com> Sun, 17 Aug 2014 07:27:21 +1000
2539+
2540+xfce4-session (4.10.1-8) unstable; urgency=medium
2541+
2542+ * debian/patches:
2543+ - 02_add-light-locker-to-xflock4 added, add light-locker support to
2544+ xflock4 now that it's in Jessie. closes: #757649
2545+
2546+ -- Yves-Alexis Perez <corsac@debian.org> Sat, 16 Aug 2014 12:48:09 +0200
2547+
2548 xfce4-session (4.10.1-7ubuntu1) utopic; urgency=medium
2549
2550 * Merge from Debian unstable, remaining Ubuntu changes:
2551
2552=== removed file 'debian/patches/02_add-dm-tool-to-xflock4.patch'
2553--- debian/patches/02_add-dm-tool-to-xflock4.patch 2014-01-16 22:09:59 +0000
2554+++ debian/patches/02_add-dm-tool-to-xflock4.patch 1970-01-01 00:00:00 +0000
2555@@ -1,10 +0,0 @@
2556---- a/scripts/xflock4
2557-+++ b/scripts/xflock4
2558-@@ -27,6 +27,7 @@ export PATH
2559- # Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
2560- for lock_cmd in \
2561- "xscreensaver-command -lock" \
2562-+ "dm-tool lock" \
2563- "gnome-screensaver-command --lock"
2564- do
2565- $lock_cmd >/dev/null 2>&1 && exit
2566
2567=== added file 'debian/patches/02_add-light-locker-to-xflock4.patch'
2568--- debian/patches/02_add-light-locker-to-xflock4.patch 1970-01-01 00:00:00 +0000
2569+++ debian/patches/02_add-light-locker-to-xflock4.patch 2014-08-16 21:43:36 +0000
2570@@ -0,0 +1,10 @@
2571+--- a/scripts/xflock4
2572++++ b/scripts/xflock4
2573+@@ -27,6 +27,7 @@ export PATH
2574+ # Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
2575+ for lock_cmd in \
2576+ "xscreensaver-command -lock" \
2577++ "light-locker-command --lock" \
2578+ "gnome-screensaver-command --lock"
2579+ do
2580+ $lock_cmd >/dev/null 2>&1 && exit
2581
2582=== modified file 'debian/patches/series'
2583--- debian/patches/series 2014-07-21 16:51:03 +0000
2584+++ debian/patches/series 2014-08-16 21:43:36 +0000
2585@@ -1,5 +1,5 @@
2586 01_fix-xrdb-call.patch
2587+02_add-light-locker-to-xflock4.patch
2588 03_runtime-logind-support.patch
2589 xubuntu_ignore-gdm-lang.patch
2590 xubuntu_set-xdg-current-desktop.patch
2591-xflock4-light-locker-support.patch
2592
2593=== removed file 'debian/patches/xflock4-light-locker-support.patch'
2594--- debian/patches/xflock4-light-locker-support.patch 2014-03-18 19:36:28 +0000
2595+++ debian/patches/xflock4-light-locker-support.patch 1970-01-01 00:00:00 +0000
2596@@ -1,21 +0,0 @@
2597-Add support for locking via light-locker to xflock4
2598-
2599----
2600- scripts/xflock4 | 5 +++--
2601- 1 file changed, 3 insertions(+), 2 deletions(-)
2602-
2603-Index: xfce4-session/scripts/xflock4
2604-===================================================================
2605---- xfce4-session.orig/scripts/xflock4 2014-03-20 09:55:53.265240000 +0100
2606-+++ xfce4-session/scripts/xflock4 2014-03-20 09:55:53.265240000 +0100
2607-@@ -24,8 +24,9 @@
2608- PATH=/bin:/usr/bin
2609- export PATH
2610-
2611--# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
2612-+# Lock by xscreensaver, gnome-screensaver, or light-locker, if a respective daemon is running
2613- for lock_cmd in \
2614-+ "light-locker-command -l" \
2615- "xscreensaver-command -lock" \
2616- "gnome-screensaver-command --lock"
2617- do
2618
2619=== modified file 'scripts/xflock4'
2620--- scripts/xflock4 2014-07-21 16:51:03 +0000
2621+++ scripts/xflock4 2014-08-16 21:43:36 +0000
2622@@ -24,9 +24,8 @@
2623 PATH=/bin:/usr/bin
2624 export PATH
2625
2626-# Lock by xscreensaver, gnome-screensaver, or light-locker, if a respective daemon is running
2627+# Lock by xscreensaver or gnome-screensaver, if a respective daemon is running
2628 for lock_cmd in \
2629- "light-locker-command -l" \
2630 "xscreensaver-command -lock" \
2631 "gnome-screensaver-command --lock"
2632 do
2633
2634=== modified file 'scripts/xinitrc.in'
2635--- scripts/xinitrc.in 2013-10-23 21:13:30 +0000
2636+++ scripts/xinitrc.in 2014-08-16 21:43:36 +0000
2637@@ -22,12 +22,6 @@
2638 export DESKTOP_SESSION
2639 fi
2640
2641-# set XDG_CURRENT_DESKTOP for alacarte
2642-if test "x$XDG_CURRENT_DESKTOP" = "x"; then
2643- XDG_CURRENT_DESKTOP="XFCE"
2644- export XDG_CURRENT_DESKTOP
2645-fi
2646-
2647 # $XDG_CONFIG_HOME defines the base directory relative to which user specific
2648 # configuration files should be stored. If $XDG_CONFIG_HOME is either not set
2649 # or empty, a default equal to $HOME/.config should be used.
2650
2651=== modified file 'scripts/xinitrc.in.in'
2652--- scripts/xinitrc.in.in 2013-10-23 21:13:30 +0000
2653+++ scripts/xinitrc.in.in 2014-08-16 21:43:36 +0000
2654@@ -22,12 +22,6 @@
2655 export DESKTOP_SESSION
2656 fi
2657
2658-# set XDG_CURRENT_DESKTOP for alacarte
2659-if test "x$XDG_CURRENT_DESKTOP" = "x"; then
2660- XDG_CURRENT_DESKTOP="XFCE"
2661- export XDG_CURRENT_DESKTOP
2662-fi
2663-
2664 # $XDG_CONFIG_HOME defines the base directory relative to which user specific
2665 # configuration files should be stored. If $XDG_CONFIG_HOME is either not set
2666 # or empty, a default equal to $HOME/.config should be used.
2667@@ -82,7 +76,7 @@
2668 test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources"
2669
2670 # load all X resources (adds /dev/null to avoid an empty list that would hang the process)
2671-cat /dev/null $XRESOURCES | xrdb -merge -
2672+cat /dev/null $XRESOURCES | xrdb -nocpp -merge -
2673
2674 # load local modmap
2675 test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap
2676
2677=== modified file 'xfce4-session/Makefile.am'
2678--- xfce4-session/Makefile.am 2014-07-21 16:51:03 +0000
2679+++ xfce4-session/Makefile.am 2014-08-16 21:43:36 +0000
2680@@ -38,8 +38,6 @@
2681 xfsm-compat-gnome.h \
2682 xfsm-compat-kde.c \
2683 xfsm-compat-kde.h \
2684- xfsm-consolekit.c \
2685- xfsm-consolekit.h \
2686 xfsm-dns.c \
2687 xfsm-dns.h \
2688 xfsm-error.c \
2689@@ -69,6 +67,10 @@
2690 xfce4_session_SOURCES += \
2691 xfsm-systemd.c \
2692 xfsm-systemd.h
2693+else
2694+xfce4_session_SOURCES += \
2695+ xfsm-consolekit.c \
2696+ xfsm-consolekit.h
2697 endif
2698
2699 xfce4_session_CFLAGS = \
2700
2701=== modified file 'xfce4-session/main.c'
2702--- xfce4-session/main.c 2013-07-01 19:35:39 +0000
2703+++ xfce4-session/main.c 2014-08-16 21:43:36 +0000
2704@@ -101,6 +101,14 @@
2705 /* pass correct DISPLAY to children, in case of --display in argv */
2706 g_setenv ("DISPLAY", gdk_display_get_name (gdk_display_get_default ()), TRUE);
2707
2708+ /* this is for compatibility with the GNOME Display Manager */
2709+ lang = g_getenv ("GDM_LANG");
2710+ if (lang != NULL && strlen (lang) > 0)
2711+ {
2712+ g_setenv ("LANG", lang, TRUE);
2713+ g_unsetenv ("GDM_LANG");
2714+ }
2715+
2716 /* check access to $ICEAUTHORITY or $HOME/.ICEauthority if unset */
2717 if (g_getenv ("ICEAUTHORITY"))
2718 authfile = g_strdup (g_getenv ("ICEAUTHORITY"));
2719
2720=== modified file 'xfce4-session/xfsm-shutdown.c'
2721--- xfce4-session/xfsm-shutdown.c 2014-07-21 16:51:03 +0000
2722+++ xfce4-session/xfsm-shutdown.c 2014-08-16 21:43:36 +0000
2723@@ -63,7 +63,6 @@
2724 #include <xfce4-session/xfsm-shutdown.h>
2725 #include <xfce4-session/xfsm-compat-gnome.h>
2726 #include <xfce4-session/xfsm-compat-kde.h>
2727-#include <xfce4-session/xfsm-consolekit.h>
2728 #include <xfce4-session/xfsm-fadeout.h>
2729 #include <xfce4-session/xfsm-global.h>
2730 #include <xfce4-session/xfsm-legacy.h>
2731@@ -71,6 +70,8 @@
2732
2733 #ifdef HAVE_SYSTEMD
2734 #include <xfce4-session/xfsm-systemd.h>
2735+#else
2736+#include <xfce4-session/xfsm-consolekit.h>
2737 #endif
2738
2739 static void xfsm_shutdown_finalize (GObject *object);
2740@@ -97,8 +98,9 @@
2741
2742 #ifdef HAVE_SYSTEMD
2743 XfsmSystemd *systemd;
2744-#endif
2745+#else
2746 XfsmConsolekit *consolekit;
2747+#endif
2748 XfsmUPower *upower;
2749
2750 /* kiosk settings */
2751@@ -137,14 +139,10 @@
2752 XfceKiosk *kiosk;
2753
2754 #ifdef HAVE_SYSTEMD
2755- shutdown->consolekit = NULL;
2756- shutdown->systemd = NULL;
2757- if (LOGIND_RUNNING())
2758- shutdown->systemd = xfsm_systemd_get ();
2759- else
2760-#endif
2761+ shutdown->systemd = xfsm_systemd_get ();
2762+#else
2763 shutdown->consolekit = xfsm_consolekit_get ();
2764-
2765+#endif
2766 shutdown->upower = xfsm_upower_get ();
2767 shutdown->helper_state = SUDO_NOT_INITIAZED;
2768 shutdown->helper_require_password = FALSE;
2769@@ -164,11 +162,10 @@
2770 XfsmShutdown *shutdown = XFSM_SHUTDOWN (object);
2771
2772 #ifdef HAVE_SYSTEMD
2773- if (shutdown->systemd != NULL)
2774- g_object_unref (G_OBJECT (shutdown->systemd));
2775+ g_object_unref (G_OBJECT (shutdown->systemd));
2776+#else
2777+ g_object_unref (G_OBJECT (shutdown->consolekit));
2778 #endif
2779- if (shutdown->consolekit != NULL)
2780- g_object_unref (G_OBJECT (shutdown->consolekit));
2781 g_object_unref (G_OBJECT (shutdown->upower));
2782
2783 /* close down helper */
2784@@ -660,11 +657,10 @@
2785 return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_RESTART, error);
2786 else
2787 #ifdef HAVE_SYSTEMD
2788- if (shutdown->systemd != NULL)
2789- return xfsm_systemd_try_restart (shutdown->systemd, error);
2790- else
2791-#endif
2792+ return xfsm_systemd_try_restart (shutdown->systemd, error);
2793+#else
2794 return xfsm_consolekit_try_restart (shutdown->consolekit, error);
2795+#endif
2796 }
2797
2798
2799@@ -682,11 +678,10 @@
2800 return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_SHUTDOWN, error);
2801 else
2802 #ifdef HAVE_SYSTEMD
2803- if (shutdown->systemd != NULL)
2804- return xfsm_systemd_try_shutdown (shutdown->systemd, error);
2805- else
2806-#endif
2807+ return xfsm_systemd_try_shutdown (shutdown->systemd, error);
2808+#else
2809 return xfsm_consolekit_try_shutdown (shutdown->consolekit, error);
2810+#endif
2811 }
2812
2813
2814@@ -697,11 +692,6 @@
2815 {
2816 g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
2817
2818-#ifdef HAVE_SYSTEMD
2819- if (shutdown->systemd != NULL)
2820- return xfsm_systemd_try_suspend (shutdown->systemd, error);
2821- else
2822-#endif
2823 return xfsm_upower_try_suspend (shutdown->upower, error);
2824 }
2825
2826@@ -713,11 +703,6 @@
2827 {
2828 g_return_val_if_fail (XFSM_IS_SHUTDOWN (shutdown), FALSE);
2829
2830-#ifdef HAVE_SYSTEMD
2831- if (shutdown->systemd != NULL)
2832- return xfsm_systemd_try_hibernate (shutdown->systemd, error);
2833- else
2834-#endif
2835 return xfsm_upower_try_hibernate (shutdown->upower, error);
2836 }
2837
2838@@ -737,14 +722,10 @@
2839 }
2840
2841 #ifdef HAVE_SYSTEMD
2842- if (shutdown->systemd != NULL)
2843- {
2844- if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
2845- return TRUE;
2846- }
2847- else
2848-#endif
2849+ if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error))
2850+#else
2851 if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error))
2852+#endif
2853 return TRUE;
2854
2855 if (xfsm_shutdown_sudo_init (shutdown, error))
2856@@ -772,14 +753,10 @@
2857 }
2858
2859 #ifdef HAVE_SYSTEMD
2860- if (shutdown->systemd != NULL)
2861- {
2862- if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))
2863- return TRUE;
2864- }
2865- else
2866-#endif
2867+ if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error))
2868+#else
2869 if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error))
2870+#endif
2871 return TRUE;
2872
2873 if (xfsm_shutdown_sudo_init (shutdown, error))
2874@@ -807,12 +784,6 @@
2875 return TRUE;
2876 }
2877
2878-#ifdef HAVE_SYSTEMD
2879- if (shutdown->systemd != NULL)
2880- return xfsm_systemd_can_suspend (shutdown->systemd, can_suspend,
2881- auth_suspend, error);
2882- else
2883-#endif
2884 return xfsm_upower_can_suspend (shutdown->upower, can_suspend,
2885 auth_suspend, error);
2886 }
2887@@ -833,12 +804,6 @@
2888 return TRUE;
2889 }
2890
2891-#ifdef HAVE_SYSTEMD
2892- if (shutdown->systemd != NULL)
2893- return xfsm_systemd_can_hibernate (shutdown->systemd, can_hibernate,
2894- auth_hibernate, error);
2895- else
2896-#endif
2897 return xfsm_upower_can_hibernate (shutdown->upower, can_hibernate,
2898 auth_hibernate, error);
2899 }
2900
2901=== modified file 'xfce4-session/xfsm-systemd.c'
2902--- xfce4-session/xfsm-systemd.c 2014-07-21 16:51:03 +0000
2903+++ xfce4-session/xfsm-systemd.c 2014-08-16 21:43:36 +0000
2904@@ -24,7 +24,6 @@
2905 #include <dbus/dbus-glib.h>
2906 #include <dbus/dbus-glib-lowlevel.h>
2907
2908-#include <libxfsm/xfsm-util.h>
2909 #include <xfce4-session/xfsm-systemd.h>
2910
2911
2912@@ -34,12 +33,8 @@
2913 #define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager"
2914 #define SYSTEMD_REBOOT_ACTION "Reboot"
2915 #define SYSTEMD_POWEROFF_ACTION "PowerOff"
2916-#define SYSTEMD_SUSPEND_ACTION "Suspend"
2917-#define SYSTEMD_HIBERNATE_ACTION "Hibernate"
2918 #define SYSTEMD_REBOOT_TEST "org.freedesktop.login1.reboot"
2919 #define SYSTEMD_POWEROFF_TEST "org.freedesktop.login1.power-off"
2920-#define SYSTEMD_SUSPEND_TEST "org.freedesktop.login1.suspend"
2921-#define SYSTEMD_HIBERNATE_TEST "org.freedesktop.login1.hibernate"
2922
2923
2924
2925@@ -98,22 +93,6 @@
2926 }
2927
2928
2929-
2930-static gboolean
2931-xfsm_systemd_lock_screen (GError **error)
2932-{
2933- XfconfChannel *channel;
2934- gboolean ret = TRUE;
2935-
2936- channel = xfsm_open_config ();
2937- if (xfconf_channel_get_bool (channel, "/shutdown/LockScreen", FALSE))
2938- ret = g_spawn_command_line_async ("xflock4", error);
2939-
2940- return ret;
2941-}
2942-
2943-
2944-
2945 static gboolean
2946 xfsm_systemd_can_method (XfsmSystemd *systemd,
2947 gboolean *can_method,
2948@@ -226,34 +205,6 @@
2949
2950
2951 gboolean
2952-xfsm_systemd_try_suspend (XfsmSystemd *systemd,
2953- GError **error)
2954-{
2955- if (!xfsm_systemd_lock_screen (error))
2956- return FALSE;
2957-
2958- return xfsm_systemd_try_method (systemd,
2959- SYSTEMD_SUSPEND_ACTION,
2960- error);
2961-}
2962-
2963-
2964-
2965-gboolean
2966-xfsm_systemd_try_hibernate (XfsmSystemd *systemd,
2967- GError **error)
2968-{
2969- if (!xfsm_systemd_lock_screen (error))
2970- return FALSE;
2971-
2972- return xfsm_systemd_try_method (systemd,
2973- SYSTEMD_HIBERNATE_ACTION,
2974- error);
2975-}
2976-
2977-
2978-
2979-gboolean
2980 xfsm_systemd_can_restart (XfsmSystemd *systemd,
2981 gboolean *can_restart,
2982 GError **error)
2983@@ -276,39 +227,3 @@
2984 SYSTEMD_POWEROFF_TEST,
2985 error);
2986 }
2987-
2988-
2989-
2990-gboolean
2991-xfsm_systemd_can_suspend (XfsmSystemd *systemd,
2992- gboolean *can_suspend,
2993- gboolean *auth_suspend,
2994- GError **error)
2995-{
2996- gboolean ret = FALSE;
2997-
2998- ret = xfsm_systemd_can_method (systemd,
2999- can_suspend,
3000- SYSTEMD_SUSPEND_TEST,
3001- error);
3002- *auth_suspend = *can_suspend;
3003- return ret;
3004-}
3005-
3006-
3007-
3008-gboolean
3009-xfsm_systemd_can_hibernate (XfsmSystemd *systemd,
3010- gboolean *can_hibernate,
3011- gboolean *auth_hibernate,
3012- GError **error)
3013-{
3014- gboolean ret = FALSE;
3015-
3016- ret = xfsm_systemd_can_method (systemd,
3017- can_hibernate,
3018- SYSTEMD_HIBERNATE_TEST,
3019- error);
3020- *auth_hibernate = *can_hibernate;
3021- return ret;
3022-}
3023
3024=== modified file 'xfce4-session/xfsm-systemd.h'
3025--- xfce4-session/xfsm-systemd.h 2014-07-21 16:51:03 +0000
3026+++ xfce4-session/xfsm-systemd.h 2014-08-16 21:43:36 +0000
3027@@ -22,8 +22,6 @@
3028 #ifndef __XFSM_SYSTEMD_H__
3029 #define __XFSM_SYSTEMD_H__
3030
3031-#define LOGIND_RUNNING() (access ("/run/systemd/seats/", F_OK) >= 0)
3032-
3033 typedef struct _XfsmSystemdClass XfsmSystemdClass;
3034 typedef struct _XfsmSystemd XfsmSystemd;
3035
3036@@ -44,12 +42,6 @@
3037 gboolean xfsm_systemd_try_shutdown (XfsmSystemd *systemd,
3038 GError **error);
3039
3040-gboolean xfsm_systemd_try_suspend (XfsmSystemd *systemd,
3041- GError **error);
3042-
3043-gboolean xfsm_systemd_try_hibernate (XfsmSystemd *systemd,
3044- GError **error);
3045-
3046 gboolean xfsm_systemd_can_restart (XfsmSystemd *systemd,
3047 gboolean *can_restart,
3048 GError **error);
3049@@ -58,16 +50,6 @@
3050 gboolean *can_shutdown,
3051 GError **error);
3052
3053-gboolean xfsm_systemd_can_suspend (XfsmSystemd *systemd,
3054- gboolean *can_suspend,
3055- gboolean *auth_suspend,
3056- GError **error);
3057-
3058-gboolean xfsm_systemd_can_hibernate (XfsmSystemd *systemd,
3059- gboolean *can_hibernate,
3060- gboolean *auth_hibernate,
3061- GError **error);
3062-
3063 G_END_DECLS
3064
3065 #endif /* __XFSM_SYSTEMD_H__ */

Subscribers

People subscribed via source and target branches

to all changes: