LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-07-2020, 08:28 AM   #1
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 170

Rep: Reputation: Disabled
Just installed DWM from Sbo - default commands not working


I'm running slackware -current and I used SBopkg to download and install dwm. Upon running it, none of the commands listed in their tutorial seem to work even though I haven't changed or edited any of the configs. The version I downloaded was 14.2 but I've heard that 14.2 applications work on current without editing. Apologies if I'm mistaken in assuming this.

It says in their tutorial here that to bring up the Terminal is [Shift]+[Alt]+[Enter].

[Alt]+[p] - dmenu for running programs like the x-www-browser

and [Alt]+[j] or [Alt]+[k] To move to another terminal.

Yet none of these commands are working. My keyboard has never had any problems like unresponsive keys or anything like that. No other commands that I've tried have worked either. To exit the X session, I had to ctrl + alt f1 and then cancel the x session.

The only commands that do seem to work are the alt + 0 and alt + space commands but seeing as I can't even get any programs to run, they're pretty much moot.

Last edited by burning; 07-07-2020 at 12:46 PM.
 
Old 07-07-2020, 04:58 PM   #2
Loomx
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 79

Rep: Reputation: Disabled
Do you have dmenu installed?
Also, by default the terminal it tries to open is st, so nothing will happen if that isn't installed either.

I would recommend unpacking the source and modifying the config.def.h file yourself. It's pretty straightforward even if you know no C.
You could change the terminal to run e.g. xterm
Then just run
Code:
make install clean
as root to install dwm manually.

[Edit] The link in my signature below is an old how-to for Debian, but should be still mostly relevant for Slackware.

Last edited by Loomx; 07-07-2020 at 05:00 PM.
 
1 members found this post helpful.
Old 07-07-2020, 05:49 PM   #3
slac
Member
 
Registered: May 2019
Posts: 82

Rep: Reputation: Disabled
Dwm is a window manager that uses st as default terminal and dmenu as a tool to execute programs and scripts right away.

St is opened with Mod + Shift + t

Dmenu is opened with Mod + p

You obviously need to have those three installed, but that is not mandatory since you can change the default behavior of dwm by editing its source code to use other programs. If you decide to do that last thing, you can change the default terminal to xterm or rxvt, both of them are included in the Slackware Official Packages (if you selected to install the x and xap series during installation, you will have them, if not, you will need to install them). That should be enough to open programs but obviously it is more handy to have dmenu installed.

In case you want to install dwm + dmenu + st, you can uninstall the SBOpkg version you have installed and execute the following script as root:

Code:
#!/bin/sh

mkdir -p $HOME/Suckless
cd $HOME/Suckless

for suck_tool in dwm dmenu st; do
  git clone https://git.suckless.org/${suck_tool}
  (cd ${suck_tool}; make clean install)
done
That should be about enough to install dwm, dmenu and st. It is not mandatory to use that script like it is, you can modify it or do things by hand.

If you want to make modifications (and you have used the previous script) just go to: $HOME/Suckless and there will be the source code. Once you have made modifications, you can reinstall by executing: make clean install

In order to execute dwm, you will have to create a file called .xinitrc at your home directory (not root):

Warning: The contents of .xinitrc will be erased.

Code:
echo "exec dwm" > $HOME/.xinitrc
If you do not want to reset the .xinitrc file you can change the ">" for ">>" in the previous command.

Then execute: startx

Last edited by slac; 07-07-2020 at 05:54 PM. Reason: for instead of from in script.
 
1 members found this post helpful.
Old 07-07-2020, 06:41 PM   #4
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 170

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Loomx View Post
Do you have dmenu installed?
Also, by default the terminal it tries to open is st, so nothing will happen if that isn't installed either.

I would recommend unpacking the source and modifying the config.def.h file yourself. It's pretty straightforward even if you know no C.
You could change the terminal to run e.g. xterm
Then just run
Code:
make install clean
as root to install dwm manually.

[Edit] The link in my signature below is an old how-to for Debian, but should be still mostly relevant for Slackware.
Ah thanks, turns out I forgot to install dmenu and st

That how-to looks really helpful, I'll check it out!
 
Old 07-07-2020, 06:44 PM   #5
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 170

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by slac View Post
Dwm is a window manager that uses st as default terminal and dmenu as a tool to execute programs and scripts right away.

St is opened with Mod + Shift + t

Dmenu is opened with Mod + p

You obviously need to have those three installed, but that is not mandatory since you can change the default behavior of dwm by editing its source code to use other programs. If you decide to do that last thing, you can change the default terminal to xterm or rxvt, both of them are included in the Slackware Official Packages (if you selected to install the x and xap series during installation, you will have them, if not, you will need to install them). That should be enough to open programs but obviously it is more handy to have dmenu installed.

In case you want to install dwm + dmenu + st, you can uninstall the SBOpkg version you have installed and execute the following script as root:

Code:
#!/bin/sh

mkdir -p $HOME/Suckless
cd $HOME/Suckless

for suck_tool in dwm dmenu st; do
  git clone https://git.suckless.org/${suck_tool}
  (cd ${suck_tool}; make clean install)
done
That should be about enough to install dwm, dmenu and st. It is not mandatory to use that script like it is, you can modify it or do things by hand.

If you want to make modifications (and you have used the previous script) just go to: $HOME/Suckless and there will be the source code. Once you have made modifications, you can reinstall by executing: make clean install

In order to execute dwm, you will have to create a file called .xinitrc at your home directory (not root):

Warning: The contents of .xinitrc will be erased.

Code:
echo "exec dwm" > $HOME/.xinitrc
If you do not want to reset the .xinitrc file you can change the ">" for ">>" in the previous command.

Then execute: startx
Thank you! That helped clear things up! Would you recommend I install individual packages for ST, Dmenu and DWM separately as well? Or just the manual install like you illustrated?

edit: why exactly is the .xinitrc file erased? And what reasons would you have for wanting to/not wanting it to reset?

Last edited by burning; 07-07-2020 at 06:46 PM.
 
Old 07-07-2020, 09:01 PM   #6
slac
Member
 
Registered: May 2019
Posts: 82

Rep: Reputation: Disabled
Quote:
Originally Posted by burning View Post
Would you recommend I install individual packages for ST, Dmenu and DWM separately as well? Or just the manual install like you illustrated?
I do not understand what you mean by saying that. Could you re-formulate?

Quote:
Originally Posted by burning View Post
edit: why exactly is the .xinitrc file erased? And what reasons would you have for wanting to/not wanting it to reset?
Well... As the time passes you may want to add more content to .xinitrc in order to fit some of your needs. After that happens, the reason to do not want to reset the file will be pretty clear, won't they? Clue: You will reset your .xinitrc file.

Just to be clear, you do not have to add content to .xinitrc using > or >>, that is only a thing I do to quickly create or append content to a file. You can just use a text editor instead, vim or vi should be good. If you want to, you can give it a try to "ed", that is a pretty handy editor to add or edit text lines as well.
 
Old 07-08-2020, 08:12 AM   #7
deNiro
Member
 
Registered: Jun 2003
Location: Belgium
Distribution: Salix 14.2 and Slackware-current
Posts: 175

Rep: Reputation: Disabled
@burning
Like the previous posters already mentioned, it's better to get dwm from git, and compile it in your homedir, since then you can easily play around with the config, change colors and what more, and quickly compile without root permissions.

just quickly how I did it.

first make sure dmenu is installed, either from sbo, or with git.

Then install dwm like this:

( I always put all my git clones in ~/git )

# cd ~/git
# git clone git://git.suckless.org/dwm
# cd dwm
# make -C ~/dwm
( by doing this , everything dwm related, like the source, the bin folder and the share folder is in ~/dwm )

then go to ~/dwm

edit the "config.mk" file
change "PREFIX = /home/henk/dwm" (obviously change my name to your username )
(by doing this while compiling the bin and share dir will be placed in ~/dwm )

you might want to edit the config.h file in that dir as well:

make sure that "static const int resizehints = 0;"
(it should be, because with =1 it will mess with your lay-out)

You might wanna change (or maybe not) your modkey from alt to the win key with:
"#define MODKEY Mod4Mask"

and perhaps you want to change your terminal to something else then st terminal. In my case I use xterm:
"static const char *termcmd[] = { "xterm", NULL };"


and then you can compile it
So in that ~/dwm dir:
# make clean install
(files will be installed in your home in ~/dwm/bin and ~/dwm/share)

And obviously every time you change something to "config.h", like other colors or what not, you have to do the #make clean install


----------
my ~/.xinitrc file to start this:

# dwm statusbar - show current time and date
while true
do
xsetroot -name "$(date "+%F %R")"
sleep 1m
done &

#[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
# sh .fehbg &
# start dwm
exec /home/henk/dwm/bin/dwm
--------------------------

hope this helps

Last edited by deNiro; 07-08-2020 at 09:33 AM.
 
1 members found this post helpful.
Old 07-09-2020, 09:13 AM   #8
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 170

Original Poster
Rep: Reputation: Disabled
Smile

Quote:
Originally Posted by slac View Post
I do not understand what you mean by saying that. Could you re-formulate?
I just meant, as I understand it, doing make clean install after downloading source from git installs the program but doesn't package it. My understanding is that this would mean updating it would be more of a hassle, no? Having to manually check if an update is required and then individually updating dmenu, dwm and st etc. But seeing as I'm new to Slackware and the concept of packaging in general I'm aware that my current level of understanding on these concepts might occasionally lead me to false conclusions such as the assumption above about downloading from git and doing make clean install leading to slightly more arduous update procedures, or I might be right in that assumption but not seeing the bigger picture.


Quote:
Well... As the time passes you may want to add more content to .xinitrc in order to fit some of your needs. After that happens, the reason to do not want to reset the file will be pretty clear, won't they? Clue: You will reset your .xinitrc file.

Just to be clear, you do not have to add content to .xinitrc using > or >>, that is only a thing I do to quickly create or append content to a file. You can just use a text editor instead, vim or vi should be good. If you want to, you can give it a try to "ed", that is a pretty handy editor to add or edit text lines as well.
And forgive me, I was overthinking after not reading your previous post correctly, I forgot that > rewrites the entire file as opposed to >> which appends.
I get it now

Last edited by burning; 07-09-2020 at 09:20 AM.
 
Old 07-09-2020, 09:47 AM   #9
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 170

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by deNiro View Post
then go to ~/dwm

edit the "config.mk" file
change "PREFIX = /home/henk/dwm" (obviously change my name to your username )
(by doing this while compiling the bin and share dir will be placed in ~/dwm )
Oh, is this just for ease of access/general organisational purposes? Where would they have been installed by default? in /bin and /share ?


Quote:
and perhaps you want to change your terminal to something else then st terminal. In my case I use xterm:
"static const char *termcmd[] = { "xterm", NULL };"
As someone who's only used xterm so far, I'm curious what some users might prefer about it over st and vice versa. What's your take on them?


Quote:
----------
my ~/.xinitrc file to start this:

# dwm statusbar - show current time and date
while true
do
xsetroot -name "$(date "+%F %R")"
sleep 1m
done &

#[ -f ~/.Xresources ] && xrdb -merge ~/.Xresources
# sh .fehbg &
# start dwm
exec /home/henk/dwm/bin/dwm
--------------------------
Could you explain what each line is doing respectively? Why the wait for one minute?

Quote:
hope this helps
Thanks! I really appreciate the in-depth explanation! Really helpful!
 
Old 07-09-2020, 12:46 PM   #10
sevendogsbsd
Senior Member
 
Registered: Sep 2017
Distribution: Slackware
Posts: 1,937

Rep: Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841Reputation: 841
So, FYI - dwm is a standalone executable so really doesn't need to be packaged. I can't speak to dmenu as I've always installed it as a package. I used to just build dwm and then use root to copy the binary to /usr/bin or wherever you normally run executables.
 
1 members found this post helpful.
Old 07-09-2020, 01:43 PM   #11
deNiro
Member
 
Registered: Jun 2003
Location: Belgium
Distribution: Salix 14.2 and Slackware-current
Posts: 175

Rep: Reputation: Disabled
Quote:
Originally Posted by burning View Post
Oh, is this just for ease of access/general organisational purposes? Where would they have been installed by default? in /bin and /share ?



As someone who's only used xterm so far, I'm curious what some users might prefer about it over st and vice versa. What's your take on them?



Could you explain what each line is doing respectively? Why the wait for one minute?


Thanks! I really appreciate the in-depth explanation! Really helpful!

Yes, since I keep everything in my home dir, so I don't have to bother with making a package, or manually copying it to the system /bin and /share. DWM is pretty small anyway, and most important, the source file is also the config file, so that is why it is probably easier to keep it in your /home.

I hardly use any other terminal then xterm. It' already installed on slack.
if you want it a bit nicer to look at, make sure you have at least these in ~/.bashrc :
# load the system-wide environment
source /etc/profile
# for 256 colours instead of the default 8
XTerm.termName: xterm-256color

here is some info on how to configure your shell more.

The first part of that .xinitrc file is to show the date and time, and since it only shows hours and minutes, I only update every minute.
The rest is to start dwm, and setting the background with feh, which i currently have disabled. I stole that from ratfactor.com, which might have some extra usefull info.

Last edited by deNiro; 07-09-2020 at 02:03 PM.
 
1 members found this post helpful.
Old 07-09-2020, 01:50 PM   #12
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 5,517

Rep: Reputation: Disabled
Quote:
Originally Posted by burning View Post
I'm running slackware -current and I used SBopkg to download and install dwm. Upon running it, none of the commands listed in their tutorial seem to work even though I haven't changed or edited any of the configs. The version I downloaded was 14.2 but I've heard that 14.2 applications work on current without editing. Apologies if I'm mistaken in assuming this.

It says in their tutorial here that to bring up the Terminal is [Shift]+[Alt]+[Enter].

[Alt]+[p] - dmenu for running programs like the x-www-browser

and [Alt]+[j] or [Alt]+[k] To move to another terminal.

Yet none of these commands are working. My keyboard has never had any problems like unresponsive keys or anything like that. No other commands that I've tried have worked either. To exit the X session, I had to ctrl + alt f1 and then cancel the x session.

The only commands that do seem to work are the alt + 0 and alt + space commands but seeing as I can't even get any programs to run, they're pretty much moot.
remember that you have to read the README of everything you install from SBo, also if you are using a third-party tool like sbopkg.
 
1 members found this post helpful.
Old 07-09-2020, 07:49 PM   #13
individual
Member
 
Registered: Jul 2018
Posts: 284
Blog Entries: 1

Rep: Reputation: 218Reputation: 218Reputation: 218
If you want to play around with different terminal emulators, but don't want to change it in the config file, install something like Xfce's exo. You can set your "preferred terminal emulator". Here are a few lines from my config.h that define a "generic" file manager, terminal emulator, and web browser.
Code:
static const char *browsercmd[] = { "/usr/bin/env", "exo-open", "--launch", "WebBrowser", NULL };
static const char *filemancmd[] = { "/usr/bin/env", "exo-open", "--launch", "FileManager", NULL };
static const char *termcmd[]  = { "/usr/bin/env", "exo-open", "--launch", "TerminalEmulator", NULL };

/* Keybind section */
{ ALTKEY,           XK_Return,                spawn,          {.v = termcmd } },
{ ALTKEY,           XK_f,                     spawn, {.v = filemancmd} },
{ ALTKEY,           XK_w,                     spawn, {.v = browsercmd} },
 
2 members found this post helpful.
Old 07-11-2020, 05:07 PM   #14
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 170

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by deNiro View Post

# cd ~/git
# git clone git://git.suckless.org/dwm
# cd dwm
# make -C ~/dwm
( by doing this , everything dwm related, like the source, the bin folder and the share folder is in ~/dwm )

then go to ~/dwm

edit the "config.mk" file
change "PREFIX = /home/henk/dwm" (obviously change my name to your username )
(by doing this while compiling the bin and share dir will be placed in ~/dwm )

you might want to edit the config.h file in that dir as well:

make sure that "static const int resizehints = 0;"
(it should be, because with =1 it will mess with your lay-out)
I ran into a bit of a snag when trying make -C /home/myusername/dwm (I would've typed the shorter file path just now using that squiggle key whose name I cannot unfortunately recall to signify my home directory but I think my keyboard map might be misconfigured. If anyone could let me know how to change it to a UK keymap, that would be very much appreciated!)

Every time I try to run it, I get this message:
Code:
make: Entering directory '/home/burning/dwm'
make: *** No targets specified and no makefile found. Stop
make: Leaving directory '/home/burning/dwm'
I edited the config.mk and config.def.h files like you recommended, but the problem still persists. I find it strange that it'd report no makefile could be found when the Makefile is clearly listed in the /home/burning/git/dwm dir.

edit: nvm, I did make ; cp dwm /home/burning/dwm to install it in /home/burning/dwm though if you run that command, you need to be in the /home/user/dwm dir when you run it.
sidenote: What exactly does setting my static const int resizehints to 0 do? Do all dwm users have to edit that file in this way before using it for the first time?

Last edited by burning; 07-13-2020 at 04:24 PM.
 
Old 07-17-2020, 03:11 AM   #15
burning
Member
 
Registered: Jan 2020
Location: Canada
Distribution: Slackware
Posts: 170

Original Poster
Rep: Reputation: Disabled
Marking the thread as solved. I just ended up using the Slackbuild off of slackbuilds.org. It works like a charm.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SBo dwm-6.2 with systray patch is bugged FlinchX Slackware 4 12-05-2019 03:30 PM
nvidia-driver SBo The symbolic link '/usr/lib/libGL.so.1' does not point to 'tmp/SBo/package-nvidia-driver/usr/lib64/libGL.so.1' Gerardo Zamudio Slackware 5 07-30-2017 10:44 PM
Questions for Robby, ponce, or anyone from SBo about SBo submission requirements. ReaperX7 Slackware 4 06-07-2015 11:30 AM
Nvidia-driver.SlackBuild from SBo (or: I am a bad and sloppy SBo maintainer) kingbeowulf Slackware 8 08-31-2012 02:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:42 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration