You are not logged in.

#1 2013-09-24 17:55:20

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

Executing command on startup doesn't work

Hello,

I'm trying to execute this script when X starts:

xmodmap -e " keycode 118 = Delete"

which works, when is executed manually from console. I tried to run it automaticaly after login and starting X by putting it into .zprofile, /etc/profile, /etc/profile.d/***, .xinit or to my awesome wm config (all other scripts here are executed normally - eg pulseaudio --start). But this command is never executed. I tried even variant with adding this to .Xmodmap and then add xmodmap .Xmodmap to .xinit, but without success.

Thanks

Offline

#2 2013-09-24 18:29:55

NGRUM
Member
Registered: 2013-09-24
Posts: 2

Re: Executing command on startup doesn't work

Have you tried any other file listed on http://zsh.sourceforge.net/Intro/intro_3.html?

Offline

#3 2013-09-24 18:43:51

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

Re: Executing command on startup doesn't work

I don't think it will work, because xmodmap needs X to run. But I login in console (using zsh). I must run it in .xinit or something like that.

Offline

#4 2013-09-24 18:46:18

MrElg
Member
Registered: 2013-08-04
Posts: 49

Re: Executing command on startup doesn't work

If you place it in xinitrc; are you sure that you have placed it before the awesome execute? The window manager command must be last in the config

Offline

#5 2013-09-24 18:46:43

NGRUM
Member
Registered: 2013-09-24
Posts: 2

Re: Executing command on startup doesn't work

Just use .xinitrc then.

Offline

#6 2013-09-25 14:22:07

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

Re: Executing command on startup doesn't work

Here is how my .xinitrc looks like:

#! /bin/bash
xmodmap -e " keycode 118 = Delete"
exec awesome

When I manually type this command, everything works. But it doesn't work after reboot (and .xinitrc is surely executed, because awesome starts ok).

Offline

#7 2013-09-25 16:12:11

Mektub
Member
From: Lisbon /Portugal
Registered: 2008-01-02
Posts: 647

Re: Executing command on startup doesn't work

Kotrfa wrote:

Here is how my .xinitrc looks like:

#! /bin/bash
xmodmap -e " keycode 118 = Delete"
exec awesome

When I manually type this command, everything works. But it doesn't work after reboot (and .xinitrc is surely executed, because awesome starts ok).

xmodmap seems to be time sensible. Anyhow, on my WM startup file I have:

(sleep 10; xmodmap ~/.Xmodmap; sleep 5; xmodmap ~/.Xmodmap) &

I come to this by trial and error.

Has said I have it on my WM startup file, but having it on .xinitrc is also OK.

Mektub


Follow me on twitter: https://twitter.com/johnbina

Offline

#8 2013-09-25 18:56:38

Kotrfa
Member
Registered: 2012-10-25
Posts: 213

Re: Executing command on startup doesn't work

Ok, I found where the problem is. I start my laptop without BT keyboard, then it is executed and it works on laptop keyboard. But it doesn't affect the BT keyboard. I will have to write some script which will execute this after connection this device.

Offline

Board footer

Powered by FluxBB