Day: November 15, 2021

ROCKPro64 with SATA card

ROCKPro64 with SATA card

ROCKPro64 is single board computer (SBC) equipped with a PCIe x4 open ended slot. I'm planing to replace my Buffalo NAS mother board, and reuse the Buffalo NAS case.

SATA card

According to compatibility list, ROCKPro64 supports 6 ports SATA card, Ziyituod SATA Card ASM 1062+1093 6-Port.

But I purchased one 10 ports SATA card, 10port 4x 1xJMB575 + 1xASM1166.

References

ROCKPro64 Hardware Accessory Compatibility
ROCKPro64

Turn off iMac Display Only

Turn off iMac Display Only

The iMac might not auto sleep sometimes, so what do you like to do before you go for quick snack? Turn off iMac display only. But there is not switch on monitor, luckily there are some ways to do.

Keyboard with Eject key

  • Control + Shift + Eject

Keyboard with Power key

  • Control + Shift + Power

Keyboard without Eject/Power

Go to login screen

  • Control + Command + Q

Then at the login screen

  • Escape

Keyboard with Touch Bar

Configure

  • Select System Preferences
  • Open Keyboard
  • Click Customize Control Strip...
  • Drag Screen Lock icon into the Touch Bar
  • Click Done.

Perform

Go to login screen

  • Tap the the Screen Lock icon on your Touch Bar

Then at the login screen

  • Escape to turn off the display immediately.

Mouse

Configure

  • Select System Preferences
  • Open Mission Control
  • Click Hot Corners
  • Choose Put Display to Sleep for one of the corner

Perform

  • Move your mouse to the corner configured

Terminal

Run the following command:

pmset displaysleepnow

References

[How to Turn Off Your Mac's Display Without Putting Your Computer to Sleep}(https://www.iclarified.com/76166/how-to-turn-off-your-macs-display-without-putting-your-computer-to-sleep)

Reconfigure iCloud in MacOS

Reconfigure iCloud in MacOS

Many days headache was fixed this morning...

Story

The problem with iCloud on my newly installed MacOS, which is High Sierra, 10.13.6, out of support by Apple.

The machine was installed via Internet, and the MacOS was Mountain Lion, then upgraded to High Sierra, the lastest can be installed in this 2011 iMac.

Issue

When connecting to iCloud at beginning, the iCloud can not sync Keychains, it is quite an issue for me, because I need to register all credentials to this iMac separately.

Then I decided to reconfigure iCloud by re-login to iCloud again.

But iCloud could not be registered any more after logout, I thought it could be issue with my unsupported OS.

Symptom

The symptom was repeating asking for iCloud user and password, no matter which iCloud I like to use. In the email account list, the account is just appear in very short period, then closed immediately.

Fix

This morning I tried to send email, found out that I could not add iCloud account, I decided to search solution in Internet.

The solution works for delete all files related to iCloud and system configuration. It is works for my newly configured iMac, because I have nothing in it.

Steps

Run following commands in terminal

rm ~/Library/Application Support/iCloud
rm ~/Library/Preferences/com.apple.systempreferences.plist01
rm ~/Library/Keychains

Then reboot

sudo reboot

References

Mac Can’t Connect to iCloud? Here Are 7 Ways to Fix It

Chinese Steamed Buns (馒头)

Chinese Steamed Buns (馒头)

Ingredients

  • 300g all-purpose flour
  • 1.5 teaspoon instant yeast
  • 2 tablespoons sugar (optional)
  • 150g water or 20ml more if needed
  • a tiny pinch of salt (around 1.5% of the dough)

Steps

  • Add ingredients
  • Stir using chopsticks
  • Use hand to knead dough
  • Till dough's surface becomes smooth
  • Put dough into container, use wet tower cover it up
  • First rising, until double size (can be 1 hour, 3 hours, or even longer. Such as overnight in refrigerator)
  • Knead dough till it become normal size
  • Separate it into smaller pieces
  • Put them into steam box resting for 10 minutes
  • Set up steamer with cold water
  • Boiling
  • Steam 18-20 minutes after boiling
  • Turn off fire
  • Wait for 5 minutes
  • Pick them up

References

Chinese Steamed Buns (Mantou)

Synology vi modify file ACL unintentionally

Synology vi modify file ACL unintentionally

When using vi editor in Synology SSH session, the ACL changed upon saving. This causes issue for permission sensitive application, such as SSH.

Cause

The vi command creates a new file, and write new contents into that file, and the new file doesn't follow the ACL of original file.

Update ACL using GUI

If SSH is not available, for example, the permission authorized_keys changed, and only public key access was opened. If the file was shared, GUI is allowed to change ACL in user's home directory.

The ACL page can be accessed using following steps.

  • Login DSM webpage
  • Right click on the file
  • Select Properties
  • Click on Permission Tab

View ACL from command line

In Synology, use following command to check file ACL

/usr/syno/bin/synoacltool -get <PATH>

Remove ACL from command line

To remove ACL, using following command

/usr/syno/bin/synoacltool -del <PATH>

Edit ACL from command line

For example, remove @users group from usbshare1

/usr/syno/sbin/synoshare --setuser usbshare1 RW - "@users"

Other options

More options can be found using following command

/usr/syno/bin/synoacltool -h

References

Manage Windows ACL with Command Line Interface ?