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
Business Life Skills

GOOD BUSINESS COMMUNICATIONS IN OUR FRACTURED AGE

Proper communication is paramount. In the same way that handing someone a cheap, faded, crappy business card paints the wrong picture about your company and brand, a poorly communciated message does the same about yourself as a person.

We live in a time when it often feels there are more communication options than people with whom we communicate. Further, those people (us) are getting bombarded with endless streams of communications, 24-7-365. So how should we communicate with them, and when we are using these mediums, what are the communication expectations?

I will begin first by mapping out the major categories of communication media and then break each one out into more detail.

Major Communication Media

  1. Chatting / Texting: Includes SMS (cellular phone text messaging), Instant Messengers (IM) such as Telegram, WhatsApp, Matrix, or – more precisely – any real-time live stream of text-based communication.
  2. E-mail: E-mail includes e-mail. It’s awesome that e-mail requires no explanation after 40 years…
  3. Voice (phone) call: Includes online Voice-Over-Internet-Protocol (VOIP) conversations (such as skype), video conversations, cellular voice phone call, ‘FaceTime’ and other such human-to-human, voice-to-voice communication.

Chatting / Text

History
Typically speaking and historically speaking, such a chat medium would never be used professionally. On the old T9 keyboards on a cell phone, you would have to push the single number button three times to find the letter ‘c’ while composing. Messages would typically be ‘See you soon’, or “I’m 5 min late”. That’s it. You would never consider this kind of medium to be acceptable in a business environment. Nor would you even give someone related to your work or business your personal cell phone, unless you were an occupation such as a REALTOR who would require a weekend phone call. You also would never have your cell phone on or audible in a public environment (gone are those days, sadly), so it was not a very reliable way to communciate, even if it was permissible.

Then came the ‘instant messages’ which started to blur the line between voice, email and texting. The same kind of skills were used but it was faster and ‘always on’. Traditionally, though, this was for either internal stuff at a company, or between friends and family. No professional would use such a medium in the context of, say, a sales conversation or even a REALTOR communicating with his/her client. There is also a high risk associated with texting / chatting because once delivered, it’s a written record and oftentimes we send these messages while angry, or – some people – even while drunk. Much less common does one send an e-mail in this way, simply because it’s a touch less convenient.

Expectations in Business
For personal communications ‘do what you want’ but in business, I would recommend limiting this form of communication to zero for any external communications related to traditional selling, communications with vendors or professionals. The context of a live-chat text chat on a website or tech-support live chat is fully acceptable because the content is always the same and 100% focused on the task at hand. Very rare would you talk about sports with the sales rep on a website, but, if this happens, staff should be instructed not to engage and politely bring the focus back to the task at hand. The risk is too high, the record is permanent. Above all, cellular sms / text-messaging should always be avoided, 100% of the time whether personal or professional because the technology is so insecure and open that you might as well post it on the lamp post. Never use sms/texting if you can avoid it, and if you use it, never ever put personal or sensitive info in the message.

For internal communications, however, texting/chatting can be an excellent communication medium and should not only be accepted but also embraced. The ‘ping’ features (ie. using the @ before the username) of most chat apps are very useful way to reach out to someone for faster and more pointed communications. Services like Slack, Rocketchat, etc, can dramatically improve collaboration as well.

Context / Function

  • Typically used between friends and family.
  • Not recommended for external business communications. For instant stuff, when a quick response is needed.
  • Useful when a real-time on-the-fly discussion is required and can’t wait out the wait of an e-mail, or the coordination of a voice call.

Pros

  • Fast
  • Limited thinking required for grammar and style
  • Good for quick surveys questions
  • Convenient.

Cons

  • Easy to lose
  • Easy to forget
  • Not very permanent.
  • Easy to make career-limiting and life-reducing errors in the heat of the moment…

Email

History
Historically, the name ‘e-mail’ means exactly what you’d guess: a hand-written piece of paper mail, but sent electronically. As a result of being one of the first electronic written forms of communications, long-standing expectations exist whether you know about them or not. Although the use of PGP technology can secure the email very well, most people do not use this end-to-end encryption, and as such, the e-mail should not be considered secure or private in any way. Further, if somone decides to try to sue you, e-mail can and will be used against you in a court of law.

Expectations in Business
E-mail format is more formal, and more professional. Composition time is longer and requires more thought process (a good thing), and more thoughtful responses.

The expectation of the speed of response of someone on the other side is, conveniently, also longer. This is excellent for a busy person because one can organize their time better with e-mail. The level of grammar is higher, the use of ‘lol’ and other ‘chat-based-stuff’ is avoided. However, the use of an occasional text-based smiley such as 🙂 would nowadays be considered acceptable if used tastefully and after the relationship with the person on the other side is somewhat matured.

Although it depends on your business, it is often acceptable to respond within one business day. Your competitors will probably respond within the same day or sometimes the next day. To assure you are one of the fastest responders in your industry, I would recommend ‘less than 3 hours’ if you can, wherever possible. Responding too quickly could present the appearance that you are not busy and may have an adverse affect so consider this too.

If an email is written to you, someone has essentially declared, “I’m spending my time to communicate with you”. As such, whether they say it or not, they will have an expectation of a response to show respect of their time. It is very easy to respond and we can break e-mails into the following two general categories: A) an email where an action is required or B) an email where no action is required. Let’s explore both of those in a bit of detail.

A – If an action is required you should, as quickly as you can:

  • Reply to the e-mail with the action item completed, if you can do the action right away, or,
  • Reply to the e-mail with an estimated time of completion of the action item, if you can do the action, but cannot do it immediately, or,
  • Reply to the e-mail immediately explaining the situation / explanation, if you cannot do the action item at all.

By replying to the e-mail in all the three cases above, you are acknowleding the person’s time, and helping them plan their situation accordingly. Otherwise, they are left in limbo. Silence, in the world of e-mail, can be more frustrating than a negative response or rejection.

B – If an action is not required, you should, as a general rule and as quickly as possible:

  • Read the email, and respond to the email with a polite confirmation of receipt if you are able to properly read it, or
  • Respond with a confirmation of receipt and let them know by when you will read in detail and respond, if you are not able to read it properly for a fairly long period of time.

In this case, not much is required of you but the confirmation of receipt will really help present you as a good communicator and respectful of others’ time.

It is wise to simplify it as follows: an e-mail requires a response every time, unless the email is absolutely informational only (ie. mass newsletter to a group) and there is no chance the person would expect a reply. If you aren’t sure, send at least a confirmation of receipt, such as ‘Received, thanks’, or ‘Thanks!’.

While we are on the topic of group e-mails, do not use the reply-all feature, unless it is absolutely required and you want to announce to the whole group that you have read it. This is typically considered super annoying when people do this. The reply feature is sufficient to confirm receipt, unless there is a reason to announce it to the group.

With e-mail, be very careful with humour. Due to lack of skills in the communication language, ethnic differences, cultural differences, etc, humour needs to be handled very carefully, until a solid relationship is established. Avoid the usual politics and religion until the relationship is established. At that point, it could be a very enriching experience to be ‘more real’ with all these great folks and use the God-given gifts you have with boldness.

E-mail requires a higher level of language proficiency and professionalism – if you’re going to send a poorly-written email with spelling errors, missing capitals, and typos to a customer or even a vendor, it would be worth considering not sending it at all. The good news, however, is that it’s super easy to write a proper and professional e-mail. This simple how-to blog is an excellent starting point. If you need to write it less formal, just tone down the salutation and add a bit more personal fluff. I would highly recommend reading this blog and consider implementing the concepts of ‘keywords in subject lines’ and ‘bottom line up front’. I firmly believe if everyone did this (at least internally) in business, we’d all have a much better life.

Context / Function
E-mail is ideal for business and recommended as the default communication for anything serious in writing. E-mails are regularly used in court cases and should be treated in the way a hand written letter would have been written back in the day. When an e-mail is sent, business is being done. Typically a professional dialogue would never take place by a chat/text environment as our friend has been doing, but instead by e-mail.

Pros

  • Long history of solid functionality. It ‘just works’.
  • Very ‘official’

Cons

  • Requires more time and skill to compose.
  • Has a higher chance of mis-interpretation than a voice call or a text chat because of its context of being a more serious communication.
  • Slower response time.
  • Less convenient.
  • Rarely secured by encryption (although possible).

Voice Calls

For this section we will assume the traditional ‘ring ring telephone call’ even though an internet video / voice call could do the same thing.

History
The first ‘instant voice communication’ and a reliable and proven and effective medium.

Function / Context
This is the most old-school communication tool in the world, other than snail mail and is very personal as you can hear the person’s voice or even see their face with video. The communication is instant (phone) and effective. Regardless what the other kids say, more can be accomplished in a 5 minute phone call than a 30 minute meeting (and it’s more enjoyable).

Expectations in Business
A phone call interrupts someone’s task and someone’s day. Let me say that again because it seems a lot of people don’t get this simple fact: A phone call interrupts someone. When you make a phone call, it better be important or valuable to the person you are calling, or, you better have a strong tone of humility and politeness if not. For sales people, this is paramount because if you call someone and try to sell something, even if they need it, and you are interrupting their crisis situation, they will hate you and your product (and your dog and goldfish while they’re at it). Always ask, “Is it ok to have a quick chat right now?” This one sentence will save you much pain.

A phone call is technically more private. Although audio can be recorded and is being recorded, typically speaking it’s much more difficult for a voice call to become part of a court record. If you need to communicate something sensitive or ‘on the side’, definitely this medium is the best. It is also one of the most clear forms of communication because you can hear more of the person’s emotions and nuances in their voice. In the other text-based communications it’s very (very, very) easy to communicate something unintended, by just one word. Countless are the stories of fights that have started over one misplaced or out-of-context word. Always use the voice call if there is risk of this.

Pros

  • Long, proven, and reliable network with a really wide reach. “It just works”
  • Fast
  • Personal
  • Reasonably secure and private
  • Better for communicating ‘nuance of the language’ that written format
  • Highly prioritized

Cons

  • Very interruptive
  • Pretty annoying
  • Getting less and less acceptable to younger generations

Conclusion

Nothing is more important in business than your communications and your communication style. You could have the nicest business card in the world but it will end up in the garbage can if you fail on the items above.

Of course, we must conclude the topic with the word ‘grace’. We all fail. I’m by far the worst. I like humour and humour in communications is risky business and I’ve offended not a few folks already as a result.

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

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.

Categories
Freedom and Privacy Life Skills Technology

THE NEED FOR A NEW QR CODE WORLD – OR SOMETHING LIKE THAT…

The Background – The Feelings

The background to this one is that I was really amazed by the technology and functionality of QR codes. QR codes brought the convenience of UPC retail bar codes to the average person without the crazy costs associated. So, even from a business perspective you could have your own scanning system if you wanted.

On a personal level, it was mind blowing that I could have a business card with a QR code on it that would ‘hide’ data within visually and then the smart phone or web cam could see the code, unpack the data and leave it with you in a digital format – with no typing needed and no errors (unless the creator goofed). This allowed me to turn a business card into an immediately usable tool, instead of what would happen before where the paper card would get buried or lost before I got to use it, plus it would force me to type more keystrokes than I wanted. I mean.. It could even do a .vcf format something which could be loaded direct into your contact books, from what I recall (would need to review this one but 99% sure I did that…)

Further to the personal benefits, let’s say you are at a social gathering. Someone approaches you and wishes to get your business card, or, some form of contact informaton that might normally be on a business card. But, you don’t really want to share certain parts, or any parts with said person. These days normally you would fumble and figure it out on the fly. What if the person says ‘text me’? Typically I say “I don’t text” and then I have to have a long discussion about why I don’t text and how to reach me, and here’s my email, and here’s my number, but don’t call me, because I don’t like phone calls, blah blah blah… It would be nice to have a standardized way of transmitting data – line of sight – no internet – no wifi – no bluetooth. Just transmit basic data. No worrying about whether they are on apple, or android or Ubuntu Touch (wait, that’s no problem!) or whatever. No worrying about whether they have a cell phone or a cell phone plan, etc. It’s also more inclusive that way.

I can hear the voices now:

  • “But you can email all that!” – No! I want faster. No typing. No thinking.
  • “But you can text all that!” – No! I said I don’t text. Don’t ask me to text you.
  • “But you can ‘bump’ with Android” – I don’t bump. I don’t Android.
  • “This is making something new that we don’t need!” – Ok… maybe… And that’s the point of this blog. Let’s figure that out…

Why QR has failed thus far (In my opinion)

After all these thoughts above, I got to thinking about the limitations of QR. You can read some of my feelings in this bug report I filed at UBports for the Camera app. Of course, I completely understand the security need here and I can’t argue it. But this has always been the issue. For QR codes to flourish, the scanner must be one button away.

And, even if you had one button there is still the annoyance of having to focus the camera. I thought about creating a tiny keychain which had one button and a camera. You would point at the QR and push/hold the ‘shutter’ button. It would focus, scan the QR code and beep when it was logged. Later you could sync that data with whatever device you want, somehow securely.

And that’s when I started thinking that it would be cool to have an ‘audio QR code’. So I searched that and found Chirp. They basically have figured it out with proprietary software – not typically a good solution if you want awesome security and privacy… But, their stuff apparently works. It sends hypersonic sounds and data.

In my opinion, this direction could work, and here are the first pros/cons:

Pros

  • No focusing of cameras (faster scan?)
  • No camera at all (cheaper hardware?)
  • Audio? Maybe not as radioactive as radio??? (just throwing it out there for the healthy people?)
  • Other cool pros?

Cons

  • Apparently dogs don’t like hypersonic?
  • Would these things have to transmit all the time or could the ‘chirp’ be triggered with some kind of ‘hey! any birds out there who want to chirp me anything?”
  • Security? Could anyone chirp anything? I haven’t really looked deeply at that part yet as you can see.

Some suggestions to the conversation were:

  1. A watch (with a cam – full Dick Tracey style)
    Sure, except I would never wear a watch, and I’m not a Dick…Tracey…
  2. Near Field Communication (NFC) which is explained well in this old 2014 vid

Then, whatever the solution is, would be able to securely/safely transmit the stored data into the device of your choice for reviewing, handling.

Final thoughts

I feel like I don’t want to add to the smartphone in my pocket, but, it seems like there is no other way. Security people say you can’t really have a one-button something without compromising security of smartphone. SO…

That’s what I’ve got to say.

I hope some kind of cheap and useful solution lands here…

Categories
Life Skills Technology

CONVERT HARVESTED BULK EMAILS INTO USABLE SPREADSHEET IN A FEW STEPS

Did someone send you a bulk email and foolishly leave all the recipients exposed? Do you want to grab those recipients and use for your own great purposes? Good news, it’s not so hard to do!

Here’s what you’ll need:

  • A text editor (gedit on ubuntu)
  • Spreadsheet software (Libre Office is the one I’ll use here since it’s both free and awesome)

1. Copy and paste the emails into a text editor

Grab the group of email addresses starting from right after the ‘to: ‘ but don’t actually include the ‘to:’. Copy this into your clipgboard.

2. Paste this to a fresh text editor window

3. Clean up the Paste

Make sure there is a trailing semi-colon after the last entry and no other gobbly gook before or after, other than just the names of the recipients and the actual email addresses. So like this stuff:

John Doe johndoe@johndoe.com; Jane Doe janedoe@janedoe.com;

4. Save file as a .csv file

Click ‘save as’ and give the file a handy name and make sure it has a trailing .csv as the file type

5. Go and open the file.

In my case it opens the file with LibreOffice – this is good. In your case…how could I know your case?

6. Select ‘semi-colon’ as the separation type

When Libre Office opens the file, uncheck comma, etc, and just leave the semi-colon because that’s what you’ve got.

7. Reformat the Orientation (optional)

After importing thus far, Libre Office seems to make the orientation horizontal putting one email address in each column and all the entries into a row spanning many horizontal columns which I didn’t like. I want to convert this to a vertical orientation with the entries spanning downwards across many rows.

Yippee yay. Someone alrady figured this out here

But in short, just do this:

  1. copy all your horizontal entries
  2. copy them to clipboard (control c)
  3. control + shift + V into the cell you want
  4. Paste (which does the ‘paste special’ command)
  5. Delete the original row you just copied from

Voila. Clean vertical list of harvested emails!

Hope that helps.

My Comments

My only improvement would be to add a script that pulls the name out and adds to the column on the right. I know thunderbird can do this when you right click and either ‘copy email address’ or ‘copy name and email address’. So it’s definitely possible to do this. In fact, how cool would that be if Thunderbird could just do all this in an add-on … hmm. Too bad I can’t program…

Categories
Life Skills Nextcloud Technology Tutorial

How to Install Video Convertor App on Nextcloud

Someone complaining that they can’t view an Apple .MOV file on your Nextcloud server? No surprise considering ‘apple is apple’.

Heard about the cool app ‘Video Convertor’ for Nextcloud? Tried to install it and use it and got that ‘requires ffmpeg error?

Same.

Turns out it’s pretty easy to to get it going and here is how:

Let’s do it.

  1. ssh into your Nextcloud box. In my case it’s a nextcloudpi box if that matters…
  2. type this into the command line: sudo apt install ffmpeg
  3. Hit your enter key
  4. Wait a long time while a seriously large amount of stuff installs (and probably this is why it’s not installed by default)
  5. Go back to your video file in the Nextcloud in the browser user interface and note the three dots on the right side of the file name. Click that
  6. Select the video icon ‘convert into’
  7. Choose your options for speed and format
  8. Do it.
  9. Wait again (a lot of waiting here…)
  10. Create a new share of the newly created video file
  11. Test the file (good practice) by sending the share to yourself in a browser that you don’t use so you are seeing what your recipient will see without your login credentials affecting things.
  12. All good? Ship the new link to your recipient

Hope that helps

Categories
Freedom and Privacy Life Skills Nextcloud Technology Tutorial Ubuntu

HOW TO MAKE A NEXTCLOUD PI BOX WORK AS REVERSE PROXY TO YUNOHOST

Background

The situation was that I wanted to test out the very cool project Yunohost but I already had Nextcloudpi (another awesome project!) running on my local network. I already had a DDNS service (No-ip) running which was pointing to my Nextcloudpi (“NCP” moving forward) box, and a second DNS service that I set up which pointed to my router for the purpose of Yunohost (“YH” moving forward). You can read about that cool DNS solution in my other blog post, by the way, as it works really well and gives a bit more power.. and it’s free.

The problem was that ports 443 and 80 were being used by NCP but YH needed them as well. The only options appeared to be:

a) change the ports of one of the machines (complicated because clients outside of the LAN in the world webs won’t know those ports) or
b) figure out what a ‘reverse proxy’ is and then make it work

The challenge was that NCP was using Apache whilst YH uses NGINX – both of which are capable of reverse proxy. So, in order to do this I ended up doing some learning of both although it turns out it wasn’t really needed after all. C’est la vie…at least I learned some things!

At the end of the journey of trying about 10,000 different settings in the Apache default configuration file that comes with NCP (and other Apache installs) called “000-default.conf” it started working after adding just two lines to my configuration which seemed not to be in any other tutorial online for some reason. The key two lines that were needed were:

SSLEngine On
SSLProxyEngine On

Without those two lines it would just never work even though the rest of my settings were right.

Ok, enough of my hard journey story, let’s log the actual configuration and steps so that anyone who wants to do the same setup can save the pain!

Assumptions

Before we begin, I will assume that you already have the following set up:

  1. Server A (in my case NCP) running Apache which is already successfully reachable and working from the outside world. Through this machine Server B will be reached.
  2. Server B (in my case YH) running whatever (I think) but in my case it’s running NGINX and this box is the one we are trying to make visible to the outside world through ports 80 and 443
  3. You have a domain (nameofyourdomain.com in this tutorial) which you own and which is already successfully hitting your router (You can test by pinging the domain and seeing the IP address of your router show up). You can do this with my other tutorial mentioned above as well. You can also get a free ‘domain’ from services like No-ip if you don’t care what the domain looks like.
  4. You have full access to SSH into both machines, but in this case Server A is the critical one.
  5. You are using an Ubuntu environment and have know how to open a Terminal and use it (roughly)
  6. You are willing to learn and try things if this doesn’t perfectly work as per this specific example. I’ll give you a few resource links as well to help you in case your set up needs tweaking.

Let’s Begin – Setting up Apache Default Config on Server A

  1. ssh into Server A (format ssh username@your.IP.Address )
  2. Change directory (cd) to your Apache2 sites-available directory. In my case it looks like this but if you aren’t using NCP it might be different
    cd /etc/apache2/sites-available
  3. Type this command to back up your Server A apache settings. If you mess anything up you can restore this one and delete the default and rename it back to original name.

sudo cp 000-default.conf 000-default.backup

  1. Check to make sure the new file with .backup is showing up by typing ‘ls’. If it’s there then proceed.
  2. Copy the sample configuration below into your clipboard
  3. Open the default Apache config file with this command (if you haven’t used nano before probably good to do a quick online overview) for editting:
    sudo nano 000-default-conf
  4. you may have some settings already in this file (you should) at the top. Scroll down to the bottom of whatever is there and then paste in the sample you have copied from below with the control + shift + v (If you don’t hold shift it won’t paste)
  5. Go through the newly-pasted configs and adjust to your settings changing domain names and ip addresses to yours.
  6. Control x to save and exit, ‘y’ to save modified buffer and ‘enter’ key to write your changes
  7. Restart apache with this command to see if it works (this will shut down whatever stuff is running on Server A so probably good idea to do this wisely if the server is currently being used by others…:

sudo systemctl restart apache2

If you get nice silence from your terminal, and no ‘journalctl’ messages, then things are going the right direction.

Run Let’s Encrypt Manually for SSL certs on Server A

For this step, to be honest, I’m not sure if you need to do it because certs are already on both boxes for NCP and YH. But you might not have that so I’ll provide the steps since after I did them nothing was worse and everything was working… I would love to get some feedback on this step.

  1. Install Let’s Encrypt tools:
    sudo apt-get install python-certbot-apache
  2. Run it
    sudo certbot --apache -d example.com -d www.example.com

Let’s Finish – Test Server B

Go to your domain from outside your LAN (just to make sure you are getting a real test) and try to hit Server B. I find mobile phone data plans are good for this kind of testing, otherwise, call your grandma and ask her what happens when she goes to nameofyourdomain.com…

If it works, you’re done.

If it doesn’t you might need to tweak your settings.

Sample Configuration – copy this and adjust to your set up

Your IP address will obviously be changed to the correct one where your Server B is. Copy everything in the code block below.

 <VirtualHost *:80>
    ServerAdmin name@nameofyourdomain.com
    ServerName nameofyourdomain.com
    ServerAlias www.nameofyourdomain.com

   ProxyPreserveHost on
   ProxyPass / http://192.168.1.37:80/
   ProxyPassReverse / http://192.168.1.37:80/

</VirtualHost>

#Listen 443

<VirtualHost *:443>

    SSLEngine On
    SSLProxyEngine On

     ServerAdmin name@nameofyourdomain.com
     ServerName nameofyourdomain.com
     ServerAlias www.nameofyourdomain.com

     ProxyPreserveHost on
     ProxyPass / https://192.168.1.37:443/
     ProxyPassReverse / https://192.168.37:443/
</VirtualHost>

FULL Sample Configuration Reference (DO NOT COPY THIS ONE)

This is what my config looked like when everything was done and working.

The ‘Rewrite engine’ stuff here was added by Lets Encrypt when it was run so it ‘should’ appear in your config after you run it after initial settings have been added. Same with the ‘Include’ stuff and the SSL certificate stuff at the bottom of the second entry.

<VirtualHost *:80>
    ServerAdmin name@nameofyourdomain.com
    ServerName nameofyourdomain.com
    ServerAlias www.nameofyourdomain.com

   ProxyPreserveHost on
   ProxyPass / http://192.168.1.37:80/
   ProxyPassReverse / http://192.168.1.37:80/

RewriteEngine on
RewriteCond %{SERVER_NAME} =nameofyourdomain.com [OR]
RewriteCond %{SERVER_NAME} =www.nameofyourdomain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

</VirtualHost>

#Listen 443

<VirtualHost *:443>

    SSLEngine On
    SSLProxyEngine On

     ServerAdmin name@nameofyourdomain.com
     ServerName nameofyourdomain.com
     ServerAlias www.nameofyourdomain.com

     ProxyPreserveHost on
     ProxyPass / https://192.168.1.37:443/
     ProxyPassReverse / https://192.168.37:443/

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/nameofyourdomain.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/nameofyourdomain.com/privkey.pem
</VirtualHost>

Random Keywords and messy spam from the Journey

This next section is merely a copy/paste of all the steps I was trying to try to get this working. The purpose is not to follow any of these instructions but merely to leave as keywords in hopes that other people trying the same things will end up finding this blog and save themself the pain! 🙂 So, don’t use the next section for any form of tutorial but feel free to read and learn.

  1. set up individual virtual host conf files on box 1 else:

We were unable to find a vhost with a ServerName or Address of mydomain.ca.
Which virtual host would you like to choose?


1: nextcloud.conf | mydomain.hopto.org | HTTPS | Enabled
2: ncp.conf | | HTTPS | Enabled
3: 000-default.conf | | | Enabled


Select the appropriate number [1-3] then [enter] (press ‘c’ to cancel):

Select the appropriate number [1-3] then [enter] (press ‘c’ to cancel): c
No vhost exists with servername or alias of mydomain.ca. No vhost was selected. Please specify ServerName or ServerAlias in the Apache config.
No vhost selected

hmm.

finding apache config…

seems like one shouldn’t mess with this… and that lets encxrypt probably does it for you

  1. sudo apt-get install python-certbot-apache (apparently not installed on ncp somehow..)
  2. created basic conf file in /sites-available
  3. restarted apache – worked
  4. added symlink to sites-enabled, restarted apache, breaks
  5. run certbot without enabled…with usual
    sudo certbot –apache -d example.com -d www.example.com

pi@nextcloudpi:/etc/apache2 $ sudo certbot –apache -d mydomain.ca -d www.mydomain.ca
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator apache, Installer apache
Cert not yet due for renewal

You have an existing certificate that has exactly the same domains or certificate name you requested and isn’t close to expiry.
(ref: /etc/letsencrypt/renewal/mydomain.ca.conf)

What would you like to do?


1: Attempt to reinstall this existing certificate
2: Renew & replace the cert (limit ~5 per 7 days)


choosing option 2

fail. same error above

now trying to go back to simply 443 config in 000-default but wtihout ssl engine stuff.

now running:
sudo certbot --apache -d mydomain.ca -d www.mydomain.ca

this is something… progress….

the bad part:

Failed redirect for mydomain.ca
Unable to set enhancement redirect for mydomain.ca
Unable to find corresponding HTTP vhost; Unable to create one as intended addresses conflict; Current configuration does not support automated redirection

the good part

IMPORTANT NOTES:

  • We were unable to set up enhancement redirect for your server,
    however, we successfully installed your certificate.
  • Congratulations! Your certificate and chain have been saved at:
    /etc/letsencrypt/live/mydomain.ca/fullchain.pem
    Your key file has been saved at:
    /etc/letsencrypt/live/mydomain.ca/privkey.pem
    Your cert will expire on 2019-09-14. To obtain a new or tweaked
    version of this certificate in the future, simply run certbot again
    with the “certonly” option. To non-interactively renew all of
    your certificates, run “certbot renew”