Posts in category “Linux”

Making bootable usb stick by dd command

You are already using Linux, so you have dd already, you don't need any other tools to make a bootable USB disk!

sudo dd bs=1M if=galliumos-3.1-baytrail.iso of=/dev/sda ; sync

Notice:

You should use your iso file name and replace /dev/sda to your own USB disk device.

Reference

ubuntu 20.04 upgrade axel to 2.17.9

try to download something but axel said "SSL error: (null)", so

axel https://github.com/axel-download-accelerator/axel/releases/download/v2.17.9/axel-2.17.9.tar.gz
tar xvfz axel-2.17.9.tar.gz 
cd axel-2.17.9
sudo apt install pkg-config -y
./configure && make && sudo make install
sudo apt remove axel
cd ..
rm -rf axel-2.17.9

解决CentOS 虚拟机从VMWare station 迁移到VirtualBox 不能启动问题

最近把一台CentOS7 虚拟机从Windows 10 的VMWare 迁移到 CentOS8 的VirtualBox上,结果不能启动,说找不到 root 和 swap。我猜测与 Host机器CPU架构不同有关,老机器是Intel芯片,新机器是 AMD CPU。 解决方法也蛮简单,进Rescue模式, yum update 就会自动装上一个新鲜的符合条件的内核。然后再重新启动就好了。 Reference

如此搞一下之后,启动倒是启动起来了,但启动时总有一个出错信息“error failed to send host log ”,虽然不影响使用,但看着很不爽。万能的Google很快给出了答案,把显卡换成 VBoxVGA 就好了。Reference

Ubuntu 22.04 fcitx-rime/ibus-rime wubin_pinyin 配置简入繁出

为啥用 fcitx 不用ibus呢.... 一开始我确实是用的ibus,但它老人家在 google doc 的网页里不显示候选文字框,等修复不知道要等到啥时候,我就扭头换 fcitx 了。

ibus-rime, fcitx-rime 已经内置这个功能,但它的默认配置里没有使用这个功能。废话不说,贴上我的配置文件

~/.config/fcitx 或 ibus/rime/default.custom.yaml 内容如下

patch:
 style:
  display_tray_icon: true
  horizental: false
  font_point: 14
 schema_list:
    - schema: wubi_pinyin
    - schema: pinyin_simp
 ascii_composer/switch_key:
  Shift_R: commit_code
  Shift_L: commit_code

~/.config/fcitx 或 ibus/rime/wubi_pinyin.custom.yaml 内容如下:

patch:
  switches:
    - name: ascii_mode
      reset: 0
      states: [ "中文", "西文" ]
    - name: full_shape
      states: [ "半角", "全角" ]
    - name: simplification
      states: [ "汉字", "漢字" ]

  simplifier/opencc_config: s2t.json
  engine/filters:
    - simplifier
    - uniquifier

How to let Supervisord wait 1 second before restarting my program?

It spent more than half an hour. Finally, I found this solution.... very simple!

#!/bin/bash
/usr/local/bin/noip2 -c /usr/local/etc/no-ip2.conf
sleep 1

noip sucks!

source