this post was submitted on 07 Apr 2024
35 points (94.9% liked)

Linux

48038 readers
790 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Hi all :)

I manage a handful of websites and their emails using the PortableApps suite on Windows, so have a separate browser and mail client for each one. This has worked well for years, but now I'm switching to Linux, Mint specifically. I've read that I can set up profiles on Firefox and probably Thunderbird, or maybe run separate instances with things like AppImages, but it sounds like it's a messy solution, and could end up with me using the wrong profile by mistake

What I want to do is set up a virtual machine for each site, and have a completely separate instance of the programs, and hopefully a way to easily transfer the machines to other systems if needs be.

I'd prefer to use a Debian / Ubuntu based distro with Apt and the 'Windows' style desktop, as that's what I'm already used to, but am I better off installing Mint and stripping it down, or is there something more suited to this?

Thanks in advance :)

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 27 points 7 months ago* (last edited 7 months ago) (2 children)

Alpine is great for VM and containers... Light on resources because of musl.

[–] [email protected] 2 points 7 months ago

The weakness of Alpine is that anything relying on glibc probably won't work. Yes, I know there's glibc simulation, but that's far from perfect.

[–] [email protected] 1 points 7 months ago

It looks great, thanks :)

I'm nojt sure whether I'm going to use it for this, as I haven't had a chance to try the package manager yet, but I'm definitely going to be giving it a test drive, even if it's only to see what it can do with such low requirements :)

[–] [email protected] 17 points 7 months ago (2 children)

install Debian the way you want up through the apps you need. Then it off and use it as a clone to copy for all your setups as needed.

[–] [email protected] 3 points 7 months ago

That's a good idea, thanks :)

[–] [email protected] 1 points 7 months ago

Exactly my idea aswell. Take your time to optimize and strip down your base install, then it's easy to just clone your base in virt-manager.

[–] [email protected] 13 points 7 months ago (2 children)

two popular choices for the container lifestyle are Debian Stable and Alpine (to the point it’s almost sacrilegious to run Alpine on the desktop)

[–] [email protected] 4 points 7 months ago (2 children)

Good choices, thanks :)

Alpine looks insane, with those low storage requirements. I need to try it out and see how I get on with the package manager though.

[–] [email protected] 4 points 7 months ago

I use Alpine with Gnome 45. Works excellent for browsing web.

[–] [email protected] 3 points 7 months ago

The package manager for Alpine is...so fast. The community (IRC/Gitlab) is responsive and helpful.

[–] [email protected] 1 points 7 months ago

Alpine is great on the desktop too! I use it on all my desktops, laptops and servers.

[–] [email protected] 9 points 7 months ago (2 children)
[–] [email protected] 2 points 7 months ago (1 children)

I was gonna say that but does alpine have KDE or XFCE (he said Windows style interface)? I’ve only used it as a container.

[–] [email protected] 4 points 7 months ago (1 children)

They have a wiki page for installing KDE so I'm sure it supports XFCE also. You'll want to download their virtual optimized version instead of mini root (which is what you normally use in a container).

[–] [email protected] 3 points 7 months ago

Runs KDE and xfce fine.

[–] [email protected] 1 points 7 months ago

Alpine does seem to be the popular distro in the thread :)

I'm planning on trying it out tonight and seein g how I get on with the package manager, not that I should need it much after the initial installation.

[–] [email protected] 9 points 7 months ago* (last edited 7 months ago) (3 children)

If you're running Linux you could just have different logins to either your main desktop or within one VM running linux.

Each user login would have their own separate home directory, own profiles for Firefox and Thunderbird, or any other tools you use. But at the same time all apps you'd install would still be available to all accounts and kept secure and up to date with the VMs system updates.

As you're using mint as your main desktop and if you're not very familiar with linux, I'd just run Mint within a Virtualbox VM, probably XFCE edition of mint. That way techniques you use in your main desktop work the same in the your VM, albeit with a slightly different interface with XFCE. Once you're more familiar with Linux you could look at other techniques? If you're familiar with Linux then KVM would be an alternate route for virtualisation, albeit very similar in this scenario.

There are methods to run portable apps in Linux (such as Appimage) but the real key is keeping profiles separate. You could also do all this by having separate Firefox and Thunderbird profiles and set up links to run the software with the specific profile you want. Again this could be done with a VM if you want to contain all this in one place, or on your main desktop (either in your Linux profile or a dedicated work profile to separate it out more cleanly from your personal files). You'd get less overhead via this route in terms of hard drive space an RAM/CPU usage. You'd literally just have separate shortcuts like "Website 1" which runs the command "thunderbird -P /path/to/website1/thunderbird/profile".

[–] [email protected] 4 points 7 months ago

If you’re running Linux you could just have different logins to either your main desktop

This is what I'd recommend, use different themes, color schemes, and/or the customer's logo so they all look very different. This is what I do to separate my business from personal stuff.

[–] [email protected] 2 points 7 months ago
[–] [email protected] 2 points 7 months ago (1 children)

Thanks for the detailed reply :)

I've tried setting up a separate profile on my laptop for the main site that I manage, but I'm finding the permissions to be difficult. I need to transfer files from my existing profile to the new website profile, but I keep getting all sorts of errors telling me that I'm not allowed, even if I put the users in the same group and give the group read and write access, or if I try changing ownership to the website user.

I've probably set up something wrong with the new user, but it made me think about other ways of doing it, and how to back it up. I'm probably going with a VM so that as well as a regular backup, I can back up the whole VM and store a copy on other physical computers. If something goes wrong, like my laptop getting stolen, I can just fire up the VM on another computer and keep working.

@[email protected] had a good idea though, of using different themes and the logo to help differentiate them. I think I'll use that whichever way I go.

XFCE is a good idea, thanks. I use Xubuntu on my media server at the moment, so I'm used to the way that it works. I like the look of KVM too. Apparently it's faster than VirtualBox, and that's usually fine for my needs, so it should be good :)

Having different Firefox and Thunderbird profiles under the same login is something that I'm definitely avoiding. I've tried things like that in the past, and have trouble keeping them separated. I have some memory issues, probably related to ADHD, and find it too easy to open the wrong copy of a program when I'm focused on something else.

[–] [email protected] 2 points 6 months ago

Ya, this isn't an easy problem to solve. I have some of the same issues.

If you want to try again or keep trying with the shared directory model try the "sticky bit" along with ACL.

sudo setfacl -d -m g:shared:rwx /path/to/shared_directory

This will make any files/directories you create in the shared dir have the right permissions to share. But it doesn't apply to files already existing in the directory or files/directories created outside of this directory that are moved into the directory.

If you go the VM route, you might look into QEMU + KVM using .qcow2 files for the VM disk. Then you could just copy the qcow around and start the VM with a command (albeit a complex command). If this sounds interestiing, let me know and I can provide help and examples of how I do it or explanations.

[–] [email protected] 9 points 7 months ago (1 children)

You should look into how Docker works. It, or something like it, is probably the better tool for the job.

[–] [email protected] 1 points 7 months ago

At the moment, Docker is frying my brain >.<

I'm trying it out with a handful of programs, and I'm struggling so far. Too many of the guides assume that you already have a certain level of Docker knowledge, and can be very confusing. It's something that I'm going to have to look at in the future :)

[–] [email protected] 6 points 7 months ago (2 children)

Check out NixOS Containers

Also: "NixOS's declarative configuration allows you to define your entire system configuration, including software packages, services, and system settings, in a single configuration file."

https://nixos.org/

https://mynixos.com/

[–] onlinepersona 3 points 7 months ago

But now they have to learn nix...

Anti Commercial AI thingyCC BY-NC-SA 4.0

[–] [email protected] 1 points 7 months ago

Thanks for the suggestion, but NixOS is a bit too complicated for what I need right now :)

[–] [email protected] 4 points 7 months ago* (last edited 7 months ago) (2 children)

Linux Lite!

It's based on Ubuntu and uses XFCE.

[–] [email protected] 2 points 7 months ago

That looks good, thanks. I use Xubuntu on my media server at the moment, so I'm used to XFCE too :)

[–] [email protected] 2 points 7 months ago (1 children)

Resource wise how does this compare to Lubuntu which is also Ubuntu based with XFCE?

ISO wise it's about 500MB smaller which is nice when I'm messing around with VMs.

[–] [email protected] 1 points 7 months ago

Lubuntu is (slightly) lighter, but lacking on software resources.

Thus, i prefer Linux Lite.

[–] [email protected] 4 points 7 months ago (1 children)

Ever considered DietPi?!

DietPi is an extremely lightweight Debian OS, highly optimised for minimal CPU and RAM resource usage [...]

You can install either LXDE, LXQt, MATE, Xfce or GNUstep as a desktop. Maybe Chromium in Kiosk mode could be suitable for you too?!

They provide ready-to-go images for a bunch of different hypervisors.

[–] [email protected] 1 points 7 months ago

I hadn't considered it, I thought it was just for SBCs.

I'll give it a try in a VM, thanks :)

[–] [email protected] 4 points 7 months ago (1 children)

VM is plenty of overhead and your use-case doesn’t really require that. If you want to effectively isolate browsers and for some reason using Firefox profiles isn’t enough (for me that was perfectly fine to have private and job profiles and just launching them with additional parameter specifying which profile like firefox -P work and I wrapped them in their dedicated .desktop files), learn about containers and Docker or Podman. You’ll get native performance, access to hardware acceleration and a native app window while also having the sandbox functionality. Plus, you’ll learn about containers, which opens a whole world of possibilities

[–] [email protected] 1 points 7 months ago

Thanks for replying :)

I'm trying to learn how to use Docker at the moment, but not getting very far. I may be able to use it for this in the future, but for now I need to stick with what I know :)

[–] [email protected] 4 points 7 months ago (2 children)

I use arch for stuff like this myself

[–] [email protected] 5 points 7 months ago
[–] [email protected] 1 points 7 months ago

Thanks for replying :)

I do like the idea of Arch, and need to give it a try. I won't use it on these though as, at least for now, I don't know enough about it to be able to repair it if something goes wrong, especially if I need access quickly.

[–] [email protected] 3 points 7 months ago (1 children)

Have you looked onto Pop OS? It combines VMs and you can delegate specific apps to a specific VM.

I tend to use Debian for VM clients because essentially all blogs assume apt-get and I hate Ubuntu.

load more comments (1 replies)
[–] [email protected] 2 points 7 months ago* (last edited 7 months ago) (1 children)

How important is the Windows-style desktop? If the VM is designed for one thing and one thing only, I'd pick any minimal WM that can alt-tab, say JWM, and then just add Firefox and Thunderbird to the autostart file.

[–] [email protected] 2 points 7 months ago

Ironically, JWM is the reason I don't use distros like Puupy os DSL. For some reason, I just can't get on with it. I don't know if it's muscle memory or something, but I just can't get to grips with it.

Saying that though, it's always worth another shot. As you suggest, I should only need the two programs, and maybe something lime FileZilla, so starting them at boot should help too :)

[–] onlinepersona 2 points 7 months ago
[–] [email protected] 2 points 7 months ago (1 children)

Artix is light and systemd free. Some super lightweight distros are tiny core and antix

[–] [email protected] 2 points 7 months ago

I like the look of these, thanks :)

I'll have to skip Artix for this job, as I'm still relatively new to Linux, and can't afford to be learning lots with this, but it's definitely one I'm going to try out and play with :)

[–] [email protected] 2 points 7 months ago (1 children)
[–] [email protected] 1 points 7 months ago

Thanks for the suggestion :)

[–] [email protected] 2 points 7 months ago (1 children)

Load up a live CD of your distro in your VM. Install a browser. Load up all your plugins, bookmarks, sites, when you have it completely how you want it, tarball your Firefox config folder to a USB drive.

The next time you want to use it, start the live CD again and untar the tarball back in your config directory. Anytime you want to update it, just remake the tarball.

It's ephemeral, no logs are stored, you have almost no chance of accidentally loading the wrong thing.

[–] [email protected] 1 points 7 months ago

I like that idea, thanks :)

[–] [email protected] 2 points 7 months ago (1 children)

You can create a shortcut for each firefox profile. This won't give you an isolation like VM or container but similar to portable apps while consume less RAM.

load more comments (1 replies)
[–] LeFantome 2 points 7 months ago* (last edited 7 months ago) (1 children)
[–] [email protected] 1 points 7 months ago

I'll give it a look, thanks :)

load more comments
view more: next ›