Dwm

From Alpine Linux
Revision as of 22:37, 8 March 2019 by Thshdw (talk | contribs) (Configuring dwm with firefox)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

dwm is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts.

Creating new user account

After the install of alpine you get the root account. We want to use a new user account that is not root.

# adduser myname

Where myname is the name you want to use

Install sudo so we can add myname to sudoers

# apk add sudo

edit the sudores file by running:

# visudo

In this file below root add:

myname ALL=(ALL) ALL

Switch to the new account

# su myname

Installing Xorg

run the following command

# sudo setup-xorg-base

Configuring the community repositories

We need to do this so we can install firefox. Edit the file this this command

# sudo vi /etc/apk/repositories

uncomment the community line by removing the # save the file and exit Next let the package manager know we made this change

# sudo apk update

Installing dependencies

Note: git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses are needed to install suckless from source

dbus-x11 is needed for firefox (when we run firefox in dwm we want it to open in a tile)

the last three (adwaita-gtk2-theme adwaita-icon-theme ttf-dejavu) are optional but I recommend them so you can have a nicer looking firefox.

The command to install the dependencies

# sudo apk add git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses dbus-x11 firefox-esr adwaita-gtk2-theme adwaita-icon-theme ttf-dejavu

Installing suckless from source

Go to this directory

# cd /tmp

this is where we will download the source code

# git clone https://git.suckless.org/dwm

Once downloaded go to the dwm directory

# cd dwm

to install run

# sudo make clean install

next leave this directory

# cd ..

so we can install dmenu

# git clone https://git.suckless.org/dmenu

# cd dmenu

# sudo make clean install

next leave this directory

# cd ..

so we can install st

# git clone https://git.suckless.org/st

# cd st

# sudo make clean install

Setting up your profile

Go to your profile

# cd /home/myname

where myname is the name of your profile

create .xinitrc

# vi .xinitrc

add this line exec dwm save the file and exit vi next create .profile

# vi .profile

add this line startx

exit to log out of the system or reboot and when you log in dwm will run press alt+p to launch dmenu and start typing firefox firefox will run in tile 9 see here if you want to change that