~alan-griffiths/miral/update-license

« back to all changes in this revision

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

  • Committer: Tarmac
  • Author(s): Alan Griffiths
  • Date: 2017-07-20 16:21:23 UTC
  • mfrom: (563.1.1 miral0)
  • Revision ID: tarmac-20170720162123-nmpmz103rq6ysxzl
[miral-run|miral-xrun] detect Mir endpoint.

Approved by Gerry Boland, mir-ci-bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
 
2
 
 
3
if   [ -e "${XDG_RUNTIME_DIR}/miral_socket" ];
 
4
then
 
5
  socket=${XDG_RUNTIME_DIR}/miral_socket
 
6
elif [ -e "${XDG_RUNTIME_DIR}/mir_socket" ];
 
7
then
 
8
  socket=${XDG_RUNTIME_DIR}/mir_socket
 
9
else
 
10
  echo "Error: Cannot detect Mir endpoint"; exit 1
 
11
fi
 
12
 
2
13
if [ "$1" = "gnome-terminal" ]
3
14
then extras='--app-id com.canonical.miral.Terminal'
4
15
fi
5
16
unset QT_QPA_PLATFORMTHEME
6
 
MIR_SOCKET=${XDG_RUNTIME_DIR}/miral_socket XDG_SESSION_TYPE=mir GDK_BACKEND=mir QT_QPA_PLATFORM=ubuntumirclient SDL_VIDEODRIVER=mir "$@" ${extras}&
 
17
MIR_SOCKET=${socket} XDG_SESSION_TYPE=mir GDK_BACKEND=mir QT_QPA_PLATFORM=ubuntumirclient SDL_VIDEODRIVER=mir "$@" ${extras}&