dwm as default wm

Forum Forums New users New Users and General Questions dwm as default wm

  • This topic has 99 replies, 13 voices, and was last updated Aug 19-2:48 pm by andyprough.
Viewing 15 posts - 1 through 15 (of 100 total)
  • Author
    Posts
  • #64247
    Member
    blur13

      Hi!

      I’m interested in using dwm as my default wm as it is even more light weight than icewm. How would I go about doing this? Using ice-rox at the moment.

      #64250
      Member
      sybok
        Helpful
        Up
        0
        ::

        Hi, the login screen allows you to switch the desktop to log in to using F1.
        The last selected/used is stored when you login the next time.
        Install the ‘dwm’, please see this post, log out, select and login.

        I sometimes prefer the command line (CLI) over GUI-programs, i.e. I could use
        1) sudo apt update
        to update overview of available packages.
        2) apt-cache search dwm
        which searches the overview for occurrence of ‘dwm’ and the output reveals that package ‘dwm’ exists in the activated/active repositories.
        3) apt-cache policy dwm
        to determine whether it is already installed; my output contains line ‘Installed: (none)’ indicating it is not installed yet and the other lines provide more information.
        4) Finally, install the package:
        sudo apt install dwm

        • This reply was modified 1 year, 9 months ago by sybok.
        • This reply was modified 1 year, 9 months ago by sybok. Reason: minor changes
        #64255
        Moderator
        christophe
          Helpful
          Up
          0
          ::

          I’m pretty sure you just install it, like sybok wrote.
          antiX should automatically add it to the list of window managers to choose from the desktop menus & F1 at login.
          That’s how it worked for me when I installed a few different WMs a while back. Not dwm, but I don’t suppose dwm would have been any different.

          confirmed antiX frugaler, since 2019

          #64256
          Member
          blur13
            Helpful
            Up
            0
            ::

            I could see how that might work when installing a WM package through apt, but the way to configure dwm is to compile it with the configurations built into the source code. A prebuilt binary is no good then. So how do I get the system to recognize dwm?

            #64257
            Member
            Xecure
              Helpful
              Up
              0
              ::

              A prebuilt binary is no good then. So how do I get the system to recognize dwm?

              Build and install as they tell you in the instructions. As long as you see a .desktop session file for dwm in /usr/share/xsessions/, slim (the login manager) will be able to see it. Then you will be able to select it from the login manager (F1 to switch between different options).

              antiX Live system enthusiast.
              General Live Boot Parameters for antiX.

              #64258
              Member
              blur13
                Helpful
                Up
                0
                ::

                Thanks! I’ll try that.

                #64261
                Member
                calciumsodium
                  Helpful
                  Up
                  0
                  ::

                  A couple of weeks ago, my son installed dwm on one of my antix computers. He is a computer science student and uses dwm on his linux mint computer. I think he used

                  sudo apt install dwm

                  It works fine on antix 19. He was showing me how dwm works and saying all good things about it. But after we rebooted, I don’t recall the exact error, but essentially the error was that antix does not support the dwm windows manager, and dwm was prevented from starting up. If you get it to work, I would be happy to also learn how.

                  #64263
                  Member
                  blur13
                    Helpful
                    Up
                    0
                    ::

                    dwm doesnt generate a .desktop session file. The only thing I managed to do was mess up my dns resolv.conf when I “sudo make install” dwm, but a bit of google foo fixed that. Might not have been related. So could I just create a .desktop session file? ie:

                    Desktop Entry]
                    Name=dwm
                    Comment=dwm
                    Exec=dwm
                    Terminal=false
                    Type=Application

                    [X-Window Manager]
                    SessionManaged=true

                    #64264
                    Member
                    Xecure
                      Helpful
                      Up
                      0
                      ::

                      Try it out. The debian package generates one that looks almost identical.

                      [Desktop Entry]
                      Encoding=UTF-8
                      Name=Dwm
                      Comment=Dynamic window manager
                      Exec=dwm
                      Icon=dwm
                      Type=XSession

                      the error was that antix does not support the dwm windows manager

                      If you mean that, inside dwm, a window appeared saying “desktop-session doesn’t support this session”, then that is normal. You choose the first option on the left (I think it is named “Desktop” or something similar), and this will disable this message from appearing again.
                      Once blur13 tries it out they can confirm.

                      antiX Live system enthusiast.
                      General Live Boot Parameters for antiX.

                      #64268
                      Member
                      andyprough
                        Helpful
                        Up
                        1
                        ::

                        Don’t listen to people telling you to install with apt – you’ll be stuck with a version of DWM that you can’t easily customize. One of the main reasons to use DWM is because of all the customization you can do. Installing it with apt is “bad”.

                        You generally want to follow these instructions as follows (there’s more tips and tricks on my antiX-DWM thread on the MX Linux forum, https://forum.mxlinux.org/viewtopic.php?p=611493#p611493). You may want to use the most recently released versions, such as DWM 6.2, instead of the git versions like I use. You’ll find links to the released versions on the suckless.org web pages for each project.

                        1. First, update the antiX software:

                        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

                        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:

                        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.
                        First build DWM:

                        cd dwm
                        sudo make install

                        Next, build dmenu:

                        cd /usr/src/dmenu
                        sudo make install

                        Now build st terminal:

                        cd /usr/src/st
                        sudo make install

                        And last build slstatus:

                        cd /usr/src/slstatus
                        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 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/:

                        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:

                        sudo geany dwm.desktop

                        Insert this text into your new text file by pasting it in geany:

                        [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, and some conky’s can cause heavy resource usage in DWM, so I remove it from antiX before I log in to DWM. You can decide if you want to keep conky on your antiX system or not. For me, I remove it with:

                        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. 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 back to the comfort of icewm).

                        NOTE – these instructions are a bit old. Recently I’ve been building my DWM stuff in a ~/git/ directory that I create instead of in /usr/src/. If you decide to build everything in ~/git/, then you won’t use sudo for steps 4 and 5.

                        • This reply was modified 1 year, 9 months ago by andyprough.
                        #64272
                        Moderator
                        christophe
                          Helpful
                          Up
                          0
                          ::

                          Way to go, andyprough!

                          confirmed antiX frugaler, since 2019

                          #64277
                          Member
                          sybok
                            Helpful
                            Up
                            0
                            ::

                            Well, I admit I was completely unaware of the possibility of/need-for pre-compile customization.
                            Could be fun.

                            Some questions not directly related to the installation but rather the “sustainability” over time.
                            Q1) Does one have to re-compile if some of the essential packages change?
                            Q2) Can they [these essential packages] change via a simple update or only upgrades could cause issues?
                            Q3) How does one avoid of getting stuck in a broken desktop environment after upgrade (apart from going to virtual terminal, console mode only, and a recompile)?

                            Would be nice if someone answers.
                            Did not find it in the internet in a speedy-quick search but noticed this “odd” mention of crashes due to ‘brave’, the browser.

                            #64297
                            Member
                            andyprough
                              Helpful
                              Up
                              0
                              ::

                              Well, I admit I was completely unaware of the possibility of/need-for pre-compile customization.
                              Could be fun.

                              Some questions not directly related to the installation but rather the “sustainability” over time.
                              Q1) Does one have to re-compile if some of the essential packages change?
                              Q2) Can they [these essential packages] change via a simple update or only upgrades could cause issues?
                              Q3) How does one avoid of getting stuck in a broken desktop environment after upgrade (apart from going to virtual terminal, console mode only, and a recompile)?

                              Would be nice if someone answers.
                              Did not find it in the internet in a speedy-quick search but noticed this “odd” mention of crashes due to ‘brave’, the browser.

                              Q1 – Actually, the point of using DWM is that you re-compile quite often. Anytime you want to customize DWM, you make changes to DWM’s config.h file and then do a quick “make install”. Compilation time is only a few seconds – DWM is kept at less than 1400 lines of code if I recall correctly. You can make changes and re-compile from within DWM, and then log out and log back in and see your changes.

                              Q2 – I don’t know of a way to do a normal binary update to a version of DWM that you installed via “make install”. The standard way is just to make your changes to config.h and run “make install” again, as I said above. config.h is pretty easy to read and make changes to, and there are tons of youtube videos and helpful websites to give you guidance.

                              Q3 – If the results of “make install” are error-free, then you should not have a broken DWM window manager. If you have errors when you run “make install” to update with your new changes, then normally the broken package won’t be installed. You’ll be left with DWM in the same condition it was without your changes, and you’ll be given error text that will tell you what you did wrong and what you need to do to get “make install” to work correctly.

                              Where people tend to get into a bit more trouble is when they try “patching” DWM. There are hundreds of “patches” available, and each one gives you some added functionality. Applying the patches often results in an error that requires that certain files such as dwm.c be fixed manually. Like with other parts of DWM customization, there are lots of good how-to videos on how to patch and to fix patch errors.

                              This all probably sounds terribly complicated, but if you spend a weekend watching videos and trying stuff out you’ll be surprised at how much of it you master. One beautiful thing about DWM is that even if you screw it up completely, you can just delete the dwm directory, download a fresh copy, run “make install”, and you are back up and running again in just a couple of minutes.

                              #64302
                              Moderator
                              Brian Masinick
                                Helpful
                                Up
                                0
                                ::

                                @andyprough: I have not used dwm recently, but I like the description of what it is and what it takes to make it.
                                Based on the description, it would not be very difficult to obtain and build at all. I accept the challenge; I’m going to snag a copy and build it. Thanks!

                                --
                                Brian Masinick

                                #64309
                                Moderator
                                Brian Masinick
                                  Helpful
                                  Up
                                  0
                                  ::

                                  I was able to get and build down very quickly (one of the fastest builds I’ve ever done).

                                  I used my Acer Aspire 5 model A515-55 to build it and I put it on Debian Bullseye 11 instead of antiX.

                                  I’m not very familiar with the keystrokes yet so I didn’t do very much with it but I think it is one of the lightest and fastest window managers available.

                                  Great job; I followed your instructions and they worked perfectly.

                                  I’ll look into using dwm and give it more time once I have the key sequences nearby to help until I’m familiar with it.

                                  Again, excellent job explaining the instructions.

                                  --
                                  Brian Masinick

                                Viewing 15 posts - 1 through 15 (of 100 total)
                                • You must be logged in to reply to this topic.