Showing posts with label bash scripting. Show all posts
Showing posts with label bash scripting. Show all posts

Sunday, May 18, 2025

From GNOME Lockout to XFCE Rebirth: How I Rescued My Linux System and Built My Own Toolkit

Tux

๐Ÿ“Œ TL;DR

After a GNOME session failure locked me out of my Ubuntu desktop and left me trapped in TTY purgatory, I rebuilt my system using XFCE. I didn’t stop there — I automated the post-install process, hardened the environment, and published the toolkit on GitHub.

This is how I reclaimed control and made it portable for Future Me (and possibly, for you).


๐Ÿ”ฅ 1. The Breakdown

My system booted straight to a black screen. GNOME was toast. No desktop. No cursor. No shell.

Just me, a blinking login prompt, and the cold comfort of TTY3...

I could log in… but I couldn’t do anything else. I didn’t want a Band-Aid. I wanted the cure.

So I decided to rebuild my desktop environment from the ground up.


๐Ÿ”ง 2. Enter XFCE (My Minimalist Sledgehammer)

I chose XFCE for one reason: it works.

It’s fast, stable, and doesn’t get caught up in the GNOME/Snap drama.

Here’s what I did:

  • Purged GNOME, GDM3, and all the loopback snap devices clogging up my mount table

  • Installed XFCE and its essential packages (xfce4, xfce4-goodies, lightdm)

  • Locked in the session default using .dmrc

  • Cleaned up the login manager so LightDM wouldn’t try to load a ghost session

Within minutes of logging in, XFCE reminded me what a functional desktop is supposed to feel like.


๐Ÿ› ️ 3. Building the Toolkit

I didn’t just fix it — I turned it into a repeatable system.

I created:

  • postinstall-finalize.sh: Hardens the system with UFW, ClamAV, smartd, Psensor, suspend rules, and more

  • bootstrap.sh: Instantly pulls and runs the setup from GitHub on any machine

  • .dotfiles.dmrc: Ensures LightDM loads into XFCE every time — no more login roulette

  • A GitHub repo to house the whole damn thing and help anyone else in the same mess

๐Ÿ”— GNOME-to-XFCE Rescue Toolkit on GitHub


⚙️ 4. What It Automates

  • XFCE session lock-in

  • UFW firewall (deny incoming, allow outgoing)

  • ClamAV antivirus with weekly scan scheduling

  • smartd disk health monitoring

  • XFCE suspend/power tweaks

  • Autostart setup for tools like Stacer and Psensor

  • Clean break from Snap loopbacks and GNOME overhead

I call it minimalism with teeth.


๐Ÿงญ 5. For Anyone Else Stuck in TTY Hell

  • Don’t reinstall.
  • Don’t rage-quit Linux.
  • Don’t think you have to keep living in GNOME’s shadow.

You can purge it. Replace it. Harden it, and make the system yours again — on your terms.


๐Ÿงช Want to Use It?

Here’s how to bootstrap a clean, hardened XFCE rescue:

wget https://raw.githubusercontent.com/catatwork217/gnome-to-xfce-rescue/main/bootstrap.sh chmod +x bootstrap.sh ./bootstrap.sh

Want to clone it manually instead?

git clone git@github.com:catatwork217/gnome-to-xfce-rescue.git cd gnome-to-xfce-rescue chmod +x postinstall-finalize.sh ./postinstall-finalize.sh

๐Ÿ’ฌ Want to Contribute?

Fork it. Break it. Rebuild it.

Add your own flair, or just keep it bookmarked for the next time your display manager betrays you.