MX-DWM/antiX-DWM - a thread for working toward an optimized respin

For issues with MX that has been modified from the initial install. Example: adding packages that then cause issues.
Message
Author
User avatar
manyroads
Posts: 2624
Joined: Sat Jun 30, 2018 6:33 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#11 Post by manyroads »

@andyprough, FWIW, I have both zoom and skype working well under dwm. I also have Vbox humming along for my Windows Genealogy apps. Calibre runs nicely as does LibreOffice among other tools.
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken

User avatar
andyprough
MX Packager
Posts: 918
Joined: Tue Jul 23, 2019 10:16 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#12 Post by andyprough »

Well, this has taken me far longer than I expected, mostly due to antiX having such an amazing bunch of spins and methods of installation and live USB usage that I ended up spending a lot of time just trying them all out. For now I've settled on a live USB with root persistence - I just love the ability to build my system and take it with me to any computer in the house or at work. I tried a lot of different antiX spins, and thought I was going to stick with something very adventurous like the antiX runit Sid spin, but in the end I've fallen in love with a very simple one - the regular antiX base version. I'm going to leave a few notes here about getting antiX up and running and then installing a basic DWM setup - not so much because I think it will be a great read for anyone, but if I put it here I'll know where to find it myself in the future. This will be a long post, mainly for reference and for posterity.

Everyone probably already knows how to set up an antiX live USB with root persistence, but I'll repeat the steps I took here just to remind myself.
1. Download the ISO from https://antixlinux.com/download/ . I picked this one: https://mirrors.evowise.com/mxlinux-iso ... 4-base.iso
I like the antiX Base install, as it doesn't have a lot of packages that are on the antiX Full ISO and which I did not initially need for this project. Packages like bluetooth, Libreoffice, cups, claws-mail, hexchat, luckybackup, and a lot of printer drivers and language packs are left out of the Base ISO. You can read the packages that are on the Full ISO and not on Base here: https://mirrors.evowise.com/mxlinux-iso ... 4-base.iso
2. Use MX Live USB maker to create the live USB. I like using the EXT4 option for my file system.
3. I like setting up root persistence at my first boot of the live USB. On a system with legacy bios the options for persistence are brought up by hitting the F5 key at the grub menu. On a system with uefi, you have to select the "custom" boot, which will take you through a series of ncurses menus to select options for your live USB, one of which will be setting up your persistence options. I like doing the full root persistence, as that way all my changes each session are burned to the USB, and I have all my changes and documents and files and browser setup no matter which computer I boot that USB stick on. If I was only going to use one computer with the live USB, I would probably do a frugal install, and keep the persistence files on the small partition on the hard drive.

Setting up DWM for the first time:
I decided to use the latest github version of the DWM and associated packages, instead of the most recent stable release. This caused me a small bit of difficulty with one package as you'll see in a future post, but nothing that is out of the ordinary for working with the DWM tools from suckless.org. And honestly it's good, as I'll have the chance to talk you, dear reader, through the process of fixing a wayward patch on DWM - a very useful skill. Anyway, here goes - these are the steps I followed for obtaining and installing the basic DWM system.

1. First, update the antiX software:

Code: Select all

sudo apt update
sudo apt upgrade
2. Add the packages you will need for installing DWM. Credit to @manyroads for pointing out the need for some x libraries on his website articles on DWM

Code: Select all

sudo apt install build-essential git joe patch libx11-dev libxft-dev libxinerama-dev
3. navigate your web browser to suckless.org, the headquarters for the DWM packages. Take some time looking around, you'll need to be familiar with this website as there are many things you'll want to do with your DWM setup that can only be done with packages and procedures from suckless.org
4. Grab the source packages for DWM, and some of its associated tools that you'll need to install alongside it - st (terminal emulator), slstatus (handy way to display information on the DWM task bar), and dmenu (an absolute necessity - dmenu is how you are going to interact with DWM and open programs and get stuff done). I build my source packages in /usr/src/, so my instructions will reflect that:

Code: Select all

cd /usr/src/
sudo git clone https://git.suckless.org/dwm
sudo git clone https://git.suckless.org/st
sudo git clone https://git.suckless.org/dmenu
sudo git clone https://git.suckless.org/slstatus
5. Build the packages. You'll need to copy a file in each directory called "config.def.h" to a file called "config.h" to do the installation:
First build DWM:

Code: Select all

cd dwm
sudo cp config.def.h config.h
sudo make install
Next, build dmenu:

Code: Select all

cd /usr/src/dmenu
sudo cp config.def.h config.h
sudo make install
Now build st:

Code: Select all

cd /usr/src/st
sudo cp config.def.h config.h
sudo make install
And last build slstatus:

Code: Select all

cd /usr/src/slstatus
sudo cp config.def.h config.h
sudo make install
6. In order to log into DWM, we're going to need to tell our login manager that DWM is something we want to be logged into. Our login manager on antiX Base is "slim" - a very small package with no frills that lives up to its name. In order for slim to recognize DWM, we need to create a text file and place it in /usr/share/xsessions/:

Code: Select all

cd /usr/share/xsessions/
While in that directory, create a dwm.desktop file. Use the editor of your choice - I like the basic antiX text editor, geany:

Code: Select all

sudo geany dwm.desktop
Insert this text into your new text file by pasting it in geany:

Code: Select all

[Desktop Entry]
Name=DWM
Comment=Window manager for the X11 Window System
Exec=dwm
Terminal=false
Type=Application
[X-Window Manager]
SessionManaged=true
7. I'm not a big conky fan, one of a few things that @manyroads and I appear to differ on, so I'll remove it before we begin:

Code: Select all

sudo apt purge conky-legacy-all
That's it - log out of whatever you were using to work in on antiX (maybe icewm?), and at the login screen hit the F1 key about 14 times as antiX cycles through its many many many window manager choices until it finally lands on DWM. Login, and behold the glory of your DWM desktop - a top bar with the numbers 1 through 9 on the lefthand side, and pretty much nothing else. Other websites will stop the instructions here, as you click with your mouse all over the desktop area in vain, expecting something to happen, but DWM gives you nothing. Not a popup menu, not a logout button so you can escape to the safety of icewm or run screaming back to the lovely XFCE desktop on MX - nothing. No matter where you click or how many times you pound on the Super key, there's no response. However, all is not lost. The most important key to remember on a freshly installed DWM session is the left Alt button. And the most important key combinations to remember when you first walk into a fresh DWM session are left-Alt-p (to bring up your dmenu function), left-Alt-shift-enter (to pop an st terminal session into existence), and left-Alt-shift-q (to logout and go screaming back to the comfort of XFCE on MX).

First you use the left-Alt-shift-enter key combo to open an instance of st terminal, and you type in "top", to bring up the ubiquitous cli process monitor. Top tells you that you are using just 160mb of memory (or close to that number), and dreams start dancing in your head about continuing to minimalize until you can run DWM with only 45mb of ram, like the Gentoo minimalist geeks do. Well, stop dreaming. It's possible on Gentoo, but on Debian-based systems like antiX and MX you'll have to get used to using a minimum of about 159mb of memory. Now use your left-Alt-p key combo to bring up the dmenu, and type "firefox" to open your web browser. You'll notice that nothing happens on your screen, but that there's a little dot by the number "9" on the top bar. That's because for some insane reason, DWM by default always opens firefox in the 9th workspace. You can click on the number 9 to find your browser. We'll be changing that default firefox opening behavior soon, so that it opens on the workspace that you are on at the time.

So, next post we'll do that - we'll change the default firefox opening behavior, and we'll add more of a taskbar so you can have some notification icons like a volume notifier, a date and time notifier, and a network notifier/connection tool. And to do that, we'll get into patching, and fixing wayward patches - not a subject for the faint at heart, but well worth learning.
Primary Computer - Commodore 64: Processor - MOS 6510/8500, 1.023MHz; Memory - 64kb RAM, 20kB ROM - 8k BASIC V2, 8k Kernel, 4k Character ROM; Display output - 320x200, 16 colours; OS - BASIC V2.0; Weight: 1.8kg

User avatar
andyprough
MX Packager
Posts: 918
Joined: Tue Jul 23, 2019 10:16 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#13 Post by andyprough »

I woke up this morning and fired up my antiX DWM USB stick and was only using 148mb at startup!! Maybe I really can get it down to 45mb like the Gentoo minimalist geeks - let me dream of the ways...
Primary Computer - Commodore 64: Processor - MOS 6510/8500, 1.023MHz; Memory - 64kb RAM, 20kB ROM - 8k BASIC V2, 8k Kernel, 4k Character ROM; Display output - 320x200, 16 colours; OS - BASIC V2.0; Weight: 1.8kg

User avatar
manyroads
Posts: 2624
Joined: Sat Jun 30, 2018 6:33 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#14 Post by manyroads »

andyprough wrote: Sat Dec 05, 2020 9:41 am I woke up this morning and fired up my antiX DWM USB stick and was only using 148mb at startup!! Maybe I really can get it down to 45mb like the Gentoo minimalist geeks - let me dream of the ways...
Just don't run any browser, any email client, any cloud client, calibre, libreoffice, or any other application. Oh you probably shouldn't use most (any) suckless plugins or any eye-candy. :bagoverhead:

Edit: btw mine runs at about 250-300M naked on both MX & antiX. There is really no difference (effectively). I can say that MX is MUCH easier to tune & tweak. :lipsrsealed:

btw. As @anticapitalista noted elsewhere, the true minimalists run without x. :eek:

Edit Edit: I just checked my antiX19 system running a display manager only (LightDM) the footprint is 237MB of RAM. 190MB above the gentoo 'goal'. :needcoffee:
Last edited by manyroads on Sat Dec 05, 2020 1:25 pm, edited 1 time in total.
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken

User avatar
anticapitalista
Developer
Posts: 4167
Joined: Sat Jul 15, 2006 10:40 am

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#15 Post by anticapitalista »

I'm sure it is possible to get dwm running with less than 100MB RAM at idle (as manyroads says - no eye candy though).

This i5 lenovo laptop (L412) that is my main rig and on which I do almost all of my development work for antiX, including kernel builds (it has 8GB RAM) idles at less than 80MB with X!

Code: Select all

 Private  +   Shared  =  RAM used	Program

 92.0 KiB +  26.5 KiB = 118.5 KiB	runit
108.0 KiB +  30.5 KiB = 138.5 KiB	runsvdir
128.0 KiB +  33.5 KiB = 161.5 KiB	svlogd
128.0 KiB +  90.5 KiB = 218.5 KiB	sleep
288.0 KiB +  62.5 KiB = 350.5 KiB	acpid
324.0 KiB + 283.5 KiB = 607.5 KiB	herbstclient
464.0 KiB + 247.5 KiB = 711.5 KiB	runsv (7)
716.0 KiB + 295.5 KiB =   1.0 MiB	desktop-session
  1.0 MiB + 358.5 KiB =   1.4 MiB	gpg-agent
804.0 KiB + 584.0 KiB =   1.4 MiB	getty (6)
  1.0 MiB + 376.5 KiB =   1.4 MiB	sudo
  1.5 MiB +  29.5 KiB =   1.5 MiB	wpa_supplicant
  1.5 MiB + 181.5 KiB =   1.6 MiB	awk
  1.3 MiB +   1.2 MiB =   2.5 MiB	dzen2
  2.5 MiB +  45.5 KiB =   2.6 MiB	udevd
  2.2 MiB + 911.5 KiB =   3.1 MiB	herbstluftwm
  3.2 MiB +  28.5 KiB =   3.2 MiB	haveged
  2.4 MiB +   1.3 MiB =   3.7 MiB	bash (6)
  3.4 MiB +   1.9 MiB =   5.3 MiB	slim
  3.1 MiB +   2.4 MiB =   5.6 MiB	dhclient (2)
  8.2 MiB +   3.2 MiB =  11.3 MiB	urxvt (2)
 27.5 MiB +   1.8 MiB =  29.3 MiB	Xorg
---------------------------------
                         77.0 MiB
=================================

anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

User avatar
anticapitalista
Developer
Posts: 4167
Joined: Sat Jul 15, 2006 10:40 am

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#16 Post by anticapitalista »

manyroads wrote: Sat Dec 05, 2020 1:04 pm btw. As @anticapitalista noted elsewhere, the true minimalists run without x. :eek:
64 bit antiX-19 frugal +persistence install booting Xless (just add 3 to boot menu) - less than 30MB RAM!

Sorry for going off-topic.
anticapitalista
Reg. linux user #395339.

Philosophers have interpreted the world in many ways; the point is to change it.

antiX with runit - lean and mean.
https://antixlinux.com

User avatar
manyroads
Posts: 2624
Joined: Sat Jun 30, 2018 6:33 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#17 Post by manyroads »

From my perspective, I am VERY happy with dwm (eye candy and all) running at about 1-1.2GB with Dropbox, a display manager, nice themes, icons, conky touchpad-indicator, light-shade utility, caffiene, feh wallpaper changer, big wallpapers, pulseaudio, rofi managing workspaces, power-manager (plus numerous acpi tools), dunst (notifications), plus dwm, st, slstatus from suckless all running. The biggest benefit to me was stated on a blog by someone when discussing the strength of dwm. He said (paraphrased) the beauty of dwm was that you could access anyone's dwm desktop and in order to use it you would have to figure out how it worked. :happy: :number1: In other words, dwm's greatest strength is in the customization you can accomplish to meet your own needs/preferences.

As Frank SInatra once sang "I did it my way..." Oh, he was on key. :worship:
Pax vobiscum,
Mark Rabideau - ManyRoads Genealogy -or- eirenicon llc. (geeky stuff)
i3wm, bspwm, hlwm, dwm, spectrwm ~ Linux #449130
"For every complex problem there is an answer that is clear, simple, and wrong." -- H. L. Mencken

User avatar
andyprough
MX Packager
Posts: 918
Joined: Tue Jul 23, 2019 10:16 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#18 Post by andyprough »

anticapitalista wrote: Sat Dec 05, 2020 1:25 pm I'm sure it is possible to get dwm running with less than 100MB RAM at idle (as manyroads says - no eye candy though).

This i5 lenovo laptop (L412) that is my main rig and on which I do almost all of my development work for antiX, including kernel builds (it has 8GB RAM) idles at less than 80MB with X!

Code: Select all

 Private  +   Shared  =  RAM used	Program

 92.0 KiB +  26.5 KiB = 118.5 KiB	runit
108.0 KiB +  30.5 KiB = 138.5 KiB	runsvdir
128.0 KiB +  33.5 KiB = 161.5 KiB	svlogd
128.0 KiB +  90.5 KiB = 218.5 KiB	sleep
288.0 KiB +  62.5 KiB = 350.5 KiB	acpid
324.0 KiB + 283.5 KiB = 607.5 KiB	herbstclient
464.0 KiB + 247.5 KiB = 711.5 KiB	runsv (7)
716.0 KiB + 295.5 KiB =   1.0 MiB	desktop-session
  1.0 MiB + 358.5 KiB =   1.4 MiB	gpg-agent
804.0 KiB + 584.0 KiB =   1.4 MiB	getty (6)
  1.0 MiB + 376.5 KiB =   1.4 MiB	sudo
  1.5 MiB +  29.5 KiB =   1.5 MiB	wpa_supplicant
  1.5 MiB + 181.5 KiB =   1.6 MiB	awk
  1.3 MiB +   1.2 MiB =   2.5 MiB	dzen2
  2.5 MiB +  45.5 KiB =   2.6 MiB	udevd
  2.2 MiB + 911.5 KiB =   3.1 MiB	herbstluftwm
  3.2 MiB +  28.5 KiB =   3.2 MiB	haveged
  2.4 MiB +   1.3 MiB =   3.7 MiB	bash (6)
  3.4 MiB +   1.9 MiB =   5.3 MiB	slim
  3.1 MiB +   2.4 MiB =   5.6 MiB	dhclient (2)
  8.2 MiB +   3.2 MiB =  11.3 MiB	urxvt (2)
 27.5 MiB +   1.8 MiB =  29.3 MiB	Xorg
---------------------------------
                         77.0 MiB
=================================

So you are running without a volume icon, wihtout a clipboard manager, without a network indicator -- those make sense. But how are you running without dbus? If you've figured that out, there's a lot of Hyperbola fans and FreeBSD fans that would be flocking to antiX I think. One Hyperbola user was trying to get me to figure out if antiX could be run without dbus earlier this year, but I did not take the time to look into it as it seemed an impossibility.

Is that what you are doing with dzen2? Using it in place of dbus and some of the x packages? If so, that's worth checking out. How did you set that up?
Primary Computer - Commodore 64: Processor - MOS 6510/8500, 1.023MHz; Memory - 64kb RAM, 20kB ROM - 8k BASIC V2, 8k Kernel, 4k Character ROM; Display output - 320x200, 16 colours; OS - BASIC V2.0; Weight: 1.8kg

User avatar
andyprough
MX Packager
Posts: 918
Joined: Tue Jul 23, 2019 10:16 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#19 Post by andyprough »

anticapitalista wrote: Sat Dec 05, 2020 1:35 pm
manyroads wrote: Sat Dec 05, 2020 1:04 pm btw. As @anticapitalista noted elsewhere, the true minimalists run without x. :eek:
64 bit antiX-19 frugal +persistence install booting Xless (just add 3 to boot menu) - less than 30MB RAM!

Sorry for going off-topic.
Now you're just showing off. :liftweight:
Primary Computer - Commodore 64: Processor - MOS 6510/8500, 1.023MHz; Memory - 64kb RAM, 20kB ROM - 8k BASIC V2, 8k Kernel, 4k Character ROM; Display output - 320x200, 16 colours; OS - BASIC V2.0; Weight: 1.8kg

User avatar
andyprough
MX Packager
Posts: 918
Joined: Tue Jul 23, 2019 10:16 pm

Re: MX-DWM/antiX-DWM - a thread for working toward an optimized respin

#20 Post by andyprough »

Dilemma: I was looking for a nice app for finding applications. I'm not a big fan of replacing dmenu with rofi, as I think most menu systems are overkill, especially in a minimalist situation like DWM. I love xfce4-appfinder for this purpose of finding apps, but I'm trying to do a setup with antiX & DWM where I don't pull in elements from DE's like XFCE or Gnome to run my basic workspace and tools.

Solution: Fortunately - antiX to the rescue. antiX has a beautiful little built in app finder called "app-select", which lists apps by name, category, description, and executed command. Apps show up in app-select as soon as you install them and restart app-select. Here, I've added DeadBeef to the system, and it shows up immediately after restarting app-select. I've bound app-select to the Super-a key combo, making it instantly available.

One annoyance with xfce4-appfinder is that it closes after starting an app. app-select stays open as long as you like, so it can be thrown onto a workspace and left open for awhile as you hunt down and open and close different packages.
You do not have the required permissions to view the files attached to this post.
Primary Computer - Commodore 64: Processor - MOS 6510/8500, 1.023MHz; Memory - 64kb RAM, 20kB ROM - 8k BASIC V2, 8k Kernel, 4k Character ROM; Display output - 320x200, 16 colours; OS - BASIC V2.0; Weight: 1.8kg

Post Reply

Return to “MX Modified”