Categories
Technology Tutorial Ubuntu

Advanced PDF Printing on Ubuntu

I travelled down a road that failed, but I learned some cool things about printing to PDF on Ubuntu that I think are worth logging and sharing for others.

1. Out-of-the-Box PDF Printing (in case you didn’t know)

In case you are new to ubuntu and didn’t know it, basic PDF printing is already installed and working perfectly. All you do is choose ‘print to file’ when you select your printer and PDFs are created. This might be all you need to know from this tutorial.

2. Converting with Ghostscript / ‘convert’ Command

This convert command is powerful. You can convert pretty much whatever image file to PDF. Probably you can convert other files, too. If you don’t believe me how powerful it is, just type man convert and check out the options…

A problem, however, is that it had a significant security issue in the past and so all rights to use the command are disabled by default. If you are running a server probably you should do your own research on the topic but if you are regular user like me you can probably follow the advice I found online to just remove the security policy file / rename it. Here is what I did and it removed all the permission errors I got while trying to run the command:

Move to the directory where the policy is: cd /etc/ImageMagick-6
Move the ‘policy.xml’ file while giving it the a new name (which ultimately just renames it): sudo mv policy.xml policy_disabled.xml

Now you can run the ‘convert’ command and send whatever it is to a pdf:

convert original_image_file.jpg output_pdf_file.pdf

3. Installing a ‘Virtual Printer’ and ‘Printing’ to it graphically

Install the thing: sudo apt install printer-driver-cups-pdf

As soon as it’s done you should be notified that a new ‘printer’ has been installed, just like it was a normal hardware printer. Now you can simply ‘print’ like you normally would to the printer called “PDF”. It will output the files to your home directory in the “PDF” folder.

4. Advanced printing with the command line using the Virtual Printer

Now that you have installed the printer-driver-cups-pdf virtual printer thing above, you now have a ‘fake printer’ in your computer and can now do ‘lpr printing’ in the commmand line. You can learn about what you can do with lpr here but instead what we’re going to do is simply direct the printing to the printer called “PDF”.

So whatever you can do with a regular printer, it seems you can do it now to PDF.

5. Other

There is also this thing which may be of value researching. I didn’t have time but it seems like there may be other value there ps2pdfwr. This is already installed with ubuntu. It takes postscript stuff and makes PDFs. You can type man ps2pdfwr in your terminal to learn more.

Hope this helps.

Categories
Technology Tutorial Ubuntu Ubuntu Touch

RECOVERING FILES USING SCALPEL AND UBUNTU

“Ooops. I deleted my photos”

I used foremost in this blog to try to recover deleted mp4 video files (for my sister) using ubuntu and the software called Foremost, but it wouldn’t find the video files. It found a bunch of photos but not her supposed videos.

Then, I thought maybe the tool wasn’t capable so I tried to figure out: Scalpel which is ‘the other’ major tool besides foremost.

But how to use it?

This video is an absolutely great way to get started doing the basics. Definitely take the time to watch it as it will give you a good birds eye view not just about carving an image file but also how to carve a device (ie. hard drive, usb drive) connected to the machine.

Also, the man scalpel was pretty useful, however, I still couldn’t figure out

a) where the ever-important scalpel.conf file was and
b) how to do mp4 which was (oddly) missing from scalpel.conf

It was pretty surprising that mp4 was missing, that’s for sure…

However, I did find this blog which got me most of the way there in terms of basic learning. Interestingly the author did not make available the following code containing the mp4 header/footer stuff to simply copy and paste. However, I was able to manually type from the screenshot so that myself (and the world) can just copy and paste it. Here it is:

EDIT 200816 – See below the disclaimer before doing this. I was wrong..

mp4 y 30000000:70000000 \x46\x4c\x56\x01\x05\x00\x00\x00\x09\x00\x00\x00\x00\x12\x00\x02\x36

Important Disclaimer: I have no idea if this thing is right, or works, but the program itself, I can verify, ran perfectly and carved for files. No videos were ultimately carved in my situation, but I don’t think that is the fault of this software nor my copy/paste stuff above. It’s because I don’t think there actually were any videos on my drive to start with. But I wanted to be clear that I simply typed out another bloggers stuff and stuck it here.

I was wrong, it seems. I kept getting nothing at all which I thought was weird. Then I just decided to dump the hex stuff above into a hex-to-text editor thing and discovered it translates to “FLV”.. So then what I did was use the same hex editor and wrote ‘mp4’ in there, and got this output:

6d 70 34

Then I updated the scalpel.conf file to look like this:

mp4 y 30000000:70000000 6d 70 34

This started working so I appear on the right path. However files still not playable and came in about 100 small chunks per directory. Need correct scalpel.conf entry to carve an mp4 file… any help appreciated in comments below!

Then I finally found another blog which showed that the scalpel.conf file is located at /etc/scalpel. Now you don’t have to spend an hour to learn that!

The first thing I did once I had what I needed to paste, and knew where to paste it, was edit the scalpel.conf file with the following command, and then copy/paste the above ‘stuff’ at the very bottom of the file and then ctrl+x, etc, to save changes in the file:

sudo nano /etc/scalpel/scalpel.conf

Once that is done, we need to run the command. Even this kind of messed me up with a few of the tutorials and even the man pages I read. Here is the syntax of what you’ll need to start it running with my breakdown of what each component is following:

sudo scalpel -c /etc/scalpel/scalpel.conf -o /path/to/output/diretory/directoryname /path/to/location/of/image.img

Quick explanation of this so you can plug in your details into the command to get carving:

sudo – it requires super user permissions (and your password)
-c – this tag points to the scalpel config file you edited above. If you want, you can move it, but if you didn’t move it this path in my example above is correct
-o – this points to your output path where ou want the recovered files to go
directoryname – at the end of your path add a useful name you’ll remember, as this directory will be created and the recovered files placed inside if it works
/path/to/location/of/image.img – likely you have already cloned the drive and are not using the original (recommended for many reasons) so this is the path to where on your machine this image file is located.
image.img – represents the name of your image, whatever it is.

So once you customize your details and hit ‘go’ you should be able to start carving files. Also, if you want to carve for more than just mp4s you can un-comment the options in the scalpel.conf file, or add others and they will all run at the same time once you start.

I found that Foremost found more .jpg than Scalpel but I might have configured one or both of them incorrectly…

Hope this helps you recover some lost goods!

Categories
Life Skills Technology Tutorial Ubuntu Ubuntu Touch

RECOVERING DATA FROM YOUR ANDROID DEVICE USING FOREMOST AND UBUNTU

“Ooops. I deleted my photos”

Well, I thought this would be a bit easier than it was but such is life – HARD…May this tutorial save many or all of you lots of time. Probably you can do all this with Kali, Debian, or other distributions that have the same commands, but I’m ubuntu so ubuntu it will be.

My goal here was pretty simple. My sister wiped her photos from her phone (or someone she knows…) and they are gone. One would think they would save somewhere in google’s creepy backup network, but seems not so. Perhaps when you press ‘delete’ on your Android device they delete first from your device then from the google servers as they sync? That’s actually good thing for security reasons and privacy – which is why I doubt it works like that (ha). Anyway, I use Ubuntu Touch so I don’t know. But I do know that Nextcloud is awesome and I believe you can set it up for manual backups so it doesn’t happen automatically and you can probably set it up just fine on Android, too. This would be ideal setup so if you accidentally delete stuff like this the deletion won’t make it to the server and you could backup from that…. Anyway, my sister wanted these photos and I like learning so I started to review how to do it from a tutorial I never finished back in 2013. At that time I had wiped all my emails in Thunderbird, and I recall I did successfully get them all back.

The first interesting thing I encountered is that when I plugged the android device in my ubuntu computer – unlike my Ubuntu Touch mobile device – an Android device ‘mounts’ but doesn’t show up as a usual sdb, sdc, sdd, etc drive in File Manager system. The reason for this is that Android apparently uses ‘MTP’ and this was the source of my initial pain. If you are interested, here is a link about my mtp journey, only because I feel I don’t want to waste the time I spent logging it all and perhaps one day it will be useful related info.

Cloning the Drive with ddrescue!

To clone the SD card of the device we are going to use a tool called ddrescue, which annoyingly is called ‘gddrescue’ in the Ubuntu packages, yet, when you run it is ‘ddrescue’, not ‘gddrescue’. I wasted a solid 15 minutes trying to figure that one out…

  1. Install dd rescue on ubuntu: sudo apt install gddrescue
  2. learn how it works and to make sure you have the right tool: man ddrescue (again, not ‘man gddrescue’)(man!)

This blog post was good except that lshw -C disk only shows discs and direct USBs I guess but not SD cards, and since my sd card is in the sd card adaptor directly in my laptop, I’m going to use lsblk which will show the SD cards and their ‘mount points’. If you haven’t seen these before, they typically show up as an entry starting with ‘mmc’.

  1. Identify your SD card mount logical whatever: lsblk
    Mine is ‘mmcblk0’ but yours could be different. If there is a ‘tree’ of partitions, just choose the top level one for the card.

Documentation shows the basic command systax for ddrescue as: ddrescue [options] infile outfile [logfile]

They also had this example:

root# ddrescue -f -n /dev/[baddrive] /root/[imagefilename].img /root/recovery.log

I will change the above example to the following, but you’ll adjust yours accordingly:
sudo ddrescue /dev/mmcblk0 ~/samsungs7.img

What I’m hoping this will do is burn a copy of the sd card to an image file which I will then be able to carve. If you do your research you’ll find that it is always recommended to clone a drive and do forensics work on it rather than do the work directly on the ‘active’ drive. I’ve removed options because I want the most thorough image creation. Disclaimer: I have not studied ddrescue in detail, so always do your own deeper dive if you have time.

Note 1 before you run the command to clone: I quickly found out at this point that my laptop didn’t have enough memory so decided to clone the drive straight to another USB pendrive of same size to keep my laptop free from having a bad situation of running out of memory. However, at the same time I thought I would take my advice and use a drive of the same size of the cloned image. Wrong move. Even though advice online says that you need ‘a drive of the same size or larger’, there must be tiny differences of size between the manufacturers because just as ddrescue was finishing the job of cloning, it stopped and told me the usb drive ran out of memory. I ended up pointing it to my big storage drive. So, my advice is this: output your cloned image to a drive LARGER than the size of the drive that is being cloned. This could save you time, headaches, and confusion.

Note 2 before you begin to clone: be careful that your path for the output image file is a ‘real storage path’ on your machine, and do not accidentally include something such as ‘/dev/sdc’ as you will get the ‘this is not a directory’ warning. If you get this warning simply check the path and adjust accordingly.

The following is my more layman’s example of the command I used successfully showing in SD card input device with the Android data on it (“mmcblk0”), the output image file going to my big storage drive (“HardDriveName”) into a directory on that drive that I have already created (For example a directory called ‘samsung’), and then finally creating a clone of the drive called in that directory (“cloneImageName.img”):
sudo ddrescue /dev/mmcblk0 /media/user/HardDriveName/path/to/place/to/store/clone/cloneImageName.img

Update the above according to your paths, of course, including the mmcblk0 as yours might be different – lsblk to confirm…

When the ddrescue command is running it looked like this for me:

GNU ddrescue 1.22
ipos: 67698 kB, non-trimmed: 0 B, current rate: 43384 kB/s
opos: 67698 kB, non-scraped: 0 B, average rate: 22566 kB/s
non-tried: 15957 MB, bad-sector: 0 B, error rate: 0 B/s
rescued: 67698 kB, bad areas: 0, run time: 2s
pct rescued: 0.42%, read errors: 0, remaining time: 11m
time since last successful read: n/a
Copying non-tried blocks… Pass 1

Carving the files with Foremost!

Good job. We now have the clone .img file and now comes the hopeful recovery stuff. We now will start rippping through the clone to see what we can find.

  1. Get software called foremost: sudo apt install foremost
  2. Learn about it: man foremost

In this case I’ll be trying to carve out picture files. It’s a Samsung and I happen to know all photos are .jpg so i’m going to narrow down this carving to .jpg only, to speed it up.

foremost -i /media/user/HardDriveName/path/to/place/to/store/clone/cloneImageName.img -o /media/user/HardDriveName/path/to/place/to/save/restored/pictures -t jpg -v

You can seen now my input file / target file is the same one we created in the cloning section above:
/media/user/HardDriveName/path/to/place/to/store/clone/cloneImageName.img

The place where we’ll save the carved files is:
/media/user/HardDriveName/path/to/place/to/save/restored/pictures

I stuck -v on the end to make it more obvious (verbose) in the terminal what’s happening. I recommend the same.

When everything is complete, by the way, Foremost creates and saves a file in the carved files directory called ‘audit.txt’. Then, a specific directory is createed called ‘jpg’ which will then house the files. This is nice and I didn’t know this happens before I began so I wasted some time creating directories with custom file-type names. No need. Foremost does this for you.

The process may take a long while so pack a lunch…

Conclusion

These two tools ddrescue (for cloning) and Foremost (for carving) are great and not so hard to use. Foremost successfully found some deleted photos, however, it was unable to find deleted videos. In fact, Foremost didn’t find a single video on the SD card which makes me wonder if it worked or if I did something wrong. I specified the .mp4 extension but nothing. I will continue to look into this, but for now, if you need to recover photos, I can tell you this worked great for me.

In fact, I ended up studying and using a second piece of carving software called scalpel which turned out also to be great, but it seems a little less simple to use. I created an similar instructional blog about scalpel file carving on ubuntu if you’d like to try that one too.

Categories
Technology Ubuntu Ubuntu Touch

Log notes from my MTP android ubuntu learning day

Before you read this. Big disclaimer. This post is written in super crappy style and is nothing more than my personal notes as I tried to figure out MTP. The only reason I’m even putting this post online is because a few of the things I learned below seem like they will be relevant for future ubuntu touch / android porting things. Even skimming over the process I went through seems useful. However, if you are looking for a good tutorial about how to actually do something with MTP / android / ubuntu, this is not that. Hopefully it will provide some value to someone though.

With that out of the way, here comes the crap:

I went down a long road installing ‘MTP://’ mount thing with sudo apt install mtp-tools (very few tutorials on this one) but after it was all said and done, I don’t think it was required because it seemed that all the entries for the ‘udev/rules.d’ files were already complete.

I had assumed you need to plug in the device and clone the internal hard drive (EMMC) via USB, but after some chats with some software communities it seems that ‘it doesn’t work like that’ and the situation is as follows (feel free to comment below otherwise to help me and other readers):

  • Everything nowadays is related to the SD card
  • You have to clone the SD card
  • You have to do forensics / file carving on the cloned drive image

I still feel there has to be a way to carve stuff from the EMMC via MTP, but that perhaps is for another tutorial blog. If you want to look into this, I will provide my learning here, but if you have an Android device with the userdata on the SD card (this is probably the case), then skip on to the following section:

  • How to ‘mount’ an Android device? With MTP
  • What is MTP? It’s this
  • If you are on ubuntu and try lsusb and can see something like this, you are probably already set up well with MTP:
    “Samsung Electronics Co., Ltd Galaxy (MTP)”

Un-mounting android.
un-plugging android.
lsusb
good. I now get “Samsung Electronics Co., Ltd Galaxy (MTP)”

Now to figure out how to find that drive… how does one mount via mtp-tools?
It seems like most stuff is from circa 2014 which is possibly old and scary at this point.
man mtp-tools

nice. tools… manly tools.

wow. bad tool page. looks like MTP tools don’t really ‘mount’ the drive as a drive but just help you communicate with the drive. Not what we’re trying to do here. Jumping up a level.

This guy seems to have figured it out in this video I watched it, felt scared, then read the following code in his notes and this seemed to make the fear go away. Now, we already have mtp-tools installed from above so I’m going to assume that we don’t need to do all of it however, commments on YT from a week ago show ‘thanks man, it worked’ so… yeah. Maybe I’ll just follow it to a tee:

sudo apt-get install libmtp-common mtp-tools libmtp-dev libmtp-runtime libmtp9

sudo apt-get dist-upgrade

sudo nano /etc/fuse.conf

lsusb

sudo nano /lib/udev/rules.d/69-mtp.rules

# Device
ATTR{idVendor}=="XXXX", ATTR{idProduct}=="YYYY", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

sudo nano /etc/udev/rules.d/51-android.rules

ATTR{idVendor}==”XXXX”, ATTR{idProduct}==”YYYY”, MODE=”0666″

sudo service udev restart

sudo reboot

I’m going to walk through these commands one at a time and freshen them up if they need freshining.

sudo apt install libmtp-common <– not needed. shows current
sudo apt install libmtp-dev <– yes, required, not currently installed
sudo apt install libmtp-runtime <– no, not required, showing current
sudo apt install libmtp9 <– no, not required, shows current.

Therefore, the first line could be:

sudo apt install libmtp-dev

I’m a little concerned about running sudo apt dist-upgrade because I think that upgrades your entire current distro from, say 18.04 to 18.10… that seems a bit intense so I’m going to try to skip that one. Instead I did:

sudo apt update and sudo apt upgrade

Since we already have mtp-tools installed and we know that lsusb is showing the right stuff “Bus 002 Device 036: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy (MTP)” i think we can move on to adding the rules

blast. it looks like this one rule location might be out of date sudo nano /etc/udev/rules.d/51-android.rules

cd /etc/udev/rules.d/ to search for it…

not there… maybe needs reboot. Rebooting….

sudo nano /etc/fuse.conf
remove comment (#) ‘user_allow_other’
control x to save changes

sudo nano /lib/udev/rules.d/69-libmtp.rules <– note, this is different from tutorial, couldn’t find his file name and assumed this is updated name
1m15s video is useful to watch as he pastes

connect phone
do an lsusb in one terminal
open new terminal window so you can see both together

take this, and update the XXXX to your device things as listed in lsusb in the other window

# Device
ATTR{idVendor}=="XXXX", ATTR{idProduct}=="YYYY", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

mine will become, for example AS DEMONSTRACTED at 1m44s in video with blue and red arrows (great visual, by the way!)
idVendor is the first 4 characters before the colon
idProduct are the second 4 characters after the colon.

# SAMSUNG GALAXY 7
ATTR{idVendor}=="04e8", ATTR{idProduct}=="6860", SYMLINK+="libmtp-%k", ENV{ID_MTP_DEVICE}="1", ENV{ID_MEDIA_PLAYER}="1"

I like to do stuff in text editors and make sure it’s good before pasting into terminals but up to you.

Oh CRAZY. it waslready in this sudo nano /lib/udev/rules.d/69-libmtp.rules

now what… hmm

well I guess we can say that was ‘step 1 to make sure that your device is recognized by MTP’. Now that is good we must do next stuff

sudo nano /etc/udev/rules.d/51-android.rules

not there. but foudn it here:

sudo /lib/udev/rules.d

so:

`/lib/udev/rules.d/51-

well that was all a waste of time, kind of. Turns out that the SD card is the mount point of the EMMC memory anyways (apparently) so I discovered there was an SD card in device and may work….

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
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
Life Skills Tutorial Ubuntu

Getting Korean Hangul Working on Ubuntu 18 and higher

How to install Korean Hangul Keyboard Ubuntu Gnome 18

In Ubuntu there are two things that need to happen to be able to type a non-native language into the operating system. You need to get the fonts and the stuff and you then need to configure stuff so the keyboard knows what to do. Without doing both, nothing will work and you’ll think things are broken.

Part 1 – Getting your Korean Language Fonts and Stuff Installed on Machine

  1. super key (sometimes erroneously called the ‘windows key’)
  2. start typing’languages’
  3. Select ‘language and region’ option (may not be top, largest option)
  4. Click the’manage installed languages’ button
  5. If you get the ‘language support is not installed completely select ‘install’. you will be prompted for your admin pass
  6. Click the ‘install/remove lanaguages’ button (on the same ‘Language SUpport’ window. NOTE: This window seems to get easily hidden by other stuff but you can find it again easily in the left launcher while it’s open)
  7. Start typing ‘Ko..’ to trigger the search of ‘Korean’ language when the list of language and their checkboxes appear
  8. select ‘Korean’ and ‘apply’ you will again be prompted for your admin pass. If you are coming from another less secure operating system this is about securing your computer against weird scripts and making sure what is happening is authorized…At this point fonts start downloading and the ‘applying changes’ window is on your screen. This takes a little while sometimes.

Remember, nothing will work yet. You have to do the next section 😉

Now, important little tip here. You need to REBOOT your system now to assure that the input sources in the next steps are refreshed. I cannot tell you how many hours I have burned on this one so just to be sure, take a second to reboot the machine now before continuing.

Part 2 – Getting Input Source Setup So You Can Actually Use the Language

  1. On the same page ‘Language and Region’, under ‘Input Sources’ section, hit the plus + button. I should state here that if for some reason you aren’t seeing what I”m seeing here, just hit your super key and then ‘settings’ and then go to “language & Region” from there. Sometimes stuff moves around…
  2. Hit the 3 dot vertical hamburger icon looking option at the bottom of the list… admittedly this step and the next are not intuitive so feel free to file a GUI suggestion with the fine folks who make Gnome. 🙂
  3. By hitting that option a search field opens up which you’d think would allow you to type ‘Korean’ or ‘Hangul’ and then find your language – but in this case you’d be incorrect for thinking that. What you need to do is scroll to the bottom of this list and selecting ‘Other’. You can alternatively type ‘Ot’ into the search field here…but you cannot type anything more than ‘Ot’ Admittedly this part is plain bad for design… so probably just use the scroll feature here to avoid thinking it’s missing, lol.
  4. Now you are able to use the search field to type ‘Korean’ and / or scroll down to find it. So go ahead and do that now…
  5. You wil see ‘Korean’ and “Korean(101/104 key compatible)” but those are just decoys! Pure deception! The one you want is called “Korean(hangul)”. I have no idea what the other ones are or do but I do know they don’t work for me. Again, if you don’t see this specific option now, you probably didn’t listen to me above and didn’t reboot your machine so be a good student and go ahead and reboot that now…

After it’s highlighted in your list, select the ‘add’ button which should change to a green colour when it’s ready. You should now be brought back to the “Language and Region’ screen and see ‘Korean(Hangul)’ in your list of ‘Input Sources’ You should also notice in the top right area where your wifi, battery, other stuff is that the symbol for your native language has appeared with a drop down arrow. In my case it’s English so I see ‘en’ with the down arrow.

Technically now you have Korean installed and a keyboard input ready to go but a quick tutorial on setting up and using it is probably wise…

Setting up and Using Korean Keyboard

Probably, if you’re like me, you’ve already hit the down arrow, switched to the ‘Ko’ (Korean) option and started typing only to find that it’s still typing English. Why is that after all this work? Because Korean keyboard input is able to type both English and Korean so you have to be able to – while in KO mode – switch back and forth. So what keys do that?

First, let’s take a look at how to switch between input sources. On the Language & Region screen, if you hit the ‘Options’ button (which appeared after you installed Korean) you can now see the key combos to switch between ‘en’ and ‘ko’. This is useful because I find that most of the time I want to be in ‘en’ because my fingers sometimes switch me to Korean accidentally during the day when I don’t need it. The default combo is ‘super’ + space bar. What is ‘super’? See above. It’s the powerful key to the left of the space bar sometimes erroneously called the ‘windows key’. Hit that with space bar and you’ll be able to switch.

Next, while in ‘korean mode’ how to switch between English and Korean? The default appears to be ‘shift + space bar’ (while in Korean mode).

You can make this combo whatever you want by one of two methods:
a) while in Korean mode, hitting the top ‘EN’ drop down in top menu of screen. This will then give you the IBUS ‘setup’ option. I like this way to adjust things. However you can also find it by
b) going to language and Region page, highlighting Korean(hangul) in input sources and hitting the settings cogwheel. Same-same….

Nice. Now you’re typing 강남 style.

Hope this helps. Should have made a video but yeah whatever too late.