Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save whinee/83ee2b9b6bd5c470f0e6f7f9df63e0c3 to your computer and use it in GitHub Desktop.
Save whinee/83ee2b9b6bd5c470f0e6f7f9df63e0c3 to your computer and use it in GitHub Desktop.
Run this script after you installed Fedora 40 (specifically i3 version) in Acer One S1003
sudo sed -i -e "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/" /etc/ssh/sshd_config
sudo chattr -f +i /etc/ssh/sshd_config
sudo systemctl restart sshd
mkdir -p /home/lyra/.config/systemd/user/
cat <<EOM >/opt/startup.sh
#!/bin/sh
sudo systemctl restart sshd
EOM
sudo chmod u+x /opt/startup.sh
sudo cat <<EOM >/etc/systemd/system/startup.service
[Unit]
Description=Startup service
After=network.service
[Service]
ExecStart=sh /opt/startup.sh
[Install]
WantedBy=default.target
EOM
sudo systemctl enable startup
sudo systemctl start startup
mkdir -p ~/.config/autostart/
cat <<EOM >~/.config/autostart/rotate_screen.desktop
[Desktop Entry]
Type=Application
Exec=xrandr -o right
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name=Rotate Screen
Comment=Rotate screen 90 degrees at startup
EOM
cat <<EOM >/usr/share/X11/xorg.conf.d/40-libinput.conf
Section "InputClass"
Identifier "libinput pointer catchall"
MatchIsPointer "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput keyboard catchall"
MatchIsKeyboard "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchpad catchall"
MatchIsTouchpad "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
Section "InputClass"
Identifier "libinput touchscreen catchall"
MatchIsTouchscreen "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
Option "TransformationMatrix" "0 1 0 -1 0 1 0 0 1"
EndSection
Section "InputClass"
Identifier "libinput tablet catchall"
MatchIsTablet "on"
MatchDevicePath "/dev/input/event*"
Driver "libinput"
EndSection
EOM
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment