2021年10月22日 星期五

Install Chinese Input on Ubuntu 20.04

1. Settings / Region & Language / Input Sources / Manage Installed Language

    Add Chinese

2. Settings / Region & Language / Input Sources / + 

    Select ... , 

    then Other, 

    then select Chinese, Press Add

3. Settings / Region & Language / Input Sources / Chinese

    Press Chinese, Select Chinese (Chewing)


2021年10月8日 星期五

VirtualBox Copy & Paste don't work between host and guest OS (for Ubuntu)

Refer to https://askubuntu.com/questions/63420/how-to-fix-virtualboxs-copy-and-paste-to-host-machine



1) VirtualBox / Machine / General / Advanced
    Shared Clipboard: Bidirectional
            Drag'n' Drop: Bidirectional
2) The guest's Ubuntun terminal commands:
sudo apt install virtualbox-guest-x11 --reinstall
VBoxClient-all --clipboard
I used --reinstall option because of I had virtualbox-guest-x11 package installed and before reinstalling it I had:
$ VBoxClient-all --clipboard
VBoxClient: error: No service specified. Quitting because nothing to do!
3) After reboot screen resolution jumps to its minimal value, so
Run Guest OS (Ubuntu) / Settings / Displays / Resolution 

2020年12月4日 星期五

The default way to take screenshot in Linux #print screen #prtscr

The default way to take screenshot in Linux


Almost all Linux distributions and desktop environments support these keyboard shortcuts.

Let’s take a look at the list of keyboard shortcuts you can utilize:

PrtSc – Save a screenshot of the entire screen to the “Pictures” directory.
Shift + PrtSc – Save a screenshot of a specific region to Pictures.
Alt + PrtSc  – Save a screenshot of the current window to Pictures.


Ctrl + PrtSc – Copy the screenshot of the entire screen to the clipboard.
Ctrl + Shift + PrtSc – Copy the screenshot of a specific region to the clipboard.

Ctrl + Alt + PrtSc – Copy the screenshot of the current window to the clipboard.

Big5 txt files became unreadable under Linux

command line (convert big5 encoding text.txt to utf8 encoding test-utf8.txt)

iconv -f big5 -t utf8 test.txt > test-utf8.txt

Refer to:  

https://www.itread01.com/p/160400.html

2020年11月5日 星期四

My Favorite Git Setting (for Ubunut)


1. Add the following in ~/.bash_profile


#! /bin/bash
#-----------------------------------------------------------------
# Bash autocompletion for Git

if [ -f ~/.git-completion.sh ]; then
   source ~/.git-completion.sh
fi

if [ -f ~/.git-prompt.sh ]; then
   source ~/.git-prompt.sh
fi

# PS1 may be replaced
 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\][\w]\[\033[0m\]\[\033[1;36m\]$(__git_ps1)\[\033[0;33m\]\[\033[0m\]$ '
#PS1='\[\033[01;32m\]\u@\h\[\033[00m\]: \[\033[01;34m\]\w \[\033[0m\]\[\033[1;36m\] $(__git_ps1)\[\033[0;33m\]\[\033[0m\]$ '
#PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
#PS1="[\[\033[1;32m\]\w\[\033[0m\]] \[\033[0m\]\[\033[1;36m\]\$(git_branch)\[\033[0;33m\]\$(git_since_last_commit)\[\033[0m\]$ "
#PS1="[\[\033[1;32m\]\w\[\033[0m\]] \[\033[0m\]\[\033[1;33m\]\$(__git_ps1)\[\033[0;33m\]\[\033[0m\]$ "


2. Download  https://github.com/git/git/blob/master/contrib/completion/git-completion.bash 

and rename by git-completion.sh

3. download https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh

$ mv git-completion.sh ~/.git-completion.sh
$ mv git-prompt.sh ~/.git-prompt.sh
$ chmod 775 .git-completion.sh
$ chmod 775 .git-prompt.sh


4. 

$ source ~/.bashrc

or


$ source ~/.bash_profile

Reference result




2019年11月13日 星期三

DEBUGGING ARDUINO SKETCHES WITH ATMEL STUDIO 7 (How to install hardware debug tool for ATMEL Studion 7)









Refer to :
1. http://www.solutions-cubed.com/electronic-design-blog/debugging-arduino-sketches-with-atmel-studio-7/

Arduino IDE (Windows app version vs conventional version)

1. The Arduino IDE from Windows app store do not have conventional directory. It's directory is on
   Windows hides windows store apps in c:/users/YourUserName/AppData(hidden folder)/Local/Packages
2. App version of Arduino IDE is not good to translate Arduino sketch file(*.ino) to ATMEL Studio 7 (*.cpp).
3. Suggestion: Removed app version of Arduino IDE and install conventional Arduino IDE from https://www.arduino.cc/en/main/software

2019年9月24日 星期二

AC6 STM32 Eclipse


Run System Workbench for STM32
1. load workspace
    PS: You may delete workspace if you need.

2. Open Projects from File System

3. Import Projects From File System or Archive


4. Build Code to check project is OK or not.