gui.mdwn 9.35 KB
Newer Older
1
2
[[!meta title="User interface for additional software packages"]]

3
[[!toc levels=2]]
4

127.0.0.1's avatar
127.0.0.1 committed
5
6
7
Goals and non-goals
===================

8
9
10
11
12
13
14
15
16
- Allow people to choose to:
  - Reinstall a package every time they start Tails.
  - Stop reinstalling a package every time.

- Integrate this in:
  - The usual installation and removal process of a package (through
    Synaptic, another graphical tool, or APT on the command line).
  - The persistent storage configuration.

127.0.0.1's avatar
127.0.0.1 committed
17
- Provide a better replacement for *Synaptic*.
18
19
20
21
22
23
  [[!tails_ticket 15262]]

- We won't provide a way for people to specify which packages to install
  outside of the usual installation process of a package. We only ask
  people if they want to reinstall a package every time *after it has
  been successfully installed a first time*.
127.0.0.1's avatar
127.0.0.1 committed
24

127.0.0.1's avatar
127.0.0.1 committed
25
26
Flow chart
==========
127.0.0.1's avatar
127.0.0.1 committed
27

127.0.0.1's avatar
127.0.0.1 committed
28
<img src="https://labs.riseup.net/code/attachments/download/1925/asp-flow-installed.svg" height="auto" />
127.0.0.1's avatar
127.0.0.1 committed
29

127.0.0.1's avatar
127.0.0.1 committed
30
<img src="https://labs.riseup.net/code/attachments/download/1926/asp-flow-removed.svg" height="auto" />
127.0.0.1's avatar
127.0.0.1 committed
31

32
33
34
35
36
37
38
User interface
==============

Notifications for addition and removal
--------------------------------------

When the user installs a package either through the APT command line or a
sajolida's avatar
sajolida committed
39
40
graphical interface like Synaptic, a notification is displayed to let them add
or remove it from their list of additional software.
41

42
43
44
These notifications are triggered by APT hooks. In the backend, we would
answer <em>Yes</em> to all debconf questions.

45
46
47
48
49
50
51
52
53
54
### When a package is installed with a persistent storage unlocked

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/notification - add.png"/>

### When a package is installed with no persistent storage

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/notification - add without persistent storage.png"/>

### When a package is installed with a persistent storage locked

55
56
57
58
59
60
61
62
63
64
65
66
67
68
No notification.

This notification could have education purposes: to tell people about
this feature. But:

- People who have a persistent storage but don't unlock it, probably do
  this only sometimes and for a reason. They probably otherwise unlock
  their persistent storage most of the time.

- If they install packages with their persistent storage locked, they
  probably do it with their persistent storage unlock as well and would
  learn about this feature when it's most relevant for them.

So let's not bother them when it's not worth it.
69
70
71

### When a package is installed but it's impossible to have a persistent storage

72
When running from a DVD, virtual machine, or intermediary Tails.
73

74
75
76
To be displayed only once per session, not to bother people too much.

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/notification - impossible persistent storage.png"/>
77

sajolida's avatar
sajolida committed
78
79
80
81
### When a package is uninstalled

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/notification - remove.png"/>

82
83
84
85
86
87
88
89
90
91
92
Notifications when starting Tails with additional software
----------------------------------------------------------

If any additional software has been configured through the notifications from
the previous sections, these packages are installed automatically from the
persistent storage every time the user starts Tails.

### When the installation starts

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/notification - installing.png"/>

93
94
95
96
97
98
99
100
101
If the summary is too long (here 62 characters), use instead only:

*Installing your additional software...*

We added "*from persistent storage*" to inform better the mental model
of users and clarify that these are not downloaded every time from the
Internet. But we also made this clearer in the notification when
installing.

sajolida's avatar
sajolida committed
102
103
104
105
### When the installation succeeds

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/notification - installed.png"/>

127.0.0.1's avatar
127.0.0.1 committed
106
107
XXX: the configure button here is tricky to implement. Can we live without it?

108
109
110
111
112
113
114
115
116
117
118
Notifications of failures
-------------------------

### When the installation fails

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/notification - installation failed.png"/>

### When the upgrade fails

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/notification - upgrade failed.png"/>

127.0.0.1's avatar
127.0.0.1 committed
119
120
121
122
### When the configuration fails (addition to/removal from the package list)

XXX: please define

123
124
125
126
127
### When the *Additional Software* configuration GUI fails to do its work

* started standalone (from the Applications menu or Overview)
* started from the persistence wizard

128
129
130
131
132
Additional Software
-------------------

The list of additional software can be open from:

sajolida's avatar
sajolida committed
133
134
- **Applications**&nbsp;▸ **System Tools**&nbsp;▸ **Additional Software**
- **Applications**&nbsp;▸ **Tails**&nbsp;▸ **Additional Software**
135
136
137

Why both? See [[!tails_ticket 5521]].

sajolida's avatar
sajolida committed
138
139
140
But also when click on the gear button next to the **Additional
Software** feature in the persistent storage settings.

141
142
143
144
145
146
147
148
149
150
151
152
### If there is no persistent storage

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/additional software - without persistent storage.png"/>

### Before any package is added

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/additional software - empty.png"/>

### When some packages are already added

<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/additional software.png"/>

127.0.0.1's avatar
127.0.0.1 committed
153
154
XXX: please define what happens when clicking on the links "Synaptic Package Manager" or "APT on the command line".

155
156
157
158
### When removing a package

By clicking on the delete cross.

159
160
Removing packages from the list doesn't require any validity check.

161
162
163
164
<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/additional software - remove.png"/>

### If the persistent storage is locked

165
<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/additional software - locked persistent storage.png"/>
166

167
### It is impossible to have a persistent storage
168
169
170

For example, when running from a DVD or virtual machine.

171
<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/additional software - impossible persistent storage.png"/>
172

173
174
Persistent storage configuration
--------------------------------
175

sajolida's avatar
sajolida committed
176
177
- MUST allow a feature to have a "Settings" button.

178
179
180
- SHOULD modify the persistent storage configuration to replace the
  **APT Packages** and **APT Lists** features by a single **Additional
  Software** feature.
127.0.0.1's avatar
127.0.0.1 committed
181

182
183
- MAY replace the custom widgets of the persistent storage configuration
  by the following GTK3 pattern:
184

185
<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/persistent storage - configuration changed.png"/>
186

187
188
189
<img src="https://raw.githubusercontent.com/sajolida/tails-wireframes/master/additional software/png/persistent storage - confirm restart.png"/>

### Backend
190

127.0.0.1's avatar
127.0.0.1 committed
191
192
193
- MUST allow programmatically activating the ASP persistence
  feature when a persistent volume is unlocked. For example,
  through the command line or a DBus method call.
127.0.0.1's avatar
127.0.0.1 committed
194

195
196
- MUST allow triggering persistence creation and then activate a feature
  (ASP) programmatically.
127.0.0.1's avatar
127.0.0.1 committed
197

sajolida's avatar
sajolida committed
198
- SHOULD allow ASP to setup the feature between persistence creation and
199
200
201
202
  persistence feature selection.

Implementation notes
====================
203

127.0.0.1's avatar
127.0.0.1 committed
204
## Components interaction
127.0.0.1's avatar
127.0.0.1 committed
205

127.0.0.1's avatar
127.0.0.1 committed
206
<img src="https://labs.riseup.net/code/attachments/download/1924/asp-chart.svg" width="150%" height="auto" />
127.0.0.1's avatar
127.0.0.1 committed
207

127.0.0.1's avatar
127.0.0.1 committed
208
<img src="https://labs.riseup.net/code/attachments/download/1927/asp-persistence-setup.svg" width="150%" height="auto" />
127.0.0.1's avatar
127.0.0.1 committed
209

127.0.0.1's avatar
127.0.0.1 committed
210
[source](https://labs.riseup.net/code/attachments/download/1923/asp-chart.odg)
127.0.0.1's avatar
127.0.0.1 committed
211
212
213
214
215
216
217

### IPC

IPC between `tails-additional-software` (root backend) and `tails-additional-software-notify` (user session notification frontend, think about `notify-send` with actions support cf. https://developer.gnome.org/notification-spec/#basic-design) is really basic: display this notification and tell me the answer. I think the easiest way to do that is just to fork as amnesia with sudo, then check the returncode.

IPC between `tails-additional-software` and `tails-persistence-setup` carries "Persistence-setup, please setup persistence with ASP" and "ASP, you can go on". It could be done the same way, but it may be worth having a persistence-setup DBus service on the system bus (which we already though when considering integrating it in the greeter).

intrigeri's avatar
intrigeri committed
218
219
220
221
222
 - allow programmatically activating the ASP persistence
   feature when a persistent volume is unlocked:

           /usr/bin/tails-persistence-setup --no-gui \
              --no-display-finished-message \
223
              --force-enable-preset AdditionalSoftware
intrigeri's avatar
intrigeri committed
224
225
226
227
228
229

 - allow triggering persistence creation and then activate a feature
   (ASP) programmatically:

           /usr/bin/tails-persistence-setup --step bootstrap \
              --no-display-finished-message \
230
              --force-enable-preset AdditionalSoftware
intrigeri's avatar
intrigeri committed
231

127.0.0.1's avatar
127.0.0.1 committed
232
IPC between `tails-additional-software-configuration` (user session configuration interface) and `tails-additional-software` carries the list entries to remove from ASP. It may be done via `sudo` or via DBus system service, but I don't think it's worth it.