gui.mdwn 8.37 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
17
18
19
20
21
22
23
- 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.

- Provide GNOME Packages as a better replacement for *Synaptic*.
  [[!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/1886/asp-chart-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/1887/asp-chart-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"/>

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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"/>

Additional Software
-------------------

The list of additional software can be open from:

sajolida's avatar
sajolida committed
122
123
- **Applications**&nbsp;▸ **System Tools**&nbsp;▸ **Additional Software**
- **Applications**&nbsp;▸ **Tails**&nbsp;▸ **Additional Software**
124
125
126

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

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

130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
### 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"/>

### When removing a package

By clicking on the delete cross.

146
147
Removing packages from the list doesn't require any validity check.

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

### If the persistent storage is locked

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

154
### It is impossible to have a persistent storage
155
156
157

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

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

160
161
Persistent storage configuration
--------------------------------
162

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

165
166
167
- 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
168

169
170
- MAY replace the custom widgets of the persistent storage configuration
  by the following GTK3 pattern:
171

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

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

### Backend
177

178
179
180
- MUST allow querying for the activation of features (ASP)
  programmatically. For example, through the command line or a DBus
  method call.
127.0.0.1's avatar
127.0.0.1 committed
181

182
183
- MUST allow triggering persistence creation and then activate a feature
  (ASP) programmatically.
127.0.0.1's avatar
127.0.0.1 committed
184

sajolida's avatar
sajolida committed
185
- SHOULD allow ASP to setup the feature between persistence creation and
186
187
188
189
  persistence feature selection.

Implementation notes
====================
190

127.0.0.1's avatar
127.0.0.1 committed
191
## Components interaction
127.0.0.1's avatar
127.0.0.1 committed
192
193
194
195
196

<img src="https://labs.riseup.net/code/attachments/download/1877/asp-chart.svg" width="150%" height="auto" />

<img src="https://labs.riseup.net/code/attachments/download/1878/asp-persistence-setup.svg" width="150%" height="auto" />

127.0.0.1's avatar
127.0.0.1 committed
197
198
199
200
201
202
203
204
205
[source](https://labs.riseup.net/code/attachments/download/1881/asp-chart.odg)

### 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).

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.