
Recently I switched to Ubuntu Touch as my daily driver for a phone. Whenever you change phone operating systems, there is a steep learning curve and an extended process of moving your digital life. If you use Android and Google, moving to another Android Google phone is fairly simple, or the same between iPhone devices. But if you switch from Android to iPhone, or iPhone to Android, or anything else to Ubuntu Touch, you have to manually move a lot of parts of your digital life. One thing that has been helpful, though, is that I run my own Nextcloud for phone backup, calendar, and contacts, so that was really easy with UT, as it has Nextcloud integration more or less built in. I could add one account in the system, and then allow other apps to access that account. Very handy.
One of the main app related problems with UT, at least for me, is the underwhelming browser. Don’t get me wrong, it browses the internet great. But doesn’t seem to have password storage integration, or various other features. In particular, I can’t remember the passwords for my 1800 (okay, maybe 120) websites that I have to go to for work, play, business, and life. So, I would use Firefox to save those passwords to my computer. Morph, UT’s web browser, doesn’t seem to have that function for some reason. E.g., I logged into a website, it doesn’t prompt me to save the password. I log out, and when I try to log back into that same website, it doesn’t auto-fill with any username or password, it doesn’t prompt me for one, it just sits, blank, at the login prompt. This is a real problem, and I don’t know how everyone else uses it without this feature.
My temporary work around is to use an app called UTPass, an app that is compatible with pass for password management. While it is not integrated into the Morph browser, it at least allows me to look up and copy my username and password so I can paste them into the login fields.
So the first thing that I thought I needed to do was to export my Firefox passwords. Turns out that I didn’t have to do that at all to reach my end goal. Keeping in mind that my end goal is to use UTPass, I needed the passwords to be encrypted with pass before I could export them to use with UTPass. So the first thing I really needed to do was install pass on my computer.
$ sudo apt-get install pass
Then I needed to set up a GPG key to use with it, with which I followed the prompts and named “aklu_pass”:
$ gpg –full-generate-key
And then initialize pass with that key:
$ pass init “aklu_pass”
Now that I have pass initialized, I could copy the Firefox passwords into it. The easiest way I found to do that was with a python tool called Firefox Decrypt.
https://github.com/Unode/firefox_decrypt/#readme
It is fairly straight forward, you run the script and give it the directory of your profile.ini file for Firefox, and choose the output format, in this case – pass.
$ python3 ./firefox_decrypt.py /home/alaskalinuxuser/snap/firefox/common/.mozilla/firefox/ –format pass
This python script pulls all of your passwords out of Firefox and dumps them into pass. You can check them by:
$ pass
Which should return a tree like output of all your websites. You can then zip up you .password-store folder with:
$ zip -r ./pass.zip /home/alaskalinuxuser/.password-store
To create the zip file you will need for UTPass. You will also need to export your GPG key so you can decrypt them in UTPass, which I did like this, obviously replacing KEYNUMBER with the actual key number:
$ gpg –export KEYNUMBER > public-key.asc
$ gpg –export-secret-keys KEYNUMBER > private-key.asc
Now you have three files, public-key.asc, private-key.asc, and pass.zip. These three files need to be copied to your UT phone, which you can use whatever method you prefer, but an easy one is the good old USB cable, but SSH/SCP is another good option.
Once you have the three files on your phone, in my case, in the Downloads folder, open up UTPass, and import both keys, and then import the pass.zip file through the UTPass settings option. And now you can view all of your passwords. You will need to type the encryption password each time to use this, so hopefully you picked something easy to type….
Linux – keep it simple.