Feature #17084
Make it easier to debug the Greeter
0%
Description
While working on Feature #16912 and Bug #15635, I found that the instructions in greeter.git/HACKING for testing the Greeter in a running Tails don’t work, because restarting gdm.service doesn’t restart the Greeter.
I found another way to test changes to the Greeter without rebuilding Tails:
- Boot Tails (in a VM) with
break=bottom
androotpw=<password>
kernel command-line options. - In the initramfs, edit
/root/usr/share/applications/tails-greeter.desktop
, replace theExec=
line withExec=gnome-terminal -- /bin/bash
. - In the gnome-terminal, log in as root with the root password set above:
Debian-gdm@amnesia:~$ su
- If you want to copy code via the clipboard from the host system, open the file you want to modify via gedit:
# Changing the DCONF_PROFILE is required to be able to save the file via gedit DCONF_PROFILE=user gedit /usr/lib/python3/dist-packages/tailsgreeter/gdmclient.py
- Remove all
self.__greeter
andself.__user_verifier
lines from the__init__
function from /home/user/projects/tails/config/chroot_local-includes/usr/lib/python3/dist-packages/tailsgreeter/gdmclient.py. These commands fail if run from outside a GDM session, i.e. from the gnome-terminal shell. - Exit the root shell and execute the greeter:
root@amnesia:/var/lib/gdm3# exit Debian-gdm@amnesia:~$ /usr/local/lib/tails-greeter
This starts a functional greeter, except that it won’t start Tails, because of the lines deleted in step 5.
I wanted to document this somewhere, so that I can find it when I have to debug the greeter again.
Also, we could make step 5 easier if we check whether an environment variable like “TAILS_TEST_GREETER” is set, and don’t execute the failing commands in gdmclient.py in that case - similar to the GDM_TEST_GREETER variable supported in gnome-shell, see https://bugzilla.gnome.org/show_bug.cgi?id=683725.
Subtasks
History
#1 Updated by segfault 2019-09-23 21:23:19
- Status changed from Confirmed to In Progress
Applied in changeset commit:tails|fb5f2bcc77925365cfdd8b7019c076da240a975a.
#2 Updated by segfault 2019-09-28 23:15:07
- Affected tool set to Greeter
#3 Updated by segfault 2019-09-28 23:16:35
- Status changed from In Progress to Confirmed
#4 Updated by segfault 2019-12-18 14:01:43
- Description updated
#5 Updated by intrigeri 2020-04-15 06:02:23
- Affected tool changed from Greeter to Welcome Screen