Useful Notes for Mac, Ubuntu and Windows

Lingling Yang
3 min readApr 22, 2019

--

Outline

conda base in terminal prompt

Set auto_activate_base True or False to control this.

# check 
conda config --show | grep auto_activate_base
# set it false
conda config --set auto_activate_base False
source ~/.bashrc
# set it True
conda config --set auto_activate_base True
source ~/.sourcerc

Environment

List all environment variables

$ printenv

Copy the folder structure without files (inside the original folder):

$ find -type d -links 2 -exec mkdir -p “~/save/to/path/examplefolders/{}” \;

Keyboard:

  • Show the full path in the folder browse: Ctrl + L; return: esc
  • Show/Unshow the hidden files in the folder browse: Ctrl + H
  • Set a window occupying the left/right half of the screen :Super + ←/→ (Ubuntu 18.04)

Ubuntu and windows time:

Operating systems store and retrieve the time in the hardware clock located on your motherboard.

Linux/Unix/Mac store the time on the hardware clock as UTC by default. UTC time is Coordinated Universal TimeWindows stores the time on the hardware clock as the local time.

Solutions:

Change the time in linux is more reliable and easier. 1. make linux use local time
In Ubuntu 18.04:
$ timedatectl set-local-rtc 1 --adjust-system-clock
To check out if your system uses Local time, just run:
$ timedatectl
Will see the local time zone is in use in the Warning section
2. make windows use UTC timecheck here: http://ubuntuhandbook.org/index.php/2016/05/time-differences-ubuntu-1604-windows-10/

Create links

windows:mklink /j C:\Users\yll\Zotero\storage D:\dropbox\ZoteroStorage (latter is the target)mklink /j "C:\Users\yll\Zotero\storage" "D:\Google Drive\ZoteroStorage Mac:ln -s /Users/linglingyang/Dropbox/ZoteroStorage /Users/linglingyang/Zotero/storage 
(use absolute path, first is the target)
Ubuntu:
ln -s "/Users/linglingyang/Google Drive/ZoteroStorage" /Users/linglingyang/Zotero/storage
(use absolute path, first is the target)

Install matlab .iso file

# Create a folder to use as a mount point.
$ sudo mkdir /media/mathworks
# Mount the ISO to that folder under root permission
$ sudo mount -t iso9660 -o loop ~/Downloads/R2018b_glnxa64_dvd1.iso /media/mathworks
# Run the installer script use sudo
$ sudo /media/mathworks/install
# installing..........
# Note: check 'Create symbolic links to MATLAB scripts in: '
# mount the second .iso
$ sudo umount /media/mathworks
$ sudo mount -t iso9660 -o loop ~/Downloads/R2018b_glnxa64_dvd2.iso /media/mathworks/

Terminator terminal manager

$ sudo apt-get install terminator

add a directory to the $PATH

Edit .bashrc in your home directory and add the following line:

$ export PATH="/path/to/dir:$PATH"// examine the value environment variables
echo $PATH

.bashrc need to be sourced or logout/login (or restart the terminal) for the changes to take effect. To source your .bashrc, simply type

$ source ~/.bashrc

Configure Multiple monitors (xrandr)

$ xrandr --listmonitors// set DP-5 as the primary display
$ xrandr --output DP-5 --primary
// set DP-3 to be right of HDMI-0
$ xrandr --output DP-3 --right-of HDMI-0
// turn off the monitor
$ xrandr --output DP-3 --off
// turn back the monitor
$ xrandr --output DP-5 --auto

Color good for Eyes:

(R: 199, G: 237, B: 204) (#C7EDCC)

Using DPT-RP1 in Ubuntu

package: https://github.com/janten/dpt-rp1-py

Installation

$ pip3 install dpt-rp1-py

Basic Usage

// register the dpt-rp1 device (only need run once)
$ dptrp1 register

// list all documents on the device
$ dptrp1 list-documents
// help
$ dptrp1 -h
// get help for the upload command
$ dptrp1 help upload
// uploading a document to the reader
$ dptrp1 upload ~/Desktop/scan.pdf

GNOME Shell Extensions

tool Tweaks

add extension using browse or command

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

No responses yet

Write a response