Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Wednesday, June 17, 2026

[Linux Desktop] How to Make Ubuntu Look Like a Mac: Windows and Zoom Dock Guide

Many people want their Ubuntu to look like a Mac. But sometimes, some windows and icons do not change their colors, and the bottom bar (Dock) cannot zoom in. In this guide, I will show you how to fix these problems step by step!


Step 1: Change the Theme for Old Apps

Ubuntu has two types of windows: old ones (GTK3) and new ones (GTK4). First, let us change the old ones.

  1. Go to the website GNOME-Look.org and download the WhiteSur GTK Theme.
  2. Unzip the file. Put the folder into a hidden folder named ~/.themes/ in your Home folder. (If you do not see it, create a new folder and name it .themes).
  3. Open the GNOME Tweaks app and click Appearance.
  4. Find Legacy Applications and change it to WhiteSur-Dark.

🔥 Step 2: Download and Change Mac Icons (Don't Forget!)

To make your apps (like Files, Browser, and Settings) look exactly like a Mac, we need to change the system icons!

  1. Go to GNOME-Look.org again and search for WhiteSur Icon Theme. Download the zip file.
  2. Unzip the file. This time, create a new hidden folder named .icons in your Home folder (the path is ~/.icons/).
  3. Put the unzipped icon folders inside ~/.icons/.
  4. Open the GNOME Tweaks app, go to Appearance, find the Icons option, and change it to WhiteSur (or WhiteSur-dark). Now all your app pictures will change to Mac style!

Step 3: Fix the New Windows (GTK4)

Now, you will see that some apps (like the Terminal) look like a Mac with red, yellow, and green buttons. But the File Manager does not change. Let us force it to change:

  1. Open your Terminal and type these commands:
    mkdir -p ~/.config/gtk-4.0
    cp -r ~/.themes/WhiteSur-Dark/gtk-4.0/* ~/.config/gtk-4.0/
  2. To make sure the system uses this theme, type this command in the Terminal:
    echo 'export GTK_THEME=WhiteSur-Dark' >> ~/.profile
  3. [Important] Now, log out of Ubuntu and log in again. Now, all windows will look like a Mac!

Step 4: Change to X11 for a Zooming Dock

On a real Mac, when your mouse moves over the bottom bar (Dock), the icons get bigger. The default Ubuntu dock cannot do this now. We need to use a great app called Plank. But Plank only works in an X11 environment.

  1. Open the Extension Manager app and turn off Dash to Dock.
  2. Log out of Ubuntu.
  3. On the login screen, click your name.
  4. Do not type your password yet! Look at the bottom-right corner. Click the small gear icon (⚙️).
  5. Change it from Ubuntu to Ubuntu on Xorg (this is X11). Then, type your password and log in.

Step 5: Install Plank and Turn on Zoom

Now we are in X11, so we can use Plank!

  1. Open the Terminal and install Plank:
    sudo apt update && sudo apt install plank -y
  2. Type this command to open Plank settings:
    plank --preferences
  3. Click the Appearance tab and turn Icon Zoom to ON.
  4. Now, move your mouse to the bottom of the screen. The icons will zoom in smoothly!

Step 6: Make Plank Start Automatically

Let us make Plank start by itself every time you turn on your computer:

  1. Open the GNOME Tweaks app again.
  2. Click Startup Applications on the left.
  3. Click the "+" button, find Plank, and add it.

⚠️ A Big Problem: You Cannot Use Waydroid in X11!

If you use Waydroid to play Android games or use Android apps on Linux, please be careful!

Why is X11 bad for Waydroid?

Waydroid only works with the new Wayland system. It does not like the old X11 system.

  • Waydroid will not open. It will show a big error message.
  • If you force it to open, it will be very slow, laggy, and bad.

📊 The Hard Choice: Looks or Functions?

You have to choose what is more important to you:

What do you want? Your System Good Things Bad Things
Beautiful Mac Looks X11 + Plank Beautiful windows, Mac icons, and cool icon zoom animation. Waydroid will not work. You cannot use Android apps.
Android Apps Wayland + Dash to Dock Waydroid works very smoothly. The Dock cannot zoom in. It looks less like a Mac.

Conclusion

Now we fixed the window colors, changed the icons, and got a beautiful Mac dock! Even though we have to choose between "Dock Zoom" and "Android Apps," learning how Linux works is a lot of fun. Enjoy your new beautiful desktop!




Tuesday, November 26, 2024

在Ubuntu看盤

 之前一直想用Bottles+Wine在Ubuntu裝上三竹來看盤(沒錯~我暫時脫離了科技業,現在是個全職投資者),可是一直碰到問題而無法順利運行。

今天想想那就改用VirtualBox+Windows的老方案好了,不過安裝時碰到了2個問題在此紀錄一下。


問題:

1. Ubuntu OEM Kernel不支援virtualbox-dkms

Workaround: 切去generic Kernel就可以安裝好。


2. 要運行VirtualBox時遇到被KVM佔用住資源

Workaround: 

sudo rmmod kvm && rmmod kvm-intel -> 失敗!想了一下原來是卡到multipass,所以把它先暫停

sudo snap stop multipass -> 成功


後記:

缺點是我不能同時使用multipass...... :(

Tuesday, June 04, 2024

How to use GUI in Ubuntu Multipass

Currently, Multipass does not provide a complete graphical interface for use like virtual machine software such as VMware or VirtualBox.

Of course, there are alternative solutions. You can connect to a Multipass instance using RDP, VNC, or X forwarding methods.

Here, I will use the X forwarding method, so when I need to use a GUI, I can launch the graphical interface of the relevant app from the CLI.

Step1. Create an SSH public key on your local machine 

Monday, May 13, 2024

Enhanced version of Ubuntu Multipass

A long time ago, there was an introduction on how to use Ubuntu's Multipass. If you're interested, you can refer to the following link below:

https://go-linux.blogspot.com/2020/06/canonicalmultipass.html


Today, I'm here to introduce to you the enhanced version of Multipass (currently in the beta channel of Snap).


1. Install it from snap beta channel:

Monday, May 06, 2024

安裝Ubuntu 22.04到新的X1

前幾天把舊X1的Ubuntu升級到22.04後體驗上還不錯,所以今天早上就把new X1也安裝了Ubuntu 22.04並且一樣保留Windows作業系統。(雙系統)

以下稍微紀錄一下我的步驟:

1. 關閉Windows的Bitlocker

2. 透過Windows內建的磁碟管理程式 -> 壓縮現有磁碟區 -> 分割出新的磁碟區 (之後裝Ubuntu)

3. 進入BIOS關閉Secure boot

4. 用Ubuntu 22.04的USB flash開機 

5. 選擇保留Windows boot loader跟grub一起,並且把Ubuntu安裝到步驟#2的磁碟區


之後就很順利完工囉~ 這篇文章就是用new X1+Ubuntu打的 :D

Friday, May 03, 2024

20.04.6 LTS to 22.04.03 LTS 筆記

今天把一台很久沒用的X1 laptop從Ubuntu 20.04.6 LTS升級到22.04.03之後,目前發現到兩個問題:

1. 無法使用gnome-terminal與terminator

爬了一下文看到很多人也遇到類似的問題,有人分享更改預設語言的方法然後重新開機並登入後可以解決,但我試了好幾次都失敗,後來發現當我開啟Settings -> Region & Language -> Manage Installed Languages之後視窗會直接crash,用Xterm直接執行gnome-terminal看到有error,最後死馬當活馬醫把我最懷疑的gcin移除掉並重新開機登入後gnome-terminal與terminator就正常了!沒想到這招有用!


2. 無法開啟Chrome

解決的方法就很簡單,重新下載並安裝吧!

wget -c https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

sudo dpkg -i google-chrome-stable_current_amd64.deb

sudo apt-get install -f


先這樣吧,之後有碰到其它問題的話會再陸續update~~


Wednesday, August 19, 2020

利用nmcli連接802.1X wlan

 

由於公司內部實在太多AP跟SSID了,在UC18 GNOME的環境一開NetworkManager scan wifi就會整個hang住,稍微研究了一下怎麼用nmcli的方式連上一個802.1X WLAN。


$ nmcli con add type wifi ifname <wifi interface> con-name <connection_profile> ssid <SSID>

$ nmcli connection edit id <connection_profile>


nmcli> set ipv4.method auto

nmcli> set 802-1x.eap peap

nmcli> set 802-1x.phase2-auth mschapv2

nmcli> set 802-1x.identity USERNAME

nmcli> set 802-1x.password PASSWORD

nmcli> set wifi-sec.key-mgmt wpa-eap

nmcli> save

nmcli> activate


搞定,收工。

Wednesday, March 11, 2020

How can I setup a snmptrap receiver server on Ubuntu Server 18.04?

之前有介紹過如何在Ubuntu Server 18.04建立一個SNMP agent讓SNMP Manager可以做get request的動作,請參考此篇: How can I setup a SNMP server on Ubuntu Server 18.04

現在來補足一下如何在Ubuntu Server 18.04實作snmptrap receiver server.

Step1. 安裝snmptrapd
$ sudo apt install snmptrapd
Step2. 配置snmptrpad可以接收agent送過來的event
$ vi /etc/snmp/snmptrapd.conf
authCommunity log,execute,net public
以上,我只開啟IPv4 + snmp version 2c

Step3. 重啟snmptrapd
$ sudo systemctl restart snmptrapd

Step4. 檢查port 162 active (UDP port 162是snmptrap, 161是snmp get,getnext,set)
$ sudo netstat -tupln | grep 162
udp        0      0 0.0.0.0:162             0.0.0.0:*                           2100/snmptrapd 
Step5. 遠端送出一個snmptrap的event
這裡我用CentOS8安裝Net-SNMP的基本工具snmptrap後,送出一個snmptrap example command.
# snmptrap -d -v 2c -c public 192.168.1.151 "" UCD-SNMP-MIB::ucdStart message s "/ disk utilization exceed 90%"
 Step6. 檢查Ubuntu Server 18.04有沒有收到此event?
$ sudo tail -f /var/log/syslog | grep snmptrap
Mar 11 16:07:06 us18 snmptrapd[2100]: 2020-03-11 16:07:06 [UDP: [192.168.1.132]:51067->[192.168.1.151]:162]:#012iso.3.6.1.2.1.1.3.0 = Timeticks: (194731) 0:32:27.31#011iso.3.6.1.6.3.1.1.4.1.0 = OID: iso.3.6.1.4.1.2021.251.1#011iso.3.6.1.4.1.2021.10.1.101 = STRING: "/ disk utilization exceed 90%"
That's all!

Friday, February 21, 2020

Turn on wireless monitor mode to capture wireless packets in Ubuntu

Wireshark在預設上是不能正確顯示無線網路的封包格式,所以如果你直接抓取wifi interface只會看到ethernet的訊框而不是802.11相關的格式。

那怎麼做呢?其實只要把wifi interface轉成monitor mode就可以了,以下嘗試在Ubuntu desktop底下實作看看:

Step1. 針對wifi NIC(wlan0)新增一個對應的monitor interface(mon0):
$ sudo iw dev wlan0 interface add mon0 type monitor

Step2. 啟動mon0 interface:
$ sudo ifconfig mon0 up
之後去啟動wireshark就會看到mon0 interface並透過它來抓802.11的封包了。

How can I setup a SNMP server on Ubuntu Server 18.04

在這篇短文中,紀錄一下如何在Ubuntu Server 18.04配置一台SNMP server同時支援snmpv2與v3,之後若有機會在補齊如何收遠端機器所發出來的snmp trap event。

Step1. 安裝:
$ sudo apt update
$ sudo apt install snmp snmpd snmp-mibs-downloader

Step2. 配置snmpd.conf:
$ sudo vi /etc/snmp/snmpd.conf
# 允許all net來連線 (IPv4+IPv6)
agentAddress udp:161,udp6:[::1]:161
# SNMP v2:
rocommunity public  default    -V systemonly
# SNMP v3:
createUser ubuntu MD5 1234567890
rouser ubuntu

Step3. 重啟snmpd 
$ sudo systemctl restart snmpd

Step4. 測試 SNMP v2與v3 lookup:
# SNMP v2
 $ snmpwalk -v 2c -c public 127.0.0.1
# SNMP v3:
$ snmpwalk -v 3 -a MD5 -A 1234567890 -u ubuntu -l auth 127.0.0.1

Note: 以上由於我都是在本機測試,所以IP為127.0.0.1

Wednesday, February 19, 2020

How can I setup a DNS server on Ubuntu Server 18.04

以前都在紅帽圈設定與架設DNS server,今天筆記一下如何在Ubuntu Server安裝與架設一個master DNS server。

Step1. 安裝DNS server
$ sudo apt install bind9

Step2. 新增Zone 
$ cd /etc/bind9
$ sudo vi zones.example.com
zone "example.com" {
    type master;
    file "/etc/bind/db.example.com";
};
Step3. 將新增的Zone加入到DNS server
$ sudo vi named.conf.local
include "/etc/bind/zones.example.com";
Step4. 建立zone file
$ sudo vi db.example.com
$TTL    86400
@      IN  SOA server1.example.com. root.server1.example.com. (
                  1     ; Serial
                 86400     ; Refresh
                 3600     ; Retry
                 2419200     ; Expire
                 84600 )   ; Negative Cache TTL
       IN  A      10.10.10.253
       IN  NS     server1.example.com.

server1    IN  A      10.10.10.253
x1            IN  A      10.10.10.100

Step5. 重新啟動DNS server
$ sudo systemctl restart bind9


以下開始來測試囉!
Step1. 將DNS指向localhost
$ sudo vi /etc/netplan/50-cloud-init.yaml
network:
    ethernets:
        enp0s3:
            dhcp4: true
            nameservers:
                addresses: [127.0.0.1, 168.95.1.1]
    version: 2
$ sudo netplan apply

Step2. 來個正解查詢:
$ host server1.example.com
server1.example.com has address 10.10.10.253

Friday, November 22, 2019

Install Powerline in Ubuntu 18.04

Powerline是隻用Python寫的小外掛程式,主要是可以讓你的Linux shell變得更漂亮,而且安裝與配置上實在是非常簡單,只要以下兩個步驟就搞定囉!

Step1:
$ sudo apt-get install powerline

Step2:
$ vi ~/.bashrc
# Powerline
POWERLINE_SCRIPT=/usr/share/powerline/bindings/bash/powerline.sh
if [ -f $POWERLINE_SCRIPT ]; then
  source $POWERLINE_SCRIPT
fi

最後重新開啟一個新的shell或是登出/登入系統後,你就有一個漂亮的shell環境了!

使用前:

使用後:



11/28 更新:
總覺得初始值的Powerline+PS1實在太陽春了,網路上搜尋了一下,果然有強者做了加強版本來外掛!請參考Pureline讓你的tty更好用吧!

Friday, November 15, 2019

Install Notepad++ on Ubuntu

You can find Notepad++ from Sanp, so that you can install it with command below:

$ sudo snap install notepad-plus-plus






Wednesday, November 06, 2019

Ubuntu Server + desktop environment

雖然說Ubuntu Server預設只有文字介面可以使用,但使用者還是可以安裝上圖形介面環境(而且還很容易),只要執行以下3個命令,你就可以選擇自己所喜歡的桌面環境。

$ sudo apt-get install xubuntu-desktop
$ sudo apt-get install lubuntu-desktop
$ sudo apt-get install kubuntu-desktop

xubuntu, lubuntu, kubuntu的差別可以參考以下的連結。
Ubuntu各版本主要差異

如果想讓系統開機還是使用文字介面(runlevel 3)的話,可以執行以下的命令:
$ sudo systemctl set-default multi-user

反之執行以下的命令後系統又會切回圖形介面環境(runlevel 5):
$ sudo systemctl set-default graphical



Wednesday, October 09, 2019

計算Linux系統開機時間

現在大部分的Linux distro.應該都採用systemd,所以可以利用它內建的一隻command去幫我們計算出系統開機的時間,比如:
$ systemd-analyze
Startup finished in 31.365s (firmware) + 5.287s (loader) + 16.686s (kernel) + 55.716s (userspace) = 1min 49.056s
graphical.target reached after 55.345s in userspace

這邊可以看到系統開機到讓user可以登入前BIOS, boot loader, kernel與userspace分別花了多少時間。從上面的例子可以觀察到系統總共開機時間是大約1分49秒,BIOS花了31.365s,boot loader花了5.287s,kernel花了16.686s,userspace(所有services起來所需時間)是55.716s

如果要看是哪隻daemon佔用多少時間可以加上blame參數:
$ systemd-analyze blame

下次如果有人問你這個系統開機要花多久? 你就可以鬆了一口氣了。



Friday, July 26, 2019

How NB-IoT module (SIM7000-C) work on Rasberry Pi and Ubuntu Server 18.04

最近study了一下NB-IoT,並且稍微筆記了一下如何實作。

不過可惜的是我手邊目前並沒有NB-IoT的Sim卡,所以使用normal SIM卡搭配SIM7000C這張module做了些練習。

以下是我的測試設備:



  • Rasberry Pi 2B
  • Waveshare SIM7000C NB-IoT HAT
  • CHT(中華電信) normal SIM
  • OS: Ubuntu Server 18.04

How to connect with CHT cell site via AT commands:

Connect to SIM7000C via USB-console:

$ sudo screen /dev/ttyUSB3 115200

Examine SIM7000C is ready to use

at

Check PIN status

at+cpin?
Ready: SIM is not pending for any password.

Configure APN(Access Point Name) automatically

at+cgdcont=1,”ip”,””
1: cid
ip: packet data protocol type 
“”: apn

Check signal

at+csq
+csq: rssi, ber
rssi:
0 -115 dBm or less
1 -111 dBm
2...30 -110... -54 dBm
31 -52 dBm or greater
99 not known or not detectable
ber:0...7 As RXQUAL values in the table in GSM 05.08 [20] subclause 7.2.4

Scan cell site:

It will take about 120 secs or more, and 46692 is CHT.
at+cops=?
+cops=?
(index,format,oper)
Index: Integer type: order number of operator in SIM preferred
Format: 3GPP MCC/MNC
MCC
MNC
ISP
466
11
中華電信 (CHT)
466
92
中華電信 (CHT)
466
93
台灣大哥大
466
97
台灣大哥大
466
99
台灣電信
466
03
遠傳電信
466
01
遠傳電信
466
88
遠傳電信
466
89
台灣之星
466
12
亞太電信
466
12
亞太電信
oper: String type(string should be included in quotation marks)

Number
Type
0
GSM
7
CAT-M1
9
NB-IoT

Connect to CHT cell site:

at+cops=1,2,”46692”

at+cgatt?

at+cpsi?
+cops=index,format,oper

Get APN

We need APN for connecting to the Internet.
It seems normal CHT SIM card is used internet as APN, and NB-IoT of CHT is internet.iot.
at+cgnapn
+cgnapn valid,APN
0: The network did not sent APN parameter to UE.In the case, is NULL.
1: The network sent APN parameter to UE.

Connect to the Internet

at+cstt=”internet”
+cstt APN,username,password

Initial mobile data network

at+ciicr

Check public IP address

at+cifsr

Test1: Ping testing 

at+cipping=”168.95.1.1”

Test2: TCP testing

at+cipstart=”tcp”,”ftp.isu.edu.tw”,21
+cipstart=mode,ip,port
Mode: tcp,udp

看到這裡相信很多人已經放棄了,不過請別氣餒其實有更簡單好用的方法唷!


Connect to the Internet via nmcli and mmcli

Issue: nmcli cannot manage interfaces


# nmcli c up id GSM

Error: Connection activation failed: No suitable device found for this connection.

Workaround:


# mv /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf  /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf_orig

# touch /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf

# systemctl restart network-manager

Ensure that mmcli can recognize and scan cell site


# mmcli -m 0

 --------------------------------
  General  |     dbus path: /org/freedesktop/ModemManager1/Modem/0
           |            device id: fa2d54b8e3ad72c95e99f28ba51b4ce48565684b
  --------------------------------
  Hardware |         manufacturer: QUALCOMM INCORPORATED
           |                model: 0
           |             revision: MPSS.JO.3.0.2.c3-00140-9607_LTEONLY_PACK-1  1 [Feb 01 2018 07:00:00]
           |         h/w revision: 10000
           |            supported: gsm-umts, lte
           |              current: gsm-umts, lte
           |         equipment id: 865233030789763
  --------------------------------
  System   |       device: /sys/devices/platform/soc/3f980000.usb/usb1/1-1/1-1.3
           |              drivers: option1, qmi_wwan
           |               plugin: SimTech
           |         primary port: cdc-wdm0
           |                ports: ttyUSB0 (qcdm), ttyUSB2 (at), cdc-wdm0 (qmi), wwan0 (net), 
           |                       ttyUSB3 (at)
  --------------------------------
  Status   |         lock: sim-pin2
           |       unlock retries: sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)
           |                state: registered
           |          power state: on
           |          access tech: lte
           |       signal quality: 94% (recent)
  --------------------------------
  Modes    |     supported: allowed: 2g; preferred: none
           |                       allowed: 4g; preferred: none
           |                       allowed: 2g, 4g; preferred: 4g
           |                       allowed: 2g, 4g; preferred: 2g
           |              current: allowed: 2g, 4g; preferred: 4g
  --------------------------------
  Bands    |     supported: egsm, dcs, pcs, g850, eutran-1, eutran-3, eutran-5, eutran-8
           |              current: egsm, dcs, pcs, g850, eutran-1, eutran-3, eutran-5, eutran-8
  --------------------------------
  IP       |     supported: ipv4, ipv6, ipv4v6
  --------------------------------
  3GPP     |         imei: 865233030789763
           |          operator id: 46692
           |        operator name: 466 92
           |         registration: home
  --------------------------------
  3GPP EPS | ue mode of operation: csps-2
  --------------------------------
  SIM      |     dbus path: /org/freedesktop/ModemManager1/SIM/0



# mmcli -m 0 --3gpp-scan --timeout=120

  ---------------------
  3GPP scan | networks: 46612 - 466 12 (lte, available)
            |           46692 - 466 92 (lte, current)
            |           46605 - 466 05 (gsm, forbidden)

Connect to the Internet with nmcli


# nmcli c add type gsm ifname "*" con-name GSM apn "internet"

Connection 'GSM' (e79462c8-d02d-4ae0-b3f4-a08db28087af) successfully added.

# nmcli c up id GSM

相信這個方法簡單了許多吧!不過了解一下底層的AT command如何運作也是相當不錯的機會啦!以下是AT command完整的說明文件: http://www.waveshare.net/w/upload/4/49/SIM7000_Series_AT_Command_Manual_V1.02.pdf

Appendix:

AT+CMNB Preferred selection between CAT-M and NB-IoT.

+cmnb: mode
1 LTE CAT-M
2 NB-IoT
3 CAT-M and NB-IoT

SIM7000C + pppd撥接上網

  1. To remove modemmanager firstly, otherwise ppp0 connection will be terminated by it.
$ sudo apt remove modemmanager

  1. To install ppp
$ sudo apt install ppp

  1. Configured ppp script for adding some AT commands.
$ cd /etc/ppp
$ vi gprs-connect-chat

TIMEOUT 15
ABORT "DELAYED"
ABORT "BUSY"
ABORT "ERROR"
ABORT "NO DIALTONE"
ABORT "NO CARRIER"
TIMEOUT 40
'' \rat
OK at+cstt=\"internet\"
OK at+cgatt?
OK at+cpsi?
OK at+ciicr
OK ATD*99***1#
CONNECT

  1.  Configured ppp dial-in configuration file:
$ cd /etc/ppp/peers
$ vi gprsdial

/dev/ttyUSB3
115200
crtscts
modem
debug
nodetach
usepeerdns
noipdefault
defaultroute
0.0.0.0:0.0.0.0
connect '/usr/sbin/chat -s -v -f /etc/ppp/gprs-connect-chat'

  1. Added “noauth” parameter in /etc/ppp/options
  2. Plug-in SIM7000C.
  3. To execute pppd call 
$ sudo pppd call gprsdial

root@Lawrence-ThinkPad-T420S:/etc/ppp/peers# pppd call gprsdial 
timeout set to 15 seconds
abort on (DELAYED)
abort on (BUSY)
abort on (ERROR)
abort on (NO DIALTONE)
abort on (NO CARRIER)
timeout set to 40 seconds
send (^Mat^M)
expect (OK)
^M
DST: 0^M
^M
*PSUTTZ: 19/06/26,08:14:58","+32",0^M
at^M^M
OK
 -- got it

send (at+cstt=\"internet\"^M)
expect (OK)
^M
at+cstt="internet"^M^M
OK
 -- got it

send (at+cgatt?^M)
expect (OK)
^M
at+cgatt?^M^M
+CGATT: 1^M
^M
OK
 -- got it

send (at+cpsi?^M)
expect (OK)
^M
at+cpsi?^M^M
+CPSI: LTE NB-IOT,Online,466-92,0xC8C9,54027119,280,EUTRAN-BAND8,3640,0,0,-9,-59
,-50,20^M
^M
OK
 -- got it

send (at+ciicr^M)
expect (OK)
^M
at+ciicr^M^M
OK
 -- got it

send (ATD*99***1#^M)
expect (CONNECT)
^M
ATD*99***1#^M^M
CONNECT
 -- got it

Script /usr/sbin/chat -s -v -f /etc/ppp/gprs-connect-chat finished (pid 2813), status = 0x0
Serial connection established.
using channel 12
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB3
sent [LCP ConfReq id=0x1 ]
rcvd [LCP ConfReq id=0x0 ]
sent [LCP ConfNak id=0x0 ]
rcvd [LCP ConfAck id=0x1 ]
rcvd [LCP ConfReq id=0x1 ]
sent [LCP ConfAck id=0x1 ]
sent [LCP EchoReq id=0x0 magic=0x640f0536]
sent [PAP AuthReq id=0x1 user="Lawrence-ThinkPad-T420S" password=]
rcvd [LCP DiscReq id=0x2 magic=0xd41b8a15]
rcvd [LCP EchoRep id=0x0 magic=0xd41b8a15 64 0f 05 36]
rcvd [PAP AuthAck id=0x1 ""]
PAP authentication succeeded
sent [CCP ConfReq id=0x1 ]
sent [IPCP ConfReq id=0x1 ]
rcvd [LCP ProtRej id=0x3 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfReq id=0x0]
sent [IPCP ConfNak id=0x0 ]
rcvd [IPCP ConfRej id=0x1 ]
sent [IPCP ConfReq id=0x2 ]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfAck id=0x1]
rcvd [IPCP ConfNak id=0x2 ]
sent [IPCP ConfReq id=0x3 ]
rcvd [IPCP ConfAck id=0x3 ]
Could not determine remote IP address: defaulting to 10.64.64.64
not replacing default route to enp0s25 [10.101.47.1]
local  IP address 10.169.25.71
remote IP address 10.64.64.64
primary   DNS address 168.95.1.1
secondary DNS address 168.95.192.1
Script /etc/ppp/ip-up started (pid 2824)
Script /etc/ppp/ip-up finished (pid 2824), status = 0x0

$ ifconfig ppp0
ppp0: flags=4305  mtu 1500
        inet 10.169.25.71  netmask 255.255.255.255  destination 10.64.64.64
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 9  bytes 382 (382.0 B)
        RX errors 0  dropped 0 overruns 0  frame 0
        TX packets 18  bytes 1385 (1.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0 collisions 0

$ ping 168.95.1.1 -I ppp0 -c 3
PING 168.95.1.1 (168.95.1.1) from 10.169.121.115 ppp0: 56(84) bytes of data.
64 bytes from 168.95.1.1: icmp_seq=1 ttl=248 time=292 ms
64 bytes from 168.95.1.1: icmp_seq=2 ttl=248 time=460 ms
64 bytes from 168.95.1.1: icmp_seq=3 ttl=248 time=267 ms

--- 168.95.1.1 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 267.265/340.248/460.987/85.994 ms