You are not logged in.
Hi,
I'm using Arch with openbox as a standalone DE and am trying to get Xbindkeys to be started with X on booting. I added
xbindkeysdirectly above
exec openbox-sessionin
~/.xinitrcas the wiki suggested.
The only way I can actually get xbindkeys working though is by starting it from terminal after logging in.
Offline
Does it work using the Openbox autostart file: https://wiki.archlinux.org/index.php/Openbox#autostart
Offline
Can you post your full ~/.xinitrc?
How do you start X (with startx, xinit, or a display manager)?
Can you put some other command right before the exec line, like a terminal emulator to see if it starts?
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Does it work using the Openbox autostart file: https://wiki.archlinux.org/index.php/Openbox#autostart
No, unfortunately, that doesn't work either
Can you post your full ~/.xinitrc?
How do you start X (with startx, xinit, or a display manager)?
Can you put some other command right before the exec line, like a terminal emulator to see if it starts?
Sure, I currently start X with LightDM
#!/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
# twm &
# xclock -geometry 50x50-1+1 &
# xterm -geometry 80x50+494+51 &
# xterm -geometry 80x20+494-0 &
# exec xterm -geometry 80x66+0+0 -name login
exec urxvt xbindkeys
exec openbox-sessionOffline
Only one exec line is read in .xinitrc and you don't launch xbindkeys with urxvt, AFAIAA...
Offline
xbindkeys & or
# Autostart xbindkeys
(sleep 10s && xbindkeys) &
Last edited by fmscott1 (2015-11-26 22:10:22)
Offline
LightDM doesn't use xinitrc, so you could put whatever you want in there - it will not be used.
LightDM uses xprofile.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
LightDM doesn't use xinitrc, so you could put whatever you want in there - it will not be used.
LightDM uses xprofile.
This did it! I also used the correct command provided by fmscott1, to get the xprofile file working. Here's my /etc/lightdm/Xsession for anyone in a very similar situation:
#!/bin/sh
#
# LightDM wrapper to run around X sessions.
echo "Running X session wrapper"
# Load profile
for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do
if [ -f "$file" ]; then
echo "Loading profile from $file";
. "$file"
fi
done
# Load resources
for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do
if [ -f "$file" ]; then
echo "Loading resource: $file"
xrdb -merge "$file"
fi
done
# Load keymaps
for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do
if [ -f "$file" ]; then
echo "Loading keymap: $file"
setxkbmap `cat "$file"`
XKB_IN_USE=yes
fi
done
# Load xmodmap if not using XKB
if [ -z "$XKB_IN_USE" ]; then
for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do
if [ -f "$file" ]; then
echo "Loading modmap: $file"
xmodmap "$file"
fi
done
fi
unset XKB_IN_USE
# Run all system xinitrc shell scripts
xinitdir="/etc/X11/xinit/xinitrc.d"
if [ -d "$xinitdir" ]; then
for script in $xinitdir/*; do
echo "Loading xinit script $script"
if [ -x "$script" -a ! -d "$script" ]; then
. "$script"
fi
done
fi
# Run user xsession shell script
script="$HOME/.xsession"
if [ -x "$script" -a ! -d "$script" ]; then
echo "Loading xsession script $script"
. "$script"
fi
echo "X session wrapper complete, running session $@"
exec xbindkeys & or
# autostart xbindkeys
(sleep 10s && xbindkeys) &
$@Thank you all for your help!
Offline
Trilby wrote:LightDM doesn't use xinitrc, so you could put whatever you want in there - it will not be used.
LightDM uses xprofile.
This did it! I also used the correct command provided by fmscott1, to get the xprofile file working. Here's my /etc/lightdm/Xsession for anyone in a very similar situation:
#!/bin/sh # # LightDM wrapper to run around X sessions. echo "Running X session wrapper" # Load profile for file in "/etc/profile" "$HOME/.profile" "/etc/xprofile" "$HOME/.xprofile"; do if [ -f "$file" ]; then echo "Loading profile from $file"; . "$file" fi done # Load resources for file in "/etc/X11/Xresources" "$HOME/.Xresources"; do if [ -f "$file" ]; then echo "Loading resource: $file" xrdb -merge "$file" fi done # Load keymaps for file in "/etc/X11/Xkbmap" "$HOME/.Xkbmap"; do if [ -f "$file" ]; then echo "Loading keymap: $file" setxkbmap `cat "$file"` XKB_IN_USE=yes fi done # Load xmodmap if not using XKB if [ -z "$XKB_IN_USE" ]; then for file in "/etc/X11/Xmodmap" "$HOME/.Xmodmap"; do if [ -f "$file" ]; then echo "Loading modmap: $file" xmodmap "$file" fi done fi unset XKB_IN_USE # Run all system xinitrc shell scripts xinitdir="/etc/X11/xinit/xinitrc.d" if [ -d "$xinitdir" ]; then for script in $xinitdir/*; do echo "Loading xinit script $script" if [ -x "$script" -a ! -d "$script" ]; then . "$script" fi done fi # Run user xsession shell script script="$HOME/.xsession" if [ -x "$script" -a ! -d "$script" ]; then echo "Loading xsession script $script" . "$script" fi echo "X session wrapper complete, running session $@" exec xbindkeys & or # autostart xbindkeys (sleep 10s && xbindkeys) & $@Thank you all for your help!
exec xbindkeys & is all you need. The other option would work if you needed that program to wait before starting. You can delete or comment that out.
Offline