Skip to content

Instantly share code, notes, and snippets.

View j1cs's full-sized avatar
😺
Im on #cat-v mostly

Juan Cuzmar j1cs

😺
Im on #cat-v mostly
View GitHub Profile
@j1cs
j1cs / gist:2f8cde3c75e326661541812318222339
Created January 6, 2025 14:22
gedora 40-41 gnome remote desktop selinux problem
tee /tmp/grd.te << EOF > /dev/null
module grd 1.0;
require {
type system_dbusd_t;
type unconfined_service_t;
type xdm_t;
class tcp_socket { getattr getopt read setopt shutdown write };
}
allow system_dbusd_t unconfined_service_t:tcp_socket { read write };
allow xdm_t unconfined_service_t:tcp_socket { getattr getopt read setopt shutdown write };
After searching around, I found the following bug, which explains the cause of the problem and documents a workaround:
https://bugzilla.rpmfusion.org/show_bug.cgi?id=7090
Following the advice in that bug report, I successfully worked around the problem as follows:
$ sudo systemctl edit systemd-homed
Then add these lines to the config file:
[Service]
Environment="SYSTEMD_HOME_LOCK_FREEZE_SESSION=false"
#!/usr/bin/env sh
curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo
sudo dnf install -y nvidia-container-toolkit
sudo nvidia-ctk runtime configure --runtime=docker
sudo systemctl restart docker
# Add this to your .zprofile or .zshrc
case $TERM in
xterm*|rxvt*)
precmd() {
# Use the appropriate shell variables to get the username and hostname
local user="%n" # %n is the username
local host="%m" # %m is the hostname up to the first '.'
print -Pn "\e]0;${user}@${host}\a"
}
;;
@j1cs
j1cs / arch_linux_installation_guide.md
Last active August 27, 2024 02:28 — forked from mjkstra/arch_linux_installation_guide.md
A modern, updated installation guide for Arch Linux with BTRFS on an UEFI system
# Config file for /etc/init.d/tigervnc
# Add the user(s) Xvnc(1) should be run for to /etc/tigervnc/vncserver.users
# DISPLAYS is no loger used.
# Optionally override the default Xsession file
# TIGERVNC_XSESSION_FILE="/usr/share/sddm/scripts/Xsession"
# TIGERVNC_XSESSION_FILE="/etc/gdm/Xsession"
# TIGERVNC_XSESSION_FILE="/etc/lightdm/Xsession"
# TIGERVNC_XSESSION_FILE="/usr/share/slim/Xsession"
@j1cs
j1cs / gtk.css
Created August 12, 2024 00:08
caret color
.caja-desktop.view .entry, .caja-navigation-window .view .entry {caret-color: black;}
sudo groupadd plugdev
sudo usermod -aG plugdev $USER
sudo dnf install -y android-tools
sudo ln -s /usr/share/doc/android-tools/51-android.rules /etc/udev/rules.d
sudo reboot # or logout
@j1cs
j1cs / force-display-xrandr.sh
Last active January 13, 2025 19:58
force display using xrandr
xrandr --query
xrandr --output VNC-0 --mode 2048x1280
cvt 2048 1280
xrandr --newmode "2048x1280_60.00" $(cvt 2048 1280 | grep Modeline | cut -d' ' -f 3-)
xrandr --addmode VNC-0 "2048x1280_60.00"
xrandr --output VNC-0 --mode "2048x1280_60.00"
@j1cs
j1cs / config
Last active January 27, 2024 16:09
terminator personal profile
[global_config]
always_split_with_profile = True
[keybindings]
[profiles]
[[default]]
foreground_color = "#ffffff"
show_titlebar = False
scrollbar_position = hidden
scrollback_infinite = True
[[GlatsTheme]]