把ubuntu搞得像mac

sudo apt install gnome-shell-extension-manager gnome-tweaks git curl wget sassc htop neofetch -y
sudo apt install flatpak -y
sudo apt install gnome-software-plugin-flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
sudo reboot now

到www.pling.com/p/1102582/下载mac图标
将文件解压后,将整个文件夹复制到~/.icons目录

git clone https://github.com/vinceliuice/WhiteSur-wallpapers.git
cd WhiteSur-wallpapers/
sudo ./install-gnome-backgrounds.sh
git clone https://github.com/vinceliuice/WhiteSur-gtk-theme.git --depth=1
cd WhiteSur-gtk-theme
./install.sh -a normal -m -N stable -l --round -t all
sudo ./tweaks.sh -g
./tweaks -F -f default

没有火狐运行:./tweaks -F

sudo flatpak override --filesystem-config/gtk-4.0

扩展管理器里安装

blur my shell
user themes
search light
gnome 4x ui
quick settings tweaker

打开优化,app里面
icons选cupertino-Sonoma
shell里选WhiteSur-Light-solid
Legacy App选WhtieSur-Light

查看全文

vhdx镜像添加nbd支持

  1. 先安装qemu-utils

    sudo -i
    apt update
    apt install qemu-utils
  2. 转到/etc/initramfs-tools目录

    cd /etc/initramfs-tools
  3. 将mwtools工具挂载到任何一个方便的位置,我这里是挂载到了我的主目录下面,mwtools目录自己mkdir

    mount /dev/sdb1 /home/kob/mwtools
  4. 将几个文件拷贝过来

    cp /home/kob/mwtools/mwtools/distros/initramfs-tools/initramfs.conf .
    cp /home/kob/mwtools/mwtools/distros/initramfs-tools/modules .
    chmod +x modules
    cd hooks
    cp /home/kob/mwtools/mwtools/distros/initramfs-tools/hooks/mwnbd .
    chmod +x mwnbd
    cd ..
    cd scripts/local-top
    cp /home/kob/mwtools/mwtools/distros/initramfs-tools/scripts/local-top/mwnbd .
    chmod +x mwnbd
    cd ..
    cd local-bottom
    cp /home/kob/mwtools/mwtools/distros/initramfs-tools/scripts/local-bottom/mwnbd .
    chmod +x mwnbd

    debian要在modules文件最后一排加上efivarfs

  5. 最后再更新一下

    cd /boot
    mkinitramfs -o /boot/initrd.img-6.11.09.19-generic

    debian的话运行下面的命令:

    sudo update-initramfs -u -k all
查看全文

ubuntu安装cursor

  1. 先要安装一个fuse,这里一定要装libfuse2,装fuse的话直接挂了

    sudo apt-get install libfuse2
  2. 去下一个cursor:

    wget https://downloads.cursor.com/production/client/linux/x64/appimage/Cursor-0.46.11-ae378be9dc2f5f1a6a1a220c6e25f9f03c8d4e19.deb.glibc2.25-x86_64.AppImage
  3. 移动到/opt文件夹

    mv Cursor-0.46.11-ae378be9dc2f5f1a6a1a220c6e25f9f03c8d4e19.deb.glibc2.25-x86_64.AppImage /opt/Cursor.AppImage
  4. 改一下权限

    sudo chmod +x /opt/cursor.appimage
  5. 写一个启动脚本

    nano cursor.sh

    内容如下:

    #!/bin/bash
    /opt/cursor.appimage --no-sandbox
  6. 给他一个运行权限

    chmod +x cursor.sh
  7. 把他移动到合适的位置

    sudo mv cursor.sh /usr/local/bin/
  8. 创建一个桌面快捷方式

    sudo nano /usr/share/applications/cursor.desktop

    内容如下:

    [Desktop Entry]
    Name=Cursor
    Comment=A powerful code editor for developers
    Exec=/usr/local/bin/cursor.sh
    Icon=/opt/cursor.png
    Terminal=false
    Type=Application
    Categories=Development;
  9. 最后再更新一下图标

    gtk-update-icon-cache
    update-desktop-database
查看全文

ubuntu 24.04安装搜狗输入法

  1. 先删除fcitx5:

    sudo apt purge fcitx5
    sudo apt autoremove
  2. 安装fcitx4:

    sudo apt install fcitx
  3. 设置fcitx为系统输入法:
    开始>语言支持>选择fcitx4
  4. 设置fcitx开机自启动:

    sudo cp /usr/share/applications/fcitx.desktop /etc/xdg/autostart/
  5. 卸载系统ibus输入法框架:

    sudo apt purge ibus
  6. 在官网下载搜狗输入法安装包,并安装,安装命令 sudo dpkg -i 安装包名:

    sudo dpkg -i sogoupinyin_4.2.1.145_amd64.deb
  7. 安装输入法依赖:

    sudo apt install libqt5qml5 libqt5quick5 libqt5quickwidgets5 qml-module-qtquick2
    
    sudo apt install libgsettings-qt1
  8. 重启电脑
  9. 解决闪屏

    sudo nano /etc/gdm3/custom.conf

    ‌1. 取消WaylandEnable的注释‌:找到以下行并取消其前面的注释符号(删除开头的#):

    WaylandEnable=false
查看全文

Ubuntu下安装neovim编辑器

  1. 用snap安装最新版,apt安装的版本比较旧:

    sudo snap install nvim –classic
  2. 安装Lazyvim插件:https://www.lazyvim.org/installation

    sudo git clone https://github.com/LazyVim/starter ~/.config/nvim
  3. 下载字体:https://www.nerdfonts.com/font-downloads

    wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.3.0/0xProto.zip
  4. 解压字体文件,将mono字体复制到字体文件夹:

    unzip 0xProto.zip
    sudo cp 0xProtoNerdFontMono-Bold.ttf /usr/share/fonts/
    sudo apt install fontconfig
    fc-cache -fv
  5. 最后,还可以安装一个gcc编译器:

    sudo apt install build-essential
查看全文