- Click top right VNC icon:
- Click the top right setting in VNC server windows:
- Select Options:
- In Options window, select Troubleshooting:
- Turn on Enable direct capture mode :
- Done.
2022年1月18日 星期二
vnc for preview using raspistill
2022年1月15日 星期六
wifi password
wpa_supplicant.conf contains readable wifi passwords, it can be replaced by the psk unreadable codes. cf: https://raspberrypi.stackexchange.com/questions/91616/wpa-supplicant-conf-in-raspberry-pi-3
- Run
wpa_passphrase "chiao-dlink842" Enter password, e.g. aaa123456, Press enterSome lines come out. e.g.
network={
ssid="chiao-dlink842"
#psk="aaa123456"
key_mgmt=WPA-PSKpsk=<codes>
}Delete the line with #psk="aaa123456", Then, add the rest lines to /etc/wpa_supplicant/wpa_supplicant.confDone.Also, for one (or some) of the AP not connected automatically, one can add this:disabled=1
2022年1月8日 星期六
記憶體的功能分類
cf: https://isite.tw/2016/05/20/15923
- ECC: 錯誤更正能力
- Buffered or Registered: 暫存緩衝的功能 (Registered)
- Non-ECC Unbuffered DIMM: 一般個人電腦使用的就是這種記憶體,價格最為低廉,但是既不具備錯誤更正能力,也沒有暫存緩衝的功能ECC
- Unbuffered DIMM: 比起 Non-ECC Unbuffered DIMM 來說,多了一顆記憶體顆粒
- ECC Registered DIMM: 除了錯誤更正能力,還加入了暫存器緩衝區的設計,目前 Intel 只有 Xeon E5 處理器搭配伺服器主機版才能使用這類記憶體。
2022年1月7日 星期五
PCIE speed
sudo lspci -vv | grep -E 'PCI bridge|LnkCap|LnkSta:'
00:1b.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #21 (rev f0) (prog-if 00 [Normal decode])
LnkCap: Port #21, Speed 8GT/s, Width x4, ASPM L0s L1, Exit Latency L0s <1us, L1 <16us
LnkSta: Speed 8GT/s (ok), Width x4 (ok)
00:1c.0 PCI bridge: Intel Corporation Cannon Lake PCH PCI Express Root Port #8 (rev f0) (prog-if 00 [Normal decode])
LnkCap: Port #8, Speed 8GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <1us, L1 <16us
LnkSta: Speed 5GT/s (downgraded), Width x1 (ok)
LnkCap: Port #0, Speed 8GT/s, Width x4, ASPM L1, Exit Latency L1 <8us
LnkSta: Speed 8GT/s (ok), Width x4 (ok)
LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Exit Latency L0s <4us, L1 unlimited
LnkSta: Speed 5GT/s (ok), Width x1 (ok)
Check pcie gen3 or gen4 gen version
sudo lspci -vv | grep -E 'PCI bridge|LnkCap|LnkSta:'
PCI Express 3.0
PCI-SIG 的 PCI Express 3.0 規格,新版每條 Lane 的單向頻寬增到 8Gbps.
但因為編碼方式改變了,相較於 2.0 之前採用 8b/10b (每10個bit只有8個是有效資料)而 3.0 編碼方式為 128/130,所以資料傳輸頻寬以及原始傳輸率基本當都可以算成 8Gbps.
x1 8Gbps (1GB/sec)
x4 32Gbps (4 GB/sec)
x8 64Gbps (8 GB/sec)
x16 128Gbps (16 GB/sec)
PCI-E 4.0 x4 ,提供最高 16GT/s×4=8GB/s 頻寬,
是 Gen3 NVMe SSD ( 8GT/s×4 =4GB/s )
| PCIE Gen |
year | 原始 傳輸率 |
頻寬(每個方向) | |||||
|---|---|---|---|---|---|---|---|---|
| ×1 | ×2 | ×4 | ×8 | ×16 | ||||
| 1.0 | 2003 | 2.5 GT/s | 250 MB/s | 0.50 GB/s | 1.0 GB/s | 2.0 GB/s | 4.0 GB/s | |
| 2.0 | 2007 | 5.0 GT/s | 500 MB/s | 1.0 GB/s | 2.0 GB/s | 4.0 GB/s | 8.0 GB/s | |
| 3.0 | 2010 | 8.0 GT/s | 984.6 MB/s | 1.97 GB/s | 3.94 GB/s | 7.88 GB/s | 15.8 GB/s | |
| 4.0 | 2017 | 16.0 GT/s | 1969 MB/s | 3.94 GB/s | 7.88 GB/s | 15.75 GB/s | 31.5 GB/s | |
| 5.0 | 2019 | 32.0 GT/s | 3938 MB/s | 7.88 GB/s | 15.75 GB/s | 31.51 GB/s | 63.0 GB/s | |
| 6.0 | 2021 | 64.0 GT/s | 7877 MB/s | 15.75 GB/s | 31.51 GB/s | 63.02 GB/s | 126.03 GB/s | |
2022年1月6日 星期四
Shrink the image file from dd
cf: https://www.pragmaticlinux.com/2020/12/how-to-clone-your-raspberry-pi-sd-card-in-linux/
- Download pishrink from GitHub
- pishrink pi4.img
- (optional) gzip 9 pi4.img
2021年12月31日 星期五
Remove ibus input method 輸入法
cf: https://askubuntu.com/questions/860780/how-to-remove-old-ibus-keyboard-input-menu-items
Enter dconf-editor and go to org.gnome.desktop.input-sources.sources then delete the input method not needed, e,g, ('ibus', 'fuzzy_table')
2021年12月30日 星期四
Inquiry about paper staus
Dear Mr./Ms. XXX [Editor's Name],
I have submitted my revised manuscript titled XXXX [manuscript id: xxxx] to your journal via the online submission system on dd/mm/yyyy [date of submission]. Two days later, the status changed to ‘with editor.’ However, the status has remained unchanged ever since.
I would be grateful if you could let me know whether there has been any further progress on my submission.
Sincerely,
XXXX [Your name and contact details]
2021年12月5日 星期日
Clean /var/log/journal
cf: https://j7.lb168.tw/2019/07/vacuum-var-log-journal/
sudo vim /etc/systemd/journald.confAdd the lines:SystemMaxUse=10M SystemMaxFileSize=10Msudo systemctl restart systemd-journald.service
cf: https://askubuntu.com/questions/1238214/big-var-log-journal
sudojournalctl --vacuum-size=10Msudojournalctl --vacuum-time=10d
2021年12月4日 星期六
Configure Thunderbird for localhost
cf : https://gist.github.com/raelgc/6031274
- 帳號設定 -> 新增其他帳號 -> Unix Mailspool(Movemail)(U)
- 您的大名: chiao
- 電子郵件地址: chiao@localhost
- 寄件伺服器: localhost
As of Thunderbird 87beta.x.x, Movemail support is removed.
https://www.thunderbird.net/en-US/thunderbird/87.0beta/releasenotes/
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Error while exporting excel from FAHP online system:
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /usr/share/php/OLE.php on line 319
sudo vim +319 /usr/share/php/OLE.php
Change "continue" to "continue 2" as follows:
default:
#chiao, 2021-12-5
# continue;
continue 2;
2021年11月28日 星期日
Phpmyadmin error: OpenDocument:group:OpenDocument/OpenOffice :group:OpenDocument/OpenOffice
cf:
- https://nknuahuang.wordpress.com/2021/07/29/phpmyadmin-fieldgroup-opendocument-openoffice%E8%A9%A6%E7%AE%97%E8%A1%A8has-no-type-%E9%8C%AF%E8%AA%A4%E4%BF%AE%E5%BE%A9/
- https://github.com/williamdes/phpmyadmintest/commit/47971806316304f650ca1b3742e2a53801d2a794#diff-a0dc86bb66cb91e51e913577b4bca7ff8ebfe41be3b82fa7f675d80c397fe180
Edit /usr/share/phpmyadmin/libraries/classes/Config/Form.php, add
protected function cleanGroupPaths(array $form): array
{
foreach($form as &$name) {
if (mb_strpos((string) $name, ‘:group:’) === 0) {
$name = str_replace(‘/’, ‘-‘, $name);
}
}
return $form;
}
public function loadForm($form_name, array $form)
{
$this->name = $form_name;
$form = $this->cleanGroupPaths($form);
$this->readFormPaths($form);
$this->readTypes();
}
phpmyadmin using zip to export database
- Edit php.ini, set zlib.output_compression = On
- sudo apt install php7.4-zip
2021年11月27日 星期六
.htaccess: Options not allowed here
cf: https://serverfault.com/questions/680563/apache-2-4-9-on-debian-7-8-htaccess-options-not-allowed
Edit /etc/apache2/mods-enabled/userdir.conf, change the line
AllowOverride FileInfo AuthConfig Limit IndexestoAllowOverride FileInfo AuthConfig Limit IndexesOptions
Cannpt login as mysql user root from normal user account
$ sudo mysql -u rootmysql> DROP USER 'root'@'localhost';mysql> CREATE USER 'root'@'localhost' IDENTIFIED BY '<root_password>';mysql> GRANT ALL PRIVILEGES ON *.* TO 'root'@'localhost' WITH GRANT OPTION; mysql>FLUSH PRIVILEGES;
In above, One replace 'root' e.g. with 'chiao' to create the a mysql user as root.
2021年11月26日 星期五
Disable Turn off WiFi of Raspberry Pi at boot
cf: https://tipsmake.com/how-to-turn-off-wifi-of-raspberry-pi
Edit the file /boot/config.txt, add this line under [all]
dtoverlay=disable-wifi
2021年11月25日 星期四
Unexpected 'new' (T_NEW) in /usr/share/php/Spreadsheet/Excel/Writer/Workbook.php
Because Error msg:
Parse error: syntax error, unexpected 'new' (T_NEW) in /usr/share/php/Spreadsheet/Excel/Writer/Workbook.php on line 180
Edit the line 180 as:
# $this->_parser =& new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version);
$this->_parser =new Spreadsheet_Excel_Writer_Parser($this->_byte_order, $this->_BIFF_version);
And line 194 as:
# $this->_tmp_format =& new Spreadsheet_Excel_Writer_Format($this->_BIFF_version);
$this->_tmp_format =new Spreadsheet_Excel_Writer_Format($this->_BIFF_version);
2021年11月7日 星期日
Clone drupal9 to pi4
- The source directory chiao@pi4:~/public_html/drupal9 does not need to be changed.
- Export drupal database from kpci7 as sql source file from here.
- Save the sql as drupal_kpci72004_20211108.sql
sed 's/utf8mb4_0900_ai_ci/utf8mb4_unicode_ci/g'drupal_kpci72004_20211108.sql > drupal_kpci72004_20211108_update.sqlImportdrupal_kpci72004_20211108_update.sql to pi4 MySQL database (by phpmyadmin):- Clone drupal database in pi4 as drupal_pi4_20211108
- Drop drupal database in pi4
- Import
drupal_kpci72004_20211108_update.sql
- Done.
- 下載 clonzilla zip 檔.
- 在USB上產生FAT32分割區(至少 200 MB) "mkfs.vfat -F 32 /dev/sdd1"
- mount /dev/sdd1 /media/usb
- 解壓縮檔案, 如: "unzip clonezilla-live-2.7.3-19-amd64.zip -d /media/usb/"
- 讓 USB 裝置可開機:
cd /media/usb/utils/linux
sudo bash makeboot.sh /dev/sdd
2021年11月5日 星期五
-
cf: https://ubuntuhandbook.org/index.php/2022/01/default-torrent-app-magnet-links-ubuntu/ Set “QBittorrent” as default app for magnet link,...
-
Download 7z-exe: https://www.7-zip.org/ Get into cmd window cd Z:\Classes\109year\Semester2\Calculus\B\HW\HW7 md files "C:\Program Fi...
-
Setting up Google Drive with rclone config involves creating a "remote" connection through an interactive terminal wizard. S...