| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This project aim at making Ubuntu/Debian/Fedora easy to use. Improvements will keep adding to the repo, wish you enjoy it.
Don't hesitate to suggest if you have any good ideas.
This is just the models that I tested/verify my changes, but not limited to any machines with the same system.
sudo apt-get install git
sudo apt-get install python-xlibsudo dpkg-reconfigure console-setupFont for the console->VGA or Do not change the boot/kernel font
sudo apt install exfat-fuse exfat-utilssudo apt install neovimFonts is important and worth a section for discussing it. I used Gnome Tweaks to change system fonts, here are the settings:
LatIn (refers macOS):
Chinese(refers to macOS):
Sans-serif font: Helvetica
Mathematical font: STIX Two Math link
Change system fonts gconftool-2 has been superseeded by gsettings on Ubuntu 16.04+ and in other GNOME based systems.
Nowadays you can simply run the following in a terminal to change/reset all your desktop font settings:
# change windows title
gsettings set org.gnome.desktop.wm.preferences titlebar-font 'Microsoft YaHei UI 11'
gsettings set org.gnome.desktop.interface document-font-name 'Microsoft YaHei UI 11'
# default font
gsettings set org.gnome.desktop.interface font-name 'Microsoft YaHei 11 UI'
# monospace-font
gsettings set org.gnome.desktop.interface monospace-font-name 'SF Mono Extra-Condensed 12'
gsettings set org.gnome.nautilus.desktop font '' # default font '', leave blankSF Mono is more preferrable from macOS: /System/Applications/Utilities/Terminal.app/Contents/Resources/Fonts In macOS: open Fonts within /System/Applications/Utilities/Terminal.app/Contents/Resources/Fonts then install it. SF Mono - Medium is my new favour.
To reset above setting, just simply type in
gsettings reset org.gnome.desktop.interface font-name
gsettings reset org.gnome.desktop.interface document-font-name
gsettings reset org.gnome.desktop.interface monospace-font-name
gsettings reset org.gnome.desktop.wm.preferences titlebar-font
gsettings reset org.gnome.nautilus.desktop font
gsettings reset org.gnome.desktop.interface text-scaling-factorThis is a very smooth integration and experience as iterm support tmux integration and feels natively. The setup is as following:
Host devvm
HostName <your-remote-hostname>
Port <connection-port>
User <username>
IdentityFile <your-key-file-path>
LocalForward 8081 localhost:8081
then you can use ssh devvm to connect. Note, et usually use 2022 port after the ssh connection. Configured this in fast-reverse-proxy.
It is highly recommend to use tmux for both your dev server or local machine because of its multiplex feature.
sudo apt install tmuxMake the tmux launch for every terminal, append the following lines at the end of the .bashrc
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux
fiThe above command is going to make sure that
(1) tmux exists on the system (2) we're in an interactive shell (3) tmux doesn't try to run within itself
alias devvm="ssh ${cloudtop_address} -oCompression=yes -oCheckHostIP=no -oServerAliveInterval=60 -t -- '''tmx2 -CC new -A -s work''"
Reference:
Enable mouse scroll:
One may notice that copy is not as natural as default terminal - i.e. mouse select + copy shortcut. To fix this, you need to add install tpm and tmux-yank:
You can select-to-copy effienctly.
# cpu stats
set -g @plugin 'tmux-plugins/tmux-cpu'
# in .tmux.conf
set -g status-right '#{cpu_bg_color} CPU:#{cpu_percentage} MEM:#{ram_percentage}'
This ultimately improve your productivity. Check here for installation
For an enhancement of Ctrl+R refer here
An alternative shell magic history using Atuin. enter_accept is set to true by default, which means default enter to the selection will execute the command. To change the selected item, just hit tab instead of enter. Documents about more settings here.
For Ubuntu specific:
git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/installPlease refer to this: Solution 1:
sudo apt-get --with-new-pkgs upgrade <list of packages kept back>
Solution 2:
sudo apt-get install <list of packages kept back>
Gnome actually supports the dynamic wallpaper around 10 years ago, and recently macOS Majove has bought this function to macOS. To enable this beautiful function that is built-in Gnome, we have to load a customize xml as desktop and lock screen background as following:
mkdir -p ~/Pictures/Wallpapers/majove_dynamic
curl -o ~/Pictures/Wallpapers/majove_dynamic/majove.xml https://github.com/syscl/Ubuntu4Laptops/blob/master/dynamic_wallpapers/majove.xmlOpen the ~/Pictures/Wallpapers/majove_dynamic/majove.xml , change the username from syscl to the user name you used, then unzip all the wallpapers from here to ~/Pictures/Wallpapaers/majove_dynamic
Set up the lock screen and desktop background by the following
gsettings set org.gnome.desktop.background picture-uri 'file:///home/syscl/Pictures/Wallpapers/mojave_dynamic/mojave.xml'
gsettings set org.gnome.desktop.screensaver picture-uri 'file:///home/syscl/Pictures/Wallpapers/mojave_dynamic/mojave.xml'Note Change the syscl to the user name you used on the above command line.
Jump right into the /usr/share/applications directory in the terminal, and remove/hide the icons you want. For example, remove the deprecated reboot, shut down and logout button when updating from Unity to Gnome
cd /usr/share/applications
sudo rm -rf reboot.desktop shutdown.desktop logout.desktopInstall compiled binaries to /usr/local/bin/vlmcsd, then execute vlmcsd then vlmcs to start the server. Then on Windows client, open cmd as Administration, run the following:
slmgr -ipk <GLVKs Key>
slmgr -skms <vlmcsd server address>
slmgr -ato
slmgr -dlvsudo apt-get install git pkg-config build-essential qt4-qmake \
libvorbis-dev zlib1g-dev libhunspell-dev x11proto-record-dev \
libqt4-dev libqtwebkit-dev libxtst-dev liblzo2-dev libbz2-dev \
libao-dev libavutil-dev libavformat-dev libtiff5-dev libeb16-devgit clone git://github.com/goldendict/goldendict.gitcd goldendict && qmake-qt4 && makeNote: to compile with libhunspell older than 1.5, use the following command to build instead
cd goldendict && qmake-qt4 "CONFIG+=old_hunspell" && makemake install
# sudo mv /usr/local/share/applications/goldendict.desktop ~/.local/share/applications # correct the *.desktop pathSystem tray disappear on Ubuntu 18.04 (Gnome)
Install sni-qt libraries: apt install sni-qt
Install translate-shell by apt install translate-shell
Add the following to Edit->Dictionaries->Sources->Programs:
echo 'body' >~/.goldendict/article-style.css
echo '{' >>~/.goldendict/article-style.css\
echo ' font-family: Microsoft YaHei;' >>~/.goldendict/article-style.css\
echo ' font-size: 12px;' >>~/.goldendict/article-style.css\
echo '}' >>~/.goldendict/article-style.css\More setting details please refer here.
sudo apt install subversionThis is a note for temporarily install Debian or Debian-like Distros on F2FS, tested on P520, E203 and raspberry pi (EFI + root partition). The basic idea is copying and updating initramfs:
f2fs fscrypto crc32-pclmul crc32c_generic crc32c-intel crc32_generic libcrc32c
for type in dev sys proc run boot boot/efi sudo mount --bind /dev /mnt/$typesudo chroot /mnt
update-initramfs
update-grub2
exitsudo unmount /mnt/boot/efi sudo unmount /mnt/* sudo unmount /mnt
Note:
Close the startup logo in /etc/libreoffice/sofficerc : Logo=1 --> Logo=0
Notice in Libreoffice 5.3.x, there's no more sofficerc in /etc/libreoffice thus we need to search where the Logo= argument located in, here's the procedure
grep -l -r -i 'Logo=' /opt/libreoffice*This will give you the correct path of the configuration location, change Logo=1 to Logo=0
Since Netease Music under Linux is achieved through Qt5, most elements are drawn by WebKit by a forking of Chromium, so we can just simply pass an startup argument --force-device-scale-factor=2 for netease-cloud-music, simply touch the /usr/share/applications/netease-cloud-music.desktop, change Exec=netease-cloud-music %U to Exec=netease-cloud-music --force-device-scale-factor=2 %U
sudo ./FoxitReader.runSet installation folder as /opt/foxitreader instead of ~/opt/foxitreader
Fixe files' permission
sudo chown -R $USER:$USER /opt/foxitreadersudo rm -r /opt/foxitreader/fxpluginsapt install aria2
mkdir ~/.aria2Attach the below contents to ~/.aria2/aria.conf
dir=/home/pi/downloads file-allocation=falloc continue log-level=error max-connection-per-server=4 summary-interval=120 daemon=true enable-rpc=true rpc-listen-port=6800 rpc-listen-all=true max-concurrent-downloads=1 disable-ipv6=true disk-cache=25M timeout=600 retry-wait=30 max-tries=50
This is a sample of the configuration, you can tune it as you like. Now create the launch init.d scirpt by the following script under ```/etc/init.d/aria2
#!/bin/sh
# /etc/init.d/aria2
### BEGIN INIT INFO
# Provides: aria2cRPC
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: aria2c RPC init script.
# Description: Starts and stops aria2 RPC services.
### END INIT INFO
RETVAL=0
case “$1” in
start)
echo -n “Starting aria2c daemon ”
umask 0000
aria2c –daemon=true –enable-rpc –rpc-listen-all -D –conf-path=/home/pi/.aria2/aria2.conf
RETVAL=$?
echo
;;
stop)
echo -n “Shutting down aria2c daemon ”
/usr/bin/killall aria2c
RETVAL=$?
echo
;;
restart)
stop
sleep 3
start
;;
*)
echo $”Usage: $0 {start|stop|restart}”
RETVAL=1
esac
exit $RETVALAttach executable permission for the script just touched (chmod +x aria) then update rc script
sudo update-rc.d aria2 defaultsNow we turn to install the Aria2 WebUI
Please refer to this link first, full document will be appended later on.
Reset transparent-mode to 'ADAPTIVE':
gsettings reset org.gnome.shell.extensions.dash-to-dock transparency-modeReset min-alpha to default
gsettings reset org.gnome.shell.extensions.dash-to-dock min-alphaRecommend style set to Dots, and the rest are the same as Ubuntu dash-to-dock.
But if this is not enough to reset all settings, try to remove and reinstall the whole directories under /usr/share/gnome-shell/extensions
sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu xenial-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'wget -q -O- http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -sudo apt update && sudo apt install filezillaThe problem of using Unity Tweak Tool(a very powerful tool) is that Unity Tweak Tool can not change the cursor entirely. In login mode, we still can see the origin system default cursor. And sometimes, the black cursor will be reversed due to some system bug. Thus the permanent solution will be replace the whole white mouse cursor to a black one, here's the solution
mv -r /usr/share/icons/DMZ-White /usr/share/icons/DMZ-White-bak
cp -r /usr/share/icons/DMZ-Black /usr/share/icons/DMZ-WhiteReboot, now you can enjoy a nice black mouse cursor.
For those who enjoy macOS cursor, here's a high quality macOS cursor under icons/cursor/macOS, you just place macOS/cursor under /usr/share/icons/DMZ-White . Reboot to enjoy the nice macOS(Sierra icons).
The icon and the name of the application is sometimes not as our expected, in other words, the icon is pretty ugly and the name is not straightforward... So to change the icon, the first step you need to do is copy the icon files to ~/.local/share/icons/hicolor/<icon_pixelxicon_pixel>/apps(arugments decided by the icon pixel), then change the .desktop file under /usr/share/applications. For example, I want to change the Simplenotes icon and name to notes.png and Notes respectively, open simplenote.desktop and change the value to Icon=Icon=/home/<username>/.local/share/icons/hicolor/128x128/apps/notes.png and Name=Notes respectively.
Once I've switched to Ubuntu, I soon realized the function of the trackpad loses drag lock and palm rejection which make the trackpad almost unable to use. Thus I do some research about how to tune with it, here's the solution.
After applying the patch, you will soon enjoy the trackpad on Ubuntu.
synclient "TapButton3" "8"This extensions makes Gnome into usable and nice state, otherwise it looks ugly.
Install it, configured it to show in the status bar. Enable/disable it by scroll mouse on the icon.
Before you install the latest LaTex, you should remove older version to avoid conflict just in case
sudo dpkg --purge --force-all texlive-xetex
sudo dpkg --purge --force-all texlive-math-extraThen install LaTex now
sudo add-apt-repository ppa:jonathonf/texlive
sudo apt-get install texlive
sudo apt-get install texlive-fonts-recommended texlive-fonts-extraFix the loss of section numbering with the new update issue
sudo wget http://mirrors.ctan.org/macros/latex/contrib/titlesec/titlesec.sty -O /usr/share/texlive/texmf-dist/tex/latex/titlesec/titlesec.styapt-get install default-jdkThis is because the missing gnome-browser-connector. Install it to fix installing gnome extension issues.
Note: Bing Wallpaper is a nice extension for gnome
This is a tricky feature that Firefox support while chromium base browser missing. Enable it by adding this --enable-features=TouchpadOverscrollHistoryNavigation to the chrome executable. Another alternative I haven't tried yet is using multi gesture libraries.
Just download the package https://linux.weixin.qq.com/en for your system, and install it. As for emoji fonts, it Ubuntu use noto fonts, I tried with Apple Emoji, tweet emoji (https://github.com/13rac1/twemoji-color-font), not working well. So I switch back to noto but lastest here https://github.com/googlefonts/noto-emoji
To install extensions for Gnome 3.x, just search the add-ons in Software application, then tune it on through Extension Settings.
You can use
sudo apt-get install unrar # support RAR 3
For unrar protected files (note protected files supports much better than unrar-free unfortunately)
unrar x -p<password> <archive_name>
I recommend to install only one of these (unrar in my case). Then use archive manager:
sudo apt-get install file-roller
Since my major desktop environment is Gnome, I will mainly focus on ibus-rime, for KDE/LXQT environments, please refer to fcitx5-rime section. People may ask why I want to use different input method, as using fcitx5 across all platforms is more consistent and easier to manage. The answer is simpler than you think, fcitx5 cannot be actived when I type search in gnome overview window, that say ibus-rime is better integrated with GTK so I created this section for the installation.
Noted, I only tested this on Ubuntu 24.04.3 lts.
patch:
schema_list:
- schema: rime_ice
style:
horizontal: true
Now to change words candidates, create ~/.config/ibus/rime/default.custom.yaml:
patch:
menu:
page_size: 8
patch:
switches:
- name: ascii_mode
states: [中, A]
reset: 1
- name: ascii_punct # 中英标点
states: [¥, $]
reset: 1
The reset value is the actul index of the states, in this case we default to "A"(ascii_mode).
All the pinyin, e.g. sogou and baidu is shit, we want a modern and effienct reliable input source, that is rime-ice run on top of fcitx5. To use it this is the following steps:
sudo apt-get install fcitx5-rime
patch:
menu:
page_size: 8
This is the same as macOS Tahoe input.
One may found chromium based or electron app blur when Gnome Wayland fractional scaling is enabled. To address it, you need to put --ozone-platform=wayland for app.
Warning: change Preferred Ozone platform in chrome:flags may cause browser flicking and broken. So use command line or change option on /usr/share/applications/google-chrome.desktop will be much safer (since you can revert back without losing app data). Append the --ozone-platform=wayland to Exec or command line. Without setting the ozone platform, Chrome's hangs a lot for me, making is basically unusable. (Constantly freezes for half a second while scrolling.)
Using the command line parameter worked nicely.
If anyone is reluctant to delete their ~/.config/google-chrome folder, you can simply edit your config manually when Chrome is not running. The config is in a JSON file called "Local State". Search for "ozone" and remove the corresponding key under "browser". (I think it was something like "lab_experiments" that I zapped.)
sudo apt-get install p7zip-fullOne may find ctrl+w not work on Linux the shortcut has been defined to other feature. To restore it, just go to the idea keybindings' setting > Extension Keyboard Shortcuts > search for ctrl+w > Remove Keybinding.
sudo add-apt-repository ppa:pinta-maintainers/pinta-stablesudo apt updatesudo apt install pintamv /usr/lib/evolution /usr/lib/evolution_DISABLE
for procname in $(ps aux | grep evolution | awk -F'/' '{print $NF}' | grep evolution | grep -v grep); do killall $procname; doneFailed to load kernel modules is actually not a kernel issue, but a bug in the default configuration of CUPS (the printing system), which tries to load the drivers for the ancient parallel port (which this computer obviously doesn't have). You can easily solve it by commenting out /etc/modules-load.d/cups-filters.conf, like so:
# Parallel printer driver modules loading for cups
# LOAD_LP_MODULE was 'yes' in /etc/default/cups
#lp
#ppdev
#parport_pc{
"workbench.colorTheme": "Xcode_default"
"window.zoomLevel": 1,
"editor.fontFamily": "'Menlo', 'Consolas', 'DejaVu Sans Mono', 'monospace'",
}
To have a vertical line (vertical rulers) to control line length, set a ruler in settings.json as (in this case length is 80)
{
"editor.rulers": [80]
}
For remote developing, install Remote - SSH and copy public key to dev server by
ssh-copy-id [username]@[ip]
"Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)" Please refer to this, the limit can be increased by editing /etc/sysctl.conf
fs.inotify.max_user_watches=524288 fs.inotify.max_user_instances=512
Check limits:
sysctl fs.inotify
Check current usage — instances per process:
cat /proc/*/fdinfo/* 2>/dev/null | grep -c inotify
Top consumers by watch count:
for pid in /proc/[0-9]*/fd; do
count=$(ls "$pid" 2>/dev/null | xargs -I{} readlink "$pid/{}" 2>/dev/null | grep -c inotify)
if [ "$count" -gt 0 ]; then
ppid=$(echo "$pid" | cut -d/ -f3)
echo "$count $(cat /proc/$ppid/comm 2>/dev/null) (pid=$ppid)"
fi
done | sort -rn | head -20
Check open file descriptor limit:
ulimit -n # soft limit for current shell ulimit -Hn # hard limit cat /proc/sys/fs/file-max # system-wide max cat /proc/sys/fs/file-nr # allocated / free / max (shows actual usage)
See open fd count per process (top offenders):
ls /proc/*/fd 2>/dev/null | awk -F/ '{print $3}' | sort | uniq -c | sort -rn | head -20 | \
while read count pid; do echo "$count $pid $(cat /proc/$pid/comm 2>/dev/null)"; done
The quick mental model: sysctl fs.inotify shows your limits, file-nr shows open fd pressure system-wide, and the per-process loop pinpoints the culprit.
Markdown preview extension: Markdown all in one
open command in mac is really convenient and its alias is xdg-open. However the xdg-open is not as smart as open in mac. Due to the fact of this, I wrote a handy script(in bin/open) for you to deal with it. You can place it under /usr/local/bin manually or install it by executing deploy as well.
sudo apt install apache2mkdir ~/apache_service_root/etc/init.d/apache2 restartsudo apt upgradeNetdata is a powerful monitor tool set for developer to keep tracking of its servers, to install it on Ubuntu 18.04+ simply type in
apt install netdataOn CentOS, please refer here
To allow ANYONE to access netdata, change the bind socket to IP = 127.0.0.1 to bind socket to IP = 0.0.0.0 in /etc/netdata/netdata.conf
Start all the services by the following:
systemctl start netdata
ufw enable
ufw allow 19999/tcp
ufw reloadkillall netdata
systemctl daemon-reload
systemctl enable netdata
systemctl restart netdatagetconf LONG_BITPlease refer here. And don't forget to change php70w-* to php-* for the installation commands.
'overwrite.cli.url' => 'https://example.com/nextcloud', 'htaccess.RewriteBase' => '/nextcloud',
then execute sudo -u www-data php [nextcloud root]/occ maintenance:update:htaccess
[virtualbox] name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch enabled=1 gpgcheck=1 repo_gpgcheck=1 gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc
Unlike $lex require money everywhere, emby is an open source media server, like universal media server (ums on Sony PS4), the way to install is straightforward, but notice change the user and group as emby:emby for the folders you want to attach as libraries otherwise permission errors will occurs.
rmmod -v pcspkrblacklist pcspkrnmcli dev wifi hotspot ifname wlan0 ssid test password "test1234"More details please refer here
mount -o remount,rw /
git clone https://github.com/syscl/LinuxLandcd LinuxLand
chmod +x deploy./deployhttps://starship.rs/ This is my starship config at ~/.config/starship.toml:
add_newline = false
format = """
$python\
$directory\
$git_branch\
$git_state\
$git_metrics\
$git_status\
$docker_context\
${custom.k8s}\
$terraform\
$helm\
$character
"""
# right_format = """
# $cmd_duration\
# $docker_context\
# $kubernetes\
# $terraform\
# $helm
# """
[directory]
style = "blue"
[character]
success_symbol = "[❯](green)"
error_symbol = "[❯](red)"
vimcmd_symbol = "[❮](green)"
[git_branch]
format = "[$branch]($style) "
style = "green"
[git_metrics]
format = "([+$added](green) [-$deleted](red) )"
added_style = "bold green"
deleted_style = "bold red"
disabled = false
[git_status]
style = "cyan"
format = "([$ahead_behind$staged$modified$untracked$renamed$deleted$conflicted$stashed]($style))"
ahead = "↑${count} "
behind = "↓${count} "
diverged = "↕ a:${ahead_count} b:${behind_count} "
stashed = "≡ "
staged = "!${count} "
modified = "!${count} "
untracked = "?${count} "
renamed = "✎${count} "
deleted = "✖${count} "
conflicted = "‼${count} "
[git_state]
format = '\([$state( $progress_current/$progress_total)]($style)\) '
style = "bright-black"
[cmd_duration]
format = "[$duration]($style) "
style = "yellow"
[python]
format = "[$virtualenv]($style) "
style = "cyan"
[custom.k8s]
# Use customize kubernetes to replace the [kubernetes] section
description = "Kubernetes context, only in deductive workspace with a fresh kubeconfig"
command = """
ctx=$(kubectl config current-context 2>/dev/null) || exit 1
echo "$ctx" | sed 's|.*:cluster/||; s|^|eks:|'
"""
when = """
[[ "$PWD" == *deductive* ]] \
&& [[ -n "$KUBECONFIG" ]] \
&& [[ -s "$KUBECONFIG" ]] \
&& (( $(date +%s) - $(date -r "$KUBECONFIG" +%s) < 3600 ))
"""
style = "cyan"
format = "[$output]($style) "
This is the config for ~/.blerc
# Change multiline execute to enter ble-bind -m emacs -f RET accept-line ble-bind -m emacs -f C-m accept-line # Disable various of ble marks # Removes [ble:exit] bleopt exec_exit_mark= bleopt exec_errexit_mark= # Removes [ble: EOF] bleopt prompt_eol_mark= # Disable typing color rendering bleopt highlight_syntax= bleopt highlight_filename= bleopt highlight_variable= # disable typing ahead suggestions bleopt complete_auto_complete=
Just place this line in .bashrc and .zshrc:
[ -s "$HOME/git/LinuxLand/.shell_common" ] && source "$HOME/git/LinuxLand/.shell_common"
plugins=(
...
zsh-autosuggestions
)
On low memory machine, it will be benefit to enable memory compression (ZRAM is enabled by default on Fedora):
systemctl enable zram-config systemctl start zram-config
Please refer to this link.
[antiX Linux] For pretty old hardware, antiX doing a great job, especially on iMac8,1(2008). I want to like puppy Linux, however it has screen flickering on iMac8,1.
See changelogs here
Excalidraw I cannot express how much I love the app, it is so simple to use (I was waiting for yeaers) just for this app, and it can be self hosted!
sudo sed -i 's/\(.*motd.*\)/#\1/g' /etc/pam.d/*If I want existing user to have the ability to run docker, run the following:
sudo usermod -aG docker $USER
newgrp dockerI mostly used Chrome Remote Desktop (CRD) for my headless server. It is easy to use, solid and robust than most of the remote desktop solution. However with the nvidia GPU installed on my server, I want it to be more powerful.
Here's the major benefit I obtain using rustdesk, with a few tunes or love, it is way much more powerful and fit my need:
The /etc/X11/xorg.conf I used:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig: version 590.48.01
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
Option "DPMS"
# Use your exact cvt output here
Modeline "3440x1440_60.00" 419.50 3440 3696 4064 4688 1440 1443 1453 1493 -hsync +vsync
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
BusID "PCI:6:16:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
Option "AllowEmptyInitialConfiguration" "True"
# Force NVIDIA to allow the custom Ultrawide and standard 4K modes
Option "ModeValidation" "NoMaxPClkCheck, AllowNonEdidModes, NoVesaModes"
Option "MetaModes" "3840x2160_60, 3440x1440_60.00"
SubSection "Display"
Virtual 4096 4096
Depth 24
EndSubSection
EndSection
The reason of 3440 monitor is because I have one so I add this resolution. restart gdm/gdm3 to take effet
sudo systemctl restart gdm # or gdm3
check the nvidia-smi
~ ❯ nvidia-smi minikube Mon Feb 9 22:57:30 2026 +-----------------------------------------------------------------------------------------+ | NVIDIA-SMI 590.48.01 Driver Version: 590.48.01 CUDA Version: 13.1 | +-----------------------------------------+------------------------+----------------------+ | GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |=========================================+========================+======================| | 0 NVIDIA GeForce RTX 2070 ... Off | 00000000:06:10.0 On | N/A | | 0% 54C P2 40W / 235W | 760MiB / 8192MiB | 8% Default | | | | N/A | +-----------------------------------------+------------------------+----------------------+ +-----------------------------------------------------------------------------------------+ | Processes: | | GPU GI CI PID Type Process name GPU Memory | | ID ID Usage | |=========================================================================================| | 0 N/A N/A 65672 G /usr/lib/xorg/Xorg 172MiB | | 0 N/A N/A 66278 G /usr/bin/gnome-shell 74MiB | | 0 N/A N/A 66948 G ...exec/xdg-desktop-portal-gnome 3MiB | | 0 N/A N/A 67011 C /usr/share/rustdesk/rustdesk 176MiB | | 0 N/A N/A 67354 G /usr/share/rustdesk/rustdesk 12MiB | | 0 N/A N/A 70879 C+G ...al/zed.app/libexec/zed-editor 200MiB | | 0 N/A N/A 76802 G ...rack-uuid=3190708988185955192 60MiB | +-----------------------------------------------------------------------------------------+
clearly shows the nvidia gpu being used nicely.
A few quirks to fix with scaling cause a big/mega mouse problem: resize the curosr size to small value from 24(default)
gsettings set org.gnome.desktop.interface cursor-size 12
One may notice that scroll in the rustdesk client is too fast and even cause blur screen, this is some of the mac app e.g. Mos smooth scrolling also take effect of the mouse scroll, to fix it just disable (make the rustdesk as exception) in the Mos > Preferences > Exception > uncheck smooth scroll, that's it.
Even thought UI animation makes things nature, however in a headless remote desktop environment, disabling the Gnome animation makes the rustdesk rendering less likely to happens and more consistent and smooth. Here's how to achieve it (as Gnome Tweak remove the option for this):
gsettings set org.gnome.desktop.interface enable-animations false
A more generic solution is to use Karabiner-Element, to remap the key from lower level for Complex Modifitaion
{
"description": "Rustdesk: Left Command to Left Control",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.carriez\\.rustdesk$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "left_command",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_control" }],
"type": "basic"
}
]
}
for Windows App/Remote Desktop:
{
"description": "Windows App: Left Command to Left Control",
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^com\\.microsoft\\.rdc\\.macos$"
],
"type": "frontmost_application_if"
}
],
"from": {
"key_code": "left_command",
"modifiers": { "optional": ["any"] }
},
"to": [{ "key_code": "left_control" }],
"type": "basic"
}
]
}
remove mod4 = Super_L keysym Super_L = Control_L add Control = Control_L
and
xmodmap ~/.Xmodmaprefer: https://ubuntu-mate.community/t/could-not-acquire-name-on-session-bus/23060 By the way, the solution for me with the Chrome Remote Desktop issue was to add a config file in the home directory named .chrome-remote-desktop-session and containing the lines
unset DBUS_SESSION_BUS_ADDRESS unset SESSION_MANAGER mate-session
export XDG_SESSION_TYPE=x11 export ZED_ALLOW_EMULATED_GPU=1 exec /usr/bin/gnome-session --session=gnome
[Customize Zed Config]
{
"ui_font_size": 14,
"buffer_font_size": 13,
"theme": {
"mode": "system",
"light": "One Light",
"dark": "One Dark"
},
"ui_font_family": "JetBrains Mono",
"buffer_font_family": "JetBrains Mono",
"terminal": {
"cursor_shape": "bar",
"font_family": "Liga SFMono Nerd Font"
}
}
Inspired by this: Settings > Privacy > Connectivity Checking
| Back | FazBrowse Home | New Git URL |