├── po ├── meson.build ├── LINGUAS └── POTFILES.in ├── xfce4-session ├── xfsm-marshal.list ├── xfsm-chooser-icon.png ├── xfce-portals.conf ├── xfsm-dns.h ├── xfsm-compat-kde.h ├── xfsm-compat-gnome.h ├── sm-layer.h ├── xfsm-fadeout.h ├── ice-layer.h ├── org.xfce.session.policy.in.in ├── xfsm-legacy.h ├── xfsm-startup.h ├── xfsm-error.h ├── xfsm-inhibitor.h ├── xfsm-shutdown-fallback.h ├── xfsm-packagekit.h ├── xfsm-logout-dialog.h ├── xfsm-chooser.h ├── xfsm-global.h ├── xfsm-inhibition.h ├── xfsm-error.c ├── xfce4-session.1 ├── xfsm-client.h ├── meson.build ├── xfsm-compat-kde.c ├── xfsm-shutdown.h ├── xfsm-dns.c ├── xfsm-fadeout.c ├── xfsm-inhibitor.c └── xfsm-properties.h ├── settings ├── xfce4-session-marshal.list ├── xfce4-session.gresource.xml ├── xfce-session-settings.desktop.in ├── xfce4-session-settings-common.h ├── xfae-window.h ├── meson.build ├── xfae-dialog.h ├── xfce4-session.xml └── xfae-model.h ├── .gitlab-ci.yml ├── icons ├── 16x16 │ └── org.xfce.session.png ├── 24x24-actions │ ├── xfsm-lock.png │ ├── xfsm-logout.png │ ├── xfsm-reboot.png │ ├── xfsm-suspend.png │ ├── xfsm-hibernate.png │ ├── xfsm-shutdown.png │ ├── xfsm-switch-user.png │ ├── xfsm-suspend.svg │ ├── xfsm-lock.svg │ ├── xfsm-shutdown.svg │ ├── xfsm-reboot.svg │ ├── xfsm-switch-user.svg │ └── xfsm-hibernate.svg ├── 24x24 │ └── org.xfce.session.png ├── 32x32 │ └── org.xfce.session.png ├── 48x48-actions │ ├── xfsm-lock.png │ ├── xfsm-logout.png │ ├── xfsm-reboot.png │ ├── xfsm-suspend.png │ ├── xfsm-hibernate.png │ ├── xfsm-shutdown.png │ ├── xfsm-switch-user.png │ ├── xfsm-lock.svg │ ├── xfsm-shutdown.svg │ ├── xfsm-suspend.svg │ ├── xfsm-reboot.svg │ ├── xfsm-logout.svg │ ├── xfsm-hibernate.svg │ └── xfsm-switch-user.svg ├── 48x48 │ └── org.xfce.session.png ├── 64x64 │ └── org.xfce.session.png ├── 96x96-actions │ ├── xfsm-lock.png │ ├── xfsm-logout.png │ ├── xfsm-reboot.png │ ├── xfsm-suspend.png │ ├── xfsm-hibernate.png │ ├── xfsm-shutdown.png │ ├── xfsm-switch-user.png │ ├── xfsm-suspend.svg │ ├── xfsm-lock.svg │ ├── xfsm-logout.svg │ ├── xfsm-hibernate.svg │ ├── xfsm-reboot.svg │ └── xfsm-switch-user.svg ├── 96x96 │ └── org.xfce.session.png ├── 128x128 │ └── org.xfce.session.png └── meson.build ├── labwc ├── meson.build ├── labwc-environment └── labwc-rc.xml ├── scripts ├── Xft.xrdb ├── meson.build ├── xflock4 └── xinitrc.in ├── xfce.desktop.in ├── xfce-wayland.desktop.in ├── xfce4-session-logout ├── xfce4-session-logout.desktop.in ├── meson.build └── xfce4-session-logout.1 ├── libxfsm ├── meson.build ├── xfsm-shutdown-common.h └── xfsm-util.h ├── xfsm-shutdown-helper └── meson.build ├── xfce-revision.h.in ├── AUTHORS ├── .scan-build-false-positives ├── doc ├── FAQ ├── README.Kiosk └── NEWS.pre-4.3 ├── .clang-format ├── meson_options.txt └── README.md /po/meson.build: -------------------------------------------------------------------------------- 1 | i18n.gettext(meson.project_name(), preset: 'glib') 2 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-marshal.list: -------------------------------------------------------------------------------- 1 | VOID:UINT,UINT 2 | VOID:STRING,BOXED 3 | -------------------------------------------------------------------------------- /settings/xfce4-session-marshal.list: -------------------------------------------------------------------------------- 1 | VOID:UINT,UINT 2 | VOID:STRING,BOXED 3 | -------------------------------------------------------------------------------- /.gitlab-ci.yml: -------------------------------------------------------------------------------- 1 | include: 2 | - project: 'xfce/xfce4-dev-tools' 3 | file: '/ci/build_project.yml' 4 | 5 | -------------------------------------------------------------------------------- /icons/16x16/org.xfce.session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/16x16/org.xfce.session.png -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/24x24-actions/xfsm-lock.png -------------------------------------------------------------------------------- /icons/24x24/org.xfce.session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/24x24/org.xfce.session.png -------------------------------------------------------------------------------- /icons/32x32/org.xfce.session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/32x32/org.xfce.session.png -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/48x48-actions/xfsm-lock.png -------------------------------------------------------------------------------- /icons/48x48/org.xfce.session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/48x48/org.xfce.session.png -------------------------------------------------------------------------------- /icons/64x64/org.xfce.session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/64x64/org.xfce.session.png -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/96x96-actions/xfsm-lock.png -------------------------------------------------------------------------------- /icons/96x96/org.xfce.session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/96x96/org.xfce.session.png -------------------------------------------------------------------------------- /icons/128x128/org.xfce.session.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/128x128/org.xfce.session.png -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/24x24-actions/xfsm-logout.png -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-reboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/24x24-actions/xfsm-reboot.png -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-suspend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/24x24-actions/xfsm-suspend.png -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/48x48-actions/xfsm-logout.png -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-reboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/48x48-actions/xfsm-reboot.png -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-suspend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/48x48-actions/xfsm-suspend.png -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-logout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/96x96-actions/xfsm-logout.png -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-reboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/96x96-actions/xfsm-reboot.png -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-suspend.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/96x96-actions/xfsm-suspend.png -------------------------------------------------------------------------------- /xfce4-session/xfsm-chooser-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/xfce4-session/xfsm-chooser-icon.png -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-hibernate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/24x24-actions/xfsm-hibernate.png -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-shutdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/24x24-actions/xfsm-shutdown.png -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-hibernate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/48x48-actions/xfsm-hibernate.png -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-shutdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/48x48-actions/xfsm-shutdown.png -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-hibernate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/96x96-actions/xfsm-hibernate.png -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-shutdown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/96x96-actions/xfsm-shutdown.png -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-switch-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/24x24-actions/xfsm-switch-user.png -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-switch-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/48x48-actions/xfsm-switch-user.png -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-switch-user.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/xfce-mirror/xfce4-session/HEAD/icons/96x96-actions/xfsm-switch-user.png -------------------------------------------------------------------------------- /labwc/meson.build: -------------------------------------------------------------------------------- 1 | install_data( 2 | [ 3 | 'labwc-environment', 4 | 'labwc-rc.xml', 5 | ], 6 | install_dir: get_option('prefix') / get_option('datadir') / 'xfce4' / 'labwc', 7 | ) 8 | -------------------------------------------------------------------------------- /settings/xfce4-session.gresource.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | xfce4-session-settings.ui 5 | 6 | 7 | -------------------------------------------------------------------------------- /scripts/Xft.xrdb: -------------------------------------------------------------------------------- 1 | ! Those are fallback settings, use the ui plugin to change it 2 | ! or add your overrides to ~/.Xresources 3 | ! Xft.hintstyle: hintnone/hintslight/hintmedium/hintfull 4 | ! Xft hinting: 1/0 5 | 6 | Xft.hinting: 1 7 | Xft.hintstyle: hintmedium 8 | -------------------------------------------------------------------------------- /xfce.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Name=Xfce Session 4 | Comment=Use this session to run Xfce as your desktop environment 5 | Exec=startxfce4 6 | Icon= 7 | Type=Application 8 | DesktopNames=XFCE 9 | Keywords=xfce;session;desktop;environment;window manager;gui; 10 | -------------------------------------------------------------------------------- /xfce-wayland.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Name=Xfce Session (Wayland) 4 | Comment=Use this session to run Xfce as your desktop environment 5 | Exec=startxfce4 --wayland 6 | Icon= 7 | Type=Application 8 | DesktopNames=XFCE 9 | Keywords=xfce;wayland;desktop;environment;session; 10 | -------------------------------------------------------------------------------- /xfce4-session/xfce-portals.conf: -------------------------------------------------------------------------------- 1 | [preferred] 2 | default=gtk; 3 | org.freedesktop.impl.portal.Wallpaper=xapp;gtk; 4 | org.freedesktop.impl.portal.Screenshot=xapp;gtk; 5 | org.freedesktop.impl.portal.Background=xapp;gtk; 6 | org.freedesktop.impl.portal.ScreenCast=wlr;gtk; 7 | org.freedesktop.impl.portal.Settings=xapp;gtk; 8 | -------------------------------------------------------------------------------- /xfce4-session-logout/xfce4-session-logout.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Version=1.0 3 | Type=Application 4 | Exec=xfce4-session-logout 5 | Icon=xfsm-logout 6 | StartupNotify=false 7 | Terminal=false 8 | Categories=System;X-XFCE;X-Xfce-Toplevel; 9 | Keywords=logout;exit;quit;shutdown; 10 | OnlyShowIn=XFCE; 11 | Name=Log Out 12 | Comment=Log out of the Xfce Desktop 13 | -------------------------------------------------------------------------------- /libxfsm/meson.build: -------------------------------------------------------------------------------- 1 | libxfsm = static_library( 2 | 'xfsm', 3 | [ 4 | 'xfsm-shutdown-common.h', 5 | 'xfsm-util.c', 6 | 'xfsm-util.h', 7 | ], 8 | c_args: [ 9 | '-DG_LOG_DOMAIN="@0@"'.format('libxfsm'), 10 | ], 11 | include_directories: [ 12 | include_directories('..'), 13 | ], 14 | dependencies: [ 15 | libxfce4ui, 16 | libxfce4util, 17 | xfconf, 18 | ], 19 | install: false, 20 | ) 21 | -------------------------------------------------------------------------------- /xfsm-shutdown-helper/meson.build: -------------------------------------------------------------------------------- 1 | executable( 2 | 'xfsm-shutdown-helper', 3 | [ 4 | 'main.c', 5 | ], 6 | c_args: [ 7 | '-DG_LOG_DOMAIN="@0@"'.format('xfsm-shutdown-helper'), 8 | ], 9 | include_directories: [ 10 | include_directories('..'), 11 | ], 12 | dependencies: [ 13 | gtk, 14 | libxfce4util, 15 | ], 16 | install: true, 17 | install_dir: helper_path_prefix / 'xfce4' / 'session', 18 | ) 19 | -------------------------------------------------------------------------------- /xfce-revision.h.in: -------------------------------------------------------------------------------- 1 | /* 2 | * The file xfce-revision.h is auto-generated and should not be modified 3 | * directly. Modify the xfce-revision.h.in file and re-run the build 4 | * instead. 5 | */ 6 | 7 | #ifndef INC_XFCE_REVISION_H 8 | #define INC_XFCE_REVISION_H 9 | 10 | #define REVISION "@REVISION@" 11 | 12 | #define VERSION_FULL VERSION "-" REVISION 13 | #define PACKAGE_STRING_FULL PACKAGE " " VERSION_FULL 14 | 15 | #endif /* INC_XFCE_REVISION_H */ 16 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Benedikt Meurer 2 | Oliver M. Bolzer 3 | Francois Le Clainche 4 | Maarten Boekhold 5 | Brian Tarricone 6 | Jani Monoses 7 | 8 | Parts of the code were copied from gnome-session and ksmserver. 9 | engines/mice/{preview,slide}.png were created by François Leclanché 10 | engines/simple/{preview,fallback}.png were created by Bennedikt Meurer 11 | -------------------------------------------------------------------------------- /settings/xfce-session-settings.desktop.in: -------------------------------------------------------------------------------- 1 | [Desktop Entry] 2 | Name=Session and Startup 3 | Comment=Customize desktop startup 4 | Exec=xfce4-session-settings 5 | Icon=org.xfce.session 6 | Terminal=false 7 | StartupNotify=true 8 | Type=Application 9 | Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; 10 | Keywords=session;settings;preferences;manager;startup;login;logout;shutdown;lock screen;application;autostart;launch;services;daemon;agent; 11 | OnlyShowIn=XFCE; 12 | X-XfcePluggable=true 13 | X-XfceHelpComponent=xfce4-session 14 | X-XfceHelpPage=preferences 15 | -------------------------------------------------------------------------------- /.scan-build-false-positives: -------------------------------------------------------------------------------- 1 | # gdbus-codegen generated code 2 | xfsm-client-dbus-client.c:[0-9]+:[0-9]+: warning: Value stored to 'skeleton' during its initialization is never read \[deadcode.DeadStores\] 3 | xfsm-manager-dbus-client.c:[0-9]+:[0-9]+: warning: Value stored to 'skeleton' during its initialization is never read \[deadcode.DeadStores\] 4 | xfsm-client-dbus.c:[0-9]+:[0-9]+: warning: Value stored to 'skeleton' during its initialization is never read \[deadcode.DeadStores\] 5 | xfsm-manager-dbus.c:[0-9]+:[0-9]+: warning: Value stored to 'skeleton' during its initialization is never read \[deadcode.DeadStores\] 6 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Generated by https://gitlab.xfce.org/infra/transifex 2 | am 3 | ar 4 | ast 5 | az_AZ 6 | az 7 | be 8 | be@tarask 9 | bg 10 | bn 11 | ca 12 | cs 13 | da 14 | de 15 | el 16 | en_AU 17 | en_CA 18 | en_GB 19 | eo 20 | es 21 | et 22 | eu 23 | fa_IR 24 | fi 25 | fr 26 | gl 27 | he 28 | hi 29 | hr 30 | hu 31 | hy_AM 32 | hye 33 | id 34 | ie 35 | is 36 | it 37 | ja 38 | ka 39 | kk 40 | ko 41 | lt 42 | lv 43 | ms 44 | nb 45 | nl 46 | nn 47 | oc 48 | pa 49 | pl 50 | pt_BR 51 | pt 52 | ro 53 | ru 54 | si 55 | sk 56 | sl 57 | sq 58 | sr 59 | sv 60 | te 61 | th 62 | tr 63 | tt 64 | ug 65 | uk 66 | ur_PK 67 | ur 68 | vec 69 | vi 70 | zh_CN 71 | zh_HK 72 | zh_TW 73 | -------------------------------------------------------------------------------- /xfce4-session-logout/meson.build: -------------------------------------------------------------------------------- 1 | executable( 2 | 'xfce4-session-logout', 3 | [ 4 | 'main.c', 5 | ], 6 | sources: xfce_revision_h, 7 | c_args: [ 8 | '-DG_LOG_DOMAIN="@0@"'.format('xfce4-session-logout'), 9 | ], 10 | include_directories: [ 11 | include_directories('..'), 12 | ], 13 | dependencies: [ 14 | gio, 15 | gtk, 16 | libxfce4ui, 17 | libxfce4util, 18 | ], 19 | install: true, 20 | install_dir: get_option('prefix') / get_option('bindir'), 21 | ) 22 | 23 | i18n.merge_file( 24 | input: 'xfce4-session-logout.desktop.in', 25 | output: 'xfce4-session-logout.desktop', 26 | po_dir: '..' / 'po', 27 | type: 'desktop', 28 | install: true, 29 | install_dir: get_option('prefix') / get_option('datadir') / 'applications', 30 | ) 31 | 32 | install_man('xfce4-session-logout.1') 33 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | 3 | xfce.desktop.in 4 | xfce-wayland.desktop.in 5 | libxfsm/xfsm-util.c 6 | settings/main.c 7 | settings/session-editor.c 8 | settings/xfae-dialog.c 9 | settings/xfae-model.c 10 | settings/xfae-window.c 11 | xfce4-session/main.c 12 | xfce4-session/xfsm-chooser.c 13 | xfce4-session/xfsm-client.c 14 | xfce4-session/xfsm-compat-gnome.c 15 | xfce4-session/xfsm-compat-kde.c 16 | xfce4-session/xfsm-dns.c 17 | xfce4-session/xfsm-global.c 18 | xfce4-session/xfsm-manager.c 19 | xfce4-session/xfsm-logout-dialog.c 20 | xfce4-session/xfsm-startup.c 21 | xfce4-session/xfsm-shutdown.c 22 | xfce4-session-logout/main.c 23 | xfce4-session-logout/xfce4-session-logout.desktop.in 24 | xfce4-session/org.xfce.session.policy.in.in 25 | 26 | # files added by intltool-prepare. 27 | settings/xfce-session-settings.desktop.in 28 | settings/xfce4-session-settings.ui 29 | -------------------------------------------------------------------------------- /labwc/labwc-environment: -------------------------------------------------------------------------------- 1 | # Example environment file for Xfce 2 | # See also example config files shipped with labwc 3 | 4 | ## 5 | ## Use the XKB_DEFAULT_LAYOUT variable to set the keyboard layout. For example 6 | ## to start with Swedish keyboard layout set it to 'se'. If you are unsure what 7 | ## your country code is, refer to the layout section of: 8 | ## /usr/share/X11/xkb/rules/evdev.lst 9 | ## 10 | ## Multiple keyboard layouts can be set by comma-separating the country codes. 11 | ## If a variant layout is needed, the syntax is layout(variant) 12 | ## If multiple layouts are used, specify the toggle-keybind using 13 | ## XKB_DEFAULT_OPTIONS as show below. 14 | ## 15 | ## For further details, see xkeyboard-config(7) 16 | ## 17 | 18 | XKB_DEFAULT_LAYOUT=en 19 | XKB_DEFAULT_MODEL=pc104 20 | 21 | ## 22 | ## Set cursor theme and size. Find system icons themes with: 23 | ## `find /usr/share/icons/ -type d -name "cursors"` 24 | ## 25 | 26 | XCURSOR_THEME=Adwaita 27 | -------------------------------------------------------------------------------- /scripts/meson.build: -------------------------------------------------------------------------------- 1 | configure_file( 2 | configuration: configuration_data({ 3 | '_datadir_': get_option('prefix') / get_option('datadir'), 4 | '_sysconfdir_': get_option('prefix') / get_option('sysconfdir'), 5 | }), 6 | input: 'startxfce4.in', 7 | output: 'startxfce4', 8 | install: true, 9 | install_dir: get_option('prefix') / get_option('bindir'), 10 | install_mode: 'rwxr-xr-x', 11 | ) 12 | 13 | configure_file( 14 | configuration: configuration_data({ 15 | '_sysconfdir_': get_option('prefix') / get_option('sysconfdir'), 16 | }), 17 | input: 'xinitrc.in', 18 | output: 'xinitrc', 19 | install: true, 20 | install_dir: get_option('prefix') / get_option('sysconfdir') / 'xdg' / 'xfce4', 21 | ) 22 | 23 | install_data( 24 | 'xflock4', 25 | install_dir: get_option('prefix') / get_option('bindir'), 26 | install_mode: 'rwxr-xr-x', 27 | ) 28 | 29 | install_data( 30 | 'Xft.xrdb', 31 | install_dir: get_option('prefix') / get_option('sysconfdir') / 'xdg' / 'xfce4', 32 | ) 33 | -------------------------------------------------------------------------------- /settings/xfce4-session-settings-common.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008 Brian Tarricone 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; version 2 of the License ONLY. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 16 | * MA 02110-1301 USA. 17 | */ 18 | 19 | #ifndef __XFCE4_SESSION_SETTINGS_COMMON_H__ 20 | #define __XFCE4_SESSION_SETTINGS_COMMON_H__ 21 | 22 | void 23 | session_editor_init (GtkBuilder *builder); 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-dns.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_DNS_H__ 23 | #define __XFSM_DNS_H__ 24 | 25 | void 26 | xfsm_dns_check (void); 27 | 28 | #endif /* !__XFSM_DNS_H__ */ 29 | -------------------------------------------------------------------------------- /doc/FAQ: -------------------------------------------------------------------------------- 1 | Session manager FAQ: 2 | -------------------- 3 | 4 | 1) Question: 5 | xfce4-session complains about /tmp/.ICE-unix should be set to root. What 6 | should I do? 7 | 8 | Answer: 9 | This is just a security warning. You can either ignore, or change the 10 | owner of /tmp/.ICE-unix to root. For example, I execute the following 11 | commands on system startup: 12 | 13 | test -d /tmp/.ICE-unix || mkdir /tmp/.ICE-unix 14 | chown root /tmp/.ICE-unix 15 | chmod 1777 /tmp/.ICE-unix 16 | 17 | 18 | 2) Question: 19 | What do I need to do in order to use xfce4-session as session manager 20 | with Xfce4? 21 | 22 | Answer: 23 | If you have a recent xfce-utils (post 20030708) then xfce4-session 24 | is automatically started by startxfce4 as long as you don't have 25 | a file ~/.xfce4/xinitrc in your home directory. Alternatively you 26 | can copy the file $sysconfdir/xfce4/xinitrc.xfce4-session to 27 | ~/.xfce4/xinitrc and start your X session using the startxfce4 script. 28 | 29 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-compat-kde.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_COMPAT_KDE_H__ 23 | #define __XFSM_COMPAT_KDE_H__ 24 | 25 | 26 | void 27 | xfsm_compat_kde_startup (void); 28 | void 29 | xfsm_compat_kde_shutdown (void); 30 | 31 | #endif /* !__XFSM_COMPAT_KDE_H__ */ 32 | -------------------------------------------------------------------------------- /icons/meson.build: -------------------------------------------------------------------------------- 1 | sizes = [16, 24, 32, 48, 64, 96, 128] 2 | names = [ 3 | 'org.xfce.session' 4 | ] 5 | action_sizes = [24, 48, 96] 6 | action_names = [ 7 | 'xfsm-hibernate', 8 | 'xfsm-lock', 9 | 'xfsm-logout', 10 | 'xfsm-reboot', 11 | 'xfsm-shutdown', 12 | 'xfsm-suspend', 13 | 'xfsm-switch-user', 14 | ] 15 | 16 | foreach size : sizes 17 | foreach name : names 18 | install_data( 19 | '@0@x@0@'.format(size) / '@0@.png'.format(name), 20 | install_dir: get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor' / '@0@x@0@'.format(size) / 'apps', 21 | ) 22 | endforeach 23 | endforeach 24 | 25 | foreach name : names 26 | install_data( 27 | 'scalable' / '@0@.svg'.format(name), 28 | install_dir: get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor' / 'scalable' / 'apps', 29 | ) 30 | endforeach 31 | 32 | foreach size : action_sizes 33 | foreach name : action_names 34 | install_data( 35 | '@0@x@0@-actions'.format(size) / '@0@.png'.format(name), 36 | install_dir: get_option('prefix') / get_option('datadir') / 'icons' / 'hicolor' / '@0@x@0@'.format(size) / 'actions', 37 | ) 38 | endforeach 39 | endforeach 40 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-compat-gnome.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | * 21 | * Most parts of this file where taken from gnome-session. 22 | */ 23 | 24 | #ifndef __XFSM_COMPAT_GNOME_H__ 25 | #define __XFSM_COMPAT_GNOME_H__ 26 | 27 | void 28 | xfsm_compat_gnome_startup (void); 29 | void 30 | xfsm_compat_gnome_shutdown (void); 31 | 32 | #endif /* !__XFSM_COMPAT_GNOME_H__ */ 33 | -------------------------------------------------------------------------------- /xfce4-session/sm-layer.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2003-2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __SM_LAYER_H__ 23 | #define __SM_LAYER_H__ 24 | 25 | #include 26 | #include 27 | 28 | #include "xfsm-manager.h" 29 | 30 | void 31 | sm_init (XfconfChannel *channel, 32 | gboolean disable_tcp, 33 | XfsmManager *manager); 34 | 35 | #endif /* !__SM_LAYER_H__ */ 36 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-fadeout.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_FADEOUT_H__ 23 | #define __XFSM_FADEOUT_H__ 24 | 25 | #include 26 | 27 | 28 | G_BEGIN_DECLS; 29 | 30 | typedef struct _XfsmFadeout XfsmFadeout; 31 | 32 | XfsmFadeout * 33 | xfsm_fadeout_new (GdkDisplay *display); 34 | void 35 | xfsm_fadeout_destroy (XfsmFadeout *fadeout); 36 | 37 | G_END_DECLS; 38 | 39 | 40 | #endif /* !__XFSM_FADEOUT_H__ */ 41 | -------------------------------------------------------------------------------- /.clang-format: -------------------------------------------------------------------------------- 1 | --- 2 | Language: Cpp 3 | BasedOnStyle: GNU 4 | 5 | AlignEscapedNewlines: DontAlign 6 | AlignTrailingComments: false 7 | AllowAllParametersOfDeclarationOnNextLine: false 8 | AlwaysBreakAfterReturnType: All 9 | BinPackParameters: false 10 | BreakBeforeBinaryOperators: NonAssignment 11 | ColumnLimit: 0 12 | ContinuationIndentWidth: 2 13 | IncludeBlocks: Regroup 14 | IncludeCategories: 15 | - Regex: '<.*>' 16 | Priority: -2 17 | CaseSensitive: true 18 | - Regex: '".*/.*"' 19 | Priority: -1 20 | CaseSensitive: true 21 | - Regex: '"[^/]*"' 22 | Priority: 0 23 | SortPriority: 1 24 | CaseSensitive: true 25 | IndentGotoLabels: false 26 | InsertNewlineAtEOF: true 27 | KeepEmptyLinesAtTheStartOfBlocks: false 28 | MaxEmptyLinesToKeep: 3 29 | SpaceAfterCStyleCast: true 30 | WhitespaceSensitiveMacros: 31 | # Buggy workaround to add exceptions to 'SpaceBeforeParens: Always' (see below) 32 | - _ 33 | # Workaround to avoid some alignment bugs when adding a macro to WhitespaceSensitiveMacros, 34 | # see https://github.com/llvm/llvm-project/issues/55443#issuecomment-1953268337 35 | # This doesn't fix all alignment bugs though, so I'd rather make an exception only for '_', 36 | # and not also for 'N_' or 'I_' for example. 37 | # See also https://github.com/llvm/llvm-project/issues/82288 38 | Macros: 39 | - _(x)=x 40 | ... 41 | -------------------------------------------------------------------------------- /xfce4-session/ice-layer.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2003-2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_ICE_LAYER_H__ 23 | #define __XFSM_ICE_LAYER_H__ 24 | 25 | #include 26 | #include 27 | 28 | #include "xfsm-manager.h" 29 | 30 | Bool 31 | ice_auth_proc (char *hostname); 32 | gboolean 33 | ice_setup_listeners (int num_listeners, 34 | IceListenObj *listen_objs, 35 | XfsmManager *manager); 36 | void 37 | ice_cleanup (void); 38 | 39 | #endif /* !__XFSM_ICE_LAYER_H__ */ 40 | -------------------------------------------------------------------------------- /xfce4-session/org.xfce.session.policy.in.in: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 12 | 13 | XFCE Session Manager 14 | http://xfce.org/ 15 | xfce4-session 16 | 17 | 18 | 19 | 23 | Shutdown, restart, suspend, or hibernate the system 24 | Authentication is required to shutdown, restart, suspend, or hibernate the system. 25 | 26 | auth_admin 27 | auth_admin 28 | yes 29 | 30 | @HELPER_PATH_PREFIX@/xfce4/session/xfsm-shutdown-helper 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-legacy.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_LEGACY_H__ 23 | #define __XFSM_LEGACY_H__ 24 | 25 | #include 26 | #include 27 | 28 | 29 | void 30 | xfsm_legacy_perform_session_save (void); 31 | void 32 | xfsm_legacy_store_session (GKeyFile *file, 33 | const gchar *group); 34 | void 35 | xfsm_legacy_load_session (GKeyFile *file, 36 | const gchar *group); 37 | void 38 | xfsm_legacy_init (void); 39 | void 40 | xfsm_legacy_startup (void); 41 | void 42 | xfsm_legacy_shutdown (void); 43 | 44 | #endif /* !__XFSM_LEGACY_H__ */ 45 | -------------------------------------------------------------------------------- /meson_options.txt: -------------------------------------------------------------------------------- 1 | option( 2 | 'x11', 3 | type: 'feature', 4 | value: 'auto', 5 | description: 'Support for the X11 windowing system', 6 | ) 7 | 8 | option( 9 | 'xsession-prefix', 10 | type: 'string', 11 | value: '', 12 | description: 'What should be the prefix for the xsession .desktop file? (default: /usr)', 13 | ) 14 | 15 | option( 16 | 'legacy-session-management', 17 | type: 'boolean', 18 | value: true, 19 | description: 'Enable X11R5 session management', 20 | ) 21 | 22 | option( 23 | 'wayland', 24 | type: 'feature', 25 | value: 'auto', 26 | description: 'Support for the Wayland windowing system', 27 | ) 28 | 29 | option( 30 | 'wayland-session-prefix', 31 | type: 'string', 32 | value: '', 33 | description: 'What should be the prefix for the wayland-session .desktop file? (default: /usr)', 34 | ) 35 | 36 | option( 37 | 'gtk-layer-shell', 38 | type: 'feature', 39 | value: 'auto', 40 | description: 'Gtk Layer Shell support (Wayland only)', 41 | ) 42 | 43 | option( 44 | 'polkit', 45 | type: 'feature', 46 | value: 'auto', 47 | description: 'Polkit support', 48 | ) 49 | 50 | option( 51 | 'helper-path-prefix', 52 | type: 'string', 53 | value: '', 54 | description: 'Path prefix under which helper executables will be installed (default: $libdir)', 55 | ) 56 | 57 | option( 58 | 'host-os', 59 | type: 'string', 60 | value: '', 61 | description: 'Host operating system to use: linux, freebsd, openbsd or solaris (default: autodetected build os)', 62 | ) 63 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-startup.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2003-2004 Benedikt Meurer 4 | * Copyright (c) 2008 Brian Tarricone 5 | * All rights reserved. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2, or (at your option) 10 | * any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | * MA 02110-1301 USA. 21 | */ 22 | 23 | #ifndef __XFSM_STARTUP_H__ 24 | #define __XFSM_STARTUP_H__ 25 | 26 | #include 27 | #include 28 | 29 | void 30 | xfsm_startup_init (XfconfChannel *channel); 31 | void 32 | xfsm_startup_shutdown (void); 33 | void 34 | xfsm_startup_foreign (XfsmManager *manager); 35 | void 36 | xfsm_startup_begin (XfsmManager *manager); 37 | void 38 | xfsm_startup_session_continue (XfsmManager *manager); 39 | gboolean 40 | xfsm_startup_start_properties (XfsmProperties *properties, 41 | XfsmManager *manager); 42 | 43 | #endif /* !__XFSM_STARTUP_H__ */ 44 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-error.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008 Brian Tarricone 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; version 2 of the License ONLY. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 16 | */ 17 | 18 | #ifndef __XFSM_ERRORS_H__ 19 | #define __XFSM_ERRORS_H__ 20 | 21 | #include 22 | #include 23 | 24 | #define XFSM_TYPE_ERROR (xfsm_error_get_type ()) 25 | #define XFSM_ERROR (xfsm_error_get_quark ()) 26 | 27 | #define ERROR_MSG(err) ((err) != NULL ? (err)->message : "Error not set") 28 | 29 | G_BEGIN_DECLS 30 | 31 | typedef enum 32 | { 33 | XFSM_ERROR_BAD_STATE = 0, 34 | XFSM_ERROR_BAD_VALUE, 35 | XFSM_ERROR_UNSUPPORTED, 36 | } XfsmError; 37 | 38 | GType 39 | xfsm_error_get_type (void) G_GNUC_CONST; 40 | GQuark 41 | xfsm_error_get_quark (void) G_GNUC_CONST; 42 | 43 | void 44 | throw_error (GDBusMethodInvocation *context, 45 | gint error_code, 46 | const gchar *format, 47 | ...); 48 | 49 | G_END_DECLS 50 | 51 | #endif /* !__XFSM_ERRORS_H__ */ 52 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![License](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://gitlab.xfce.org/xfce/xfce4-session/-/blob/master/COPYING) 2 | 3 | # xfce4-session 4 | 5 | 6 | Xfce4-session is a session manager for Xfce. Its task is to save the state of your desktop (opened applications and their location) and restore it during a next startup. You can create several different sessions and choose one of them on startup. 7 | 8 | ---- 9 | 10 | ### Homepage 11 | 12 | [Xfce4-session documentation](https://docs.xfce.org/xfce/xfce4-session/start) 13 | 14 | ### Changelog 15 | 16 | See [NEWS](https://gitlab.xfce.org/xfce/xfce4-session/-/blob/master/NEWS) for details on changes and fixes made in the current release. 17 | 18 | ### Source Code Repository 19 | 20 | [Xfce4-session source code](https://gitlab.xfce.org/xfce/xfce4-session) 21 | 22 | ### Download a Release Tarball 23 | 24 | [Xfce4-session archive](https://archive.xfce.org/src/xfce/xfce4-session) 25 | or 26 | [Xfce4-session tags](https://gitlab.xfce.org/xfce/xfce4-session/-/tags) 27 | 28 | ### Installation 29 | 30 | From source: 31 | 32 | % cd xfce4-session 33 | % meson setup build 34 | % meson compile -C build 35 | % meson install -C build 36 | 37 | From release tarball: 38 | 39 | % tar xf xfce4-session-.tar.xz 40 | % cd xfce4-session- 41 | % meson setup build 42 | % meson compile -C build 43 | % meson install -C build 44 | 45 | ### Uninstallation 46 | 47 | % ninja uninstall -C build 48 | 49 | ### Reporting Bugs 50 | 51 | Visit the [reporting bugs](https://docs.xfce.org/xfce/xfce4-session/bugs) page to view currently open bug reports and instructions on reporting new bugs or submitting bugfixes. 52 | 53 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-inhibitor.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 | * 3 | * Copyright (C) 2021-2022 Matias De lellis 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_INHIBITOR_H 23 | #define __XFSM_INHIBITOR_H 24 | 25 | #include 26 | 27 | #include "xfsm-inhibition.h" 28 | 29 | G_BEGIN_DECLS 30 | 31 | #define XFSM_TYPE_INHIBITOR (xfsm_inhibitor_get_type ()) 32 | G_DECLARE_FINAL_TYPE (XfsmInhibitor, xfsm_inhibitor, XFSM, INHIBITOR, GObject) 33 | 34 | gboolean 35 | xfsm_inhibitor_add (XfsmInhibitor *store, 36 | XfsmInhibition *inhibition); 37 | 38 | gboolean 39 | xfsm_inhibitor_remove (XfsmInhibitor *store, 40 | guint cookie); 41 | 42 | gboolean 43 | xfsm_inhibitor_is_empty (XfsmInhibitor *store); 44 | 45 | gboolean 46 | xfsm_inhibitor_has_flags (XfsmInhibitor *store, 47 | XfsmInhibitonFlag flags); 48 | 49 | XfsmInhibitor * 50 | xfsm_inhibitor_get (void); 51 | 52 | G_END_DECLS 53 | 54 | #endif /* __XFSM_INHIBITOR_H */ 55 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-shutdown-fallback.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003-2004 Benedikt Meurer 3 | * Copyright (c) 2011 Nick Schermer 4 | * Copyright (c) 2014 Xfce Development Team 5 | * All rights reserved. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2, or (at your option) 10 | * any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | * MA 02110-1301 USA. 21 | */ 22 | 23 | #ifndef __XFSM_SHUTDOWN_FALLBACK_H__ 24 | #define __XFSM_SHUTDOWN_FALLBACK_H__ 25 | 26 | #include "xfsm-shutdown.h" 27 | 28 | gboolean 29 | xfsm_shutdown_fallback_auth_shutdown (void); 30 | gboolean 31 | xfsm_shutdown_fallback_auth_restart (void); 32 | gboolean 33 | xfsm_shutdown_fallback_auth_suspend (void); 34 | gboolean 35 | xfsm_shutdown_fallback_auth_hibernate (void); 36 | gboolean 37 | xfsm_shutdown_fallback_auth_hybrid_sleep (void); 38 | 39 | gboolean 40 | xfsm_shutdown_fallback_can_suspend (void); 41 | gboolean 42 | xfsm_shutdown_fallback_can_hibernate (void); 43 | gboolean 44 | xfsm_shutdown_fallback_can_hybrid_sleep (void); 45 | 46 | gboolean 47 | xfsm_shutdown_fallback_try_action (XfsmShutdownType type, 48 | GError **error); 49 | 50 | #endif /* !__XFSM_SHUTDOWN_FALLBACK_H__ */ 51 | -------------------------------------------------------------------------------- /xfce4-session-logout/xfce4-session-logout.1: -------------------------------------------------------------------------------- 1 | .TH xfce4-session-logout 1 "Oct 7, 2008" 2 | .SH NAME 3 | xfce4-session-logout \- Logs out from Xfce 4 | .SH SYNOPSIS 5 | .B xfce4-session-logout 6 | .br 7 | .SH DESCRIPTION 8 | This manual page documents briefly the 9 | .B xfce4-session-logout 10 | command. 11 | .PP 12 | The \fBxfce4-session-logout\fP command allows you to programmatically 13 | logout from your Xfce session. It requests the session manager to display 14 | the logout confirmation screen, or, if given one of the command-line 15 | options below, causes the session manager to take the requested action 16 | immediately. 17 | 18 | 19 | .SH OPTIONS 20 | \fBxfce4-session-logout\fP takes the following command line options: 21 | .TP 22 | .B \-\-logout 23 | Log out without displaying the logout dialog. 24 | .TP 25 | .B \-\-halt 26 | Halt without displaing the logout dialog. 27 | .TP 28 | .B \-\-reboot 29 | Reboot without displaying the logout dialog. 30 | .TP 31 | .B \-\-suspend 32 | Suspend without displaying the logout dialog. 33 | .TP 34 | .B \-\-hibernate 35 | Hibernate without displaying the logout dialog. 36 | .TP 37 | .B \-\-hybrid-sleep 38 | Hybrid Sleep without displaying the logout dialog. 39 | .TP 40 | .B \-\-fast 41 | Do a fast shutdown. This instructs the session manager 42 | not to save the session, but instead to quit everything 43 | quickly. 44 | .TP 45 | .B \-\-help 46 | Print a help screen and exit. 47 | .TP 48 | .B \-\-version 49 | Output version information and exit. 50 | 51 | .SH AUTHOR 52 | \fBxfce4-session-logout\fP and this manual 53 | page were written by Brian 54 | Tarricone and Benedikt Meurer 55 | as part of the Xfce project. 56 | .SH "REPORTING BUGS" 57 | Report bugs to https://gitlab.xfce.org/xfce/xfce4-session/. 58 | .SH COPYRIGHT 59 | Copyright \(co 2004 Benedikt Meurer. 60 | .br 61 | Copyright \(co 2008 Brian Tarricone. 62 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-packagekit.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- 2 | * 3 | * Copyright (C) 2021 Matias De lellis 4 | * 5 | * Licensed under the GNU General Public License Version 2 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2 of the License, or 10 | * (at your option) any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_PACKAGEKIT_H__ 23 | #define __XFSM_PACKAGEKIT_H__ 24 | 25 | G_BEGIN_DECLS 26 | 27 | #define XFSM_TYPE_PACKAGEKIT (xfsm_packagekit_get_type ()) 28 | G_DECLARE_FINAL_TYPE (XfsmPackagekit, xfsm_packagekit, XFSM, PACKAGEKIT, GObject) 29 | 30 | XfsmPackagekit * 31 | xfsm_packagekit_get (void); 32 | 33 | gboolean 34 | xfsm_packagekit_has_update_prepared (XfsmPackagekit *packagekit, 35 | gboolean *update_prepared, 36 | GError **error); 37 | 38 | gboolean 39 | xfsm_packagekit_try_trigger_shutdown (XfsmPackagekit *packagekit, 40 | GError **error); 41 | 42 | gboolean 43 | xfsm_packagekit_try_trigger_restart (XfsmPackagekit *packagekit, 44 | GError **error); 45 | 46 | G_END_DECLS 47 | 48 | #endif /* __XFSM_PACKAGEKIT_H__ */ 49 | -------------------------------------------------------------------------------- /settings/xfae-window.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2005 Benedikt Meurer 4 | * Copyright (c) 2008 Jannis Pohlmann 5 | * All rights reserved. 6 | * 7 | * This program is free software; you can redistribute it and/or modify 8 | * it under the terms of the GNU General Public License as published by 9 | * the Free Software Foundation; either version 2, or (at your option) 10 | * any later version. 11 | * 12 | * This program is distributed in the hope that it will be useful, 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 | * GNU General Public License for more details. 16 | * 17 | * You should have received a copy of the GNU General Public License 18 | * along with this program; if not, write to the Free Software 19 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 20 | * MA 02110-1301 USA. 21 | */ 22 | 23 | #ifndef __XFAE_WINDOW_H__ 24 | #define __XFAE_WINDOW_H__ 25 | 26 | #include "xfae-model.h" 27 | 28 | G_BEGIN_DECLS; 29 | 30 | typedef struct _XfaeWindowClass XfaeWindowClass; 31 | typedef struct _XfaeWindow XfaeWindow; 32 | 33 | #define XFAE_TYPE_WINDOW (xfae_window_get_type ()) 34 | #define XFAE_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFAE_TYPE_WINDOW, XfaeWindow)) 35 | #define XFAE_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFAE_TYPE_WINDOW, XfaeWindow)) 36 | #define XFAE_IS_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFAE_TYPE_WINDOW)) 37 | #define XFAE_IS_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFAE_TYPE_WINDOW)) 38 | #define XFAE_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFAE_TYPE_WINDOW, XfaeWindowClass)) 39 | 40 | GType 41 | xfae_window_get_type (void) G_GNUC_CONST; 42 | 43 | GtkWidget * 44 | xfae_window_new (void) G_GNUC_MALLOC; 45 | 46 | G_END_DECLS; 47 | 48 | #endif /* !__XFAE_WINDOW_H__ */ 49 | -------------------------------------------------------------------------------- /doc/README.Kiosk: -------------------------------------------------------------------------------- 1 | The Xfce session manager supports the KIOSK mode introduced with libxfce4util 2 | 4.1.13. It provides the following KIOSK capabilities: 3 | 4 | CustomizeSplash whether or not the user is allowed to customize 5 | the splash screen. 6 | 7 | CustomizeChooser whether or not the user is allowed to customize 8 | the session chooser settings 9 | 10 | CustomizeLogout whether or not the user is allowed to customize 11 | the logout settings 12 | 13 | CustomizeCompatibility whether or not the user is allowed to customize 14 | the compatibility settings (KDE/Gnome compat) 15 | 16 | CustomizeSecurity whether or not the user is allowed to customize 17 | the security settings. This is one of the most 18 | IMPORTANT settings, since it prevents users 19 | (actually libICE) from binding to a TCP port. 20 | 21 | Shutdown whether or not the user is allowed to shutdown 22 | (reboot or poweroff) the system. If a user lacks 23 | this capability the reboot and poweroff options 24 | in the shutdown dialog will be greyed out. 25 | 26 | SaveSession whether or not the user is allowed to save 27 | the session on logout. If a user lacks this 28 | capability the "Save session for future logins" 29 | checkbox in the shutdown dialog will be 30 | greyed out. 31 | 32 | So a sample xfce4-session section in your kioskrc might look like this: 33 | 34 | --- snip --- 35 | [xfce4-session] 36 | CustomizeSplash=ALL 37 | CustomizeChooser=ALL 38 | CustomizeLogout=ALL 39 | CustomizeCompatibility=%wheel 40 | CustomizeSecurity=NONE 41 | Shutdown=%wheel 42 | SaveSession=%admin 43 | --- snip --- 44 | 45 | This allows all users to change their splash, chooser and logout settings, but 46 | allows only users in the group wheel to customize the compatibility settings 47 | and shutdown the system, and only users in the group admin to save the 48 | session on logout. No one will be allowed to adjust the security settings. 49 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-logout-dialog.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003-2004 Benedikt Meurer 3 | * Copyright (c) 2011 Nick Schermer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_LOGOUT_DIALOG_H__ 23 | #define __XFSM_LOGOUT_DIALOG_H__ 24 | 25 | #include "xfsm-shutdown.h" 26 | 27 | typedef struct _XfsmLogoutDialogClass XfsmLogoutDialogClass; 28 | typedef struct _XfsmLogoutDialog XfsmLogoutDialog; 29 | 30 | #define XFSM_TYPE_LOGOUT_DIALOG (xfsm_logout_dialog_get_type ()) 31 | #define XFSM_LOGOUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFSM_TYPE_LOGOUT_DIALOG, XfsmLogoutDialog)) 32 | #define XFSM_LOGOUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFSM_TYPE_LOGOUT_DIALOG, XfsmLogoutDialogClass)) 33 | #define XFSM_IS_LOGOUT_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFSM_TYPE_LOGOUT_DIALOG)) 34 | #define XFSM_IS_LOGOUT_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFSM_TYPE_LOGOUT_DIALOG)) 35 | #define XFSM_LOGOUT_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFSM_TYPE_LOGOUT_DIALOG, XfsmLogoutDialogClass)) 36 | 37 | GType 38 | xfsm_logout_dialog_get_type (void) G_GNUC_CONST; 39 | 40 | gboolean 41 | xfsm_logout_dialog (const gchar *session_name, 42 | XfsmShutdownType *return_type, 43 | gboolean accessibility); 44 | 45 | #endif 46 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-chooser.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_CHOOSER_H__ 23 | #define __XFSM_CHOOSER_H__ 24 | 25 | #include 26 | 27 | 28 | G_BEGIN_DECLS; 29 | 30 | #define XFSM_TYPE_CHOOSER xfsm_chooser_get_type () 31 | #define XFSM_CHOOSER(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, XFSM_TYPE_CHOOSER, XfsmChooser) 32 | #define XFSM_CHOOSER_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, XFSM_TYPE_CHOOSER, XfsmChooserClass) 33 | #define XFSM_IS_CHOOSER(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, XFSM_TYPE_CHOOSER) 34 | 35 | #define XFSM_RESPONSE_LOAD 1 36 | #define XFSM_RESPONSE_NEW 2 37 | 38 | typedef struct _XfsmChooser XfsmChooser; 39 | typedef struct _XfsmChooserClass XfsmChooserClass; 40 | 41 | struct _XfsmChooserClass 42 | { 43 | GtkDialogClass parent_class; 44 | }; 45 | 46 | struct _XfsmChooser 47 | { 48 | GtkDialog dialog; 49 | 50 | GtkWidget *tree; 51 | }; 52 | 53 | GType 54 | xfsm_chooser_get_type (void) G_GNUC_CONST; 55 | 56 | void 57 | xfsm_chooser_set_sessions (XfsmChooser *chooser, 58 | GList *sessions, 59 | const gchar *default_session); 60 | 61 | gchar * 62 | xfsm_chooser_get_session (const XfsmChooser *chooser); 63 | 64 | G_END_DECLS; 65 | 66 | 67 | #endif /* !__XFSM_CHOOSER_H__ */ 68 | -------------------------------------------------------------------------------- /settings/meson.build: -------------------------------------------------------------------------------- 1 | settings_sources = [ 2 | 'main.c', 3 | 'session-editor.c', 4 | 'xfae-dialog.c', 5 | 'xfae-dialog.h', 6 | 'xfae-model.c', 7 | 'xfae-model.h', 8 | 'xfae-window.c', 9 | 'xfae-window.h', 10 | 'xfce4-session-settings-common.h', 11 | ] 12 | 13 | settings_sources += gnome.genmarshal( 14 | 'xfce4-session-marshal', 15 | sources: 'xfce4-session-marshal.list', 16 | prefix: 'xfce4_session_marshal', 17 | internal: true, 18 | install_header: false, 19 | ) 20 | 21 | settings_sources += gnome.gdbus_codegen( 22 | 'xfsm-client-dbus-client', 23 | sources: '..' / 'xfce4-session' / 'xfsm-client-dbus.xml', 24 | interface_prefix: 'org.xfce.Session', 25 | namespace: 'Xfsm', 26 | install_header: false, 27 | ) 28 | settings_sources += gnome.gdbus_codegen( 29 | 'xfsm-manager-dbus-client', 30 | sources: '..' / 'xfce4-session' / 'xfsm-manager-dbus.xml', 31 | interface_prefix: 'org.xfce.Session', 32 | namespace: 'Xfsm', 33 | install_header: false, 34 | ) 35 | 36 | settings_sources += gnome.compile_resources( 37 | 'xfce4-session-resources', 38 | 'xfce4-session.gresource.xml', 39 | ) 40 | 41 | executable( 42 | 'xfce4-session-settings', 43 | settings_sources, 44 | sources: xfce_revision_h, 45 | c_args: [ 46 | '-DG_LOG_DOMAIN="@0@"'.format('xfce4-session-settings'), 47 | ], 48 | include_directories: [ 49 | include_directories('..'), 50 | ], 51 | dependencies: [ 52 | gio, 53 | gmodule, 54 | gtk, 55 | libxfce4ui, 56 | libxfce4util, 57 | xfconf, 58 | ], 59 | link_with: [ 60 | libxfsm, 61 | ], 62 | install: true, 63 | install_dir: get_option('prefix') / get_option('bindir'), 64 | ) 65 | 66 | i18n.merge_file( 67 | input: 'xfce-session-settings.desktop.in', 68 | output: 'xfce-session-settings.desktop', 69 | po_dir: '..' / 'po', 70 | type: 'desktop', 71 | install: true, 72 | install_dir: get_option('prefix') / get_option('datadir') / 'applications', 73 | ) 74 | 75 | install_data( 76 | 'xfce4-session.xml', 77 | install_dir: get_option('prefix') / get_option('sysconfdir') / 'xdg' / 'xfce4' / 'xfconf' / 'xfce-perchannel-xml', 78 | ) 79 | -------------------------------------------------------------------------------- /labwc/labwc-rc.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | automatic 10 | 11 | 12 | 13 | Adwaita 14 | 8 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 30 | 31 | 32 | 33 | 34 | on 35 | 36 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 10 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /settings/xfae-dialog.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2005 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFAE_DIALOG_H__ 23 | #define __XFAE_DIALOG_H__ 24 | 25 | #include 26 | 27 | #include "xfae-model.h" /* Type XfsmRunHook */ 28 | 29 | G_BEGIN_DECLS; 30 | 31 | typedef struct _XfaeDialogClass XfaeDialogClass; 32 | typedef struct _XfaeDialog XfaeDialog; 33 | 34 | #define XFAE_TYPE_DIALOG (xfae_dialog_get_type ()) 35 | #define XFAE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFAE_TYPE_DIALOG, XfaeDialog)) 36 | #define XFAE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFAE_TYPE_DIALOG, XfaeDialogClass)) 37 | #define XFAE_IS_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFAE_TYPE_DIALOG)) 38 | #define XFAE_IS_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFAE_TYPE_DIALOG)) 39 | #define XFAE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFAE_TYPE_DIALOG, XfaeDialogClass)) 40 | 41 | GType 42 | xfae_dialog_get_type (void) G_GNUC_CONST; 43 | 44 | GtkWidget * 45 | xfae_dialog_new (const gchar *name, 46 | const gchar *descr, 47 | const gchar *command, 48 | XfsmRunHook trigger); 49 | 50 | void 51 | xfae_dialog_get (XfaeDialog *dialog, 52 | gchar **name, 53 | gchar **descr, 54 | gchar **command, 55 | XfsmRunHook *trigger); 56 | 57 | G_END_DECLS; 58 | 59 | #endif /* !__XFAE_DIALOG_H__ */ 60 | -------------------------------------------------------------------------------- /scripts/xflock4: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # xfce4 4 | # 5 | # Copyright (C) 1999, 2003 Olivier Fourdan (fourdan@xfce.org) 6 | # Copyright (C) 2011 Guido Berhoerster (guido+xfce.org@berhoerster.name) 7 | # Copyright (C) 2015, 2018 Simon Steinbeiß (simon@xfce.org) 8 | # Copyright (C) 2011, 2022 Jarno Suni (8@iki.fi) 9 | # 10 | # This program is free software; you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation; either version 2 of the License, or 13 | # (at your option) any later version. 14 | # 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # 20 | # You should have received a copy of the GNU General Public License 21 | # along with this program; if not, write to the Free Software 22 | # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 23 | # 24 | 25 | print_help() { 26 | echo 'Usage: xflock4 [OPTION]' 27 | echo 'Try to lock the session in various ways, depending on the configured' 28 | echo 'screensavers. In particular, first try to execute the command set in the Xfconf' 29 | echo 'property /general/LockCommand of the xfce4-session channel.' 30 | echo 31 | echo ' -h, --help display this help and exit' 32 | } 33 | 34 | case $1 in 35 | -h|--help) 36 | print_help 37 | exit 0 38 | ;; 39 | ?*) 40 | print_help >&2 41 | exit 1 42 | ;; 43 | esac 44 | 45 | # Wait a bit so that user have time to raise finger from a key if 46 | # the script is run in terminal. 47 | [ -t 0 ] && sleep 1 48 | 49 | # echo is used to strip blanks 50 | # $(((1<<31)-1)) is MAXINT, which disables timeout: see 51 | # https://dbus.freedesktop.org/doc/api/html/group__DBusPendingCall.html 52 | ret=$(echo $(dbus-send --session \ 53 | --dest=org.xfce.SessionManager \ 54 | --print-reply=literal \ 55 | --reply-timeout=$(((1<<31)-1)) \ 56 | --type=method_call \ 57 | /org/xfce/SessionManager \ 58 | org.xfce.Session.Manager.Lock)) 59 | [ "$ret" = 'boolean true' ] 60 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-global.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2003-2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_GLOBAL_H__ 23 | #define __XFSM_GLOBAL_H__ 24 | 25 | #include 26 | 27 | #include "settings/xfae-model.h" /* XfsmRunHook */ 28 | 29 | #include "xfsm-shutdown.h" /* XfsmShutdownType */ 30 | 31 | 32 | #define DEFAULT_SESSION_NAME "Default" 33 | 34 | extern gboolean verbose; 35 | 36 | #if defined(G_HAVE_ISO_VARARGS) 37 | 38 | #define xfsm_verbose(...) \ 39 | G_STMT_START \ 40 | { \ 41 | if (G_UNLIKELY (verbose)) \ 42 | xfsm_verbose_real (__func__, __FILE__, __LINE__, __VA_ARGS__); \ 43 | } \ 44 | G_STMT_END 45 | 46 | #else 47 | 48 | #define xfsm_verbose(...) 49 | 50 | #endif 51 | 52 | void 53 | xfsm_enable_verbose (void); 54 | gboolean 55 | xfsm_is_verbose_enabled (void); 56 | void 57 | xfsm_verbose_real (const char *func, 58 | const char *file, 59 | int line, 60 | const char *format, 61 | ...) G_GNUC_PRINTF (4, 5); 62 | 63 | GValue * 64 | xfsm_g_value_new (GType gtype); 65 | void 66 | xfsm_g_value_free (GValue *value); 67 | 68 | gint 69 | xfsm_launch_desktop_files_on_login (gboolean start_at_spi); 70 | gint 71 | xfsm_launch_desktop_files_on_shutdown (gboolean start_at_spi, 72 | XfsmShutdownType shutdown_type); 73 | gint 74 | xfsm_launch_desktop_files_on_run_hook (gboolean start_at_spi, 75 | XfsmRunHook run_hook); 76 | 77 | #endif /* !__XFSM_GLOBAL_H__ */ 78 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-inhibition.h: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 | * 3 | * Copyright (C) 2021 Matias De lellis 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_INHIBITON_H__ 23 | #define __XFSM_INHIBITON_H__ 24 | 25 | #include 26 | 27 | G_BEGIN_DECLS 28 | 29 | #define XFSM_TYPE_INHIBITION (xfsm_inhibition_get_type ()) 30 | G_DECLARE_FINAL_TYPE (XfsmInhibition, xfsm_inhibition, XFSM, INHIBITION, GObject) 31 | 32 | /** 33 | * XfsmInhibitonFlag: 34 | * @XFSM_INHIBITON_FLAG_LOGOUT: Inhibit ending the user session by logging out or by shutting down the computer 35 | * @XFSM_INHIBITON_FLAG_SWITCH: Inhibit user switching 36 | * @XFSM_INHIBITON_FLAG_SUSPEND: Inhibit suspending the session or computer 37 | * @XFSM_INHIBITON_FLAG_IDLE: Inhibit the session being marked as idle (and possibly locked) 38 | */ 39 | typedef enum 40 | { 41 | XFSM_INHIBITON_FLAG_LOGOUT = 1 << 0, 42 | XFSM_INHIBITON_FLAG_SWITCH = 1 << 1, 43 | XFSM_INHIBITON_FLAG_SUSPEND = 1 << 2, 44 | XFSM_INHIBITON_FLAG_IDLE = 1 << 3 45 | } XfsmInhibitonFlag; 46 | 47 | XfsmInhibition * 48 | xfsm_inhibition_new (const char *app_id, 49 | guint toplevel_xid, 50 | XfsmInhibitonFlag flags, 51 | const char *reason); 52 | 53 | const char * 54 | xfsm_inhibition_get_app_id (XfsmInhibition *inhibition); 55 | const char * 56 | xfsm_inhibition_get_reason (XfsmInhibition *inhibition); 57 | guint 58 | xfsm_inhibition_get_cookie (XfsmInhibition *inhibition); 59 | XfsmInhibitonFlag 60 | xfsm_inhibition_get_flags (XfsmInhibition *inhibition); 61 | guint 62 | xfsm_inhibition_get_toplevel_xid (XfsmInhibition *inhibition); 63 | guint * 64 | xfsm_inhibition_peek_cookie (XfsmInhibition *inhibition); 65 | 66 | G_END_DECLS 67 | 68 | #endif /* __XFSM_INHIBITON_H__ */ 69 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-error.c: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2008 Brian Tarricone 3 | * 4 | * This program is free software; you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation; version 2 of the License ONLY. 7 | * 8 | * This program is distributed in the hope that it will be useful, 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 | * GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License 14 | * along with this program; if not, write to the Free Software 15 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 16 | * MA 02110-1301 USA. 17 | */ 18 | 19 | #include "xfsm-error.h" 20 | 21 | #define XFSM_DBUS_NAME "org.xfce.SessionManager" 22 | 23 | static const GDBusErrorEntry xfsm_error_entries[] = { 24 | { XFSM_ERROR_BAD_STATE, XFSM_DBUS_NAME ".Error.Failed" }, 25 | { XFSM_ERROR_BAD_VALUE, XFSM_DBUS_NAME ".Error.General" }, 26 | { XFSM_ERROR_UNSUPPORTED, XFSM_DBUS_NAME ".Error.Unsupported" }, 27 | }; 28 | 29 | GQuark 30 | xfsm_error_get_quark (void) 31 | { 32 | static volatile gsize quark_volatile = 0; 33 | 34 | g_dbus_error_register_error_domain ("xfsm_error", 35 | &quark_volatile, 36 | xfsm_error_entries, 37 | G_N_ELEMENTS (xfsm_error_entries)); 38 | 39 | return (GQuark) quark_volatile; 40 | } 41 | 42 | GType 43 | xfsm_error_get_type (void) 44 | { 45 | static GType xfsm_error_type = 0; 46 | 47 | if (G_UNLIKELY (xfsm_error_type == 0)) 48 | { 49 | static const GEnumValue values[] = { 50 | { XFSM_ERROR_BAD_STATE, "XFSM_ERROR_BAD_STATE", "BadState" }, 51 | { XFSM_ERROR_BAD_VALUE, "XFSM_ERROR_BAD_VALUE", "BadValue" }, 52 | { XFSM_ERROR_UNSUPPORTED, "XFSM_ERROR_UNSUPPORTED", "Unsupported" }, 53 | { 0, NULL, NULL }, 54 | }; 55 | 56 | xfsm_error_type = g_enum_register_static ("XfsmError", values); 57 | } 58 | 59 | return xfsm_error_type; 60 | } 61 | 62 | void 63 | throw_error (GDBusMethodInvocation *context, 64 | gint error_code, 65 | const gchar *format, 66 | ...) 67 | { 68 | va_list args; 69 | gchar *message; 70 | 71 | va_start (args, format); 72 | message = g_strdup_vprintf (format, args); 73 | va_end (args); 74 | 75 | g_dbus_method_invocation_return_error (context, XFSM_ERROR, error_code, "%s", message); 76 | 77 | g_free (message); 78 | } 79 | -------------------------------------------------------------------------------- /xfce4-session/xfce4-session.1: -------------------------------------------------------------------------------- 1 | .TH xfce4-session 1 "Sep 28, 2014" 2 | .SH NAME 3 | xfce4-session \- Starts up the Xfce Desktop Environment 4 | .SH SYNOPSIS 5 | .B xfce4-session 6 | .br 7 | .SH DESCRIPTION 8 | This manual page documents briefly the 9 | .B xfce4-session 10 | command. 11 | .PP 12 | The \fBxfce4-session\fP program starts up the Xfce Desktop Environment and 13 | is typically executed by your login manager (e.g. xdm, gdm, kdm, wdm or from 14 | your X startup scripts). It will load your last session or a default session 15 | that includes the standard Xfce programs if no saved session is available. 16 | 17 | \fBxfce4-session\fP is an standard X11R6 session manager that can manage 18 | any X11R6 SM compliant program, including GNOME and KDE programs. 19 | 20 | \fBxfce4-session\fP uses the contents of the ~/.cache/sessions/ directory 21 | for starting previously saved sessions. 22 | 23 | 24 | .SH OPTIONS 25 | \fBxfce4-session\fP takes the following command line options: 26 | .TP 27 | .B \-\-disable\-tcp 28 | Disable binding to TCP ports in the ICE layer. This is not possible on every 29 | platform. If you use this option on a platform that does not support it, 30 | \fBxfce4-session\fP will print a warning message and ignore the setting. 31 | .TP 32 | .B \-\-help 33 | Print a help screen and exit. 34 | .TP 35 | .B \-\-version 36 | Output version information and exit. 37 | 38 | 39 | .SH ENVIRONMENT 40 | \fBxfce4-session\fP's behaviour is affected by the following environment 41 | variables. 42 | .PP 43 | .TP 44 | .B XDG_CONFIG_HOME 45 | Specifies the root for all user-specific configuration files. If this 46 | environment variable is unset, it defaults to 47 | .I ~/.config/ 48 | .TP 49 | .B XDG_CONFIG_DIRS 50 | Set of preference ordered base directories relative to which configuration 51 | files should be searched in addition to the 52 | .B $XDG_CONFIG_HOME 53 | base directory. The directories should be separated with a colon. 54 | .TP 55 | .B XDG_CACHE_HOME 56 | Specifies the root for all user-specific cache data. If this environment 57 | variable is unset, it defaults to 58 | .I ~/.cache/ 59 | .TP 60 | .B XFSM_VERBOSE 61 | When defined, this environment variable enables debugging messages to be 62 | saved to 63 | .I ~/.xfce4-session.verbose-log 64 | The log file from the last session run with this environment variable 65 | set is retained at 66 | .I ~/.xfce4-session.verbose-log.last 67 | These debugging messages are useful for troubleshooting and development. 68 | 69 | .SH FILES 70 | \fBxfce4-session\fP reads its configuration from Xfconf. 71 | \fBxfce4-session\fP stores its session data into 72 | .IR $XDG_CACHE_HOME/sessions/ . 73 | 74 | .SH AUTHOR 75 | \fBxfce4-session\fP was written by Benedikt Meurer 76 | as part of the Xfce project. 77 | This manual page was written by Oliver M. Bolzer 78 | and Benedikt Meurer . 79 | 80 | .SH "REPORTING BUGS" 81 | Report bugs to https://gitlab.xfce.org/xfce/xfce4-session/. 82 | 83 | .SH COPYRIGHT 84 | Copyright \(co 2003-2014 Benedikt Meurer. 85 | -------------------------------------------------------------------------------- /libxfsm/xfsm-shutdown-common.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2018 Ali Abdallah 3 | * All rights reserved. 4 | * 5 | * This program is free software; you can redistribute it and/or modify 6 | * it under the terms of the GNU General Public License as published by 7 | * the Free Software Foundation; either version 2, or (at your option) 8 | * any later version. 9 | * 10 | * This program is distributed in the hope that it will be useful, 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | * GNU General Public License for more details. 14 | * 15 | * You should have received a copy of the GNU General Public License 16 | * along with this program; if not, write to the Free Software 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 18 | * MA 02110-1301 USA. 19 | */ 20 | #ifndef __XFSM_SHUTDOWN_COMMON_H_ 21 | #define __XFSM_SHUTDOWN_COMMON_H_ 22 | 23 | #ifdef POWEROFF_CMD 24 | #undef POWEROFF_CMD 25 | #endif 26 | #ifdef REBOOT_CMD 27 | #undef REBOOT_CMD 28 | #endif 29 | #ifdef UP_BACKEND_SUSPEND_COMMAND 30 | #undef UP_BACKEND_SUSPEND_COMMAND 31 | #endif 32 | #ifdef UP_BACKEND_HIBERNATE_COMMAND 33 | #undef UP_BACKEND_HIBERNATE_COMMAND 34 | #endif 35 | 36 | /* On FreeBSD, NetBSD and DragonFly BSD users with write access to 37 | * /dev/acpi can suspend/hibernate the system */ 38 | #define BSD_SLEEP_ACCESS_NODE "/dev/acpi" 39 | 40 | /* On OpenBSD this is done via apmd, so we check /var/run/apmdev to see 41 | * zzz and ZZZ commands can write to it*/ 42 | #ifdef BACKEND_TYPE_OPENBSD 43 | #undef BSD_SLEEP_ACCESS_NODE 44 | #define BSD_SLEEP_ACCESS_NODE "/var/run/apmdev" 45 | #endif 46 | 47 | #if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) 48 | #define POWEROFF_CMD "/sbin/shutdown -p now" 49 | #define REBOOT_CMD "/sbin/shutdown -r now" 50 | #elif defined(sun) || defined(__sun) 51 | #define POWEROFF_CMD "/usr/sbin/shutdown -i 5 -g 0 -y" 52 | #define REBOOT_CMD "/usr/sbin/shutdown -i 6 -g 0 -y" 53 | #else 54 | #define POWEROFF_CMD "/sbin/shutdown -h now" 55 | #define REBOOT_CMD "/sbin/shutdown -r now" 56 | #endif 57 | 58 | #ifdef BACKEND_TYPE_FREEBSD 59 | #define UP_BACKEND_SUSPEND_COMMAND "/usr/sbin/acpiconf -s 3" 60 | #define UP_BACKEND_HIBERNATE_COMMAND "/usr/sbin/acpiconf -s 4" 61 | #endif 62 | 63 | #ifdef BACKEND_TYPE_LINUX 64 | #define UP_BACKEND_SUSPEND_COMMAND "/usr/sbin/pm-suspend" 65 | #define UP_BACKEND_HIBERNATE_COMMAND "/usr/sbin/pm-hibernate" 66 | #endif 67 | 68 | #ifdef BACKEND_TYPE_OPENBSD 69 | #define UP_BACKEND_SUSPEND_COMMAND "/usr/sbin/zzz" 70 | #define UP_BACKEND_HIBERNATE_COMMAND "/usr/sbin/ZZZ" 71 | #endif 72 | 73 | #ifdef BACKEND_TYPE_SOLARIS 74 | #define UP_BACKEND_SUSPEND_COMMAND "/usr/bin/sys-suspend" 75 | #define UP_BACKEND_HIBERNATE_COMMAND "/usr/bin/false" 76 | #endif 77 | 78 | #ifndef UP_BACKEND_SUSPEND_COMMAND 79 | #define UP_BACKEND_SUSPEND_COMMAND "/usr/bin/false" 80 | #endif 81 | 82 | #ifndef UP_BACKEND_HIBERNATE_COMMAND 83 | #define UP_BACKEND_HIBERNATE_COMMAND "/usr/bin/false" 84 | #endif 85 | 86 | #endif /* __XFSM_SHUTDOWN_COMMON_H_ */ 87 | -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-lock.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 51 | 52 | 54 | 55 | 57 | image/svg+xml 58 | 60 | 61 | 62 | 63 | 68 | 75 | 84 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /settings/xfce4-session.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /libxfsm/xfsm-util.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2003-2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_UTIL_H__ 23 | #define __XFSM_UTIL_H__ 24 | 25 | #ifdef ENABLE_X11 26 | #include 27 | #define WINDOWING_IS_X11() GDK_IS_X11_DISPLAY (gdk_display_get_default ()) 28 | #else 29 | #define WINDOWING_IS_X11() FALSE 30 | #endif 31 | #ifdef ENABLE_WAYLAND 32 | #include 33 | #define WINDOWING_IS_WAYLAND() GDK_IS_WAYLAND_DISPLAY (gdk_display_get_default ()) 34 | #else 35 | #define WINDOWING_IS_WAYLAND() FALSE 36 | #endif 37 | 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | G_BEGIN_DECLS; 44 | 45 | #define DEFAULT_SESSION_NAME "Default" 46 | #define SETTINGS_CHANNEL "xfce4-session" 47 | #define SESSION_FILE_DELIMITER "," 48 | 49 | typedef struct _XfsmSessionInfo XfsmSessionInfo; 50 | 51 | struct _XfsmSessionInfo 52 | { 53 | gchar *name; /* name of the session */ 54 | time_t atime; /* last access time */ 55 | cairo_surface_t *preview; /* preview icon (52x42) */ 56 | }; 57 | 58 | enum 59 | { 60 | PREVIEW_COLUMN, 61 | NAME_COLUMN, 62 | TITLE_COLUMN, 63 | ACCESSED_COLUMN, 64 | ATIME_COLUMN, 65 | N_COLUMNS, 66 | }; 67 | 68 | 69 | gboolean 70 | xfsm_start_application (gchar **command, 71 | gchar **environment, 72 | GdkScreen *screen, 73 | const gchar *current_directory, 74 | const gchar *client_machine, 75 | const gchar *user_id); 76 | 77 | void 78 | xfsm_place_trash_window (GtkWindow *window, 79 | GdkScreen *screen, 80 | gint monitor); 81 | 82 | /* XXX - move to libxfce4util? */ 83 | gboolean 84 | xfsm_strv_equal (gchar **a, 85 | gchar **b); 86 | 87 | gchar * 88 | xfsm_gdk_display_get_fullname (GdkDisplay *display); 89 | 90 | cairo_surface_t * 91 | xfsm_load_session_preview (const gchar *name, 92 | gint size, 93 | gint scale_factor); 94 | 95 | const gchar * 96 | settings_list_sessions_get_filename (void); 97 | 98 | GKeyFile * 99 | settings_list_sessions_open_key_file (gboolean readonly); 100 | 101 | GList * 102 | settings_list_sessions (GKeyFile *file, 103 | gint scale_factor); 104 | 105 | void 106 | settings_list_sessions_treeview_init (GtkTreeView *treeview); 107 | 108 | void 109 | settings_list_sessions_populate (GtkTreeModel *model, 110 | GList *sessions); 111 | 112 | void 113 | settings_list_sessions_delete_session (GtkButton *button, 114 | GtkTreeView *treeview); 115 | 116 | G_END_DECLS; 117 | 118 | #endif /* !__XFSM_UTIL_H__ */ 119 | -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-shutdown.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 51 | 52 | 54 | 55 | 57 | image/svg+xml 58 | 60 | 61 | 62 | 63 | 68 | 75 | 88 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-suspend.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 51 | 52 | 54 | 55 | 57 | image/svg+xml 58 | 60 | 61 | 62 | 63 | 68 | 74 | 79 | 84 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-reboot.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 51 | 52 | 54 | 55 | 57 | image/svg+xml 58 | 60 | 61 | 62 | 63 | 68 | 74 | 80 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-client.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2003-2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_CLIENT_H__ 23 | #define __XFSM_CLIENT_H__ 24 | 25 | #include 26 | #include 27 | 28 | #include "xfsm-properties.h" 29 | 30 | G_BEGIN_DECLS 31 | 32 | #define XFSM_TYPE_CLIENT (xfsm_client_get_type ()) 33 | #define XFSM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFSM_TYPE_CLIENT, XfsmClient)) 34 | #define XFSM_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFSM_TYPE_CLIENT)) 35 | 36 | /* fwd decl */ 37 | struct _XfsmManager; 38 | 39 | typedef struct _XfsmClient XfsmClient; 40 | 41 | typedef enum 42 | { 43 | XFSM_CLIENT_IDLE = 0, 44 | XFSM_CLIENT_INTERACTING, 45 | XFSM_CLIENT_SAVEDONE, 46 | XFSM_CLIENT_SAVING, 47 | XFSM_CLIENT_SAVINGLOCAL, 48 | XFSM_CLIENT_WAITFORINTERACT, 49 | XFSM_CLIENT_WAITFORPHASE2, 50 | XFSM_CLIENT_DISCONNECTED, 51 | XFSM_CLIENT_STATE_COUNT 52 | } XfsmClientState; 53 | 54 | GType 55 | xfsm_client_get_type (void) G_GNUC_CONST; 56 | 57 | gchar * 58 | xfsm_client_generate_id (SmsConn sms_conn) G_GNUC_PURE; 59 | 60 | XfsmClient * 61 | xfsm_client_new (struct _XfsmManager *manager, 62 | SmsConn sms_conn, 63 | GDBusConnection *connection); 64 | 65 | void 66 | xfsm_client_set_initial_properties (XfsmClient *client, 67 | XfsmProperties *properties); 68 | 69 | XfsmClientState 70 | xfsm_client_get_state (XfsmClient *client); 71 | void 72 | xfsm_client_set_state (XfsmClient *client, 73 | XfsmClientState state); 74 | 75 | const gchar * 76 | xfsm_client_get_id (XfsmClient *client); 77 | const gchar * 78 | xfsm_client_get_app_id (XfsmClient *client); 79 | 80 | SmsConn 81 | xfsm_client_get_sms_connection (XfsmClient *client); 82 | 83 | XfsmProperties * 84 | xfsm_client_get_properties (XfsmClient *client); 85 | XfsmProperties * 86 | xfsm_client_steal_properties (XfsmClient *client); 87 | 88 | #ifdef ENABLE_X11 89 | void 90 | xfsm_client_merge_properties (XfsmClient *client, 91 | SmProp **props, 92 | gint num_props); 93 | #endif 94 | void 95 | xfsm_client_delete_properties (XfsmClient *client, 96 | gchar **prop_names, 97 | gint num_props); 98 | 99 | const gchar * 100 | xfsm_client_get_object_path (XfsmClient *client); 101 | 102 | void 103 | xfsm_client_set_pid (XfsmClient *client, 104 | pid_t pid); 105 | 106 | void 107 | xfsm_client_set_app_id (XfsmClient *client, 108 | const gchar *app_id); 109 | 110 | void 111 | xfsm_client_set_service_name (XfsmClient *client, 112 | const gchar *service_name); 113 | const gchar * 114 | xfsm_client_get_service_name (XfsmClient *client); 115 | 116 | void 117 | xfsm_client_terminate (XfsmClient *client); 118 | 119 | void 120 | xfsm_client_end_session (XfsmClient *client); 121 | 122 | void 123 | xfsm_client_cancel_shutdown (XfsmClient *client); 124 | 125 | G_END_DECLS 126 | 127 | #endif /* !__XFSM_CLIENT_H__ */ 128 | -------------------------------------------------------------------------------- /xfce4-session/meson.build: -------------------------------------------------------------------------------- 1 | session_sources = [ 2 | 'main.c', 3 | 'xfsm-chooser.c', 4 | 'xfsm-chooser.h', 5 | 'xfsm-client.c', 6 | 'xfsm-client.h', 7 | 'xfsm-compat-gnome.c', 8 | 'xfsm-compat-gnome.h', 9 | 'xfsm-compat-kde.c', 10 | 'xfsm-compat-kde.h', 11 | 'xfsm-dns.c', 12 | 'xfsm-dns.h', 13 | 'xfsm-error.c', 14 | 'xfsm-error.h', 15 | 'xfsm-global.c', 16 | 'xfsm-global.h', 17 | 'xfsm-inhibition.c', 18 | 'xfsm-inhibition.h', 19 | 'xfsm-inhibitor.c', 20 | 'xfsm-inhibitor.h', 21 | 'xfsm-logout-dialog.c', 22 | 'xfsm-logout-dialog.h', 23 | 'xfsm-manager.c', 24 | 'xfsm-manager.h', 25 | 'xfsm-packagekit.c', 26 | 'xfsm-packagekit.h', 27 | 'xfsm-properties.c', 28 | 'xfsm-properties.h', 29 | 'xfsm-shutdown-fallback.c', 30 | 'xfsm-shutdown-fallback.h', 31 | 'xfsm-shutdown.c', 32 | 'xfsm-shutdown.h', 33 | 'xfsm-startup.c', 34 | 'xfsm-startup.h', 35 | ] 36 | 37 | c_args = [ 38 | '-DG_LOG_DOMAIN="@0@"'.format('xfce4-session'), 39 | '-DWNCK_I_KNOW_THIS_IS_UNSTABLE=1', 40 | '-DXFSM_SHUTDOWN_HELPER_CMD="@0@"'.format(helper_path_prefix / 'xfce4' / 'session' / 'xfsm-shutdown-helper'), 41 | ] 42 | 43 | if enable_x11 44 | c_args += [ 45 | '-DICEAUTH_CMD="@0@"'.format(iceauth.full_path()), 46 | ] 47 | 48 | session_sources += [ 49 | 'ice-layer.c', 50 | 'ice-layer.h', 51 | 'sm-layer.c', 52 | 'sm-layer.h', 53 | 'xfsm-fadeout.c', 54 | 'xfsm-fadeout.h', 55 | ] 56 | 57 | if get_option('legacy-session-management') 58 | session_sources += [ 59 | 'xfsm-legacy.c', 60 | 'xfsm-legacy.h', 61 | ] 62 | endif 63 | endif 64 | 65 | session_sources += gnome.genmarshal( 66 | 'xfsm-marshal', 67 | sources: 'xfsm-marshal.list', 68 | prefix: 'xfsm_marshal', 69 | internal: true, 70 | install_header: false, 71 | ) 72 | 73 | session_sources += gnome.gdbus_codegen( 74 | 'xfsm-client-dbus', 75 | sources: 'xfsm-client-dbus.xml', 76 | interface_prefix: 'org.xfce.Session', 77 | namespace: 'XfsmDbus', 78 | install_header: false, 79 | ) 80 | session_sources += gnome.gdbus_codegen( 81 | 'xfsm-manager-dbus', 82 | sources: 'xfsm-manager-dbus.xml', 83 | interface_prefix: 'org.xfce.Session', 84 | namespace: 'XfsmDbus', 85 | install_header: false, 86 | ) 87 | 88 | session_sources += custom_target( 89 | 'xfsm-chooser-icon.h', 90 | input: 'xfsm-chooser-icon.png', 91 | output: 'xfsm-chooser-icon.h', 92 | command: [gdk_pixbuf_csource, '--static', '--raw', '--stream', '--name=xfsm_chooser_icon_data', '@INPUT@'], 93 | capture: true, 94 | ) 95 | 96 | executable( 97 | 'xfce4-session', 98 | session_sources, 99 | sources: xfce_revision_h, 100 | c_args: c_args, 101 | include_directories: [ 102 | include_directories('..'), 103 | ], 104 | dependencies: [ 105 | gio, 106 | gio_unix, 107 | gtk, 108 | gmodule, 109 | libxfce4ui, 110 | libxfce4util, 111 | libxfce4windowing, 112 | xfconf, 113 | x11_deps, 114 | gtk_layer_shell, 115 | polkit, 116 | libm, 117 | ], 118 | link_with: [ 119 | libxfsm, 120 | ], 121 | install: true, 122 | install_dir: get_option('prefix') / get_option('bindir'), 123 | ) 124 | 125 | if polkit.found() 126 | policy_in = configure_file( 127 | configuration: configuration_data({ 128 | 'HELPER_PATH_PREFIX': helper_path_prefix, 129 | }), 130 | input: 'org.xfce.session.policy.in.in', 131 | output: 'org.xfce.session.policy.in', 132 | install: false, 133 | ) 134 | 135 | i18n.merge_file( 136 | input: policy_in, 137 | output: 'org.xfce.session.policy', 138 | po_dir: '..' / 'po', 139 | type: 'xml', 140 | install: true, 141 | install_dir: get_option('prefix') / get_option('datadir') / 'polkit-1' / 'actions', 142 | ) 143 | endif 144 | 145 | install_data( 146 | 'xfce-portals.conf', 147 | install_dir: get_option('prefix') / get_option('datadir') / 'xdg-desktop-portal', 148 | ) 149 | 150 | install_man('xfce4-session.1') 151 | -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-suspend.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 53 | 54 | 56 | 57 | 59 | image/svg+xml 60 | 62 | 63 | 64 | 65 | 70 | 76 | 82 | 87 | 92 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-compat-kde.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifdef HAVE_SYS_TYPES_H 23 | #include 24 | #endif 25 | #ifdef HAVE_SYS_WAIT_H 26 | #include 27 | #endif 28 | #ifdef HAVE_SYS_TIME_H 29 | #include 30 | #endif 31 | #ifdef HAVE_SYS_RESOURCE_H 32 | #include 33 | #endif 34 | 35 | #ifdef HAVE_ERRNO_H 36 | #include 37 | #endif 38 | #ifdef HAVE_UNISTD_H 39 | #include 40 | #endif 41 | 42 | #include 43 | #include 44 | 45 | #include "xfsm-compat-kde.h" 46 | 47 | 48 | static gboolean kde_compat_started = FALSE; 49 | 50 | 51 | static gboolean 52 | run_timeout (gpointer user_data) 53 | { 54 | int status; 55 | int result; 56 | pid_t pid = *((pid_t *) user_data); 57 | 58 | result = waitpid (pid, &status, WNOHANG); 59 | 60 | if (result == pid) 61 | { 62 | gtk_main_quit (); 63 | } 64 | else if (result == -1) 65 | { 66 | g_warning ("Failed to wait for process %d: %s", (int) pid, g_strerror (errno)); 67 | gtk_main_quit (); 68 | } 69 | 70 | return TRUE; 71 | } 72 | 73 | 74 | static void 75 | run (const gchar *command) 76 | { 77 | gchar buffer[2048]; 78 | GError *error = NULL; 79 | gchar **argv; 80 | gint argc; 81 | pid_t pid; 82 | 83 | g_snprintf (buffer, 2048, 84 | "env DYLD_FORCE_FLAT_NAMESPACE= LD_BIND_NOW=true SESSION_MANAGER= %s", 85 | command); 86 | 87 | if (!g_shell_parse_argv (buffer, &argc, &argv, &error)) 88 | { 89 | g_warning ("Unable to parse \"%s\": %s", buffer, error->message); 90 | g_error_free (error); 91 | return; 92 | } 93 | 94 | if (g_spawn_async (NULL, argv, NULL, 95 | G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH, 96 | NULL, NULL, &pid, &error)) 97 | { 98 | guint id = g_timeout_add (300, run_timeout, &pid); 99 | gtk_main (); 100 | g_source_remove (id); 101 | } 102 | else 103 | { 104 | g_warning ("Unable to exec \"%s\": %s", buffer, error->message); 105 | g_error_free (error); 106 | } 107 | 108 | g_strfreev (argv); 109 | } 110 | 111 | 112 | void 113 | xfsm_compat_kde_startup (void) 114 | { 115 | gchar command[256]; 116 | 117 | if (G_UNLIKELY (kde_compat_started)) 118 | return; 119 | 120 | run ("kdeinit4"); 121 | 122 | /* tell klauncher about the session manager */ 123 | g_snprintf (command, 256, 124 | "qdbus org.kde.klauncher /KLauncher setLaunchEnv SESSION_MANAGER \"%s\"", 125 | g_getenv ("SESSION_MANAGER")); 126 | run (command); 127 | 128 | /* tell kde if we are running multi-head */ 129 | if (gdk_display_get_n_screens (gdk_display_get_default ()) > 1) 130 | { 131 | g_snprintf (command, 256, 132 | "qdbus org.kde.klauncher /KLauncher setLaunchEnv KDE_MULTIHEAD \"true\""); 133 | run (command); 134 | } 135 | 136 | kde_compat_started = TRUE; 137 | } 138 | 139 | 140 | void 141 | xfsm_compat_kde_shutdown (void) 142 | { 143 | if (G_UNLIKELY (!kde_compat_started)) 144 | return; 145 | 146 | /* shutdown KDE services */ 147 | run ("kdeinit4_shutdown"); 148 | 149 | kde_compat_started = FALSE; 150 | } 151 | -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-logout.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 51 | 52 | 54 | 55 | 57 | image/svg+xml 58 | 60 | 61 | 62 | 63 | 68 | 74 | 79 | 84 | 101 | 102 | 103 | -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-lock.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 53 | 54 | 56 | 57 | 59 | image/svg+xml 60 | 62 | 63 | 64 | 65 | 70 | 76 | 82 | 91 | 100 | 107 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /settings/xfae-model.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2005 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFAE_MODEL_H__ 23 | #define __XFAE_MODEL_H__ 24 | 25 | #include 26 | 27 | G_BEGIN_DECLS; 28 | 29 | typedef struct _XfaeModelClass XfaeModelClass; 30 | typedef struct _XfaeModel XfaeModel; 31 | 32 | #define XFAE_TYPE_MODEL (xfae_model_get_type ()) 33 | #define XFAE_MODEL(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFAE_TYPE_MODEL, XfaeModel)) 34 | #define XFAE_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFAE_TYPE_MODEL, XfaeModelClass)) 35 | #define XFAE_IS_MODEL(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFAE_TYPE_MODEL)) 36 | #define XFAE_IS_MODEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFAE_TYPE_MODEL)) 37 | #define XFAE_MODEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFAE_TYPE_MODEL, XfaeModelClass)) 38 | 39 | #define XFSM_TYPE_RUN_HOOK (xfsm_run_hook_get_type ()) 40 | 41 | /** 42 | * XfsmRunHook: 43 | * The trigger / hook on which a specific command should be executed 44 | **/ 45 | typedef enum 46 | { 47 | XFSM_RUN_HOOK_LOGIN, 48 | XFSM_RUN_HOOK_LOGOUT, 49 | XFSM_RUN_HOOK_SHUTDOWN, 50 | XFSM_RUN_HOOK_RESTART, 51 | XFSM_RUN_HOOK_SUSPEND, 52 | XFSM_RUN_HOOK_HIBERNATE, 53 | XFSM_RUN_HOOK_HYBRID_SLEEP, 54 | XFSM_RUN_HOOK_SWITCH_USER, 55 | } XfsmRunHook; 56 | 57 | GType 58 | xfsm_run_hook_get_type (void) G_GNUC_CONST; 59 | 60 | /** 61 | * XfaeModelColumn: 62 | * 63 | * Columns exported by the #XfaeModelColumn using 64 | * the #GtkTreeModel interface. 65 | **/ 66 | typedef enum 67 | { 68 | XFAE_MODEL_COLUMN_ICON, 69 | XFAE_MODEL_COLUMN_NAME, 70 | XFAE_MODEL_COLUMN_ENABLED, 71 | XFAE_MODEL_COLUMN_REMOVABLE, 72 | XFAE_MODEL_COLUMN_TOOLTIP, 73 | XFAE_MODEL_RUN_HOOK, 74 | XFAE_MODEL_N_COLUMNS, 75 | } XfaeModelColumn; 76 | 77 | GType 78 | xfae_model_get_type (void) G_GNUC_CONST; 79 | 80 | GtkTreeModel * 81 | xfae_model_new (void); 82 | 83 | gboolean 84 | xfae_model_add (XfaeModel *model, 85 | const gchar *name, 86 | const gchar *description, 87 | const gchar *command, 88 | XfsmRunHook run_hook, 89 | GError **error); 90 | 91 | gboolean 92 | xfae_model_get (XfaeModel *model, 93 | GtkTreeIter *iter, 94 | gchar **name, 95 | gchar **description, 96 | gchar **command, 97 | XfsmRunHook *run_hook, 98 | GError **error); 99 | 100 | gboolean 101 | xfae_model_remove (XfaeModel *model, 102 | GtkTreeIter *iter, 103 | GError **error); 104 | 105 | gboolean 106 | xfae_model_edit (XfaeModel *model, 107 | GtkTreeIter *iter, 108 | const gchar *name, 109 | const gchar *description, 110 | const gchar *command, 111 | XfsmRunHook run_hook, 112 | GError **error); 113 | 114 | gboolean 115 | xfae_model_toggle (XfaeModel *model, 116 | GtkTreeIter *iter, 117 | GError **error); 118 | 119 | gboolean 120 | xfae_model_set_run_hook (GtkTreeModel *tree_model, 121 | GtkTreePath *path, 122 | GtkTreeIter *iter, 123 | XfsmRunHook run_hook, 124 | GError **error); 125 | 126 | G_END_DECLS; 127 | 128 | #endif /* !__XFAE_MODEL_H__ */ 129 | -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-hibernate.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 51 | 52 | 54 | 55 | 57 | image/svg+xml 58 | 60 | 61 | 62 | 63 | 68 | 74 | 80 | 86 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-logout.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 53 | 54 | 56 | 57 | 59 | image/svg+xml 60 | 62 | 63 | 64 | 65 | 70 | 76 | 82 | 87 | 92 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-hibernate.svg: -------------------------------------------------------------------------------- 1 | 2 | 21 | 23 | 47 | 54 | 55 | 57 | 58 | 60 | image/svg+xml 61 | 63 | 64 | 65 | 66 | 71 | 77 | 83 | 88 | 94 | 103 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /icons/48x48-actions/xfsm-switch-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 51 | 52 | 54 | 55 | 57 | image/svg+xml 58 | 60 | 61 | 62 | 63 | 68 | 74 | 80 | 87 | 94 | 100 | 101 | 102 | -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-reboot.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 53 | 54 | 56 | 57 | 59 | image/svg+xml 60 | 62 | 63 | 64 | 65 | 70 | 76 | 82 | 95 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /icons/96x96-actions/xfsm-switch-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 20 | 22 | 46 | 53 | 54 | 56 | 57 | 59 | image/svg+xml 60 | 62 | 63 | 64 | 65 | 70 | 76 | 82 | 88 | 95 | 102 | 108 | 109 | 110 | -------------------------------------------------------------------------------- /doc/NEWS.pre-4.3: -------------------------------------------------------------------------------- 1 | $Id: NEWS.pre-4.3 16227 2005-07-14 16:06:25Z benny $ 2 | 3 | 20040924: 4 | --------- 5 | 6 | * Version 4.1.16 7 | * Don't grab the display on logout, as it doesn't work well with 8 | compositors. 9 | 10 | 20040203: 11 | --------- 12 | 13 | * Version 4.1.2 14 | * Icon changes in the tray icon menu (the session control icon) 15 | * Added about dialog now that XfceAboutDialog is in libxfcegui4. 16 | 17 | 20040129: 18 | --------- 19 | 20 | * Version 4.1.1 (big jump indeed, but need to catch up with the rest 21 | of the desktop :-)) 22 | * Finally moved xfce_setenv()/xfce_putenv() to libxfce4util and 23 | we are now secured from stupid native implementations of both 24 | functions. 25 | * Some autotools and copyright updates. 26 | 27 | 20040125: 28 | --------- 29 | * Version 0.2.1 30 | * Updated the xfce4-session manual page to reflect the latest 31 | changes. 32 | 33 | 20040113: 34 | --------- 35 | * Added --disable-tcp option to disable binding to TCP ports. This 36 | is no new configure option, but a runtime option, that is, it can 37 | be supplied to xfce4-session at startup. 38 | 39 | 20040110: 40 | --------- 41 | * Version 0.2.0 42 | * Added support for user defined poweroff/halt/reboot commands, 43 | and some cleanups, thanks to Brian Tarricone. 44 | * Various fixes in the meantime, too bad I have no spare time for 45 | xfce :-( 46 | 47 | 20030721: 48 | --------- 49 | * Fix problem with Xrandr MCS plugin and splash screen not using 50 | the new screen height/width. 51 | 52 | 20030716: 53 | --------- 54 | * XfceTrayIcon now both provides "clicked" (a single left button 55 | click) and "double_clicked" (double left button click) signals 56 | * XfceTrayIcon no longer autoconnects, you'll need to call 57 | xfce_tray_icon_connect() explicitly 58 | 59 | 20030715: 60 | --------- 61 | * Version 0.1.1 62 | * Make "session control" sticky again, since the xfwm4 problem with 63 | sticky windows seems to be fixed 64 | * Many improvements on the XfceTrayIcon class (will be moved to 65 | libxfcegui4 soon) 66 | * Session managers tray icon can now be enabled/disabled from 67 | the settings dialog 68 | * Added more helpful tooltips to the settings dialog (translations 69 | needs to be updated) 70 | 71 | 20030713: 72 | --------- 73 | * Version 0.1.0 74 | * Fixed problem with SaveYourself Phase2 being aborted (that 75 | should also correct the xfwm4 save problem). 76 | * Fixed problem with "session control" window beeing undecorated 77 | * Fix problem with users splash themes directory not being created 78 | when installing new themes 79 | * Skip the splash screen window in tasklists and pagers (Gdk >= 2.2 80 | only for now, a netk version is on the way, see util.c) 81 | 82 | 20030712: 83 | --------- 84 | * Fixed tray icon problem 85 | * New tray icon wrapper XfceTrayIcon, will be moved to libxfcegui4 86 | later 87 | 88 | 20030710: 89 | --------- 90 | * Added spec file 91 | * Two Solaris fixes 92 | * State is now displayed in "session control" 93 | * added "Quit session" and "Save session" to the tray menu 94 | (GtkImageMenuItem's now working btw.) 95 | * Fixed bug in SaveYourselfDone code (manager does not entered 96 | IDLE state after a succesfull checkpoint) 97 | * Added UNIX signals support: SIGUSR1 saves current session, SIGINT 98 | quits current session 99 | * Added security check to xfce4-shutdown (shutdown.allow is only used 100 | if owned by root) 101 | * Honor fast SaveYourself requests 102 | 103 | 20030708: 104 | --------- 105 | * startxfce4 in xfce-utils was altered to automatically use 106 | xfce4-session by default if installed. 107 | * Added "session control" dialog and tray icon. Made several 108 | improvements. Now requires libxfcegui4 >= 3.92.2 109 | * smproxy now works with xfce4-session, that says, X11R5 session 110 | apps are now managed by the session manager as well (e.g. xcalc, 111 | xedit, xbiff or even apps like gimp and gqview) 112 | 113 | 20030707: 114 | --------- 115 | * Splash screen themes can now be selected from the settings plugin, 116 | and in addition, you can also install new themes from the settings 117 | plugin. 118 | * Added docs/FAQ file. 119 | 120 | 20030706: 121 | --------- 122 | * the session manager now takes care of starting files in 123 | ~/Desktop/Autostart/ after all session aware apps are restarted. 124 | This should make live easier, esp. with apps that depend on 125 | the window manager already running. 126 | * the splash screen is now themable. See docs/SplashThemes.txt for 127 | further information. In addition, the splash screen also appears 128 | when starting a default session, and not only when restoring a 129 | previously saved session. 130 | 131 | 20030702: 132 | --------- 133 | * session file naming scheme has changed from 134 | ~/.xfce4/sessions/session- 135 | to 136 | ~/.xfce4/sessions/xfsm- 137 | -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-suspend.svg: -------------------------------------------------------------------------------- 1 | 2 | 21 | 47 | 51 | 52 | Adwaita Icon Template 54 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | GNOME Design Team 67 | 68 | 69 | 70 | 72 | Adwaita Icon Template 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 112 | 113 | 114 | 115 | 122 | 127 | 128 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-shutdown.h: -------------------------------------------------------------------------------- 1 | /*- 2 | * Copyright (c) 2003-2004 Benedikt Meurer 3 | * Copyright (c) 2011 Nick Schermer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_SHUTDOWN_H__ 23 | #define __XFSM_SHUTDOWN_H__ 24 | 25 | #define LOGIND_RUNNING() (access ("/run/systemd/seats/", F_OK) >= 0) 26 | 27 | typedef struct _XfsmShutdownClass XfsmShutdownClass; 28 | typedef struct _XfsmShutdown XfsmShutdown; 29 | 30 | #define XFSM_TYPE_SHUTDOWN (xfsm_shutdown_get_type ()) 31 | #define XFSM_SHUTDOWN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFSM_TYPE_SHUTDOWN, XfsmShutdown)) 32 | #define XFSM_SHUTDOWN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFSM_TYPE_SHUTDOWN, XfsmShutdownClass)) 33 | #define XFSM_IS_SHUTDOWN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFSM_TYPE_SHUTDOWN)) 34 | #define XFSM_IS_SHUTDOWN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFSM_TYPE_SHUTDOWN)) 35 | #define XFSM_SHUTDOWN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFSM_TYPE_SHUTDOWN, XfsmShutdownClass)) 36 | 37 | typedef enum 38 | { 39 | XFSM_SHUTDOWN_ASK = 0, 40 | XFSM_SHUTDOWN_LOGOUT, 41 | XFSM_SHUTDOWN_SHUTDOWN, 42 | XFSM_SHUTDOWN_RESTART, 43 | XFSM_SHUTDOWN_SUSPEND, 44 | XFSM_SHUTDOWN_HIBERNATE, 45 | XFSM_SHUTDOWN_HYBRID_SLEEP, 46 | XFSM_SHUTDOWN_SWITCH_USER, 47 | } XfsmShutdownType; 48 | 49 | typedef enum 50 | { 51 | PASSWORD_RETRY, 52 | PASSWORD_SUCCEED, 53 | PASSWORD_FAILED 54 | } XfsmPassState; 55 | 56 | GType 57 | xfsm_shutdown_get_type (void) G_GNUC_CONST; 58 | 59 | XfsmShutdown * 60 | xfsm_shutdown_get (void); 61 | 62 | gboolean 63 | xfsm_shutdown_password_require (XfsmShutdown *shutdown, 64 | XfsmShutdownType type); 65 | 66 | XfsmPassState 67 | xfsm_shutdown_password_send (XfsmShutdown *shutdown, 68 | XfsmShutdownType type, 69 | const gchar *password); 70 | 71 | gboolean 72 | xfsm_shutdown_try_type (XfsmShutdown *shutdown, 73 | XfsmShutdownType type, 74 | GError **error); 75 | 76 | gboolean 77 | xfsm_shutdown_try_restart (XfsmShutdown *shutdown, 78 | GError **error); 79 | 80 | gboolean 81 | xfsm_shutdown_try_shutdown (XfsmShutdown *shutdown, 82 | GError **error); 83 | 84 | gboolean 85 | xfsm_shutdown_try_suspend (XfsmShutdown *shutdown, 86 | GError **error); 87 | 88 | gboolean 89 | xfsm_shutdown_try_hibernate (XfsmShutdown *shutdown, 90 | GError **error); 91 | 92 | gboolean 93 | xfsm_shutdown_try_hybrid_sleep (XfsmShutdown *shutdown, 94 | GError **error); 95 | 96 | gboolean 97 | xfsm_shutdown_try_switch_user (XfsmShutdown *shutdown, 98 | GError **error); 99 | 100 | void 101 | xfsm_shutdown_can_restart (XfsmShutdown *shutdown, 102 | gboolean *can_restart, 103 | gboolean *auth_restart); 104 | 105 | void 106 | xfsm_shutdown_can_shutdown (XfsmShutdown *shutdown, 107 | gboolean *can_shutdown, 108 | gboolean *auth_shutdown); 109 | 110 | void 111 | xfsm_shutdown_can_suspend (XfsmShutdown *shutdown, 112 | gboolean *can_suspend, 113 | gboolean *auth_suspend); 114 | 115 | void 116 | xfsm_shutdown_can_hibernate (XfsmShutdown *shutdown, 117 | gboolean *can_hibernate, 118 | gboolean *auth_hibernate); 119 | 120 | void 121 | xfsm_shutdown_can_hybrid_sleep (XfsmShutdown *shutdown, 122 | gboolean *can_hybrid_sleep, 123 | gboolean *auth_hybrid_sleep); 124 | 125 | gboolean 126 | xfsm_shutdown_can_switch_user (XfsmShutdown *shutdown, 127 | gboolean *can_switch_user, 128 | GError **error); 129 | 130 | gboolean 131 | xfsm_shutdown_can_save_session (XfsmShutdown *shutdown); 132 | 133 | gboolean 134 | xfsm_shutdown_can_logout (XfsmShutdown *shutdown); 135 | 136 | gboolean 137 | xfsm_shutdown_has_update_prepared (XfsmShutdown *shutdown); 138 | 139 | #endif /* !__XFSM_SHUTDOWN_H__ */ 140 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-dns.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | * 21 | * Parts of this file where taken from gnome-session/main.c, which 22 | * was written by Tom Tromey. 23 | */ 24 | 25 | #ifdef HAVE_SYS_TYPES_H 26 | #include 27 | #endif 28 | #ifdef HAVE_SYS_SOCKET_H 29 | #include 30 | #endif 31 | #ifdef HAVE_SYS_UTSNAME_H 32 | #include 33 | #endif 34 | 35 | #ifdef HAVE_MEMORY_H 36 | #include 37 | #endif 38 | #ifdef HAVE_NETDB_H 39 | #include 40 | #endif 41 | #ifdef HAVE_STRING_H 42 | #include 43 | #endif 44 | #ifdef HAVE_UNISTD_H 45 | #include 46 | #endif 47 | 48 | #include 49 | #include 50 | 51 | #include "libxfsm/xfsm-util.h" 52 | 53 | #include "xfsm-dns.h" 54 | #include "xfsm-global.h" 55 | 56 | 57 | static gchar * 58 | queryhostname (gchar *buffer, gsize length, gboolean readable) 59 | { 60 | #ifdef HAVE_GETHOSTNAME 61 | if (gethostname (buffer, length) == 0) 62 | return buffer; 63 | #else 64 | struct utsname utsname; 65 | if (uname (&utsname) == 0) 66 | { 67 | g_strlcpy (buffer, utsname.nodename, length); 68 | return buffer; 69 | } 70 | #endif 71 | if (readable) 72 | { 73 | g_strlcpy (buffer, _("(Unknown)"), length); 74 | return buffer; 75 | } 76 | return NULL; 77 | } 78 | 79 | 80 | static gboolean 81 | check_for_dns (void) 82 | { 83 | #ifdef HAVE_GETADDRINFO 84 | struct addrinfo *result = NULL; 85 | struct addrinfo hints = { 0 }; 86 | #endif 87 | char buffer[256]; 88 | gchar *hostname; 89 | 90 | hostname = queryhostname (buffer, 256, FALSE); 91 | if (hostname == NULL) 92 | return FALSE; 93 | 94 | #ifdef HAVE_GETADDRINFO 95 | hints.ai_socktype = SOCK_STREAM; 96 | hints.ai_flags = AI_CANONNAME; 97 | 98 | if (getaddrinfo (hostname, NULL, &hints, &result) != 0) 99 | return FALSE; 100 | 101 | if (g_ascii_strncasecmp (result->ai_canonname, hostname, 0) != 0) 102 | { 103 | freeaddrinfo (result); 104 | return FALSE; 105 | } 106 | 107 | freeaddrinfo (result); 108 | #else 109 | #ifdef HAVE_GETHOSTBYNAME 110 | if (gethostbyname (hostname) == NULL) 111 | { 112 | return FALSE; 113 | } 114 | #endif 115 | #endif 116 | 117 | return TRUE; 118 | } 119 | 120 | 121 | enum 122 | { 123 | RESPONSE_LOG_IN, 124 | RESPONSE_TRY_AGAIN, 125 | }; 126 | 127 | 128 | void 129 | xfsm_dns_check (void) 130 | { 131 | GtkWidget *msgbox = NULL; 132 | gchar hostname[256]; 133 | gint response; 134 | 135 | while (!check_for_dns ()) 136 | { 137 | if (msgbox == NULL) 138 | { 139 | GdkScreen *screen = xfce_gdk_screen_get_active (NULL); 140 | 141 | queryhostname (hostname, 256, TRUE); 142 | 143 | msgbox = gtk_message_dialog_new (NULL, 0, 144 | GTK_MESSAGE_WARNING, 145 | GTK_BUTTONS_NONE, 146 | _("Could not look up internet address for %s.\n" 147 | "This will prevent Xfce from operating correctly.\n" 148 | "It may be possible to correct the problem by adding\n" 149 | "%s to the file /etc/hosts on your system."), 150 | hostname, hostname); 151 | 152 | gtk_dialog_add_buttons (GTK_DIALOG (msgbox), _("Continue anyway"), 153 | RESPONSE_LOG_IN, _("Try again"), RESPONSE_TRY_AGAIN, 154 | NULL); 155 | 156 | gtk_window_set_screen (GTK_WINDOW (msgbox), screen); 157 | gtk_container_set_border_width (GTK_CONTAINER (msgbox), 6); 158 | gtk_window_set_position (GTK_WINDOW (msgbox), GTK_WIN_POS_CENTER); 159 | } 160 | 161 | gtk_dialog_set_default_response (GTK_DIALOG (msgbox), RESPONSE_TRY_AGAIN); 162 | 163 | response = gtk_dialog_run (GTK_DIALOG (msgbox)); 164 | if (response != RESPONSE_TRY_AGAIN) 165 | break; 166 | 167 | gtk_widget_hide (msgbox); 168 | } 169 | 170 | if (msgbox != NULL) 171 | gtk_widget_destroy (msgbox); 172 | } 173 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-fadeout.c: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2004-2006 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | 28 | #include "xfsm-fadeout.h" 29 | 30 | 31 | struct _XfsmFadeout 32 | { 33 | Display *xdisplay; 34 | Window *xwindow; 35 | }; 36 | 37 | 38 | 39 | static Window 40 | xfsm_x11_fadeout_new_window (GdkDisplay *display, 41 | GdkScreen *screen) 42 | { 43 | XSetWindowAttributes attr; 44 | Display *xdisplay; 45 | Window xwindow; 46 | GdkWindow *root; 47 | GdkCursor *cursor; 48 | cairo_t *cr; 49 | gint width; 50 | gint height; 51 | GdkPixbuf *root_pixbuf; 52 | cairo_surface_t *surface; 53 | gulong mask = 0; 54 | gulong opacity; 55 | gboolean composited; 56 | gint scale; 57 | 58 | gdk_x11_display_error_trap_push (display); 59 | 60 | xdisplay = gdk_x11_display_get_xdisplay (display); 61 | root = gdk_screen_get_root_window (screen); 62 | 63 | width = gdk_window_get_width (root); 64 | height = gdk_window_get_height (root); 65 | 66 | composited = gdk_screen_is_composited (screen) 67 | && gdk_screen_get_rgba_visual (screen) != NULL; 68 | 69 | cursor = gdk_cursor_new_for_display (display, GDK_WATCH); 70 | 71 | scale = gdk_window_get_scale_factor (root); 72 | width *= scale; 73 | height *= scale; 74 | 75 | if (!composited) 76 | { 77 | /* create a copy of root window before showing the fadeout */ 78 | root_pixbuf = gdk_pixbuf_get_from_window (root, 0, 0, width, height); 79 | } 80 | 81 | attr.cursor = gdk_x11_cursor_get_xcursor (cursor); 82 | mask |= CWCursor; 83 | 84 | attr.override_redirect = TRUE; 85 | mask |= CWOverrideRedirect; 86 | 87 | attr.background_pixel = BlackPixel (xdisplay, gdk_x11_screen_get_screen_number (screen)); 88 | mask |= CWBackPixel; 89 | 90 | xwindow = XCreateWindow (xdisplay, gdk_x11_window_get_xid (root), 91 | 0, 0, width, height, 0, CopyFromParent, 92 | InputOutput, CopyFromParent, mask, &attr); 93 | 94 | g_object_unref (cursor); 95 | 96 | if (composited) 97 | { 98 | /* apply transparency before map */ 99 | opacity = 0.5 * 0xffffffff; 100 | XChangeProperty (xdisplay, xwindow, 101 | gdk_x11_get_xatom_by_name_for_display (display, "_NET_WM_WINDOW_OPACITY"), 102 | XA_CARDINAL, 32, PropModeReplace, (guchar *) &opacity, 1); 103 | } 104 | 105 | XMapWindow (xdisplay, xwindow); 106 | 107 | if (!composited) 108 | { 109 | /* create background for window */ 110 | surface = cairo_xlib_surface_create (xdisplay, xwindow, 111 | gdk_x11_visual_get_xvisual (gdk_screen_get_system_visual (screen)), 112 | 0, 0); 113 | cairo_xlib_surface_set_size (surface, width, height); 114 | cr = cairo_create (surface); 115 | 116 | /* draw the copy of the root window */ 117 | gdk_cairo_set_source_pixbuf (cr, root_pixbuf, 0, 0); 118 | cairo_paint (cr); 119 | g_object_unref (root_pixbuf); 120 | 121 | /* draw black transparent layer */ 122 | cairo_set_source_rgba (cr, 0, 0, 0, 0.5); 123 | cairo_paint (cr); 124 | cairo_destroy (cr); 125 | cairo_surface_destroy (surface); 126 | } 127 | 128 | gdk_display_flush (display); 129 | gdk_x11_display_error_trap_pop_ignored (display); 130 | 131 | return xwindow; 132 | } 133 | 134 | 135 | 136 | XfsmFadeout * 137 | xfsm_fadeout_new (GdkDisplay *display) 138 | { 139 | XfsmFadeout *fadeout; 140 | GdkScreen *screen; 141 | 142 | fadeout = g_slice_new0 (XfsmFadeout); 143 | 144 | fadeout->xdisplay = gdk_x11_display_get_xdisplay (display); 145 | screen = gdk_display_get_default_screen (display); 146 | fadeout->xwindow = GINT_TO_POINTER (xfsm_x11_fadeout_new_window (display, screen)); 147 | 148 | return fadeout; 149 | } 150 | 151 | 152 | 153 | void 154 | xfsm_fadeout_destroy (XfsmFadeout *fadeout) 155 | { 156 | gdk_x11_display_error_trap_push (gdk_display_get_default ()); 157 | XDestroyWindow (fadeout->xdisplay, GPOINTER_TO_INT (fadeout->xwindow)); 158 | gdk_display_flush (gdk_display_get_default ()); 159 | gdk_x11_display_error_trap_pop_ignored (gdk_display_get_default ()); 160 | 161 | g_slice_free (XfsmFadeout, fadeout); 162 | } 163 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-inhibitor.c: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- 2 | * 3 | * Copyright (C) 2021-2022 Matias De lellis 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #include 23 | 24 | #include "xfsm-inhibitor.h" 25 | 26 | static void 27 | xfsm_inhibitor_finalize (GObject *object); 28 | 29 | struct _XfsmInhibitor 30 | { 31 | GObject parent; 32 | 33 | GHashTable *inhibitions; 34 | }; 35 | 36 | G_DEFINE_TYPE (XfsmInhibitor, xfsm_inhibitor, G_TYPE_OBJECT) 37 | 38 | static gboolean 39 | g_hash_func_inhibition_has_flag (gpointer key, 40 | gpointer value, 41 | gpointer data) 42 | { 43 | XfsmInhibitonFlag flags = xfsm_inhibition_get_flags (XFSM_INHIBITION (value)); 44 | XfsmInhibitonFlag flag = GPOINTER_TO_UINT (data); 45 | return (flags & flag); 46 | } 47 | 48 | static gboolean 49 | g_hash_func_inhibition_cookie_cmp (gpointer key, 50 | gpointer value, 51 | gpointer data) 52 | { 53 | guint cookie = xfsm_inhibition_get_cookie (XFSM_INHIBITION (value)); 54 | return (cookie == GPOINTER_TO_UINT (data)); 55 | } 56 | 57 | 58 | gboolean 59 | xfsm_inhibitor_add (XfsmInhibitor *store, 60 | XfsmInhibition *inhibition) 61 | { 62 | g_return_val_if_fail (XFSM_IS_INHIBITOR (store), FALSE); 63 | g_return_val_if_fail (XFSM_IS_INHIBITION (inhibition), FALSE); 64 | 65 | g_debug ("XfsmInhibitor: Adding inhibitions %u to store", 66 | xfsm_inhibition_get_cookie (inhibition)); 67 | g_hash_table_insert (store->inhibitions, 68 | xfsm_inhibition_peek_cookie (inhibition), 69 | g_object_ref (inhibition)); 70 | return TRUE; 71 | } 72 | 73 | gboolean 74 | xfsm_inhibitor_remove (XfsmInhibitor *store, 75 | guint cookie) 76 | { 77 | XfsmInhibition *inhibition; 78 | 79 | g_return_val_if_fail (XFSM_IS_INHIBITOR (store), FALSE); 80 | 81 | g_debug ("XfsmInhibitor: Removing inhibitions %u to store", cookie); 82 | 83 | inhibition = g_hash_table_find (store->inhibitions, 84 | g_hash_func_inhibition_cookie_cmp, 85 | GUINT_TO_POINTER (cookie)); 86 | if (inhibition == NULL) 87 | return FALSE; 88 | 89 | return g_hash_table_remove (store->inhibitions, 90 | xfsm_inhibition_peek_cookie (inhibition)); 91 | } 92 | 93 | gboolean 94 | xfsm_inhibitor_is_empty (XfsmInhibitor *store) 95 | { 96 | g_return_val_if_fail (XFSM_IS_INHIBITOR (store), FALSE); 97 | 98 | return (g_hash_table_size (store->inhibitions) == 0); 99 | } 100 | 101 | gboolean 102 | xfsm_inhibitor_has_flags (XfsmInhibitor *store, 103 | XfsmInhibitonFlag flags) 104 | { 105 | XfsmInhibition *inhibition; 106 | 107 | g_return_val_if_fail (XFSM_IS_INHIBITOR (store), FALSE); 108 | 109 | inhibition = g_hash_table_find (store->inhibitions, 110 | g_hash_func_inhibition_has_flag, 111 | GUINT_TO_POINTER (flags)); 112 | 113 | return (inhibition != NULL); 114 | } 115 | 116 | static void 117 | xfsm_inhibitor_class_init (XfsmInhibitorClass *klass) 118 | { 119 | GObjectClass *object_class = G_OBJECT_CLASS (klass); 120 | 121 | object_class->finalize = xfsm_inhibitor_finalize; 122 | } 123 | 124 | static void 125 | xfsm_inhibitor_init (XfsmInhibitor *store) 126 | { 127 | store->inhibitions = g_hash_table_new_full (g_int_hash, 128 | g_int_equal, 129 | NULL, 130 | (GDestroyNotify) g_object_unref); 131 | } 132 | 133 | static void 134 | xfsm_inhibitor_finalize (GObject *object) 135 | { 136 | XfsmInhibitor *store; 137 | 138 | g_return_if_fail (XFSM_IS_INHIBITOR (object)); 139 | 140 | store = XFSM_INHIBITOR (object); 141 | 142 | g_hash_table_destroy (store->inhibitions); 143 | 144 | G_OBJECT_CLASS (xfsm_inhibitor_parent_class)->finalize (object); 145 | } 146 | 147 | XfsmInhibitor * 148 | xfsm_inhibitor_get (void) 149 | { 150 | static XfsmInhibitor *object = NULL; 151 | 152 | if (G_LIKELY (object != NULL)) 153 | { 154 | g_object_ref (G_OBJECT (object)); 155 | } 156 | else 157 | { 158 | object = g_object_new (XFSM_TYPE_INHIBITOR, NULL); 159 | g_object_add_weak_pointer (G_OBJECT (object), (gpointer) &object); 160 | } 161 | 162 | return object; 163 | } 164 | -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-lock.svg: -------------------------------------------------------------------------------- 1 | 2 | 21 | 47 | 51 | 52 | Adwaita Icon Template 54 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | GNOME Design Team 67 | 68 | 69 | 70 | 72 | Adwaita Icon Template 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 112 | 113 | 114 | 115 | 122 | 131 | 138 | 147 | 148 | -------------------------------------------------------------------------------- /scripts/xinitrc.in: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # fix broken $UID on some system... 4 | if test "x$UID" = "x"; then 5 | if test -x /usr/xpg4/bin/id; then 6 | UID=`/usr/xpg4/bin/id -u`; 7 | else 8 | UID=`id -u`; 9 | fi 10 | fi 11 | 12 | # set $XDG_MENU_PREFIX to "xfce-" so that "xfce-applications.menu" is picked 13 | # over "applications.menu" in all Xfce applications. 14 | if test "x$XDG_MENU_PREFIX" = "x"; then 15 | XDG_MENU_PREFIX="xfce-" 16 | export XDG_MENU_PREFIX 17 | fi 18 | 19 | # set DESKTOP_SESSION so that one can detect easily if an Xfce session is running 20 | if test "x$DESKTOP_SESSION" = "x"; then 21 | DESKTOP_SESSION="xfce" 22 | export DESKTOP_SESSION 23 | fi 24 | 25 | # set XDG_CURRENT_DESKTOP so that Qt 5 applications can identify user set Xfce theme 26 | if test "x$XDG_CURRENT_DESKTOP" = "x"; then 27 | XDG_CURRENT_DESKTOP="XFCE" 28 | export XDG_CURRENT_DESKTOP 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 | export XDG_CONFIG_HOME 37 | fi 38 | [ -d "$XDG_CONFIG_HOME" ] || mkdir "$XDG_CONFIG_HOME" 39 | 40 | # $XDG_CACHE_HOME defines the base directory relative to which user specific 41 | # non-essential data files should be stored. If $XDG_CACHE_HOME is either not 42 | # set or empty, a default equal to $HOME/.cache should be used. 43 | if test "x$XDG_CACHE_HOME" = "x" ; then 44 | XDG_CACHE_HOME=$HOME/.cache 45 | export XDG_CACHE_HOME 46 | fi 47 | [ -d "$XDG_CACHE_HOME" ] || mkdir "$XDG_CACHE_HOME" 48 | 49 | # set up XDG user directores. see 50 | # http://freedesktop.org/wiki/Software/xdg-user-dirs 51 | if command -v xdg-user-dirs-update >/dev/null 2>&1; then 52 | xdg-user-dirs-update 53 | fi 54 | 55 | if test "x$XFCE4_SESSION_COMPOSITOR" = "x" 56 | then 57 | # For now, start with an empty list 58 | XRESOURCES="" 59 | 60 | # Has to go prior to merging Xft.xrdb, as its the "Defaults" file 61 | test -r "@_sysconfdir_@/xdg/xfce4/Xft.xrdb" && XRESOURCES="$XRESOURCES @_sysconfdir_@/xdg/xfce4/Xft.xrdb" 62 | test -r $HOME/.Xdefaults && XRESOURCES="$XRESOURCES $HOME/.Xdefaults" 63 | 64 | BASEDIR=$XDG_CONFIG_HOME/xfce4 65 | if test -r "$BASEDIR/Xft.xrdb"; then 66 | XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb" 67 | elif test -r "$XFCE4HOME/Xft.xrdb"; then 68 | mkdir -p "$BASEDIR" 69 | cp "$XFCE4HOME/Xft.xrdb" "$BASEDIR"/ 70 | XRESOURCES="$XRESOURCES $BASEDIR/Xft.xrdb" 71 | fi 72 | 73 | # merge in X cursor settings 74 | test -r "$BASEDIR/Xcursor.xrdb" && XRESOURCES="$XRESOURCES $BASEDIR/Xcursor.xrdb" 75 | 76 | # ~/.Xresources contains overrides to the above 77 | test -r "$HOME/.Xresources" && XRESOURCES="$XRESOURCES $HOME/.Xresources" 78 | 79 | # load all X resources (adds /dev/null to avoid an empty list that would hang the process) 80 | cat /dev/null $XRESOURCES | xrdb -merge - 81 | 82 | # load local modmap 83 | test -r $HOME/.Xmodmap && xmodmap $HOME/.Xmodmap 84 | fi 85 | 86 | # ensure both the DBus session bus and systemd user session (if running) has 87 | # all the env vars it needs to properly populate the environment of child 88 | # processes 89 | if command -v dbus-update-activation-environment >/dev/null 2>&1; then 90 | if command -v systemctl >/dev/null 2>&1 && systemctl --user list-jobs >/dev/null 2>&1; then # user session is running 91 | systemd_arg='--systemd' 92 | fi 93 | 94 | dbus-update-activation-environment $systemd_arg \ 95 | DESKTOP_SESSION \ 96 | XAUTHLOCALHOSTNAME=$XAUTHLOCALHOSTNAME \ 97 | XDG_CACHE_HOME \ 98 | XDG_CONFIG_DIRS \ 99 | XDG_CONFIG_HOME \ 100 | XDG_CURRENT_DESKTOP \ 101 | XDG_DATA_DIRS \ 102 | XDG_DATA_HOME \ 103 | XDG_MENU_PREFIX \ 104 | XDG_RUNTIME_DIR \ 105 | XDG_SEAT \ 106 | XDG_SEAT_PATH \ 107 | XDG_SESSION_CLASS \ 108 | XDG_SESSION_DESKTOP \ 109 | XDG_SESSION_ID \ 110 | XDG_SESSION_PATH \ 111 | XDG_SESSION_TYPE \ 112 | XDG_STATE_HOME 113 | fi 114 | 115 | # check if we start xfce4-session with ck-launch-session. this is only 116 | # required for starting from a console, not a login manager 117 | if test "x$XFCE4_SESSION_WITH_CK" = "x1"; then 118 | if command -v ck-launch-session >/dev/null 2>&1; then 119 | exec ck-launch-session xfce4-session 120 | else 121 | echo 122 | echo "You have tried to start Xfce with consolekit support, but" 123 | echo "ck-launch-session is not installed." 124 | echo "Aborted startup..." 125 | echo 126 | exit 1 127 | fi 128 | else 129 | # workaround https://github.com/canonical/lightdm/issues/63 130 | if [ -n "$XDG_VTNR" ] && [ -f "/sys/devices/virtual/tty/tty0/active" ]; then 131 | VT_TEST_CNT=1 132 | while true; do 133 | CURRENT_VT=$(cat /sys/devices/virtual/tty/tty0/active) 134 | if [ "$CURRENT_VT" = "tty$XDG_VTNR" ]; then 135 | break 136 | fi 137 | VT_TEST_CNT=$((VT_TEST_CNT + 1)) 138 | if [ "$VT_TEST_CNT" -gt 100 ]; then 139 | echo "VT $XDG_VTNR is expected but the switch did not happen in the last second, continuing anyway." 140 | break 141 | fi 142 | sleep 0.01 143 | done 144 | fi 145 | 146 | # start xfce4-session normally 147 | exec ${XFCE4_SESSION_COMPOSITOR:-xfce4-session} 148 | fi 149 | 150 | # if we got here, then exec failed 151 | exit 1 152 | -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-shutdown.svg: -------------------------------------------------------------------------------- 1 | 2 | 21 | 47 | 51 | 52 | Adwaita Icon Template 54 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | GNOME Design Team 67 | 68 | 69 | 70 | 72 | Adwaita Icon Template 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 112 | 113 | 114 | 115 | 122 | 135 | 141 | 142 | -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-reboot.svg: -------------------------------------------------------------------------------- 1 | 2 | 21 | 47 | 51 | 52 | Adwaita Icon Template 54 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | GNOME Design Team 67 | 68 | 69 | 70 | 72 | Adwaita Icon Template 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 112 | 113 | 114 | 115 | 122 | 135 | 141 | 142 | -------------------------------------------------------------------------------- /xfce4-session/xfsm-properties.h: -------------------------------------------------------------------------------- 1 | /* $Id$ */ 2 | /*- 3 | * Copyright (c) 2003-2004 Benedikt Meurer 4 | * All rights reserved. 5 | * 6 | * This program is free software; you can redistribute it and/or modify 7 | * it under the terms of the GNU General Public License as published by 8 | * the Free Software Foundation; either version 2, or (at your option) 9 | * any later version. 10 | * 11 | * This program is distributed in the hope that it will be useful, 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | * GNU General Public License for more details. 15 | * 16 | * You should have received a copy of the GNU General Public License 17 | * along with this program; if not, write to the Free Software 18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19 | * MA 02110-1301 USA. 20 | */ 21 | 22 | #ifndef __XFSM_PROPERTIES_H__ 23 | #define __XFSM_PROPERTIES_H__ 24 | 25 | #ifdef ENABLE_X11 26 | #include 27 | #else 28 | #define SmInteractStyleNone 0 29 | #define SmInteractStyleErrors 1 30 | #define SmInteractStyleAny 2 31 | 32 | #define SmSaveGlobal 0 33 | #define SmSaveLocal 1 34 | #define SmSaveBoth 2 35 | 36 | #define SmRestartIfRunning 0 37 | #define SmRestartAnyway 1 38 | #define SmRestartImmediately 2 39 | #define SmRestartNever 3 40 | 41 | #define SmCloneCommand "CloneCommand" 42 | #define SmCurrentDirectory "CurrentDirectory" 43 | #define SmDiscardCommand "DiscardCommand" 44 | #define SmEnvironment "Environment" 45 | #define SmProcessID "ProcessID" 46 | #define SmProgram "Program" 47 | #define SmRestartCommand "RestartCommand" 48 | #define SmResignCommand "ResignCommand" 49 | #define SmRestartStyleHint "RestartStyleHint" 50 | #define SmShutdownCommand "ShutdownCommand" 51 | #define SmUserID "UserID" 52 | 53 | typedef gpointer SmsConn; 54 | #endif 55 | 56 | #include 57 | 58 | /* GNOME compatibility */ 59 | #define GsmPriority "_GSM_Priority" 60 | #define GsmDesktopFile "_GSM_DesktopFile" 61 | 62 | #define MAX_RESTART_ATTEMPTS 5 63 | 64 | typedef struct _XfsmProperties XfsmProperties; 65 | 66 | struct _XfsmProperties 67 | { 68 | guint restart_attempts; 69 | guint restart_attempts_reset_id; 70 | 71 | guint startup_timeout_id; 72 | 73 | GPid pid; 74 | guint child_watch_id; 75 | 76 | gchar *client_id; 77 | gchar *hostname; 78 | gchar *service_name; 79 | 80 | GTree *sm_properties; 81 | }; 82 | 83 | 84 | #define XFSM_PROPERTIES(p) ((XfsmProperties *) (p)) 85 | 86 | 87 | XfsmProperties * 88 | xfsm_properties_new (const gchar *client_id, 89 | const gchar *hostname) G_GNUC_PURE; 90 | void 91 | xfsm_properties_free (XfsmProperties *properties); 92 | 93 | #ifdef ENABLE_X11 94 | void 95 | xfsm_properties_extract (XfsmProperties *properties, 96 | gint *num_props, 97 | SmProp ***props); 98 | #endif 99 | void 100 | xfsm_properties_store (XfsmProperties *properties, 101 | GKeyFile *file, 102 | const gchar *prefix, 103 | const gchar *group); 104 | 105 | XfsmProperties * 106 | xfsm_properties_load (GKeyFile *file, 107 | const gchar *prefix, 108 | const gchar *group); 109 | 110 | gboolean 111 | xfsm_properties_check (const XfsmProperties *properties) G_GNUC_CONST; 112 | 113 | const gchar * 114 | xfsm_properties_get_string (XfsmProperties *properties, 115 | const gchar *property_name); 116 | gchar ** 117 | xfsm_properties_get_strv (XfsmProperties *properties, 118 | const gchar *property_name); 119 | guchar 120 | xfsm_properties_get_uchar (XfsmProperties *properties, 121 | const gchar *property_name, 122 | guchar default_value); 123 | 124 | const GValue * 125 | xfsm_properties_get (XfsmProperties *properties, 126 | const gchar *property_name); 127 | 128 | void 129 | xfsm_properties_set_string (XfsmProperties *properties, 130 | const gchar *property_name, 131 | const gchar *property_value); 132 | void 133 | xfsm_properties_set_strv (XfsmProperties *properties, 134 | const gchar *property_name, 135 | gchar **property_value); 136 | void 137 | xfsm_properties_set_uchar (XfsmProperties *properties, 138 | const gchar *property_name, 139 | guchar property_value); 140 | 141 | gboolean 142 | xfsm_properties_set (XfsmProperties *properties, 143 | const gchar *property_name, 144 | const GValue *property_value); 145 | #ifdef ENABLE_X11 146 | gboolean 147 | xfsm_properties_set_from_smprop (XfsmProperties *properties, 148 | const SmProp *sm_prop); 149 | #endif 150 | 151 | gboolean 152 | xfsm_properties_remove (XfsmProperties *properties, 153 | const gchar *property_name); 154 | 155 | void 156 | xfsm_properties_set_default_child_watch (XfsmProperties *properties); 157 | 158 | gint 159 | xfsm_properties_compare (const XfsmProperties *a, 160 | const XfsmProperties *b) G_GNUC_CONST; 161 | 162 | gint 163 | xfsm_properties_compare_id (const XfsmProperties *properties, 164 | const gchar *client_id); 165 | 166 | #endif /* !__XFSM_PROPERTIES_H__ */ 167 | -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-switch-user.svg: -------------------------------------------------------------------------------- 1 | 2 | 21 | 47 | 51 | 52 | Adwaita Icon Template 54 | 56 | 58 | 59 | 61 | image/svg+xml 62 | 64 | 65 | 66 | GNOME Design Team 67 | 68 | 69 | 70 | 72 | Adwaita Icon Template 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 100 | 102 | 104 | 106 | 108 | 110 | 112 | 113 | 114 | 115 | 120 | 126 | 130 | 131 | 132 | -------------------------------------------------------------------------------- /icons/24x24-actions/xfsm-hibernate.svg: -------------------------------------------------------------------------------- 1 | 2 | 22 | 48 | 52 | 53 | Adwaita Icon Template 55 | 57 | 59 | 60 | 62 | image/svg+xml 63 | 65 | 66 | 67 | GNOME Design Team 68 | 69 | 70 | 71 | 73 | Adwaita Icon Template 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 101 | 103 | 105 | 107 | 109 | 111 | 113 | 114 | 115 | 116 | 123 | 129 | 138 | 147 | 148 | --------------------------------------------------------------------------------