As per the documentation of `startx`, if you do not use a full pathname it runs a default session and passes it your argument as a parameter. Also make sure `~/.xinitrc` is executable (`chmod +x ~/.xinitrc) and that its first line is `#! /bin/bash` or `#! /bin/sh`.
Brandon Allbery <allbery.b@gmail.com> writes:
> Your description of running `startx` seems a bit confused to me. Did you
> run it in the background and then try to run xmonad? This won't work
> because `startx` can't alter the environment variables of the running
> shell, so `$DISPLAY` won't be set. You need to run xmonad within the client
> environment: `startx ~/.cache/xmonad/xmonad-x86_64-linux` (it has to be a
> full pathname; see the `startx` documentation).
>
I thought that I had to start the xserver before invoking 'exec ~/.cache/xmonad/...'' like I would in .xinitrc. Now when I log in and manually run 'startx ~/.cache/xmonad/xmonad-x86_64-linux' it works like a charm. But when I run 'startx .xinitrc' where one line of .xinitrc contains 'exec ~/.cache/xmonad/xmonad-x86_64-linux' the startup of the xserver fails. I also tried giving the full path like 'home/jan/.cache/...' but it still fails. Do I have to wrap the path into quotes for the exec command or what is wrong here?
Best regards
Jan
--