├── README.md └── mscorefonts.sh /README.md: -------------------------------------------------------------------------------- 1 | # Silverblue tidbits 2 | Some things I do on Fedora Silverblue (best Linux desktop 😀️) to get software I want on the host whilst trying to avoid package overlaying. This is entirely for myself, but maybe others might find it useful. 3 | 4 | - Contents 5 | - [Google Chrome](#google-chrome) 6 | - [Nano](#nano) 7 | - [Android Tools (adb, fastboot etc)](#android-tools-adb-fastboot-etc) 8 | - [MS Core Fonts](#ms-core-fonts) Arial, Courier, Times, Webdings etc 9 | - [youtube-dl](#youtube-dl) 10 | - [wireguard](#wireguard) 11 | - [Broadcom Wireless Driver (wl/b43)](#broadcom) 12 | - [NVIDIA](#nvidia) 13 | - [Visual Studio Code (Prompt & SDKs)](#vscode-tweaks) 14 | - [Large /sysroot/ostree/repo](#ostree-prune) 15 | 16 | ### Google Chrome 17 | It's a bad idea to install the Google Chrome RPM, you'll eventually get stuck in an update loop where the rpm keeps replacing the update each time. 18 | 19 | #### Repo 20 | 21 | ```bash 22 | sudo -i 23 | ``` 24 | ```bash 25 | cat << EOF > /etc/yum.repos.d/google-chrome.repo 26 | [google-chrome] 27 | name=google-chrome 28 | baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64 29 | enabled=1 30 | gpgcheck=1 31 | gpgkey=https://dl.google.com/linux/linux_signing_key.pub 32 | EOF 33 | ``` 34 | 35 | #### Install 36 | 37 | ```bash 38 | rpm-ostree install google-chrome-stable 39 | ``` 40 | --- 41 | 42 | ### Nano 43 | 44 | #### ncurses 45 | 46 | ```bash 47 | wget https://ftp.gnu.org/pub/gnu/ncurses/ncurses-6.1.tar.gz 48 | tar -xvf ncurses-6.1.tar.gz && cd ncurses-6.1 49 | ./configure --prefix=/usr/local 50 | make -j4 51 | sudo make install 52 | ``` 53 | 54 | #### nano 55 | ```bash 56 | wget https://www.nano-editor.org/dist/v4/nano-4.3.tar.gz 57 | tar -xvf nano-4.3.tar.gz && cd nano-4.3 58 | CFLAGS="-I/usr/local/include/ncurses" ./configure --prefix=/usr/local 59 | make -j4 60 | sudo make install 61 | ``` 62 | --- 63 | 64 | ### Android Tools (adb, fastboot etc) 65 | 66 | ```bash 67 | wget https://dl.google.com/android/repository/platform-tools-latest-linux.zip 68 | unzip platform-tools-latest-linux.zip 69 | sudo cp -v platform-tools/adb platform-tools/fastboot platform-tools/mke2fs* platform-tools/e2fsdroid /usr/local/bin 70 | ``` 71 | 72 | #### Device rules (to use without root) 73 | 74 | ```bash 75 | git clone https://github.com/M0Rf30/android-udev-rules.git 76 | cd android-udev-rules 77 | sudo cp -v 51-android.rules /etc/udev/rules.d/51-android.rules 78 | sudo chmod a+r /etc/udev/rules.d/51-android.rules 79 | sudo groupadd adbusers 80 | sudo usermod -a -G adbusers $(whoami) 81 | sudo systemctl restart systemd-udevd.service 82 | adb kill-server 83 | adb devices 84 | ``` 85 | --- 86 | 87 | ### MS Core Fonts 88 | 89 | #### cabextract 90 | ```bash 91 | wget https://www.cabextract.org.uk/cabextract-1.9.1.tar.gz 92 | tar -xvf cabextract-1.9.1.tar.gz 93 | cd cabextract-1.9.1 94 | ./configure --prefix=/usr/local && make 95 | sudo make install 96 | ``` 97 | 98 | #### mscorefonts.sh 99 | 100 | ```bash 101 | wget https://raw.githubusercontent.com/p1u3o/tidbits/master/mscorefonts.sh 102 | sh mscorefonts.sh 103 | ``` 104 | ##### To install user-wide (Flatpak will see these) 105 | ```bash 106 | mkdir ~/.local/share/fonts 107 | mkdir ~/.local/share/fonts/mscorefonts 108 | cp -v fonts/*.ttf fonts/*.TTF ~/.local/share/fonts/mscorefonts/ 109 | ``` 110 | ##### To install system-wide (Flatpak might not see these yet) 111 | ```bash 112 | sudo mkdir /usr/local/share/fonts/ 113 | sudo mkdir /usr/local/share/fonts/mscorefonts/ 114 | sudo cp -v fonts/*.ttf fonts/*.TTF /usr/local/share/fonts/mscorefonts/ 115 | ``` 116 | --- 117 | 118 | ### youtube-dl 119 | 120 | #### Python Fix 121 | ```bash 122 | sudo ln -s /usr/bin/python3 /usr/local/bin/python 123 | ``` 124 | #### youtube-dl 125 | ```bash 126 | sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl 127 | sudo chmod a+rx /usr/local/bin/youtube-dl 128 | youtube-dl 129 | ``` 130 | --- 131 | 132 | ### wireguard 133 | 134 | #### rpm fusion 135 | 136 | Enable RPM Fusion if you haven't already 137 | 138 | ```bash 139 | sudo rpm-ostree install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm 140 | ``` 141 | Reboot 142 | 143 | #### kmod 144 | 145 | ```bash 146 | rpm-ostree install akmod-wireguard 147 | ``` 148 | Reboot 149 | 150 | --- 151 | 152 | ### Broadcom 153 | 154 | #### rpm fusion 155 | 156 | Enable RPM Fusion if you haven't already 157 | 158 | ```bash 159 | sudo rpm-ostree install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm 160 | ``` 161 | Reboot 162 | 163 | #### non-free driver (wl) 164 | 165 | This driver is not open source and is known to be unreliable. If possible use the alternative driver below if your hardware supports it. 166 | 167 | ```bash 168 | rpm-ostree install akmod-wl 169 | ``` 170 | Reboot 171 | 172 | #### free driver (b43) 173 | 174 | Please see [here](https://wireless.wiki.kernel.org/en/users/Drivers/b43#Supported_devices) that your hardware is supported before using this. 175 | 176 | The open source driver still needs firmware files. 177 | 178 | ```bash 179 | rpm-ostree install http://download1.rpmfusion.org/nonfree/fedora/tainted/30/x86_64/Packages/b/b43-firmware-6.30.163.46-4.fc30.noarch.rpm 180 | ``` 181 | Reboot 182 | 183 | --- 184 | 185 | ### NVIDIA 186 | 187 | #### rpm fusion 188 | 189 | Enable RPM Fusion if you haven't already 190 | 191 | ```bash 192 | sudo rpm-ostree install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm 193 | ``` 194 | Reboot 195 | 196 | #### kmod & drivers 197 | 198 | ```bash 199 | rpm-ostree install akmod-nvidia xorg-x11-drv-nvidia xorg-x11-drv-nvidia-cuda 200 | rpm-ostree kargs --append=rd.driver.blacklist=nouveau --append=modprobe.blacklist=nouveau --append=nvidia-drm.modeset=1 201 | ``` 202 | 203 | #### initramfs 204 | 205 | If you want to make sure the nvidia driver is part of the initramfs, which allows the modesetting driver to work sooner (full screen boot logo), enable initramfs generation. I personally recommend this, although it comes at the cost of slower updates. 206 | 207 | ```bash 208 | rpm-ostree initramfs --enable 209 | ``` 210 | 211 | Reboot 212 | 213 | #### note 214 | 215 | Fedora has a fast updating kernel, sometimes the kernel can be updated before the nvidia driver does and rpm-ostree will fail to install updates. 216 | 217 | There is no need to worry when this happens, ostree is preventing your computer from updating to a point where it won't work. Simply wait a day or two for the nvidia driver to be updated or try enabling the testing repo `/etc/yum.repos.d/rpmfusion-nonfree-updates-testing.repo` to see if that already has a newer driver. 218 | 219 | --- 220 | 221 | ### VSCode Tweaks 222 | #### Fix Terminal Prompt 223 | 224 | bash-4.4$ => [user@host project/src]$ 225 | 226 | Add to the end of your ~/.bashrc 227 | 228 | ```bash 229 | if [ "$FLATPAK_ID" == "com.visualstudio.code" ]; then 230 | export PS1="[\u@\h \W]\\$ " 231 | fi 232 | ``` 233 | 234 | #### SDKs (PHP, Java, Golang, Rust etc) 235 | 236 | These add compilers, runtimes etc these languages to Flatpak, and VSCode can see these. They get installed to /usr/lib/sdk however VSCode will pickup a few automatically. 237 | 238 | `flatpak install ` 239 | 240 | - Java | org.freedesktop.Sdk.Extension.openjdk[9-11] 241 | - PHP | org.freedesktop.Sdk.Extension.php73 242 | - Node | org.freedesktop.Sdk.Extension.node10 243 | - Go | org.freedesktop.Sdk.Extension.golang 244 | - .NET | org.freedesktop.Sdk.Extension.dotnet 245 | - Rust | org.freedesktop.Sdk.Extension.rust-stable 246 | 247 | You can find more by searching for them 248 | `flatpak search org.freedesktop.Sdk.Extension`desktop 249 | 250 | ### OSTree Prune 251 | 252 | If you're like me and have messed around with rebases, you may find /sysroot/ostree/repo has become multiple times larger than /usr itself, and `rpm-ostree cleanup` won't fix this. 253 | 254 | Instead, you just need to prune. This freed up 15GB for me, but your results may vary depending on your rebases. 255 | 256 | ```sudo ostree prune``` 257 | -------------------------------------------------------------------------------- /mscorefonts.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | _sfpath="http://downloads.sourceforge.net/corefonts" 3 | fonts=($_sfpath/andale32.exe $_sfpath/arial32.exe $_sfpath/arialb32.exe $_sfpath/comic32.exe $_sfpath/courie32.exe $_sfpath/georgi32.exe 4 | $_sfpath/impact32.exe $_sfpath/times32.exe $_sfpath/trebuc32.exe $_sfpath/verdan32.exe $_sfpath/webdin32.exe) 5 | 6 | for i in "${fonts[@]}" 7 | do 8 | wget $i 9 | cabextract $(basename $i) -d fonts 10 | done 11 | 12 | --------------------------------------------------------------------------------