SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-07-17 22:33:42

safetycopy
urban legend
From: The Chatsubo
Registered: 2010-04-03
Posts: 1,311

dwm + SLiM Confusion [solved]

OK, I've tried to pull things together from various other posts, but I'm still missing something. I can get dwm to start after selecting it as the session from SLiM, but I can't get anything else to run with dwm.

I've added dwm to /etc/slim.conf

Here's my ~/.xsession:

#!/bin/sh

case $1 in
openbox)
    exec openbox-session
    ;;
dwm)
    exec /home/safetycopy/.config/dwm/start
    ;;
esac

...and here's /home/safetycopy/.config/dwm/start:

#!/bin/bash
nitrogen --restore &
dwm

What I think should happen is that I should be logged into a dwm session with my wallpaper restored, but I'm logged into a dwm session with no wallpaper hmm

I know it's me.

What have I done wrong?

Last edited by safetycopy (2012-07-19 00:27:26)


i wonder if i missed the warning
Skinny Puppy, Love in Vein

Offline

Be excellent to each other!

#2 2012-07-17 22:46:38

pidsley
Window Mangler
Registered: 2012-05-23
Posts: 1,752

Re: dwm + SLiM Confusion [solved]

safetycopy wrote:

What have I done wrong?

Is "tried to use SLiM" a possible answer to this question? smile

Seriously, what if you disable SLiM (you don't even have to uninstall it) and just start dwm with "startx" and .xinitrc:

#!/bin/sh

eval `dbus-launch --sh-syntax --exit-with-session`
exec ck-launch-session /home/safetycopy/.config/dwm/start

LightDM is another option -- it worked well for me before I ditched login managers entirely.

Last edited by pidsley (2012-07-17 22:54:44)

Offline

#3 2012-07-17 22:53:51

safetycopy
urban legend
From: The Chatsubo
Registered: 2010-04-03
Posts: 1,311

Re: dwm + SLiM Confusion [solved]

^ Ditching SLiM is an option, but I'd still like the ability to switch between Openbox and dwm. I'm still not really sure on how to do that without a login manager and I figured I'd try this the "easy" way before moving on to something else...


i wonder if i missed the warning
Skinny Puppy, Love in Vein

Offline

#4 2012-07-17 23:03:08

pidsley
Window Mangler
Registered: 2012-05-23
Posts: 1,752

Re: dwm + SLiM Confusion [solved]

I just put both (or more) lines in .xinitrc and comment out the one I don't want:

#!/bin/sh

eval `dbus-launch --sh-syntax --exit-with-session`
exec ck-launch-session /home/safetycopy/.config/dwm/start
#exec ck-launch-session openbox-session

Then when I want to change, I log out of X, edit .xinitrc, and startx again. I like simple solutions.

Offline

#5 2012-07-17 23:18:15

safetycopy
urban legend
From: The Chatsubo
Registered: 2010-04-03
Posts: 1,311

Re: dwm + SLiM Confusion [solved]

Well, like I said, that's an option (although editing a file just to switch sessions seems like a bit of a nuisance) but it's bugging me that I can't figure out how to do this with SLiM - I thought I'd figured it out but I guess I'm still doing something (other than SLiM) wrong...


i wonder if i missed the warning
Skinny Puppy, Love in Vein

Offline

#6 2012-07-18 04:38:05

m5
#! CrunchBanger
From: 200 years ago.
Registered: 2011-12-08
Posts: 221

Re: dwm + SLiM Confusion [solved]

safetycopy wrote:

but it's bugging me that I can't figure out how to do this with SLiM - I thought I'd figured it out but I guess I'm still doing something (other than SLiM) wrong...

It bugs me too.I had similar problem with evilwm as you know :
http://crunchbanglinux.org/forums/topic … -and-slim/

did you change your login_cmd in slim.conf to read .xinitrc?
though I have changed it and it didn`t work for me,
arch wiki says you need .xinitrc for this :
https://wiki.archlinux.org/index.php/SL … vironments
this thread says you need .xsession :
http://crunchbanglinux.org/forums/topic … with-slim/

it seems both should work,so I guess I did something wrong.

Last edited by m5 (2012-07-18 04:39:21)


Keep digging.
Linux beginner.

Offline

#7 2012-07-18 10:03:11

El_Belgicano
#! CrunchBanger
Registered: 2011-05-23
Posts: 147

Re: dwm + SLiM Confusion [solved]

safetycopy wrote:

^ Ditching SLiM is an option, but I'd still like the ability to switch between Openbox and dwm. I'm still not really sure on how to do that without a login manager and I figured I'd try this the "easy" way before moving on to something else...

I'm using this snippet in .bash_profile to select a network profile to load (i'm using plain /etc/network/interfaces to connect) before startx get called:

if [[ -z $DISPLAY ]] && [[ $(tty) = /dev/tty1 ]]
then
    while true
    do
        read -n 1 -p 'Which wm to load? (openbox/dwm): '
        echo ''
        case $REPLY in
            [openbox]) echo "openbox-session" > ~/.wmtostart & exec startx ;;
            [dwm]) echo "dwm-session" > ~/.wmtostart & exec startx ;;
            *) break ;;
        esac
    done
fi

and in your .xinitrc, you'd just:

wm=$(cat ~/.wmtostart)
exec $wm

I'm definetly not smart enough to have add something to my .bash_profile so i don't deserve any credits for this, the rest of this "this might be"-HOW-TO is pure untested (by me) stuff, so you might be the guinea pig here and there might be some other ways to achieve the same too...

Enjoy

Offline

#8 2012-07-18 11:16:30

skbierm
#! Member
From: Germany
Registered: 2012-07-17
Posts: 81

Re: dwm + SLiM Confusion [solved]

safetycopy,

did you first try to start dwm from runlevel 3? (sudo init 3 from a tty outside of X - you're Xorg will then shutdown). If not, give it a try to see, if you're dwm is working ... otherwise you might hunt for the wrong bug :\

Just a guess ...


Running #! on
* Lenovo ThinkPad Edge e420s, Intel Core i5-2430M, 8 GB Ram, 320 GB HD, 1366x768, Intel GMA HD 3000 + AMD Radeon HD 6630M 2GB
* ASUS F55A-091D, Intel Pentium B980, 4 GB Ram, 500 GB HD, Intel HD Graphics, 1366x768
* Panasonic ToughBook CF-19, Intel Core Duo U2400, 4 GB Ram, 320 GB HD, Intel GMA 950, 1024x768 Touchdisplay

Offline

#9 2012-07-18 11:40:52

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: dwm + SLiM Confusion [solved]

Runlevels 2 to 5 are identical in Debian.

Offline

#10 2012-07-18 12:35:07

skbierm
#! Member
From: Germany
Registered: 2012-07-17
Posts: 81

Re: dwm + SLiM Confusion [solved]

Thanks for the correction, el_koraco.
I just started Crunchbang yesterday, so my runlevel knowledge is worth nothing anymore on Debian. What command is then used to stop Xorg from working?


Running #! on
* Lenovo ThinkPad Edge e420s, Intel Core i5-2430M, 8 GB Ram, 320 GB HD, 1366x768, Intel GMA HD 3000 + AMD Radeon HD 6630M 2GB
* ASUS F55A-091D, Intel Pentium B980, 4 GB Ram, 500 GB HD, Intel HD Graphics, 1366x768
* Panasonic ToughBook CF-19, Intel Core Duo U2400, 4 GB Ram, 320 GB HD, Intel GMA 950, 1024x768 Touchdisplay

Offline

#11 2012-07-18 12:40:40

el_koraco
#!/loony/bun
From: inside Ed
Registered: 2011-07-25
Posts: 4,749

Re: dwm + SLiM Confusion [solved]

sudo service <display manager> stop
openbox --exit
Ctrl Alt Backspace
Crtl Q

IT depends on the given desktop or window manager.

Offline

#12 2012-07-18 12:42:53

skbierm
#! Member
From: Germany
Registered: 2012-07-17
Posts: 81

Re: dwm + SLiM Confusion [solved]

Yep, just did it already trying by

sudo /etc/init.d/slim stop for shutting down and sudo service slim start for firing up, so both commands are equivalent, more or less.


Running #! on
* Lenovo ThinkPad Edge e420s, Intel Core i5-2430M, 8 GB Ram, 320 GB HD, 1366x768, Intel GMA HD 3000 + AMD Radeon HD 6630M 2GB
* ASUS F55A-091D, Intel Pentium B980, 4 GB Ram, 500 GB HD, Intel HD Graphics, 1366x768
* Panasonic ToughBook CF-19, Intel Core Duo U2400, 4 GB Ram, 320 GB HD, Intel GMA 950, 1024x768 Touchdisplay

Offline

#13 2012-07-18 13:07:06

PackRat
#! Die Hard
From: USA
Registered: 2011-03-03
Posts: 1,237

Re: dwm + SLiM Confusion [solved]

Does it work the way you want if you change your .xsession entry to:

dwm)
    nitrogen --restore &
    exec dwm
    ;;

As I recall, that is what I had to do - but to .xinitrc

Last edited by PackRat (2012-07-18 13:07:54)


"It does not require many words to speak the truth." - Chief Joseph, Nez Perce tribe

Offline

#14 2012-07-18 23:28:34

thevdude
#! Junkie
From: Pittsburgh, PA
Registered: 2011-09-01
Posts: 469

Re: dwm + SLiM Confusion [solved]

PackRat wrote:

Does it work the way you want if you change your .xsession entry to:

dwm)
    nitrogen --restore &
    exec dwm
    ;;

As I recall, that is what I had to do - but to .xinitrc

This is exactly how I had my dwm set up in .xsession and it worked great, although I didn't use nitrogen to do a wallpaper (did start twmnd and mpd, though)

Offline

#15 2012-07-19 00:03:18

safetycopy
urban legend
From: The Chatsubo
Registered: 2010-04-03
Posts: 1,311

Re: dwm + SLiM Confusion [solved]

@PackRat: I tried changing the .xsession entry like you mentioned but it made no difference. I also tried it adding a 10s sleep to nitrogen, but that made no difference either.

Incidentally, when I start a dwm session and run nitrogen --restore from a terminal, the wallpaper is set as expected.


i wonder if i missed the warning
Skinny Puppy, Love in Vein

Offline

#16 2012-07-19 00:26:33

safetycopy
urban legend
From: The Chatsubo
Registered: 2010-04-03
Posts: 1,311

Re: dwm + SLiM Confusion [solved]

OK, I've finally hit on a successfull combination, thanks to @m5 for pointing out the switch to .xinitrc smile

/etc/slim.conf

login_cmd           exec /bin/sh - ~/.xinitrc %session
sessions            openbox,spectrwm,dwm

~/.xinitrc

DEFAULT_SESSION=openbox

case $1 in
openbox)
    exec openbox-session
    ;;
dwm)
    nitrogen --restore &
    exec dwm
    ;;
spectrwm)
    exec spectrwm
    ;;
*)
    exec $DEFAULT_SESSION
    ;;
esac

i wonder if i missed the warning
Skinny Puppy, Love in Vein

Offline

#17 2012-07-19 03:10:01

rstrcogburn
CrunchRanger
From: New Mexico
Registered: 2010-06-12
Posts: 1,931
Website

Re: dwm + SLiM Confusion [solved]

@thevdude  I thought you're a wmfscratcher?

Last edited by rstrcogburn (2012-07-19 03:13:18)


That hawk just kept flying! -Ben Lilly

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo