Skip to content
Snippets Groups Projects
Commit 569a6e6a authored by Guido Gunther's avatar Guido Gunther :zzz:
Browse files

Merge branch 'session' into 'master'

Start phosh via gnome-session

Closes #23

See merge request !83
parents cf9f830f 2d81318c
No related branches found
No related tags found
1 merge request!83Start phosh via gnome-session
Pipeline #
......@@ -24,15 +24,38 @@ way to get going is to do the following:
## Running
When running from the source tree start *rootston*. Then start *phosh*
using:
### Running from the source tree
When running from the source tree start the compositor *rootston*. Then start
*phosh* using:
_build/run
or in one command:`
or in one command:
../wlroots/_build/rootston/rootston -E _build/run -C ./rootston.ini
This will make sure the gsettings schema is found, there's enough of a GNOME
session running an the some of the mutter DBus API is stubbed so
gnome-settings-manager can work.
This will make sure the needed gsettings schema is found.
### Running from the Debian packages
If installed via the Debian packages you can also run phosh via gnome-session.
It ships a file in /usr/share/gnome-session/sessions so you can bring up a
session using
gnome-session --disable-acceleration-check --session=phosh
This assumes you have the compositor already running. If you want to start
phosh at system boot there's a systemd unit file in */lib/systemd/system/phosh*
which is disabled by default:
systemctl enable phosh
systemctl start phosh
This runs *phosh* as user *purism* (which needs to exist). If you don't have a
user *purism* and don't want to create on you can make systemd run *phosh* as
any user by using an override file:
$ cat /etc/systemd/system/phosh.service.d/override.conf
[Service]
User=<your_user>
WorkingDirectory=<your_home_directory>
desktopconf = configuration_data()
desktopconf.set('bindir', bindir)
desktopconf.set('libexecdir', libexecdir)
desktop_files = [
'sm.puri.Phosh.desktop',
]
foreach desktop_file : desktop_files
i18n.merge_file('desktop',
input: configure_file(
input: desktop_file + '.in.in',
output: desktop_file + '.in',
configuration: desktopconf
),
output: desktop_file,
po_dir: '../po',
install: true,
install_dir: desktopdir,
type: 'desktop'
)
endforeach
sessions = [
'phosh.session',
]
foreach session: sessions
desktop = session + '.desktop'
i18n.merge_file(
session,
input: configure_file(
input: desktop + '.in.in',
output: desktop + '.in',
configuration: desktopconf
),
output: session,
po_dir: '../po',
install: true,
install_dir: join_paths(sessiondir, 'sessions'),
type: 'desktop',
)
endforeach
runconf = configuration_data()
runconf.set('bindir', bindir)
runconf.set('libexecdir', libexecdir)
runconf.set('pkgdatadir', pkgdatadir)
runconf.set('wlrootsdir', join_paths(libexecdir, 'wlroots'))
configure_file(
input: 'phosh.in',
output: 'phosh',
install_dir: bindir,
configuration: runconf,
install: true
)
schemas = ['sm.puri.phosh.gschema.xml']
compiled = gnome.compile_schemas(
build_by_default: true
......@@ -7,3 +62,5 @@ install_data(
schemas,
install_dir: 'share/glib-2.0/schemas'
)
install_data('rootston.ini', install_dir : pkgdatadir)
#!/bin/sh
ROOTSTON="/usr/bin/rootston"
ROOTSTON_INI="@pkgdatadir@/rootston.ini"
if [ -x @wlrootsdir@/rootston ]; then
ROOTSTON=@wlrootsdir@/rootston
elif [ -x @bindir@/rootston ]; then
ROOTSTON=@bindir@/rootston
elif [ -x /usr/lib/wlroots/rootston ]; then
ROOTSTON=/usr/lib/wlroots/rootston
fi
if [ -f "/etc/phosh/rootston.ini" ]; then
ROOTSTON_INI=/etc/phosh/rootston.ini
fi
exec "${ROOTSTON}" -C "${ROOTSTON_INI}" -E "gnome-session --disable-acceleration-check --session=phosh"
[GNOME Session]
Name=Phosh
RequiredComponents=sm.puri.Phosh;org.gnome.SettingsDaemon.A11ySettings;org.gnome.SettingsDaemon.Clipboard;org.gnome.SettingsDaemon.Color;org.gnome.SettingsDaemon.Datetime;org.gnome.SettingsDaemon.Housekeeping;org.gnome.SettingsDaemon.Keyboard;org.gnome.SettingsDaemon.MediaKeys;org.gnome.SettingsDaemon.Mouse;org.gnome.SettingsDaemon.Power;org.gnome.SettingsDaemon.PrintNotifications;org.gnome.SettingsDaemon.Rfkill;org.gnome.SettingsDaemon.ScreensaverProxy;org.gnome.SettingsDaemon.Sharing;org.gnome.SettingsDaemon.Smartcard;org.gnome.SettingsDaemon.Sound;org.gnome.SettingsDaemon.Wacom;org.gnome.SettingsDaemon.XSettings;
File moved
[Desktop Entry]
Type=Application
Name=Phone Shell
Comment=Window management and application launching for mobile
Exec=@libexecdir@/phosh
Categories=GNOME;Librem5;Core;
OnlyShowIn=GNOME;
NoDisplay=true
X-GNOME-Autostart-Phase=DisplayServer
X-GNOME-Provides=panel;windowmanager;
X-GNOME-Autostart-Notify=true
X-GNOME-AutoRestart=false
......@@ -23,6 +23,8 @@ Depends:
${misc:Depends},
${shlibs:Depends},
fonts-lato,
Recommends:
gnome-session,
Description: Simple Wayland shell
Phosh is a simple shell for wayland compositors speaking the
weston-desktop-shell protocol.
......
rootston.ini
......@@ -25,7 +25,8 @@ Before=graphical.target
ConditionPathExists=/dev/tty0
[Service]
ExecStart=/usr/lib/wlroots/rootston -E /usr/lib/phosh/phosh -C /usr/share/phosh/rootston.ini
Environment=LANG=C.UTF-8
ExecStart=/usr/bin/phosh
TimeoutStartSec=60
User=purism
PAMName=login
......
......@@ -5,15 +5,15 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all
%:
dh $@ --builddirectory=_build
override_dh_auto_install:
dh_auto_install
# Move phosh to arch indep dir
mv debian/phosh/usr/lib/*/phosh debian/phosh/usr/lib/phosh/phosh
cp rootston.ini debian/phosh/usr/share/phosh/
override_dh_installsystemd:
dh_installsystemd --no-start --no-enable
override_dh_systemd_start:
dh_systemd_start --no-start --no-restart-after-upgrade
override_dh_systemd_enable:
dh_systemd_enable --no-enable
override_dh_auto_test:
ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
xvfb-run ninja -C _build test
......
......@@ -5,9 +5,18 @@ project('phosh', 'c',
default_options: [ 'warning_level=1', 'buildtype=debugoptimized', 'c_std=gnu11' ],
)
prefix = get_option('prefix')
bindir = join_paths(prefix, get_option('bindir'))
datadir = join_paths(prefix, get_option('datadir'))
localedir = join_paths(prefix, get_option('localedir'))
libexecdir = join_paths(prefix, get_option('libexecdir'))
desktopdir = join_paths(datadir, 'applications')
sessiondir = join_paths(datadir, 'gnome-session')
pkgdatadir = join_paths(datadir, meson.project_name())
config_h = configuration_data()
config_h.set_quoted('GETTEXT_PACKAGE', 'phosh')
config_h.set_quoted('LOCALEDIR', join_paths(get_option('prefix'), get_option('localedir')))
config_h.set_quoted('LOCALEDIR', localedir)
configure_file(
input: 'config.h.in',
......@@ -70,6 +79,7 @@ configure_file(
configuration: run_data)
gnome = import('gnome')
i18n = import('i18n')
subdir('data')
subdir('po')
......
data/sm.puri.Phosh.desktop.in.in
data/phosh.session.desktop.in.in
src/auth.c
src/background.c
src/batteryinfo.c
......
......@@ -87,6 +87,6 @@ phosh_deps = [
phosh = executable('phosh', phosh_sources,
dependencies: phosh_deps,
install: true,
install_dir: get_option('libexecdir'),
install_dir: libexecdir,
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment