How to restore local notes from backup on macOS

I will explain in this post how to restore local notes from a backup to Apple’s Notes app on macOS.

1. Quit Notes

2. Temporarily disable Notes in iCloud settings in System Preferences

3. Open Finder. Go to your home folder. Copy the folder in the following path to a safe location, just in case something goes wrong:

4. Create a backup of all notes which do not exist in your backup, if any… Copy & paste them to a safe place.

Warning! After the following step, all your existing notes will be permanently deleted and notes on the backup will replace them eventually. If your backup does not include all your notes, you will have to manually restore the missing parts by copying & pasting them into your Notes app.

5. If you are ready it is time to restore all your notes from your backup. Copy the folder in the following path from your backup to your home folder, or restore it via Time Machine from an older time point.

6. Run your Notes app and enable Notes in iCloud if you wish.

You should now have all your local Notes back… Congrats!

How to verify SHA or MD5 checksum on macOS

For sha256:

For sha1:

For sha512:

For md5:

Save file location of Rise of the Tomb Raider [Mac]

Save file location of Rise of the Tomb Raider [Mac]:

Go to this folder:

Double click to the Steam Saves shortcut. This will take you to a path like this:

You will find your save data in that folder.

How to review or cancel subscriptions in iOS

  1. Open Settings
  2. Tap on the top row which shows your name in its title and “Apple ID, iCloud, iTunes & App Store” in its subtitle.
  3. Tap on “iTunes & App Stores”
  4. Tap on your “Apple ID: your@email.com” row (pretty obvious, right?)
  5. Tap on “View Apple ID” option in the alert style popup (seriously…)
  6. Enter pin & password, or use Touch ID or Face ID.
  7. Scroll down a little…. You will see “Subscriptions”

How to share files and folders from debian linux to macOS or Windows

tuxI took the following steps to share a folder from my computer with debian 10 to my Mac with macOS on my local area network (i.e. LAN, home network). Accessing from a PC running Windows is very similar and it is also explained below.

  1. To share files and folders: Go to your debian. Follow this official guide:
    1. Install samba server.
    2. Edit config file.
    3. You don’t have to make your home folders writable, you can leave them as read only. I even recommend to make home folders not shared at all, just by commenting out all lines under [homes] section, including the section title, unless sharing all home folders is absolutely necessary.
    4. You can share just one folder under your home directory by adding another share definition.
    5. Add a user with a password to your samba server.
    6. Restart samba server.
  2. To access shared files and folders over network:
    If you use a Mac, use Finder to navigate to debian system on the network, click “Connect as…” button to login with a username and password.
    If you use a PC, open Windows Explorer, navigate to Networks… Just connect to your debian system by using a username and password.

Voilà!

Pleasure

CLIII

“But what says Socrates? – “One man finds pleasure in improving his land, another his horses. My pleasure lies in seeing that I myself grow day by day.”

The Golden Sayings of Epictetus, The Harvard Classics, 61st Printing, 1968, p. 172

Connection error (Xiaomi Mi Phone to PC via USB) (Solution)

If you have issues (empty folder, cannot connect, etc.) when connecting your Xiaomi phone to your PC via USB cable, you should try the following before you try anything else. This is how I solved it after I installed Mi Suite and enabled developer options and USB debugging; these were not necessary.

  1. Connect your device to your PC.
  2. Unlock your device (phone) if it is locked.
  3. On your device, swipe down from the top of the screen.
  4. Scroll down if necessary until you see the notification of “Android System”. It should be saying something like “This device is charging from USB”. Click on for other options. Choose file transfer or photo transfer.

How to change wallpaper settings in Gnome 3

There is surprisingly not any GUI option in Gnome 3 by default to change wallpaper settings. I use “dconf-editor” for this purpose. It is possible to center, scale, tile or stretch a wallpaper by using it.

“dconf-editor” can be found in the main repositories of Debian. Once you installed it, open dconf-editor, and navigate to: org -> gnome -> desktop -> background. There you will see the pop-up menu which let you make arrangements on your wallpaper.

Source: https://ask.fedoraproject.org/en/question/24825/on-gnome3-how-can-i-center-an-image-as-my-wallpaper-or-maybe-stretch-or-tile-it/

How to install debian alongside Windows (dual boot) with full disk encryption

In this post I will shortly list the steps to install debian using LVM and LUKS alongside a working Windows installation, as a dual boot system.

When you follow the following steps, you will have separate /home, root and swap partitions and all of them will be fully encrypted.

This is tested with debian 9 and Windows 10, 64 bit system with GPT partitioning structure.

  1. Create a free NTFS partition on your disk for Windows and a free disk space following the Windows partition for your Linux installation. I suggest at least 20G of disk size for Linux root partition. You may use debian live USB/CD and gparted for this purpose.
  2. Install Windows to the first partition.
  3. Plug in the ethernet cable and unplug all unnecessary USB disks except the installation one to prevent any mistake during installation and partitioning.
  4. Boot with a debian USB or compact disk and run the installer.
  5. Select a language: English
  6. Select your location: Choose yours.
  7. Configure locales: Choose yours or choose US.
  8. Configure the keyboard: Choose yours.
  9. Detect network hardware: “Some of your hardware needs non-free firmware files to operate. The firmware can be loaded from removable media, such as a USB stick or floppy. The missing firmware files are: iwlwifi-7260-17.ucode”. If you have such media available now, insert it, and continue. Load missing firmware from removable media: No.
  10. Detect network hardware: “Some of your hardware needs non-free firmware files to operate. The firmware can be loaded from removable media, such as a USB stick or floppy. The missing firmware files are: rtl_nic/rtl8411-2.fw”. If you have such media available now, insert it, and continue. Load missing firmware from removable media: No.
  11. Please enter the hostname for this system: Choose yours. This will be the name of your computer and it may be visible on the local area network.
  12. Please enter the domain name. Choose yours or hit enter.
  13. Choose a mirror of the Debian archive: Choose yours. Hit enter when it asks you for a proxy if you don’t need one.
  14. Set up users and passwords: Just hit enter to disable root account.
  15. A user account will be created for you to use instead of the root account for non-administrative activities. Full name: Choose something or enter yours. Choose a password.
  16. Partition disks: Manual.
  17. Create a 500M partition at the beginning of the free disk space. Set its mount point as “/boot”, format it and use it as ext4 journaling file system (In this guide boot partition will be unencrypted. If you want to make it encrypted as well, it is possible. Check duckduckgo).
  18. “Configure encrypted volumes”. Write changes to the disk: Yes.
  19. “Please select the devices to be encrypted”: Select the free space. Write changes to the disk: Yes. The data will be overwritten: Yes. Erasing data… (This can take a little while)
  20. Choose a secure encryption passphrase.
  21. Configure the logical volume manager. Write current partitioning scheme: Yes.
  22. Create volume group. Enter a name for volume group, such as “vg”.
  23. Select encrypted disk (/dev/mapper/sdx_crypt).
  24. Create a logical volume. Select vg. Give a logical volume name: root. Set its size. My suggestion: At least 20G.
  25. Create a logical volume. Select vg. Give a logical volume name: home. Set its size… Spare a few gigs for swap, if possible. Typically twice as your RAM size, but nowadays I think 4-8 gigs would be sufficient for most people.
  26. Create a logical volume. Select vg. Give a logical volume name: swap. Set its size. Give all the remaining space.
  27. Finish LVM configuration.
  28. Select LV root and configure it: Use as ext4, mount point /.
  29. Select LV home and configure it: Use as ext4, mount point /home.
  30. Select LV swap and configure it: Use as swap area.
  31. Finish partitioning and write changes to the disk.
  32. Installing system… (This can take a while).

Well, that was it… Stay free and stay safe.

How to install and use MAME on Linux (debian)

I published a post titled “How to install and use sdlmame on Linux (debian/ubuntu)” in 2008. Realized that it needs an update, I would like to quickly share my experience of using MAME on Linux (debian) in 2017.

Keep reading if you would like to easily play “Outrunners” like you do in the good old days, but this time with your child, friend or spouse with infinite coins, thanks to your GNU/Linux computer. 🙂

How to install MAME Arcade Emulator on Linux (debian)?

To install MAME Arcade Emulator on debian Linux, simply install “mame” package from the main repositories.

A simple “mame” keyword search in Synaptic:

 

 

Configuring your ROM directory:

You should properly configure your preferred rom directory in the MAME user interface before attempting to find/run your games.

Select “Configure Options” in the main menu.

Select “Configure Directories”…

Select “ROMs”…

Add path of the directory of your rom files here.

Place your rom files in your rom directory as .zip files.

Also remember that your rom files must be compatible with the MAME version you use. Old rom files may not work with newer MAME versions. You may find recent MAME roms here.

To run MAME Arcade Emulator:

Just click on its icon in your Applications list or just hit SUPER key and type mame and press ENTER. I prefer the latter.

Here is the MAME Arcade Emulator user interface:

Gnome Video Arcade

Another option is using “Gnome Arcade Emulator (a.k.a. Gnome Video Arcade)”, which is a  simple MAME frontend for the GNOME desktop. Just search its name in Synaptic and install it.

Here is its simple interface:

Just don’t get confused if you see lots of old “machine” names such as “Atari 2600 (NTSC)” or “Amstrad GX4000” in the “available games” list. QMC2 is also likewise confusing.

Have fun!