~ci-train-bot/miral/miral-ubuntu-zesty-2476

« back to all changes in this revision

Viewing changes to miral-shell/miral-app.sh

  • Committer: Bileto Bot
  • Date: 2016-12-16 00:35:53 UTC
  • mfrom: (342.1.1 miral-release)
  • Revision ID: ci-train-bot@canonical.com-20161216003553-26pav92h0dcg2rk9
* New upstream release 1.0.0 (https://launchpad.net/miral/+milestone/1.0)
  - ABI summary:
    . miral ABI bumped to 2
  - Enhancements:
    . Allow the WM policy a say in inherited moves of child windows
    . Remove deprecated APIs
    . add miral-app script to launch examples hosted by an existing desktop
  - Bugs fixed:
    . Examples fail to start under Unity8 (LP: #1646431)
    . [miral-shell --window-manager tiling] windows are not correctly
      constrained to tiles (LP:  #1646735)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/bash
 
2
 
 
3
miral_server=miral-shell
 
4
launcher='gnome-terminal --app-id com.canonical.miral.Terminal'
 
5
hostsocket=
 
6
bindir=
 
7
 
 
8
if [ -n "${MIR_SOCKET}" ]
 
9
then
 
10
  if [ ! -e "${MIR_SOCKET}" ]
 
11
  then
 
12
    echo "Error: Host endpoint '${MIR_SOCKET}' does not exists"; exit 1
 
13
  fi
 
14
  i=0; while [ -e "${XDG_RUNTIME_DIR}/mir_socket{i}" ]; do let i+=1 ;done
 
15
  socket=${XDG_RUNTIME_DIR}/mir_socket{i}
 
16
  hostsocket='--host-socket ${MIR_SOCKET}'
 
17
else
 
18
  socket=${XDG_RUNTIME_DIR}/mir_socket
 
19
fi
 
20
 
 
21
while [ $# -gt 0 ]
 
22
do
 
23
  if [ "$1" == "--help" -o "$1" == "-h" ]
 
24
  then
 
25
    echo "$(basename $0) - Handy launch script for a hosted miral \"desktop session\""
 
26
    echo "Usage: $0 [options] [shell options]"
 
27
    echo "Options are:"
 
28
    echo "    -kiosk               use miral-kiosk instead of ${miral_server}"
 
29
    echo "    -launcher <launcher> use <launcher> instead of '${launcher}'"
 
30
    echo "    -socket   <socket>   set the mir socket [${socket}]"
 
31
    echo "    -bindir   <bindir>   path to the miral executable"
 
32
    exit 0
 
33
    elif [ "$1" == "-kiosk" ];              then miral_server=miral-kiosk
 
34
    elif [ "$1" == "-launcher" ];           then shift; launcher=$1
 
35
    elif [ "$1" == "-socket" ];             then shift; socket=$1
 
36
    elif [ "$1" == "-bindir" ];             then shift; bindir=$1/
 
37
    elif [ "${1:0:2}" == "--" ];            then break
 
38
    fi
 
39
    shift
 
40
done
 
41
 
 
42
if [ -e "${socket}" ]; then echo "Error: session endpoint '${socket}' already exists"; exit 1 ;fi
 
43
 
 
44
sh -c "${bindir}${miral_server} $* ${hostsocket} --file ${socket} --desktop_file_hint=miral-shell.desktop"&
 
45
 
 
46
while [ ! -e "${socket}" ]; do echo "waiting for ${socket}"; sleep 1 ;done
 
47
 
 
48
unset QT_QPA_PLATFORMTHEME
 
49
MIR_SOCKET=${socket} GDK_BACKEND=mir QT_QPA_PLATFORM=ubuntumirclient SDL_VIDEODRIVER=mir dbus-run-session -- ${launcher}
 
50
killall ${bindir}${miral_server}
 
51