6

I installed dwm 6.0 using the file provided here and then...

# make install
# dwm

But running "dwm" gives error: "dwm: cannot open display". I tried "exec dwm", but it starts a new login dialog, basically a new session.

Note: I installed a display manager, and I'm sure it's not a graphics card installation problem, because I tried the "awesome" window manager package and it worked.

skink
  • 5,133
  • 6
  • 37
  • 58
Omar Awamry
  • 1,462
  • 3
  • 15
  • 29
  • You need to run `dwm` as the user with the X session running (not root like in that snippet) and when no other window manager is already running. Alternatively, you need to put that in your X session startup scripts or give it a login manager configuration entry. – Etan Reisner Jul 07 '15 at 17:48
  • 3
    Dwm is a "Window manager" - you can't just "run" it, like a normal program. You need to configure X Windows to use it, then you need to restart X. Look here: https://wiki.archlinux.org/index.php/Dwm or https://bbs.archlinux.org/viewtopic.php?id=109206 – paulsm4 Jul 07 '15 at 17:48
  • It did work and dwm started after editing .xinitrc. thanks alot for your help. – Omar Awamry Jul 07 '15 at 17:55

1 Answers1

21

First, you will need to install X server and Git (as root)

pacman -S xorg-xinit xorg git

Change directory to /usr/src because you want this to apply to all users:

cd /usr/src

As root, clone suckless software such as dwm (window manager), st (recommended terminal), and dmenu (simple application menu)

git clone git://git.suckless.org/dwm
git clone git://git.suckless.org/st
git clone git://git.suckless.org/dmenu

Change directory into each one, and compile them:

cd dwm ## Do this step also with st and dmenu
sudo make clean install

Add a new user that is under the users group (as root):

useradd -m -g users ari
passwd ari

Log out, log in as new user, and execute:

<favorite text editor> .xinitrc
    from there, add "exec dwm" into the file, save, and exit

Start your session with:

startx
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131