Skip to content

Instantly share code, notes, and snippets.

@Nexarian
Nexarian / xrdp-nvidia-setup.sh
Last active March 5, 2025 15:40
Setup for XRDP using Nvidia Acceleration
#!/usr/bin/env bash
set -e
cd ~
sudo -v
# Make sure system is in a good, updated, clean, state.
sudo apt-get -y update
@Nexarian
Nexarian / xrdp-intel-setup.sh
Last active March 17, 2025 15:43
Setup for Intel acceleration and XRDP
#!/usr/bin/env bash
set -e
sudo -v
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get autoremove -y
@Nexarian
Nexarian / ubuntu-2204-laptop-setup.sh
Last active June 20, 2024 05:45
Ubuntu 22.04 setup
#!/usr/bin/env bash
set -e
cd ~
sudo -v
sudo apt-get -y install nvidia-prime vim git mesa-utils net-tools \
gnupg2 software-properties-common apt-transport-https gpg wget \
@Nexarian
Nexarian / setup-freerdp.sh
Last active June 20, 2024 05:45
Install FreeRDP
#!/usr/bin/env bash
set -e
sudo -v
sudo apt install -y make git g++ nasm
git clone https://github.com/cisco/openh264.git ~/openh264
cd ~/openh264
@Nexarian
Nexarian / xrdp-setup-no-hw-accel.sh
Last active June 20, 2024 05:45
XRDP setup with only CPU encoding. No hardware acceleration
#!/usr/bin/env bash
set -e
sudo -v
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get autoremove -y
#!/usr/bin/env bash
function kill_all() {
process=$1
for i in $(ps aux | grep $process | tr -s ' ' | cut -d" " -f 2)
do
sudo kill -9 $i
done
}
~/restart_xrdp.sh
sudo make clean all -j $(nproc)
sudo make install -j $(nproc)
sudo systemctl daemon-reload
sudo service xrdp restart
@Nexarian
Nexarian / xrdp-setup-x264-no-hw-accel.sh
Last active January 17, 2025 21:38
XRDP setup enabling X264 with no Nvidia or Intel acceleration
#!/usr/bin/env bash
set -e
sudo -v
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get autoremove -y
@Nexarian
Nexarian / ip_routing.sh
Created January 4, 2025 06:13
IP Routing Prototype with direct IP addresses
#!/bin/bash
set -ex
# Function to check if a command succeeded
check_command() {
if [ $? -ne 0 ]; then
echo "Error: $1"
exit 1
fi
@Nexarian
Nexarian / ip_routing_ns.sh
Created January 4, 2025 06:13
IP Routing with Namespaces
#!/usr/bin/env bash
set -ex
BRIDGE_NAME="br0"
BRIDGE_IP="192.168.92.1"
setup_bridge() {
echo "Setting up bridge $BRIDGE_NAME"
ip link add name $BRIDGE_NAME type bridge