Dwm: Difference between revisions
Alpineuser (talk | contribs) No edit summary |
No edit summary |
||
Line 5: | Line 5: | ||
This guide covers: | This guide covers: | ||
* Creating a user account that can run | * Creating a user account that can run sudo | ||
* Installing dependencies for the [https://suckless.org suckless] tools and installing firefox | * Installing dependencies for the [https://suckless.org suckless] tools and installing firefox | ||
* Installing from source dwm (dynamic window manager), dmenu (dynamic menu), st (simple terminal) | * Installing from source dwm (dynamic window manager), dmenu (dynamic menu), st (simple terminal) | ||
Line 12: | Line 12: | ||
== Creating a new user account == | == Creating a new user account == | ||
After | After installing Alpine you get the root account. We want to create an account that is not root, but can run sudo. | ||
{{cmd|# adduser myname}} | {{cmd|# adduser myname}} | ||
Where '''myname''' is the | Where '''myname''' is the user name you want to use. | ||
Install sudo so we can add '''myname''' to sudoers. | Install sudo so we can add '''myname''' to sudoers. | ||
Line 21: | Line 21: | ||
Edit the sudoers file by running: | Edit the sudoers file by running: | ||
{{cmd|# visudo}} | {{cmd|# visudo}} | ||
{{Note| | {{Note|Edit the sudoers file using only '''visudo'''}} | ||
Add | Add the newly create account to sudoers. Insert the line '''after''' the root definition. The relevant section should look like this: | ||
{{cat|/etc/sudoers.tmp| | {{cat|/etc/sudoers.tmp| | ||
<pre> | <pre> | ||
Line 32: | Line 32: | ||
Switch to the new account | Switch to the new account | ||
{{cmd|# su myname}} | {{cmd|# su myname}} Where '''myname''' is your username. | ||
== Installing Xorg == | == Installing Xorg == | ||
Run the following command to install X.org | Run the following command to install X.org: | ||
{{cmd|# sudo setup-xorg-base}} | {{cmd|# sudo setup-xorg-base}} | ||
== | == Configure the community repositories == | ||
This is needed so you can install Firefox. Edit the file with this command: | |||
{{cmd|# sudo vi /etc/apk/repositories}} | {{cmd|# sudo vi /etc/apk/repositories}} | ||
Uncomment the community line by removing the '''#''' then save the file and exit. | Uncomment the community line by removing the '''#''' then save the file and exit. | ||
Line 50: | Line 50: | ||
#http://linorg.usp.br/AlpineLinux/edge/community | #http://linorg.usp.br/AlpineLinux/edge/community | ||
#http://linorg.usp.br/AlpineLinux/edge/testing}} | #http://linorg.usp.br/AlpineLinux/edge/testing}} | ||
Next | Next, tell the package manager about the change: | ||
{{cmd|# sudo apk update}} | {{cmd|# sudo apk update}} | ||
== Installing dependencies == | == Installing dependencies == | ||
{{Note| | {{Note| | ||
'''git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses''' | '''git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses''' is needed to install suckless tools from source. | ||
'''dbus-x11''' is needed for the dbus system ( | '''dbus-x11''' is needed for the dbus system (enables firefox running in dwm to open in a tile) | ||
The last three '''adwaita-gtk2-theme adwaita-icon-theme ttf-dejavu''' are optional but | The last three '''adwaita-gtk2-theme adwaita-icon-theme ttf-dejavu''' are optional, but recommended for a nicer looking firefox.}} | ||
The command to install the dependencies: | The command to install the dependencies: | ||
Line 65: | Line 65: | ||
== Installing suckless tools dwm, dmenu, and st from source == | == Installing suckless tools dwm, dmenu, and st from source == | ||
Change to the /tmp directory. {{cmd| # cd /tmp}} then execute: | |||
{{cmd|# git clone https://git.suckless.org/dwm}} | {{cmd|# git clone https://git.suckless.org/dwm}} | ||
Once downloaded go to the dwm directory {{cmd|# cd dwm}} | Once downloaded, go to the dwm directory {{cmd|# cd dwm}} | ||
To install, run: | To install, run: | ||
{{cmd|# sudo make clean install}} | {{cmd|# sudo make clean install}} | ||
Next, | Next, go up one directory level {{cmd|# cd ..}} to install dmenu: | ||
{{cmd|# git clone https://git.suckless.org/dmenu}} | {{cmd|# git clone https://git.suckless.org/dmenu}} | ||
{{cmd|# cd dmenu}} | {{cmd|# cd dmenu}} | ||
{{cmd|# sudo make clean install}} | {{cmd|# sudo make clean install}} | ||
Finally, | Finally, go up one more directory level {{cmd|# cd ..}} to install st: | ||
{{cmd|# git clone https://git.suckless.org/st}} | {{cmd|# git clone https://git.suckless.org/st}} | ||
{{cmd|# cd st}} | {{cmd|# cd st}} | ||
{{cmd|# sudo make clean install}} | {{cmd|# sudo make clean install}} | ||
== Setting up your profile == | == Setting up your profile == | ||
Change to your home directory: | |||
{{cmd|# cd /home/myname}} Where '''myname''' is your username. | {{cmd|# cd /home/myname}} Where '''myname''' is your username. | ||
Create .xinitrc: | Create .xinitrc: | ||
Line 102: | Line 102: | ||
|gotchas}} | |gotchas}} | ||
Log out or reboot. dwm will run the next time you log in. | |||
Press alt+p to launch dmenu | Press alt+p to launch dmenu. Type firefox then press enter. Firefox will load and run in tile 9. | ||
= = | = = |
Revision as of 12:28, 8 August 2021
dwm is a dynamic window manager for X. It manages windows in tiled, monocle and floating layouts.
This guide covers:
- Creating a user account that can run sudo
- Installing dependencies for the suckless tools and installing firefox
- Installing from source dwm (dynamic window manager), dmenu (dynamic menu), st (simple terminal)
- Configuring the new profile to run dwm at login.
Creating a new user account
After installing Alpine you get the root account. We want to create an account that is not root, but can run sudo.
# adduser myname
Where myname is the user name you want to use.
Install sudo so we can add myname to sudoers.
# apk add sudo
Edit the sudoers file by running:
# visudo
Add the newly create account to sudoers. Insert the line after the root definition. The relevant section should look like this:
Contents of /etc/sudoers.tmp
## ## User privilege specification ## root ALL=(ALL) ALL myname ALL=(ALL) ALL
Switch to the new account
# su myname
Where myname is your username.
Installing Xorg
Run the following command to install X.org:
# sudo setup-xorg-base
Configure the community repositories
This is needed so you can install Firefox. Edit the file with this command:
# sudo vi /etc/apk/repositories
Uncomment the community line by removing the # then save the file and exit. It should look something like this:
Contents of /etc/apk/repositories
Next, tell the package manager about the change:
# sudo apk update
Installing dependencies
git make gcc g++ libx11-dev libxft-dev libxinerama-dev ncurses is needed to install suckless tools from source.
dbus-x11 is needed for the dbus system (enables firefox running in dwm to open in a tile)
The last three adwaita-gtk2-theme adwaita-icon-theme ttf-dejavu are optional, but recommended for 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
Change to the /tmp directory.
# cd /tmp
then execute:
# git clone https://git.suckless.org/dwm
Once downloaded, go to the dwm directory
# cd dwm
To install, run:
# sudo make clean install
Next, go up one directory level
# cd ..
to install dmenu:
# git clone https://git.suckless.org/dmenu
# cd dmenu
# sudo make clean install
Finally, go up one more directory level
# cd ..
to install st:
# git clone https://git.suckless.org/st
# cd st
# sudo make clean install
Setting up your profile
Change to your home directory:
# cd /home/myname
Where myname is your username.
Create .xinitrc:
# vi .xinitrc
Add this line:
Contents of ~/.xinitrc
Save the file and exit vi.
Next, create .profile.:
# vi .profile
Add this line:
Contents of ~/.profile
Contents of ~/.profile
Log out or reboot. dwm will run the next time you log in. Press alt+p to launch dmenu. Type firefox then press enter. Firefox will load and run in tile 9.
- https://pkgs.alpinelinux.org/contents?file=dwm
- "dwm is only a single binary, and its source code is intended to never exceed 2000 SLOC. dwm is customized through editing its source code"
- Awesome
- Raspberry Pi 3 - Browser Client - A guide which omits dwm, but uses similar steps to install firefox in a diskless install on ARM. dwm is not used on the RPI3, due to tmpfs limitations.