Mir

Merge lp:~alan-griffiths/mir/mirterminal into lp:mir

Proposed by Alan Griffiths
Status: Rejected
Rejected by: Alan Griffiths
Proposed branch: lp:~alan-griffiths/mir/mirterminal
Merge into: lp:mir
Diff against target: 47 lines (+27/-0)
3 files modified
debian/mir-utils.install (+1/-0)
src/utils/CMakeLists.txt (+7/-0)
src/utils/mirterminal.sh (+19/-0)
To merge this branch: bzr merge lp:~alan-griffiths/mir/mirterminal
Reviewer Review Type Date Requested Status
Andreas Pokorny (community) Approve
Kevin DuBois (community) Approve
Alexandros Frantzis (community) Approve
Daniel van Vugt Needs Fixing
Cemil Azizoglu (community) Approve
Mir CI Bot continuous-integration Approve
Review via email: mp+291346@code.launchpad.net

Commit message

utils: script for launching gnome-terminal as a Mir client

Description of the change

utils: script for launching gnome-terminal as a Mir client

    $ bin/mir_demo_server&
    $ bin/mirterminal

To post a comment you must log in.
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:3447
https://mir-jenkins.ubuntu.com/job/mir-ci/795/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/790
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/827
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/818
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/818
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/799
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=vivid+overlay/799/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/799
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/799/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/799
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/799/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/799
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/799/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/799
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/799/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/795/rebuild

review: Approve (continuous-integration)
Revision history for this message
Cemil Azizoglu (cemil-azizoglu) wrote :

Good

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Can we rename that please? (like mir-gnome-terminal)

The name 'mirterminal' is probably best left reserved for a native Mir terminal (eventually).

review: Needs Fixing
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> Can we rename that please? (like mir-gnome-terminal)
>
> The name 'mirterminal' is probably best left reserved for a native Mir
> terminal (eventually).

Hmm, I was thinking that gnome-terminal is an implementation detail and that "mirterminal" would be reimplemented as a native terminal when one is available.

Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

> Hmm, I was thinking that gnome-terminal is an implementation detail and that "mirterminal"
> would be reimplemented as a native terminal when one is available.

If that's the intention, I am fine with keeping 'mirterminal'.

review: Approve
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Note that an alternative approach would be to name this mir-gnome-terminal, and use the debian alternatives system to provide 'mirterminal'.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> Note that an alternative approach would be to name this mir-gnome-terminal,
> and use the debian alternatives system to provide 'mirterminal'.

I like that.

/me goes digging into postinst and update-alternatives

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> /me goes digging into postinst and update-alternatives

/me decides that this isn't needed (yet) and can be done later.

Revision history for this message
Kevin DuBois (kdub) wrote :

I think a user of the switch would be alright leaving which particular terminal gets started as an implementation detail. (especially at this stage of mir-desktop)

review: Approve
Revision history for this message
Andreas Pokorny (andreas-pokorny) wrote :

As soon as there is a native terminal we could do that .. and just take this as is.

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

OK, if we're using alternatives then we still need to consider the implications of the "$*"

The "$*" means users can pass their own command line options. So right now that means options that gnome-terminal understands. Much later that means options that some native terminal app understands. So we're kind of declaring in advance that anyone who writes a script passing options to 'mirterminal' will have compatibility broken in future. If we just named it 'mir-gnome-terminal' now however, then that future compatibility break would not occur. And we'd never need to concern ourselves with update-alternatives either.

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

> OK, if we're using alternatives then we still need to consider the
> implications of the "$*"

Good point

Unmerged revisions

3447. By Alan Griffiths

mirterminal utility

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/mir-utils.install'
2--- debian/mir-utils.install 2016-04-06 17:01:47 +0000
3+++ debian/mir-utils.install 2016-04-08 09:39:13 +0000
4@@ -4,3 +4,4 @@
5 usr/bin/mirscreencast
6 usr/bin/mirbacklight
7 usr/bin/mirrun
8+usr/bin/mirterminal
9
10=== modified file 'src/utils/CMakeLists.txt'
11--- src/utils/CMakeLists.txt 2016-04-06 16:41:21 +0000
12+++ src/utils/CMakeLists.txt 2016-04-08 09:39:13 +0000
13@@ -32,3 +32,10 @@
14 install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/mirbacklight
15 DESTINATION ${CMAKE_INSTALL_BINDIR}
16 )
17+
18+add_custom_target(mirterminal ALL
19+ cp ${CMAKE_CURRENT_SOURCE_DIR}/mirterminal.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/mirterminal
20+)
21+install(PROGRAMS ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/mirterminal
22+ DESTINATION ${CMAKE_INSTALL_BINDIR}
23+)
24
25=== added file 'src/utils/mirterminal.sh'
26--- src/utils/mirterminal.sh 1970-01-01 00:00:00 +0000
27+++ src/utils/mirterminal.sh 2016-04-08 09:39:13 +0000
28@@ -0,0 +1,19 @@
29+#!/bin/sh
30+#
31+# Copyright © 2016 Canonical Ltd.
32+#
33+# This program is free software: you can redistribute it and/or modify it
34+# under the terms of the GNU General Public License version 3,
35+# as published by the Free Software Foundation.
36+#
37+# This program is distributed in the hope that it will be useful,
38+# but WITHOUT ANY WARRANTY; without even the implied warranty of
39+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
40+# GNU General Public License for more details.
41+#
42+# You should have received a copy of the GNU General Public License
43+# along with this program. If not, see <http://www.gnu.org/licenses/>.
44+#
45+# Authored by: Alan Griffiths <alan@octopull.co.uk>
46+
47+$(dirname "$0")/mirrun gnome-terminal --app-id com.canonical.mir.Terminal $*

Subscribers

People subscribed via source and target branches