You are not logged in.

#1 2017-04-29 14:17:53

Das Michael
Member
Registered: 2017-04-29
Posts: 2

[Solved] .xinitrc only launches window manager

Hey,

I'm trying to launch volnoti & xscreensaver with awesome wm and all I can get is awesome alone.

xinit.rc

exec awesome
exec volnoti &
exec xscreensaver -nosplash &

I boot, login, type startx. Awesome launches, nothing else. I can launch the other two fine by manually typing the command

Ive also tried

exec volnoti
volnoti
volnoti &

and tried in .xprofile

I'm not really sure how to debug where I'm going wrong

Please help

p.s.

which awesome
/usr/bin/awesome
which volnoti
/usr/bin/volnoti

Last edited by Das Michael (2017-04-30 11:59:54)

Offline

#2 2017-04-29 14:42:54

Lemongrass
Member
From: Central Europe
Registered: 2017-03-03
Posts: 59

Re: [Solved] .xinitrc only launches window manager

My .xinitrc is working for me. Maybe this is not the most elegant .xinitrc, but it does its duty. I guess nothing gets executed after the first exec line...

#!/bin/sh

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

if [ -d /etc/X11/xinit/xinitrc.d ] ; then
 for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
  [ -x "$f" ] && . "$f"
 done
 unset f
fi

#appended to autostart Xfce4
xscreensaver & # start screen locker
xbacklight -set 100 # default brightness
exec startxfce4 # autostart Xfce4

https://wiki.archlinux.org/index.php/Xinit#xinitrc

Remember that lines following a command using exec would be ignored.

Last edited by Lemongrass (2017-04-29 14:52:29)

Offline

#3 2017-04-29 15:07:24

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: [Solved] .xinitrc only launches window manager

"exec" will stop the script at that line. The rest of the script will not run. You can read documentation about this by doing "help exec" on a bash command line.

Only use exec to start your window manager. The other programs that you want to start, do that without exec and with a "&" at the end of their line to make them start in the background.

Offline

#4 2017-04-29 16:12:46

ayekat
Member
Registered: 2011-01-17
Posts: 1,590

Re: [Solved] .xinitrc only launches window manager

Ropid wrote:

Only use exec to start your window manager. The other programs that you want to start, do that without exec and with a "&" at the end of their line to make them start in the background.

This will only work if the exec line is the last line among the commands you want to run.

Note that you can also launch your window manager without exec. If you read up on what exec does (replace the current process), you will understand why it can be more elegant to run the last command with exec—but it is not mandatory.


pkgshackscfgblag

Offline

#5 2017-04-29 17:04:46

Das Michael
Member
Registered: 2017-04-29
Posts: 2

Re: [Solved] .xinitrc only launches window manager

Wow, now there is a lesson in reading. I was on that wiki page a few lines up.

Thanks for the advice, all working now.

Offline

#6 2017-04-29 19:11:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Solved] .xinitrc only launches window manager

The expectation is that you will read the wiki before posting here; that means actually reading, not skimming.


Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB