Got a Acer ConceptD 7 Ezel CC715-71P to install Linux and test touch screen on it. After booting from Ubuntu 23.10 USB, the installer told me that I need to deal with the Intel RST settings. Reboot, F2, enter the BIOS setup, but I didn’t find any option related.
Category Archives: 技术
Play Linux vms on M3 Max
Yeah, got a new work laptop recently, MacBook Pro 16″, M3 Max/36GB/1TB. But Asahi Linux is not ready for M3 yet.
And I have VMware Fusion, then I tried a few linux distributions with arm64/aarch64 support.
How to run ARM64(aarch64) Qt auto tests on x86_64
Assume you have a host(x86_64) build of qtbase, like following:
1 2 3 4 5 6 7 |
cd ~/qt git clone git://code.qt.io/qt/qtbase.git mkdir qtbase-build cd qtbase-build ../qtbase/configure -developer-build -opensource -confirm-license -nomake examples -nomake tests -verbose cmake --build . --parallel -j8 |
Some extra work to setup system:
Build Qt dev/5.15/5.12/4.8 on Ubuntu 23.10
Install Ubuntu 23.10, for me, it’s an VM via VMware Fusion 13.5.0 on MacBook Pro 2019.
Install some needed packages,
1 2 3 4 5 6 7 8 |
sudo apt install -y zsh build-essential perl python3 git sudo snap install cmake --classic sudo apt install ninja-build sudo apt-get build-dep qtbase-opensource-src sudo apt-get install libxcb-xinerama0-dev sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev sudo apt-get install libdbus-1-dev libglib2.0-dev |
Default gcc/g++ is 13.2.0.
Add following in env:
1 2 3 |
export MAKEFLAGS='--jobs=8' export CMAKE_GENERATOR=Ninja |
Note for fixing network setup in vm
I normally run several linux vms in VMware Fusion on MacBook Pro 2019. Recently during a trip, the system stuck. I forced a shutdown and reboot. Then I lost network in a Ubuntu 23.04 vm, there is no ethernet interfaces in Network section in Settings(GNOME), and there is no related icon in top-right corner.
I googled a few times, I found one article helped me. Something is wrong in this file:
1 2 3 4 5 6 |
sudo cat /var/lib/NetworkManager/NetworkManager.state [main] NetworkingEnabled=false WirelessEnabled=true WWANEnabled=true |
Anyway, I just followed the steps in the article, it works for me.
1 2 3 4 |
sudo service NetworkManager stop sudo rm /var/lib/NetworkManager/NetworkManager.state sudo service NetworkManager start |
Play Qt dev in Flatpak world
XDG Desktop Portal and Flatpak are more and more in used. If you are using Qt, Flatpak KDE runtime is a good place to start, install pre-built Qt binaries in Flatpak world. But it’s normally for the released versions.
If you want to play with the edge of Qt, for example, dev branch, you can try following steps:
1 2 3 4 5 6 7 8 9 10 |
git clone https://github.com/liangqi/flatpak-kde-runtime.git cd flatpak-kde-runtime make remotes make check make org.kde.Sdk.app cd repo flatpak remote-add --user --no-gpg-verify liang-flatpak file://$(pwd) flatpak install --user liang-flatpak org.kde.Platform flatpak install --user liang-flatpak org.kde.Sdk |
And here is an example at io.qt.examples.dropsite.yaml
1 2 3 4 |
git clone https://github.com/liangqi/dropsite-flatpak.git cd dropsite-flatpak flatpak-builder --user --install --force-clean build-dir io.qt.examples.dropsite.yaml |
Thanks bbhtt for the help in matrix.to: Packaging KDE Apps in Flatpaks channel.
Install Vim 9.0 and enable Qml syntax
(Ubuntu 22.04/23.04)
1 2 3 |
$ sudo add-apt-repository ppa:jonathonf/vim $ sudo apt install vim |
Reference: How to Install Latest Vim 9.0 on Ubuntu Based Linux Distributions
Configure vim to enable Qml syntax
1 2 3 4 5 6 7 8 9 |
$ cd ~ $ mkdir .vim $ cd .vim $ mkdir ftplugin indent syntax $ wget -O ftplugin/qml.vim https://raw.githubusercontent.com/peterhoeg/vim-qml/master/ftplugin/qml.vim $ wget -O indent/qml.vim https://raw.githubusercontent.com/peterhoeg/vim-qml/master/indent/qml.vim $ wget -O syntax/qml.vim https://raw.githubusercontent.com/peterhoeg/vim-qml/master/syntax/qml.vim $ vi ~/.vimrc |
Add the following line:
1 2 |
autocmd BufRead,BufNewFile *.qml setfiletype qml |
Configure nvim and nvim-qt
1 2 3 4 5 |
$ cd ~/.config $ ln -s ~/.vim ./nvim $ cd nvim $ ln -s ~/.vimrc ./init.vim |
Reference: How to share config between Vim and Neovim
Help to test KDE/Plasma 6 Wayland
KDE developers are working hard on Plasma 6 Wayland. See also KDE Plasma 6 Development Progressing Well, Plasma 6 Beta Possible In A Few Months and KDE Plasma 6 Wayland Session: “It’s Been Working Great!”.
For example, you can install Neon Developer Edition via KDE neon: Live Images. After installation, you can upgrade it to KDE/Plasma 6,
sudo apt update
sudo apt install neon-settings-2
sudo apt full-upgrade
See also Neon Unstable now using Qt 6 Builds of Frameworks and Plasma.
If you find any bug, please help to report to KDE bugtracker. Here is my first ticket recently.
View heart rate for pool swimming with Workout app on Apple Watch
Normally you can see the heart rate information for running/hiking/skiing. But it’s not the case by default for pool swimming with Workout app.
On Apple Watch, Workout, touch the “…” button on Pool Swim(OPEN GOAL) section, click the pencil button on the top-right corner of “Open” section, Workout Views, Edit Views, enable the “Include” of “METRICS 2” for heart rate information and “HEART RATE ZONES” if needed. You can also “Reorder” the views, the button for it at the bottom of the page.
Reference:
* Apple: Use the Workout app on your Apple Watch
* Polar: HOW TO CALCULATE YOUR MAXIMUM HEART RATE
* Polar: HEART RATE ZONES | THE BASICS
Sway on VMware Fusion
With Manjaro(Arch based, Xfce edition), installed as a vm in VMware Fusion on macOS. You can install sway or sway-git.
sudo pacman -S sway
or
git clone https://aur.archlinux.org/wlroots-git.git
cd wlroots-git
makepkg -si
git clone https://aur.archlinux.org/swaybg-git.git
cd swaybg-git
makepkg -si
git clone https://aur.archlinux.org/sway-git.git
cd sway-git
makepkg -si
If you want to use gnome-terminal,
sudo pacman -S gnome-terminal
Modify /etc/sway/config , the line
set $term foot
to
set $term gnome-terminal
Modify /usr/share/wayland-sessions/sway.desktop , the line
Exec=sway
to
Exec=env WLR_NO_HARDWARE_CURSORS=1 /usr/bin/sway
If you want to restart display manager to login again,
sudo systemctl restart lightdm
Reference