Categories
Freedom and Privacy Tutorial Ubuntu Touch

How to set up Gitlab with Ubuntu Touch 2FA Manager App

I had been using Ubuntu Touch Authenticator app, but I wanted to try out the 2FA Manager app to see how that worked for me. The only problem was that I had never reset my 2FA stuff that I originally set up so this was my first time switching devices. It was easy, but it was also not documented. I hope this simple guide helps and perhaps the steps of this process also apply to other 2FA sites:

In your Gitlab account

  1. Log into your gitlab account
  2. Go to “Settings” under your top right avatar
  3. Go to “Account”
  4. Click the ‘Manage Two Factor Authentication” button
  5. Click the ‘Disable two-factor authentication’ button which will then warn give you this warning “Are you sure? This will invalidate your registered applications and U2F devices.”
  6. Select ‘Ok’ on warning screen

This will now present you with a screen and QR code where you will scan it and bring it into the Ubuntu Touch 2FA Manager app. So now let’s move to your ubuntu touch device…

On your Ubuntu Touch device

  1. Download / install tagger app if you have not already done so
  2. Download install the 2FA Manager app if you have not already done so
  3. Open the 2FA Manager App
  4. Open Tagger app and point camera at QR code and patiently wait… adjust camera position if needed until it registers the QR code. You will know this is working when the dialogue with “open url, copy to clip, generate qr code” buttons pops up
  5. Select ‘open URL’
  6. Add a description. This is just a friendly name that will help you remember what this key is for as you may build up many keys over the years.
  7. Press ‘Add’ button. You should now be taken to the 2FA Manager app to a screen with a 6 digit bold code and a purple progress meter that is moving. You will notice that each time the progress meter reaches the end, it will loop back with a new 6 digit number. You will also notice that if you tap this 6 digit code it will open it up and make it much bigger and easier to read and also give you the ability to copy this code to clipboard. Whichever way you prefer, these are the two ways you can obtain your 2FA codes and these codes are what you will use to log into Gitlab each time, and also to use to finish up your setup in your Gitlab account.
  8. Go back to Gitlab

Meanwhile, back at Gitlab…

  1. Look at your 2FA Manager app and grab the 6 digit code presented on the screen. But hurry! (dramatic music here) If you don’t grab it quick enough the next one will be generated. This is for security if you were wondering and limits the chance of someone stealing your stuff…
  2. Enter the 6 digit code into the ‘pin code’ field on your Gitlab 2FA setup page you should still be on
  3. Select ‘Register with two-factor app’ button
  4. Save your recovery codes: If all goes well you should now be presented with a ‘congratulations’ screen and a list of 10 random looking letters and number strings with bullet points. These are your recovery keys so save them somewhere safe. I recommend the keypassxc app as it’s a really great password manager for your laptop / desktop ubuntu environment.
  5. After you have these recovery codes safely stored, press ‘proceed’. If you got an ‘invalid code’ message, it probably means you weren’t fast enough with steps 1-3 above so repeat but faster 😉

You should now be brought back to your gitlab Account page and good to go. You can probably use this workflow above to do 2FA setups in other systems as well.

Categories
Business PrestaShop Technology Tutorial Ubuntu

Setting Up Prestashop on Digital Ocean Ubuntu Server

The background to this post is that I had a sudden need to ‘figure out shopping carts’. I understood from times past it probably isn’t wise to have a shopping cart that intends to scale on a shared cpanel host, even though it’s pretty dead easy to set that up. I decided this was the day I had to learn how to set up an Ubuntu server myself and face it until I knew enough to do so.

I started with Digital Ocean because I recall testing a ‘droplet’ and being surprised how easy and nice it was. They also support UBports and their servers so I appreciate that. I got a promotional code to try it out and glad I did. I think it’s a really nice solution.

The real purpose of this tutorial is to make sure I don’t forget all the things I learned and also to leave some bread crumbs for others who might want to do the same thing.

I landed on prestashop because it’s very open software, very flexible, been around for many years, and has a bunch of modules that should be quite helpful to roll out store after store.

The idea of this server is that it will run the ‘main business website’ as well as the shopping cart.

Any time you see ‘123.123.123.123’ this is your IP address for your server. Replace it with your actual one, of course.

You should also have a nice password manager set up to save yourself much time and pain as you learn. I recommend keepasxc

Let’s get started

Big Step 1 – Set up the Digital Ocean Droplet

  1. Initiate your server / droplet
    I won’t give detailed instructions here because there is lots of documentation out there. One thing I will say is that i used an Ubuntu 18.04 LTS server with 2GB of ram to make sure I had enough ram to do what’s needed for both the main site and prestashop.
  2. Immediately set up your A records to point to your domain.
    In Digital Ocean (“DO”) it’s pretty easy but I don’t have any links to it. Just go to ‘networking’, add your domain, then create your domains, subdomains, etc, and then point the A record to the Server you just initialed in step 1 above. This step is important to do right away because propagation of the name server to the IP address / box takes an hour or more sometimes depending on where you are.
  3. Set up your SSH keys
    Before you install the droplet, make sure your SSH keys are set up properly because you are going to use them a lot in the terminal. Here is some ssh tutorial. Note that it’s a little hard for me to find SSH stuff in the DO backend so for the records it’s at settings / security and then a tab (I think…)
  4. SSH into your new server
    ssh root@123.123.123.123
  5. Set up a non-root user account on the server
    This is a nice detailed tutorial on this if you’d like here.

Otherwise, this summaries it:

  • Log into the server as root: ssh root@123.123.123.123
  • Make sysadmin user: adduser sysadmin and follow the prompts (should be password prompt and then a few questions)
  • Add new user to the sudo list: sudo usermod -aG sudo sysadmin
  • Switch to new sysadmin user: su sysadmin
  • (Optional) Test the new-found powers by running this and then cancelling: sudo dpkg-reconfigure tzdata

Helpful note
If you find you are not getting prompted for the questions after running the adduser command, it might be because you accidentally ran useradd command like me… weird how it works both ways…

  1. Update the server’s packages
    sudo apt update
    sudo apt upgrade

Big Step 2 – Install Apache

  1. sudo apt install apache2
  2. Check to see if this triggered new packages to upgrade: sudo apt update
  3. If packages need updating: sudo apt ugrade

Big Step 3 – Install PHP

There were about a million different tutorials out there that worked but were pretty hard. At the end of all that I found this which seems to work just fine and dandy, so hopefully it works for you:

  1. Add PPA: sudo add-apt-repository ppa:ondrej/php
  2. Update packages: sudo apt update
  3. Install php (adjusting version and number as you over time and making sure the version is correct for Prestashop / other software): sudo apt install php7.3
  4. Test php version: `php -v’
  5. Add the modules required for Prestashop (adjust for whatever else you are installing): sudo apt install libapache2-mod-php7.3 php7.3 php7.3-common php7.3-curl php7.3-gd php7.3-imagick php7.3-mbstring php7.3-mysql php7.0-json php7.3-xsl php7.3-intl php7.3-zip
  6. Open this file (adjust PHP version as needed / as appropriate): sudo nano /etc/php/7.3/apache2/php.ini
  7. Add these lines of code. Truthfully I don’t know where you are supposed to add them so I added them near the bottom in the first space from the bottom I could find, but not at the very bottom. Adjust as needed:
file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago
  1. Restart apache2 after doing php changes (now) with this sudo systemctl restart apache2.service (I’m not 100% sure this step is required, but never hurts!)
  2. Test that PHP is working by:
  • Creating this test file: sudo nano /var/www/html/phpinfo.php
  • Adding this info to the file and saving: <?php phpinfo( ); ?>
  • Going to the URL where this file is where you should see a boring PHP info page: 123.123.123.123/phpinfo.php
  • Deleting the file if the test is good: sudo rm /var/www/html/phpinfo.php

Big Step 4 – Install Mariadb

Apparently mariadb is like mysql but getting more love as we move into the future. I’m just following along.

  1. Create a database name and save it to your password manager. I’m going to use ‘presta_db’ for this. You can call it what you’d like.
  2. Create a database user name and a password and do the same in the password manager.
  3. Install mariadb: sudo apt-get install mariadb-server mariadb-client
  4. Do a security upgrade on it and make a password, etc for database: sudo mysql_secure_installation. Follow the prompts with very likely these answers: Enter, Y, password, repeat password, Y, Y, Y, Y

Big Step 5 – Create your Database in Mariadb

Assuming you did the steps above in step 4, you should now be able to log into your database area with your new password you created. I don’t know if you HAVE to use CAPS for the maria commands, but I do just for visual aid, which is probably why we see this around town…

  1. Log into mariadb: sudo mysql -u root -p
  2. Create your database with the database name you saved to your password manager above: CREATE DATABASE presta_db;
  3. Create the user and password for the database replacing username and password in the following code with yours between the apostrophes: CREATE USER 'username_here'@'localhost' IDENTIFIED BY 'new_password_here';
  4. Do whatever this does, lol: GRANT ALL ON presta_db.* TO 'username_here'@'localhost' IDENTIFIED BY 'same_password_here' WITH GRANT OPTION;
  5. Flush stuff: FLUSH PRIVILEGES;
  6. Exit stuff: EXIT;

Big Step 6 – Create the Directory Structure for a Shared Server Environment (Optional)

First a good resource for hosting multiple domains on a single ubuntu server.

I will provide the directory structure I used for both the ‘standalone’ setup and the ‘shared’ setup (multiple domains on one machine). You can choose and adjust how you like.

  1. Make the full path to the place where you plan to put Prestashop on a shared server environment:
  • sudo mkdir -p /var/www/shop.domain.com/public_html
  • repeat this command for each domain, changing the shop.domain.com/ part to whatever is appropriate

On a standalone environment: sudo mkdir -p /var/www/html/domain.com

Bit Step 7 – Set up your Virtual Host Files in Apache for Each Domain (Shared server environment)

This blog really says it all resource, except, you don’t have to mess around with that /etc/hosts stuff that he talks about at the end. I did that and messed things up on DO environment… The key with this section here is to make sure (in whatever way you are most confortable) that you have a ‘domain.com.conf’ file sitting in the /etc/apache2/sites-available/ directory with the correct domain information in that file and saved. If you don’t, you’ll have pain. The nice part is this wasn’t as scary as I first thought it was. The key items you’ll need are probably these for a basic setup, and this worked fine for Prestashop for me:

ServerName domain.com
ServerAlias www.domain.com
ServerAdmin yourname@youremail.com
DocumentRoot /var/www/domain.com/public_html/prestashop

Lets Encrypt (awesome free SSL cert system) will do ‘the rest’ for you in an upcoming step to deal with port 443 / https:// if you were wondering…

Here is a summary of what I do showing two domains on a shared environment getting their own conf files which we can then edit:

Copy default template for domain 1: sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/shop.domain1.com.conf

Copy default template for domain 2: sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/domain2.com.conf

sudo nano edit each of the above configs with:

  1. Uncomment ServerName line and add correct one:
  2. Add ServerAlias for the www entry below it (not showing in default for some reason, so type it in ServerAlias www.domain.com )
  3. Update admin email
  4. Update document root to /var/www/shop.dailynow.ca/public_html
  5. Repeat for conf files for any other domains on server
  6. Reload Apache just because: systemctl reload apache2.service
  7. Disable the default conf file: sudo a2dissite 000-default.conf
  8. Enable domain 1: sudo a2ensite shop.domain1.com.conf
  9. Enable domain 2 (if applicable): sudo a2ensite domain2.com.conf
  10. Enable re-write mode (which drops some code into your conf file above): sudo a2enmod rewrite
  11. Restart Apache again for fun: sudo systemctl restart apache2.service

Big Step 8 – Putting Prestashop on the server

  1. Install the unzip tool for dealing with the Prestashop zip file: sudo apt install unzip
  2. Navigate to a safe place for doing stuff: cd /tmp/
  3. Verify that you are updating the link in the following code to the latest version. You can verify by going to thei releases page, clicking the latest, right clicking on the zip file and selecting copy link location and pasting into url in code here:
  4. Download the goods! wget -c https://github.com/PrestaShop/PrestaShop/releases/download/1.7.6.7/prestashop_1.7.6.7.zip
  5. Create a prestashop empty directory and unzip the file you just downloaded in step 4 into it: unzip prestashop_1.7.6.7.zip -d prestashop/
  6. move up a level to be able to perform next ‘move’ cd ..
  7. Move the whole directory you just made to the appropriate directory you created in ‘Big Step 6″ above. Adjust as required to your situation: sudo mv prestashop /var/www/shop.domain.com/public_html/
  8. Assign the correct ownership to the prestashop directory (adjust path as fitting for your situation): sudo chown -R www-data:www-data /var/www/shop.domain.com/public_html/prestashop/
  9. Assign the correct permissions to the same directory: sudo chmod -R 755 /var/www/shop.domain.com/public_html/prestashop/

Big Step 9 – Lets Encrypt

I feel, although I’m not sure, that this is the right place for this section: after everything is setup and just before installing Prestashop. When you start the Prestashop installation process it passes sensitive data around like passwords so I feel it should be set up here. However, I’m going to write a warning here, and then repeat it later: you must enable SSL in Prestashop itself in the admin area or things are going to go really bad. SUPER Special thanks to whoever you are author of this blog.

At this point, too, you’ll need to make sure that your domain has propagated (which is why I put the nameserver stuff at the very top). If it hasn’t propagated, Letsencrypt will fail it’s process on the last part. Here is how you can check to make sure you’re ready to continue:

  1. From inside your server, check your current ip address with ifconfig
  2. In a new terminal window (not the server itself but your own PC in a different network) ping your domains individually: ping domain1.com ping domain2.com
  3. Make sure the bounce ip address from ping matches the ifconfig ip address of your server / droplet in step 1 above.

If you get a long hang or failed ping, probably your domain hasn’t propagated yet. You’ll have to wait as I don’t know of another way to speed things up, except I believe you can reduce the TTL rate from 3600 down but that may have adverse affects on your server resources. Study this topic yourself if you run into it.

Bonus Tip
You can find out a bunch of cool stuff about your domains and propagation with DIG command dig domainname.com .
This command seems to be more powerful than propagation and can at least tell you if things ‘should’ propagate correctly before it actually propagates.
Here are two cool ones:

  • Find out the name server associated with your domain: dig domain.com NS
  • Check out that an A record is setup and working: dig domain.com A

Install LetsEncrypt

  1. Add the PPA: sudo add-apt-repository ppa:certbot/certbot
  2. Install the certbot: sudo apt install python-certbot-apache
  3. Test the syntax of, what I believe, are the conf files and apache conf files: sudo apache2ctl configtest. If you get an ‘OK’ message, continue. If you change anything in your conf files, don’t forget to reload Apache after sudo systemctl reload apache2
  4. Enable the firewall: sudo ufw enable
  5. MISSION CRITICAL Right here and right now, be sure you allow the ssh rule in the firewall rules, otherwise, you’ll get locked out of your server like I did. Thankfully with DO if you do get locked out you can go in through their virtual console, but still…So, simply run this line of code to open up SSH in the firewall: sudo ufw allow ssh
  6. Let https traffic through so that Letsencrypt can do its thing: sudo ufw allow 'Apache Full'
  7. Check the firewall status which should show active, as well as show BOTH 22/tcp and Apache Full enabled for both ipv4 and ipv6. Don’t continue until these are both present: sudo ufw status
  8. RUN IT sudo certbot --apache -d your_domain -d www.your_domain
  9. Most questions are easy to answer. Choose option 2 for normal and higher security forcing redirects to https. Note! It seems after you choose this it’s forever impossible to connect with regular http:// on port 80. This may be important? Not sure…didn’t affect prestashop.
  10. Probably you should test your domains here to make sure https:// is working. I didn’t write any steps for this as I figured Prestashop will be a good test coming soon…
  11. Repeat steps 8-10 for other domains (ie. domain2.com) if required adjusting as appropriate
  12. When done all your domains, do a dry run renewal to make sure renewal process is working well too: sudo certbot renew --dry-run

Bonus Section! How to get rid of Letsencrypt Stuff When everything goes bad…

Sometimes we make mistakes and things go wrong with SSL certificates. If you want to rule out Letsencrypt and your certs from the equation, it’s not entirely simple to get it out of your system, as I thought it was. So, here is your bonus section in case you need it nearby:

  1. Disable the letsencrypt conf file: sudo a2dissite prestashop-le-ssl.conf
  2. Totally uninstall letsencrypt (‘certbot’) sudo apt remove --purge python-certbot-apache
  3. Purge these dirs of their certs:

rm -rf /etc/letsencrypt
rm -rf /var/log/letsencrypt
rm -rf /var/lib/letsencrypt
rm -rf /path/to/your/git/clone/directory (seemed not applicable)
rm -rf ~/.local/share/letsencrypt (seemed not applicable)

  1. Wipe all the ssl conf files (which stuck around after wiping the above) in /etc/apache2/sites-available/ with something like:
    sudo rm shop.domain.com-le-ssl.conf
    and sudo rm shop.domain2.com-le-ssl.conf
  2. Restart apache: sudo systemctl restart apache2.service
  3. Restart installation process again if applicable sudo apt install python-certbot-apache

Big Step 10 – Installing Prestashop Via Browser

Go to your var/www/domain.com/public_html/prestashop directory and you should now see Prestashop magically start to do stuff if everything above went well.

You will walk through the install steps and connect the database to the mariadb database name, database user, and database password you created in Big Step 5 above. You will also create a shop admin user and password in the process. When the process is finished, it will warn you to delete your install directory. You cannot log in to your admin area without first deleting this, or, renaming this directory.

To delete it:
Change to where directory is: cd /var/www/shop.domain.com/public_html/prestashop
Remove install directory and all its contents: sudo rm -r install/

To rename it:
Change to where directory is: cd /var/www/shop.domain.com/public_html/prestashop
Move it (which actually renames it), giving it whatever name you’d like: sudo mv install/ install_123abc

Now go to your Prestashop admin area which will be something like domain.com/admin128r78575 (some random characters after the word admin). By the way, you can always find this by navigating to the prestashop directory and just looking for it. This is a nice tip if things go bad 😉

Log in with your shop admin user / password

STOP! Enable and Force SSL HTTPS:// NOW! Do not wait, wonder, etc. If you don’t enable this, things will be bad because your letsencrypt SSL certs are set up and forcing HTTPS:// traffic meaning you’ll never be able to see your shop from the outside without this step. Here is the link again to the post

Note If you happen to get this error while installing Prestashop, you can safely continue as it reportedly does not mess anything major up:

PrestaShop 1.7.5.0 install reports that:
To get the latest internationalization data upgrade the ICU system package and the intl PHP extension”

This is a post I found which indicated this.

Oh, you probably want to rename your Presta-generated admin login directory because it probably made a weird one like admin37dumj777 which means you’d have to log in to your back end at domain.com/admin37dumj777. I did this with this command: sudo mv /admin37dum777 newadmindirectoryname/ which thus ‘moves’ it, or more accurately, renames it and doesn’t move it at all since we didn’t actually change its location. Nice trick, eh?? Now you can log in at domain.com/newadmindirectoryname/

Concluding Comments

I’m tired. That was hard. I hope it helped at least one person besides me. Have a nice day!

Categories
Tutorial Ubuntu Touch

Flashing Ubuntu Touch to your Pinephone’s EMMC memory

You might have already read my first round of ‘flashing 101’ when I successfully flashed Ubuntu Touch to and SD card making it possible to boot the Pinephone that way with Ubuntu Touch. That first blog is a bit more messy because I was learning so in fact, this post here might also help you with flashing to an SD card as it should be more clearly written. If I had more time I’d clean them both up but I don’t so yeah…

The next step in my learning is to figure out how to flash / copy ubuntu touch onto the pinephone’s EMMC (built in) memory. This should make it run faster. There wasn’t a step-by-step that I could find and so I guess I have to write it. Nice folks in the pinephone telegram group said that I would follow a similar method as flashing to the SD card (see my detailed step-by-step on that here so that hopefully is true. Let’s try…

1. Plug in your Pinephone

Unlike my other tutorial, you’ll need the device plugged into your production machine from where the image will be coming.

2. Get latest image

Choose the latest Pinephone image from this page. I choose stable usually but as of today ‘stable’ is a figment of our imagination 🙂 Save it somewhere memorable and probably smart to put it in a dedicated directory so you can run commands more simply and safely. I just realized there is a bmap file sitting with this image download on this page. This could be useful and relevant soon as you read on…

3. Get setup with BMAP

You can just follow my detailed blog if you’d like. If you don’t know what it is, then you probably want to do this.

4. Confirm the source of your ubuntu-touch-pinephone.img.xz file

The file you downloaded in step 2 above which you have on your computer. In my case it’s going to flash from my download directory in my dedicated ‘pinephone_flashing’ directory so mine looks like this:

~/Downloads/pinephone_flashing/ubuntu-touch-pinephone.img.xz

5. Put Pinephone into ‘Yumi Mode’

I didn’t know what else to call this so I named it ‘Yumi Mode’ since that’s the name of the UBports Robot Mascot… I tried to simply plug in the pinephone and do this work but it won’t recognize anything. Thankfully I had read some other tutorial about how to get into this mode. Here’s how

a) Assure device is powered off (you can push / hold power button for about 5 seconds)
b) Press / hold power and volume up buttons together for about 6 or 7 seconds.

If successful, you should start to see a trainload of partitions start to load in your file manager (Nautilus).

6. Identify the destination path to the EMMC

If you’ve done my other blog where you install Ubuntu Touch to the SD card this time we’ll do the same thing but point the destination to the EMMC memory.

  • Hit the super key to the left of the space bar
  • Type ‘disks’ to open the ‘Disks’ utility. You should now see two items related to UT in the left pane of the ‘Disks’ app:

‘Drive | JumpDriv e microSD’

and

‘Drive | JumpeDriv e eMMC’

  • Click the ‘Drive | JumpeDriv e eMMC’ on the left pane
  • Take the path from the ‘Device’ path. In my case it looks like this “Device dev/sdc” but yours can – and very possibly will be – slightly different in the last letter. You can actually just highlight it and copy it from there

path: /dev/sdc

This is a great way to visually identify and confirm which mount point is your eMMC which will help you quickly deal with unmounting stuff in the next section

7. Unmount the partitions on the eMMC drive

If the drive is ‘fully ejected’ by Ubuntu, you will probably get this error when you run the final flashing command:

bmaptool: ERROR: cannot open destination file ‘/dev/sdc’: [Errno 123] No medium found: ‘/dev/sdc’

A reboot of the device again and putting it into ‘Yumi Mode’ again might fix it for you if you are lucky – once this worked for me – but that was it. I do not believe this can be done reliably and thus you should proceed with the command line method. It’s really not that hard if you work together with the Disks utility.

The reason why the ‘eject’ button in File Manager (Nautilus) doesn’t work for this purpose is because ‘it uses udisks ctl which both unmounts and ejects the partition’. We only want unmount, not eject, you see. So, we must ‘terminally unmount’ these as follows:

First, run the mount command which will show you (truthfully) what drives are (actually) mounted on the system. For me these were all located at the very bottom of the terminal output list.

You can, however, in the Disks utility, click through each partition and see at the bottom ‘mounted’ or ‘not mounted` or ‘unkown’ and compare against the terminal output to gain further confidence that you are unmounting and flashing to the right place. The Pinephone image has a mixture of all of these, it seems, so probably better to just manually unmount everything with the terminal. It’s really easy once you identify the actually-mounted drives you just run:

sudo umount /dev/sdc2' sudo umount /dev/sdc4′
etc
etc

**Tip **: If while running the final flashing commands you get this error:

bmaptool: ERROR: the image file ‘/home/wt/Downloads/ubuntu-touch-pinephone.img.xz’ has size 826.3 MiB and it will not fit the block device ‘/dev/sdc3’ which has 1.0 KiB capacity

You are probably writing to a partition like I did instead of the actual device. You probably put in /dev/sdc3 instead of /dev/sdc as an example.

8. Run the flashing command

This assumes you have alread set up and read and understand my blog above.

Format:

sudo bmaptool copy --bmap ~/path/where/your/bmap/file/is/located /path/where/your/image/is/located /path/to/memory/device

My actual example:

sudo bmaptool copy --bmap ~/Downloads/pphone.bmap ~/Downloads/ubuntu-touch-pinephone.img.xz /dev/sdc

Worked for me! Hope it works for you too 🙂

Categories
Business Freedom and Privacy Life Skills

Starting a Company Right with LibreOffice Docs

If you are at a company at the startup phase, and you want to make sure that the company isn’t plagued by proprietary office documents, and to make sure that everyone knows the reason *why* this matters, I have created the attached documents. I will also paste the raw text into this post so you can know what’s in the documents.

You may need to send a very stern and heartfelt email with these documents (edited to your liking) to the Founders of a company to show them that you aren’t trying to make life hard but actually better. Many people who are wrapped up in closed software simply don’t understand they are victims.

I hope these prove to be valuable to you and your startup and that free software is further advanced as a result.

WORKING WITH OFFICE DOCUMENTS AT NEWCO

Working with office documents such as spreadsheets and text documents is fundamental to every business. Here at NewCo, we only work with office document software that respects our privacy and the privacy of those with whom we communicate on a day-to-day basis. By operating in this way, we assure that no one at NewCo (or outside) is forced to purchase expensive or unethical software to perform the task at hand. It also future-proofs NewCo against needs that may require wholesale adjustments to documents and / or implementations of business systems.

What this means on a practical level is that every spreadsheet and text document created, is done so in LibreOffice. LibreOffice is distributed on your Ubuntu operating system distribution and also on many other distributions in the world. LibreOffice also has the capability of opening proprietary software and saving to their formats.

Creating a New Office Document

  1. Open LibreOffice
  2. Select the type of document you want to create from top left icon in menu
  1. Click File / save or ‘control + s’ and it will automatically save in the correct (and ethical) format

Converting Proprietary Documents to LibreOffice

If someone sends you a document in a closed/proprietary format (such as Microsoft’s ‘Word’ or “Excel”) which is to be used for any business purpose whatsoever, especially on an ongoing basis:

  1. Open the document in LibreOffice
  2. Save the document ‘file / save’ or ‘control + s’
  1. If /when a warning appears, accept the ODF option. This will instantly convert the document to a format that works in LibreOffice. Most of the time there is no material damage to the formatting but if there is it is usually a quick fix.

Outbound Company Documents

Default to PDF – Every Time

In the event that someone needs a document from us, we should, unless asked otherwise, always provide the information / document in PDF format. There are three major reasons for this:

1. Security: this is a step way to help make sure information sent from NewCo is not manipulated on the other side (it’s an image file life a photo at its core).

2. Branding and Marketing : companies and their employees who send information in editable documents display their lack of professionalism to the recipient which is something we never want to do from the first day. Sending an editable office document . When someone in business sends a ‘Word or Excel” document, it screams “mom & pop operation” and immediately shows they are not a serious operation which will put NewCo in an inferior brand position.

3. Supreme Accessibility: PDF is one of the only formats that is able to be opened and viewed reliably, and with good formatting on any device on earth.

The good news is that in LibreOffice, this is dead easy: there is a one-button PDF creation tool in the menu. 

Creating a PDF Office Document

  1. Open Document in LibreOffice
  2. Click the one-button PDF creation tool
  1. Name it and save it

Increase the PDF Security with a Password (Optional)

The greater news is that by choosing ‘file’ and ‘export’ (instead of the one-button option above) you can easily export the same PDF with a password so that the person opening can only open it with the password you provide them, which further protects the data we send out and puts NewCo a further step above other companies in terms of quality presentation in front of others and in terms of security.

Outbound Company Documents As LibreOffice Only

In the event an external party needs a document that they need to manipulate:

  1. Attach the appropriate LibreOffice document in the LibreOffice format (ie. .odt, .ods)
  2. Copy and paste the following message into the body of the email which explains what’s going on and why:

+++++

I have attached the document you requested in LibreOffice format – a free, robust and ethical office document software suite. If you don’t already have the software, you can download it (for free) here and you and your company can benefit from it: https://www.libreoffice.org/download/download/

+++++

Outbound Company Documents as LibreOffice and Proprietary

If absolutely needed and you deem the recipient to be a ‘lost cause’ (there are many out there) then you can also pre-convert the document to a Microsoft format using LibreOffice and attach that as well with a modified version of the comments.

  1. Attach the appropriate LibreOffice document in the LibreOffice format (ie. .odt, .ods)
  2. Convert the LibreOffice formatted document to Microsoft’s proprietary format by performing a ‘file / save as’
  1. Attach the proprietary format to the email as well
  2. Copy and paste the following message into the body of the email which explains what’s going on and why:

+++++

I have attached the document you requested in LibreOffice format – a free, robust and ethical office document software suite that our company has embraced. If you don’t already have the software, you can download it (for free) here and you and your company can start benefiting from it: https://www.libreoffice.org/download/download/. I have also attached the document as a Microsoft format for the sake of time as I realize many companies out there are still paying for and using it.

+++++

Categories
Technology Tutorial Ubuntu Touch

How to do an Ubuntu Touch Video Screen Cast Recording

Making a video screen cast of your Ubuntu Touch (“UT”) device is a bit difficult as of the date of this blog post, however, thankfully, there is a way to do it with a bunch of scary terminal commands.

This is pretty technical, but is probably the only way (for now) to do this. Special thanks to Amolith who forwarded to Joe (“in here”) who then forwarded it to me. The power of free software communities at work!

First, I’ll just give you the commands in case you are already familiar enough with terminals and commands. Then, I will provide detailed how-to to follow.

Record a big raw video file in interesting .raw format

EDIT 20/06/21
This first command has been updated to reduce ‘terminal weirdness’. Now it works quietly in the terminal. Special thanks to Rodney for that excellent improvement.

adb exec-out timeout 120 mirscreencast -m /run/mir_socket --stdout --cap-interval 2 -s 384 640 > ubuntu_touch.raw

Convert it to ‘normal’ format (mp4) with ffmpeg tool

ffmpeg -f rawvideo -pix_fmt rgba -s:v 384x640 -i ubuntu_touch.raw -filter:v "setpts=2*PTS" ubuntu_touch.mp4

I plan to give a few more how-to details next by editing this blog post but for now I at least wanted it logged somewhere where myself and others can easily find it.

Enjoy

Tutorial – How to actually do it.

Before you begin

I would recommend creating a directory / folder just for doing this stuff. Then, you will navigate in your terminal to this directory. That makes sure that all the video is dumping in a place where you’ll be able to find it and work with it easier. Otherwise, your terminal might autonomously dump it an undesired location (your Home directory if you left everything default…). Once you have created this directory, navigate to it with the terminal’s ‘cd’ command. If you don’t know how to do that, take a few minutes to search and learn? It’s a good life skill and you can brag about it at the coffee machine or water cooler…

Now that you have the scary command line codes above ready to copy and paste, here’s how you do it and what to expect.

First, you’ll have to make sure you have adb setup on your ‘production machine’ (the machine that is recording the Ubuntu Touch output video. You should be ok to just do the usual sudo apt install adb and then perhaps you’ll need to be in ‘Developer mode’ to do all this. You might find that your system already has adb. If so, it will tell you that your version is up to date, etc and you can continue. If you need either of these or find it’s not working right, this blog has a lot of good info in one place. Most should be current still at the time of this post.

Next, plug in your UT device and get ready to record. Probably a quick test video is wise, by the way, before you start recording a long meaningful video.

Next, run the first command above by copying/pasting into your terminal. You will see this (or something very similar) in the terminal. Just pretend this means “your raw video is now recording to your production machine” because that’s what’s happening even though you can’t see it:

daemon not running; starting now at tcp:5037

daemon started successfully

When you are done recording, go back to your terminal and press ‘control C’ in to stop the process. You will see absolutely nothing except your ^C. Just pretend this means ‘Your raw video file has now stopped recording and is sitting in the directory where you started it”.

Finally, you’ll need to convert the raw video to a human-usable format – and probably mp4 is what you’re looking for which is why the above command is setup the way it is. Note that if you want to do any other million different things with your video work, you could study the power of ffmpeg and do whatever you like with formats, resolutions, etc, etc….

Now, in your terminal after you run the converting command, you are going to see a lot of ‘stuff’ in your terminal. I’m not going to even paste it here because there is so much. I’m also not going to pretend I know what any of of it means. Just be aware this is ‘normal’.

Once complete you should now have a .raw video and a .mp4 video in your screen casting directory.

Double click your .mp4 file to make sure it’s working and enjoy your new Ubuntu Touch video screen recording.

Categories
Life Skills Parenting Technology Tutorial Ubuntu

Making Roblox Work on Ubuntu in Windows 7 on Virtual Box

IMPORTANT! THIS BLOG POST IS BEING TESTED NOW AND NEEDS SOME WORK. I EXPECT TO UPDATE / IMPROVE THIS AT LEAST ONE MORE TIME. IT’S HERE JUST FOR TESTING PURPOSES. NOTE ALSO THAT AS OF TODAY, EVEN IF YOU GET THIS ALL DONE YOU COULD GET THE SAME ‘KICKED BECAUSE OF WEIRD BEHAVIOUR’ MESSAGE (OR WHATEVER IT’S CALLED). OF COURSE, FEEL FREE TO TRY IT OUT AND LEAVE COMMENTS WHILE I’M ALSO CHECKING IT! 🙂

0. Background

Kids wanted roblox. I hate windows. Roblox only works on Windows. Therefore by deduction, I also hate Roblx. They made their setup so you can play only on windows, android and maybe ios (never checked). But no linux.. what? Serious? A goofy downloadable plugin-app-game kind of thing in 2020? But let’s move on. The fact is, I compromised and made a concession that this setup will be only for this one box for this one purpose and that’s it. I had an old windows 7 machine sticker on one of my ubuntu machines.

1. Find a windows 7 cd rom or some ISO..somewhere…somehow…

Actually this step probably took a whole day. Hadn’t done this in years and windows is so lame that you have to buy their operating system (which isn’t worth paying for) and yeah. So I found some random link online and downloaded windows 7 .iso file professional to match my windows sticker (legitimate key). The fact they even made it hard to download something you already paid for was additional fuel for my Windows fire…

2. Download Virtualbox on Ubuntu

I think this is in the software centre in most Ubuntu Distros. Just search it, install it. Tip: in ubuntu software centre you need to type the whole word for it to show up easily, so ‘virtualbox’ instead of ‘virtual box’

3. Install Windows on Virtualbox

Just start up a “new” machine and point it to your downloaded ISO above. Do the usual windows install that we used to do back when we were slaves…I just accepted all the default suggestions for setting up the box and then adjusted them later. This helps assure a successful install, I believe.

4. Install Guest Additions

This section I’m breaking into two pieces because I’m not 100% sure what’s best. I ‘think’ it depends on what Windows you are using as to whether you need to install guest additions in safe or ‘regular / unsafe’ mode. At least, that’s what my hours of web-searching taught me… So, you can ‘try’ the regular unsafe mode (skip ahead) or, you can do ‘safe mode’ which takes longer and is more annoying. In either case, some of the steps / process might help you along the way so maybe worth a quick read.

A. Installing in ‘Safe’ Mode [this section needs checking / testing]

If you already tried installing guest additions in ‘unsafe mode’you might need to remove guest additions before trying again in safe mode. That’s what I did, anyway. Let’s get this done:

  • When windows is booting you press F8.
  • Choose ‘safe mode with networking’
  • In the Virtual box menu in guest machine window, go to the ‘Devices’ menu
  • Insert Guest additions from bottom of the drop down menu
  • go to ‘start’ menu then ‘my computer’ and the CD rom (in windows)
  • in the ROM directory, double click ‘vboxwindowsadditions-amd64’ (assuming you are 64 architecture…) and a wizard should start
  • Check the ‘direct3D support (experimental)’ checkbox
  • Click ‘install’
  • You may get ‘trust Oracle?’ messages. Even if they can’t be trusted it’s easier to check the box and move on. After all, this is already a highly questionable game and enterprise…
  • Reboot? yes
  • I have notes that said I got a message like “Accept ‘basic 3D’ but I can’t confirm. If you get this, I think you should accept it…
  • After machine comes back, skip ahead and do all the 2D and 3D steps in section below

Here is a helpful [link](this link helped: https://forums.virtualbox.org/viewtopic.php?t=55226) by the way

B. Installing in ‘Unsafe’ Mode

This part got me bad. I also had no idea about ‘Guest Additions’ somehow, so this turned out to be a good learning experience. What ‘guest additions’ does is basically install this big package which gives you more direct and quality connections to the host machines hardware. Before installing I was getting all sorts of video card driver errors. When I opened Roblox Studio it was asking to upgrade to OpenGL 2.0 or higher.

To do this step it was as simple as going to ‘Devices’ and ‘install guest additions’ and walking through the steps. Then it opened a wizard on Windows and walked through the install of the guest addition stuff. Finally it asked for a reboot and when it came back things were already working a bit better. But I was still getting driver errors on Roblox Studio…this ultimately froze the program and demanded to close program which I did. I noticed also that in my ‘device manager’ and then ‘display adaptor’ now it’s listing ‘virtualbox graphics adapter’ which should be best since it’s grabbing host hardware. And this is why I ended up doing all the steps in the ‘safe mode’ section above…

check to see if 3D acceleration is enabled by opening ‘run’ and typing ‘dxdiag’. This link will help if that sounds hard. You should see 3D acceleration as ‘enabled’.Try a round of Roblox? 🙂

5. Enable 3D acceleration in Virtualbox

This one sucked another hour or two of my short life so hopefully this can save you the pain. After doing all of the above I was still getting error after error. In my ‘Directx’ settings I was getting ‘direct3d not available’ messages and another setting ‘not available’. I assumed that Virtualbox would have installed 3D acceleration stuff by default but that was a bad assumption because probably Virtualbox is used by a lot of non-gaming developers who don’t need it nor the drain on the host hardware resources. Anyway, there is likely a good reason for it but the 3D acceleration wasn’t enabled. To enable it, shut down the guest machine, go to ‘settings’ (yellow cogwheel) then ‘display’ then check the 2d and 3d acceleration checkboxes (Not sure if i need 2D but I just wanted to be sure. Probably you should do section 6 below too before starting machine and save a step. Video card stuff may also be linked to the dreaded ‘roblox kicked unexpected client behavior’ message…

A helpful link about 3d acceration stuff.

6. Boosted video memory

I also noticed an ‘invalid setting’ in virtualbox saying that I was less than 27MB of video memory so I raised it from 16MB up to 32 to see if that made things better in the settings of the guest machine.

7. Overcoming the ‘roblox kicked unexpected client behavior’ issue

Frankly, I don’t have the answer yet but working on it. It ‘seems’ unsolvable for both Wine and Virtualbox in Ubuntu but I don’t quit easily. For now it would be nice to have others help on this one since I did all the heavy lifting. I feel there might be a browser hack or some other simple work around to stop the player from getting kicked for no reason.

Categories
Freedom and Privacy Technology Tutorial Ubuntu

How to use this Bmap Tool Thing…

So someone said ‘use bmap tools instead of dd because it’s faster and better’.
It sounded good but as usual when I went searching for documentaion on how to simply use this tool I was left in another command line dizziness. You can check their read me file on the git repository here for yourself if you’d like. This blog here was also even better than the read me file, so thanks to whoever this is as well.

So, hopefully this blog will help you step by step setting things up because I can confirm indeed this thing is blazingly fast compared to dd or other direct image copying things!

Assumptions

  • you are running Ubuntu
  • You know how to find your terminal and type in it
  • you want to flash / copy something to something 🙂

1. Get Bmap

sudo apt install bmap-tools if you have not done so already. This will install in ubuntu

2. Create your Bmap file

This is the thing that seemed to be not explained anywhere well. So what this step does it it creates a file formatted as ‘.bmap’. It’s an xml file. Somehow this file is what makes the magic work so if you create it with the bmap tool and use it in the bmap command line, copying is way faster.

Name your bmap file

You can name this file anything you want. I chose to call it something completely different from my image file so that I don’t accidentally type a wrong command. In my case I was flashing a pinephone image to a micro SD card so I named the bmap file ‘pphone.bmap’ and then the image file remained the way I downloaded it as ‘ubuntu-touch-pinephone.img.xz’.

Select a location

Next, select a nice directory on your computer where you want to run these commands. You can make your own directory or just use the Downloads directory – it’s up to you. I’ll use “Downloads’ for my example.

Run the bmap file creation command

This part here will create the bmap file now that you’ve thought everything through. Just open a terminal and enter this:

bmaptool create /path/to/your/image > /path/where/you/want/bmap/file/saved/bmapfilename.bmap

Here is my actual example with some filled in info:

bmaptool create ~/Downloads/ubuntu-touch-pinephone.img.xz > ~/Downloads/pphone.bmap

— PLAY BY PLAY COMMAND COMMENTARY —

  • ‘bmaptool’ calls the app.
  • ‘create’ : a bmap tool command that says ‘make a bmap file’
  • ~/Downloads/ubuntu-touch-pinephone.img.xz: the location of your image
  • ‘>’ thing is… who knows! But it does stuff
  • ~/Downloads/pphone.bmap: destination of where you want your .bmap file to end up.

Press enter and you should see an output in your terminal something like this:


bmaptool: WARNING: all 826.3 MiB are mapped, no holes in ‘/home/wt/Downloads/ubuntu-touch-pinephone.img.xz’
bmaptool: WARNING: was the image handled incorrectly and holes were expanded?

wt@wt-Lemur:~$ cd Downloads/


Not sure what the warnings were but it seemed to be ok 🙂

3. Copy / Flash your image to your desintation drive, card, whatever

Now that you have your .bmap file created (and you should go to that directory to make sure before proceeding, by the way) you are ready to start blazingly fast copying! Woot woot. This is a simple change from the command above. If you look at my example, I think you’ll figure it out pretty quick.

Note 1: Sudo required for this one.
Note 2: Be CAREFUL before you hit the enter key because if you map this to the wrong desintation, you could damage stuff. I always remove any external drives I don’t want to accidentally kill 🙂

sudo bmaptool copy --bmap ~/path/where/your/bmap/file/is/located /path/where/your/image/is/located /path/to/memory/device

Here is my example with stuff filled in:

sudo bmaptool copy --bmap ~/Downloads/pphone.bmap ~/Downloads/ubuntu-touch-pinephone.img.xz /dev/mmcblk0

  • — PLAY BY PLAY COMMAND COMMENTARY —
  • ‘sudo’ -gives you super powers
  • ‘bmaptool’ calls the app.
  • ‘copy’ is the command to copy (smart name…)
  • ‘–bmap’ : says ‘hey! here’s my bmap file so you copy this thing fast”
  • ‘~/Downloads/pphone.bmap’ : this is the path to my bmap file
  • ‘~/Downloads/ubuntu-touch-pinephone.img.xz’ : this is the location of my image that I want to flash onto something. In my example it’s the pinephone image
  • ‘/dev/mmcblk0’ : the destination of where you want your .bmap file to end up. This this case it’s the SD memory card but yours could be /sdc /sda or whatever depending.

Here is the output of my terminal doing this. I find it’s helpful to see terminal stuff so you don’t think you’re going crazy if stuff looks bad in your opinion 🙂


bmaptool: info: block map format version 2.0
bmaptool: info: 211529 blocks of size 4096 (826.3 MiB), mapped 211529 blocks (826.3 MiB or 100.0%)
bmaptool: info: copying image ‘ubuntu-touch-pinephone.img.xz’ to block device ‘/dev/mmcblk0’ using bmap file ‘pphone.bmap’
bmaptool: WARNING: failed to enable I/O optimization, expect suboptimal speed (reason: cannot switch to the ‘noop’ I/O scheduler: [Errno 22] Invalid argument)
bmaptool: info: 100% copied

bmaptool: ERROR: checksum mismatch for blocks range 0-211528: calculated 92c113dde2f5836ccdfc756c2713965bcbd49e5fd9208f0ff89bba4df904f3e2, should be e8648c7193ae920c23de5dcbb23be9ecdca0c94dbfd16b4c003ec9f0511e4406 (image file /home/wt/Downloads/ubuntu-touch-pinephone.img.xz)


Well hopefully this blog was good payback for the nice guy who recommended it. Definitely it’s a time saver and ‘not so hard’ if you have some instruction.

Categories
Tutorial Ubuntu Ubuntu Touch

Flashing Ubuntu Touch onto SD Card for Pinephone Braveheart Installation

EDIT 20/06/19
I have done a fairly extensive post about how to use BMAP properly so here is a link to my post. You should probably read this to know that the true benefits of speed from Bmap tools comes from following the instructions in my other blog. Otherwise, you might as well just use ‘dd’ or other flashing techniques. Bmap is indeed faster!

EDIT: 20/06/14

I tried with Etcher and had problems booting (not sure this was actually the cause) so now I’m trying with a tool recommended bmap-tools by someone in the Pinephone Telegram group. This tutorial includes instructions for getting set up and using this bmap tools tool.

This tutorial assumes you are running Ubuntu on your desktop/pc/laptop…

It’s a command line tool, it seems so yeah. No GUI. Hopefully my commands and instructions will remove the CLI mystique…

Apparently bmap-tools also automatically unzips/uncompresses your ubuntu-touch-pinephone.img.xz image as well, so you don’t have to do that step before.

  1. Get Ubuntu Touch image currently here
  2. Install to ubuntu: sudo apt install bmap-tools
  3. Confirm the source of your ubuntu-touch-pinephone.img.xz file which you have on your computer from this instructional page your source and destination addresses. In my case it’s coming from my download directory and going to my SD card so my source location looks like this:

~/Downloads/ubuntu-touch-pinephone.img.xz

  1. Confirm the destination path of your SD card. This step is important because if you goof this you risk (probably) writing your image to the wrong drive and killing it. How I do this is
    a) Hit the super key to the left of the space bar
    b) Type ‘disks’ to open the Disks utility
    c) Click my SD card on the left pane (graphically)
    d) Take the path from the ‘Device’ path. In my case it looks like this “Device dev/mmcblk0p1” You can actually just highlight it and copy it from there
  • path: /dev/mmcblk0

Important note on this last step: I had a lot of annoyances in the terminal related to ‘memory errors’ and it was because I had copied the entire item. In my case it looked like this: mmcblk0p1. Make sure that you do not have anything like ‘p1’ or ‘p2’ on the end of your destination path. These are for ‘partitions’ and is the incorrect path. should be just : /dev/mmcblk0not something like this –> /dev/mmcblk0p1. If you run it with the latter you will get those memory errors like me.

Just to leave it as reference the errors caused by the mistake above look like this:

bmaptool: info: no bmap given, copy entire image to '/dev/mmcblk0'
bmaptool: WARNING: failed to enable I/O optimization, expect suboptimal speed (reason: cannot switch to the 'noop' I/O scheduler: [Errno 22] Invalid argument)
/
bmaptool: info: synchronizing '/dev/mmcblk0'
bmaptool: info: copying time: 17m 13.1s, copying speed 13.5 MiB/sec
  1. Run the command
    Pre-cautionary step 1: remove all external drives before doing any of this.
    Pre-cautionary step 2: Other tutorials I read did not explain that you should unmount your drive before beginning. So in your Nautilus just go through and ‘eject’ anything showing up as ‘ejectable’.

As a reference, this tutorial was helpful for tool usage but still not quite clear enough so I’ll go even slower…

EDIT 20/06/14 – Apparently this next bit of my advice is bad and slows down the process. Apparently you should just make sure you run the command in the same directory as the image, and then it will work faster and without the need for the –nobmap tag. I will leave this here as a reference just in case you need it but as of today it was advised to not follow it:

—-

With bmaptool when you are doing straight flashing you can just add the --nobmap tag to the command, which I think means ‘just do this thing without routing through other specific instruction file’. So that’s what I’m going to do.

—-

I am still not 100% sure if this step is required, but it helped me so I’m leaving it as a reference: I also got some ‘no space left on device’ errors so I decided to first format the drive with Disk tools before trying again. I did this by opening the ‘Disks’ graphical utility again by clicking the SD card I wanted to format and then selecting ‘format disk’ from the top right hamburger menu. Takes about 2 seconds to wipe whatever is on there… after doing this step everything finally started working better. I created a linux ext4 partition next to see if that helped. I made the first partition with 21GB (for the image) and then a trailing 10GB for ‘whatever’. These were just choices I made thinking that I could maybe use the trailing 10GB for phone storage.

Here are, therefore, the steps, assuming you have done all of the above:

  1. Open the terminal
  2. Make sure you have navigated (with terminal commands) to the directory where your image is
  3. Type the following command replacing the source and path with whatever is correct from your device as per instructions above:

bmaptool -E copy /path/to/ubuntu-touch-pinephone.img.xz /path/to/SD/card

My example that finally worked looked like this for your reference:

sudo -E bmaptool copy ~/Downloads/ubuntu-touch-pinephone.img.xz /dev/mmcblk0

Boot it

Apparently just inserting the SD card and turning the power on should do it, but yeah. Depends on a ‘few things’ as to whether this will be your experience 😉

This was actually harder than I thought. I’m not sure if this was the cause of my pain but I’m going to list it anyways. I had to do about 100 reboots and it still wasn’t working. I couldn’t seem to get past the ubuntu purple splash startup screen. I ‘think’ I had interrupted a process the first time so i did all of the above steps againb but this time I held down the power button until the green indicator light came on and then everything started as expected and I was able to start using Ubuntu Touch. Members of the community indicated it may be related to a faulty build and to try other build numbers to see if that helps. We shall see.

Issues flashing cards

I had an interesting issue where I couldn’t unmount a card. System said ‘not mounted’ when I tried umount command. Amazingly, just a reboot of computer allowed the ‘Disks’ utility to start working again as normal. Others were reporting that one should consider using gparted tools instead of Disks utility just as another related tip if you are interested.

I hope this helps and have a great day

Resources

Pinephone images for Ubuntu Touch here

How to telnet into the device here

My bmap tools tutorial here

Categories
PrestaShop Technology Tutorial

Fixing PrestaShop child theme upload fail

Just a quick post. To be totally honest, I haven’t had time to investigate if this is a filed bug or not, but I’m going to post this here to save others some headaches and also hopefully serve as a reference link for someone else if they want to file the bug officially (sorry, my bad).

I tried to upload a child theme in the prestashop theme section but kept getting this message in the ‘upload child theme’ feature:

Oops… Upload failed.
What happened?
Try again

However, when I clicked the ‘what happened’ link it only told me that the file wasn’t valid (in this case I was uploading a .zip which it instructed me to do) so the file was valid.

To make a long story short, what I had to do to get it working was this in the Theme & Logo / Advanced Customization area:

  1. Switch back from my already-uploaded first-attempt child theme to the original parent theme
  2. Delete my first child theme upload attempt with same name
  3. Upload the new Child theme

If I’m correct in my assumption that the ‘technical name’ of my first uploaded theme is conflicting with the new upload attempt, this should be clearly laid out in the upload area and a few other areas so that the user knows ‘ah! i should delete any conflicting child themes first!”

Again, I haven’t tested this more than twice but hopefully this helps the devs and some users

Categories
Life Skills Technology Tutorial

How to Import Shopify Data into Prestashop with CSV

Brutal. I spent probably 3 hours trying to figure this out so I thought I should spend about 10 minutes and write this quick blog post for anyone else who might hit this.

I was testing out Prestashop (looking good so far!) and the aim was to move a new shopify account over to Prestashop to see how it goes.

First thing I did was had the Shopify product data exported as .csv file.

Next I followed the instructions on the documentation page for importing into Prestshop. Unfortunately, though, there seemed to be no detailed instructions about how to set up data. I think this is because there are a lot of migration companies that make some cash doing this so fair enough.

Anyways, what I did was opened up both Shopify .csv and Prestashop demo .csv for products and noticed that they both have different data separator formats.

Shopify uses commas whereas Prestashop uses semi colon.

So, all I had to do was manually type in a comma into the field that says ‘Field Separator’ in the Prestashop import module and everything started working and I could start mapping the fields and database tables as expected and as explained in documentation.

Hope this tiny, one second tip helps you save 3 hours and some cash.