Linux Setup


For all of my past computer use I’ve defaulted to using Windows 10 as my daily driver and using the same install for everything. My art, dev, entertainment, school, etc., was all done on the same PC. Photoshop, VS Code, Netflix, and 100 browser tabs all open simultaneously as I flip flop between projects and activities often. This obviously gets very messy. Not only does it take a blow to system resources, but it also significantly drags down productivity. Having Netflix or Youtube even just easily accessible on a computer used to get work done on is incredibly tempting, especially when running a dual monitor setup.

The most recent solution to my bloated computer problem is to work exclusively wthin designated virtual machines. For every bucket of interest, I build a virtual machine for it. For example, I need to have a space to edit photos, sketch, 3D model, build graphics, etc. so I’ve built a designated art vm. I need somewhere to work on my development work? programming vm. To get even deeper into this partitioning, you could make a web dev vm and a game dev vm if I wanted. It’s a very modular system that I will be describing in the rest of this post.

Hardware

To start, I’m gonna describe everything I’ve configured on the hardware level so that the rest of this post makes more sense.

My SSD is what contains my host operating system, Debian 11. This is what I like to call my dash OS. It acts as a dashboard for me to access and manipulate my files and virtual machines.

My first HHD is an ext4 partitioned filesystem where I save all my files from art, schoolwork, development work, etc.

I’ll get into the second HHD a little later, but it contains my windows dual boot, and all my game installs.

Passthrough


For my virtual machines, I pass through as much hardware as feasibly possible to make working among them as seamless and efficient as possible. As you’ve probably noticed, I have two graphics cards. I use my GTX 970 to render the dash OS, virtualizer frontends, filesystem, terminal emulators, and such. While the GTX 3070 is passed through to the virtual machines (where all the work should be done anyway).

On top of that, I passthrough the entirety of my 2TB HDD to all my virtual machines so they share a massive unified filesystem. This is perfect for when I’m working on a large project in my development vm, for example, and need to switch over to my art vm for a few sessions to work on some 3D models. The filesystem passthrough makes accessing these assets seamless.


Dash OS

My host operating system (the OS that grub boots into when I turn on my computer) is Debian 11. I initially used Debian for its stability, super minimal install, and community + documentation. I was just starting with linux and since I was moving all of my work over I didn’t want anything breaking due to my ignorance. I do a good amount of tweaking configuration files to maintain my computer as this is where I do all my system monitoring and virtualizing. While I do not regret using Debian, it would certainly be my second choice for dash OS now. I’ve become much more confident with my abilities handling Linux and would rather be using Arch at this point. That said, the amount of work it would take to move my system over to Arch is far greater than what I’m willing to do.

screenshot of my dashboard os. Showing a system monitor, terminal, qemu frontend, and file manager

Ideally, I don’t want to spend any time in my dash. I only want to use it to configure my virtual machines or dealing with base system configuration.

I use bspwm as window manager for a few reasons. The main reason is that it’s configured entirely via the terminal, so I can automate so much using just some bash scripts that run at log-in.

After the hardware configuration and some minimal ricing, this is what I have in my bspwmrc:

#Set up workspaces
LAYOUT=$HOME/.config/bspwm/layouts

$LAYOUT/dash.sh 1
$LAYOUT/www.sh 2
$LAYOUT/sys.sh 3
$LAYOUT/util.sh 4

bspc desktop -f 1

#Start keybindings process
pgrep -x sxhkd > /dev/null || sxhkd &

The scripts I’m calling in the layouts directory are starting applications and catching them with bspwm to place them in the correct layout. Heres dash.sh, for example:

#!/bin/sh
. $HOME/.config/bspwm/layouts/layout.sh


bspc rule -a virtmanager -o desktop=$dsktp
sudo virt-manager &

sleep $T
bspc rule -a qterminal -o split_dir="west" split_ratio="0.85" desktop=$dsktp
qterminal 'notes' &

sleep $T
bspc rule -a nemo -o split_dir="south" split_ratio="0.7" desktop=$dsktp
nemo &

sleep $T
bspc node -f north
bspc rule -a qterminal -o split_dir="west" split_ratio="0.25" desktop=$dsktp
qterminal -e htop &

I’m not going to go into the innards of bspwm and bspc in this post but you can read its documentation on the manpage if you’re interested in how exactly i’m doing this.

Essentially, each layout script comprises of instructions on where to place each window. Then, initializes the program. Sleep commands in between each one to ensure the program is running and rendering before adding to the layout; this is a small limitation I’ve found with bspwm.

The variables $T and $dsktp are defined in layout.sh, for conciseness.

T=0.75
dsktp=$1

Significant programs on the dash:

Virtual Machines


At this point, I’m going to describe what some of my virtual machines are for and what I have installed on them and guide you through the decisison making behind it. These can act as a template for anyone looking to build a similar system.

Development

Firstly is my development environment. I use a minimal install of Manjaro with the KDE desktop environment. Other than the obligatory access to the AUR for any respectable development environment, there are quite a few, albeit small, things that make it a perfect out-of-the-box distro. Such as, the Yakuake drop-down terminal, the built-in zsh auto-completion, and other programmer-oriented features.

snippet of my workflow in the development virtual machine. Opening file manager from terminal and Godot 4 from yakuake terminal

Plus, this taskbar I configured in less than a minute or so using only its built-in widgets is perfect for my web development workflow.

screenshot of custom taskbar wth sticky note, color picker, and calculator widgets

Significant programs on DEV:

(Otherwise, I’m probably using one of the KDE default applications.)

Art

Art was a harder machine to build. The work I do can demand some GPU and CPU-intensive rendering processes. Ideally, I would be using Windows for this, as the adobe suite is what I used primarily before my switch to Linux. I’m not even totally sure whether I’d even like having to use Windows anymore but thankfully, Windows made that decision for me as it makes it way too much effort to run within a vm.

One of my main goals with the art vm is to have the distro handle all the lower-level shenanigans for me. I want a distro that will install and run all my art software as smoothly as possible. I don’t want to think like a programmer when working on graphic design or 3D modeling.

I’ve settled with Ubuntu using the Budgie desktop environment.

I need something stable and well-supported. Ideally, I don’t want to ever have to look at any code, or even open a terminal while in the art vm.

snippet of my workflow in the art virtual machine

To be perfectly clear, I don’t really like Ubuntu. I would much rather be using something that better fits this vm, like Fedora. It’s much more trimmed down and has a far better repository. But Fedora’s obsession with free and open-source software is borderline strangling when trying to get any proprietary software to work. I barely get past installing Nvidia drivers, not to mention all the non-free creative software I’m going to be using and experimenting with. Even open-source programs like blender ran like shit after installing my propriety drivers.

So unless another stable and well-supported distro is maintained with non-tech-savvy people in mind I’ll have to stick with Ubuntu.

Significant programs on ART:

Entertainment

The entertainment is a little more complex as I play lots of games which vm’s typically don’t handle well + the majority of games aren’t even built with Linux in mind, and even if they are, its an afterthought.

I’ve already tried getting a windows vm to work for my art machine but like I said in my ENT vm it just does not like being in a virtual machine. Not to mention, a vm will set of pretty much any respectable anti-cheat.

I decided it simply isn’t worth it. On my second HDD, I have a windows install that exists entirely to run games, Youtube, and Netflix. I tend to be too busy to have short gaming sessions anyway, so I dual boot from the grub menu whenever I want a relaxing night. This HDD is what I would use to store my game installations regardless, so it’s not much of a sacrifice.

screenshot of dual boot windows gaming desktop

On the Linux side, I have an entertainment vm with a browser for youtube, netflix, chess.com, etc., for when I just need to take a quick break without needing to reboot. Linux mint is good for this as its really simple and tailored for out-of-the-box ease of use.

Note that vm doesn’t utilize the GPU passthrough. Therefore, I can open it and use it while another vm runs in the background on pause. It’s not doing anything intensive, so it’s not an issue.


Other vm’s, which are out of the scope of this post, include:

Future

This whole system is just a prototype. I have many things I want to implement to refine it and get it to a point where it’s exactly how I want it to run.

Secondary Input Device

One of the most glaring issues with this whole system is the amount of friction presented when logging into the dash OS to get into a vm, and accessing the dash from the vm. I am usb-redirecting my keyboard, mouse, and headset manually every time I open a virtual machine, and thus have no way of accessing my dash without completely shutting down the vm.

I think the easiest way to handle this is to just have a macro pad that doesn’t leave the dash OS. Then bind the keys directly to some custom inputs. One of them being a sort of “kill switch” that will cut off the usb redirection to the vm and return them to the host.

Better Dash Layout

Another thing that could be better is the layout of each screen on my dash. This is especially frustrating when configuring a virtual machine. Virt-Manager opens a whole new window to edit the configuration of a virtual machine, and even if I just want to run it I have to open the configuration to redirect my usb inputs. Ideally, the layout of my desktops are to stay the exact same regardless of what I’m doing.

Not entirely sure what the best solution to this could be, but I’ve got a few ideas that might work. Firstly, I can always build my own frontend to run virtual machines and auto-redirect my usbs. Especially with my secondary input device, this could make a lot of sense. Alternatively, I could figure out a way to have bspwm group new windows into a tabbed window. Something like suckless’ tabbed would work very well.


Conclusion

That’s pretty much all I’ve got so far in my setup. I’m constantly tweaking and improving it since I’m using it the majority of my day, and it’s where I do my most important work. I’ll write an update after I’ve made some significant changes and/or progress on my future goals for this project.