On Mon, May 16, 2016 at 03:00:16PM -0800, Britton Kerin wrote:
> I just made .xinit:
>
> $ ls -l .xinitrc
> -rw-r--r-- 1 bkerin bkerin 9 May 16 14:50 .xinitrc
> $ cat .xinitrc
> exec dwm
> $
>
> I slightly remember doing that 20 years ago or so, fun.  But it doesn't
> seem to work nowadays at least on debian 8.4.  I still get gnome
> even after a reboot.  Perhaps the tutorial Launching section should
> be removed since wrong stuff is worse than nothing.  I wouldn't ask
> dwm to cover how to avoid gnome under all circumstances, maybe
> just a pointer a good source on the gruesome details would be good.

X11 session initialization varies between distros, so it's hard to write
something that applies to everyone. For example, when I used an RHEL
desktop for the very first time a few months ago, I discovered you have
to install an additional package to have the startup process read a
local X11 session file.

My personal desktop and laptop run on Debian 8, and I have a ~/.xsession
file (attached to this message) that contains my startup script. Using
~/.xinitrc _might_ work on Debian, but I don't know for sure. At the
very least, you need to make sure the script is executable, which is not
the case above.

I also have the following in the Makefile I use for configuration new
machines:

    # The default XFCE4 session in Debian will always attempt to launch
    # orage, xfdesktop and xfce4-panel regardless of the local session.
    # Since the init script is executed as the user, and I never use
    # these programs, simply symlinking them to /bin/true somewhere in
    # the PATH effectively disables them.
    $(HOME)/bin/orage:
            ln -s /bin/true $@

    $(HOME)/bin/xfdesktop:
            ln -s /bin/true $@

    $(HOME)/bin/xfce4-panel:
            ln -s /bin/true $@

Eric
#!/usr/bin/env bash
test -z "$PROFILE_LOADED" && source ~/.profile

export XDG_CACHE_HOME="/tmp/"
export _JAVA_AWT_WM_NONREPARENTING="1"

window_manager="dwm"

async_startup_commands=(
    "gpick"
    "pidgin"
    "st"
    "volti"
    "wmname LG3D"
    "xcompmgr -n"
    "xfce4-session"
    "xmodmap ~/.xmodmaprc"
    "xset s off -dpms"
    "xsetroot -solid #000000"
)

if command -v slock; then
    export DISPLAY_LOCKER="slock"
else
    export DISPLAY_LOCKER="xscreensaver-command -l"
    async_startup_commands+=("xscreensaver -no-splash")
fi

# On my personal machines, I use Firefox and Chromium while I use exclusively
# use Google Chrome at work.
if [[ "$(hostname -f)" = *.codevat.com ]]; then
    async_startup_commands+=(
        "chromium"
        "firefox"
    )
else
    async_startup_commands+=(
        "google-chrome"
    )
fi

for command in "${async_startup_commands[@]}"; do
    eval " $command" &
done

# Automatically relaunch the window manger if its exits with a non-zero exit
# code with a short delay between each launch.
while ! $window_manager; do
    sleep 1
done

Reply via email to