You are not logged in.

#1 2013-03-02 13:00:08

TryAgain
Member
Registered: 2013-03-02
Posts: 2

~/.xinitrc ignored during X startup

I want Xmodmap to make change to keyboard layout (swap caps and ctrl) at startup. So I've made ~/.Xmodmap file with corresponding instructions. In my ~/.xinitrc there is code:

usermodmap=$HOME/.Xmodmap
...
if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

But it seems that nothing from ~/.xinitrc is used by xinit which is supposed to call it. I think so because the file hadn't been containing even exec startlxde line for a long time while DE was loading correctly.
However, when I call startx from real console, it loads ~/.xinitrc for sure because the keyboard layout is changed in proper way.
As you could note, i use LXDE. DM is LXDM.
What may be wrong?
Sorry if my English bad.

Last edited by TryAgain (2013-03-02 13:03:09)

Offline

#2 2013-03-02 13:13:59

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,552
Website

Re: ~/.xinitrc ignored during X startup

You say it works when you call startx from a "real console", but it doesn't work when you run xinit from somewhere else.  Where else do you call xinit from?

Please post your full ~/.xinitrc, and ~/.xsession files.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2013-03-02 15:56:23

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: ~/.xinitrc ignored during X startup

LXDM does not load ~/.xinitrc. Someone correct me if I'm wrong.

Offline

#4 2013-03-02 19:16:57

clickit
Member
From: Athens, Hellas
Registered: 2007-07-18
Posts: 93

Re: ~/.xinitrc ignored during X startup

anonymous_user wrote:

LXDM does not load ~/.xinitrc. Someone correct me if I'm wrong.

i agree to that

Offline

#5 2013-03-03 14:31:17

Reznor
Member
From: BiH
Registered: 2012-06-23
Posts: 78

Re: ~/.xinitrc ignored during X startup

Use slim.


rm -rf /

Offline

#6 2013-03-03 14:47:18

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: ~/.xinitrc ignored during X startup

Just use the xkb option instead of xmodmap. And no, no reason to change the DM. lxdm reads ~/.xsession, but I bet lxde have some fancy dialog to set the layout and options.

Last edited by Mr.Elendig (2013-03-03 14:48:04)


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#7 2013-03-03 18:21:23

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: ~/.xinitrc ignored during X startup

You can symlink ~/.xinitrc to ~/.xsession. I remember doing that with lxdm a long time back.

Offline

#8 2013-03-04 10:43:14

TryAgain
Member
Registered: 2013-03-02
Posts: 2

Re: ~/.xinitrc ignored during X startup

Trilby wrote:

You say it works when you call startx from a "real console", but it doesn't work when you run xinit from somewhere else.  Where else do you call xinit from?

Please post your full ~/.xinitrc, and ~/.xsession files.

I thought that xinit is used while LXDE starts. I don't run it manually.
I didn't make my own ~/.xinitrc, I just used the one from /etc/xinit/ and removed lines at the end, containing twm, xterm, xclock etc. And added "exec startlxde".

Mr.Elendig wrote:

Just use the xkb option instead of xmodmap. And no, no reason to change the DM. lxdm reads ~/.xsession, but I bet lxde have some fancy dialog to set the layout and options.

I know about that option, just wonder why one of the solutions from wiki doesn't work.

x33a wrote:

You can symlink ~/.xinitrc to ~/.xsession. I remember doing that with lxdm a long time back.

I've made a symlink to ~/.xinitrc named ~/.xsession, but it didn't help. I'll try something in the evening.

Offline

#9 2013-03-04 11:49:02

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,552
Website

Re: ~/.xinitrc ignored during X startup

TryAgain wrote:

I thought that xinit is used while LXDE starts. I don't run it manually.

So is the problem solved then?  Forget about xinitrc, just put the commands you want to run in one of the startup files that you actually use.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#10 2013-03-04 12:26:43

Gumper
Member
From: U.S.A.
Registered: 2009-10-26
Posts: 132

Re: ~/.xinitrc ignored during X startup

I'm currently running:

@xmodmap ~/.Xmodmaprc

in my ~/.config/lxsession/LXDE/autostart and it works fine there.


Ready yourselves, ready yourselves
Let us shine the light of Jesus in the darkest night
Ready yourselves, ready yourselves
May the powers of darkness tremble as our praises rise .... Casting Crowns-Until The Whole World Hears.

Offline

#11 2013-03-04 14:44:38

Mr.Elendig
#archlinux@freenode channel op
From: The intertubes
Registered: 2004-11-07
Posts: 4,097

Re: ~/.xinitrc ignored during X startup

LXDE most likely loads a keymap in its startup, overriding anything you do in .xprofile etc.


Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest

Offline

#12 2013-06-06 16:53:44

silentstone
Member
Registered: 2011-12-04
Posts: 4

Re: ~/.xinitrc ignored during X startup

I've been looking for the reason that LXDE doesn't autostart all the applications listed in ~/.xinitrc or ~/.config/openbox/autostart or even ~/.config/autostart, all of which are places I've tried.  Thanks for the tip-off!

Offline

Board footer

Powered by FluxBB