You are not logged in.

#1 2015-08-04 10:28:18

sorkaud
Member
Registered: 2015-07-15
Posts: 37

[SOLVED] I can't source xprofile to xinitrc

Recenly, i set up nabi, korean input method, and followed wiki but i can't use nabi. here is what i followed

https://wiki.archlinux.org/index.php/In … ion/Korean

i make

~/.xprofile
export XIM=nabi
export XIM_ARGS=
export XIM_PROGRAM="nabi"
export XMODIFIERS="@im=nabi"
export GTK_IM_MODULE=xim
export QT_IM_MODULE=xim

and insert

# Make sure this is before the 'exec' command or it won't be sourced.
[ -f /etc/xprofile ] && source /etc/xprofile
[ -f ~/.xprofile ] && source ~/.xprofile

to ~/.xinitrc

following https://wiki.archlinux.org/index.php/Xprofile

But, nabi doesn't work.

So i check env

env | grep IM 

XDG_RUNTIME_DIR=/run/usr/1000

no GTK no QT. why this happen?. I expect those env variable must be appear when i do "startx" at console. help me plz......

i tried to change my locale to ko_KR.UFT-8 but it is not helping

Last edited by sorkaud (2016-11-22 01:26:17)

Offline

#2 2015-08-04 10:49:48

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

Re: [SOLVED] I can't source xprofile to xinitrc

Please post your ~/.xinitrc.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2015-08-04 11:02:54

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] I can't source xprofile to xinitrc

When posting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

Offline

#4 2015-08-04 11:23:48

sorkaud
Member
Registered: 2015-07-15
Posts: 37

Re: [SOLVED] I can't source xprofile to xinitrc

karol wrote:

When posting configs, code or command output, please use [ code ] tags, not [ quote ] tags https://bbs.archlinux.org/help.php#bbcode

like this

It makes the code more readable and - in case of longer listings - more convenient to scroll through.

thanks i thought that was blackboxed and it is custom to use quote . it's my mistake

Offline

#5 2015-08-04 11:32:27

sorkaud
Member
Registered: 2015-07-15
Posts: 37

Re: [SOLVED] I can't source xprofile to xinitrc

Trilby wrote:

Please post your ~/.xinitrc.

 
  GNU nano 2.4.2                                    File: /home/archie/.xinitrc                                                                               

#!/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/?* ; 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


#Make sure this is before the 'exec' command or it won't be sourced
#Source xprofile

[ -f /etc/xprofile ] && source /etc/xprofile
[ -f ~/.xprofile] && source ~/.xprofile


xscreensaver &
xsetroot -cursor_name left_ptr &
exec startxfce4

Offline

#6 2015-08-04 12:09:50

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

Re: [SOLVED] I can't source xprofile to xinitrc

That looks good - a bit cluttered, but it should work.

My only suspicion is startxfce4 - that works very different than most WMs that would be started from xinit, startxfce4 does a lot to set up it's own environment.  While it shouldn't, it *might* be possible that it discards the previously sourced variables.  You could test this by temporarily replacing the startxfce4 line with just a terminal emulator - then from within the terminal, check whether the environment variables are there.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2015-08-06 05:10:50

sorkaud
Member
Registered: 2015-07-15
Posts: 37

Re: [SOLVED] I can't source xprofile to xinitrc

Trilby wrote:

That looks good - a bit cluttered, but it should work.

My only suspicion is startxfce4 - that works very different than most WMs that  would be started from xinit, startxfce4 does a lot to set up it's own environment.  While it shouldn't, it *might* be possible that it discards the previously sourced variables.  You could test this by temporarily replacing the startxfce4 line with just a terminal emulator - then from within the terminal, check whether the environment variables are there.

i've changed exec startxfce4 to exec xterm  and in the terminal those envirnment variables doesn't appear it was same as i first described (XDG_runtime .....  only this)


now i'm gonna move xprofile script to bashrc.

but i still wonder why this happen... As you suspect, does xfce reset env when exec startxfce4?  (i thought xterm is not depend on xfce....  am i right?)

Offline

#8 2015-08-06 10:06:14

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [SOLVED] I can't source xprofile to xinitrc

I don't think it has anything to do with startxfce4. I set variables in my ~/.xprofile and I also use Xfce. Whilst I do log in with a DM, the DM is still running startxfce4 ultimately. Instead of sourcing ~/.xprofile, try just executing it.

Offline

#9 2015-08-13 10:44:08

sorkaud
Member
Registered: 2015-07-15
Posts: 37

Re: [SOLVED] I can't source xprofile to xinitrc

Chazza wrote:

I don't think it has anything to do with startxfce4. I set variables in my ~/.xprofile and I also use Xfce. Whilst I do log in with a DM, the DM is still running startxfce4 ultimately. Instead of sourcing ~/.xprofile, try just executing it.

i move script in ~/.xprofile to ~/.bashrc and it works well.

you said " Whilst I do log in with a DM, the DM is still running startxfce4 ultimately." and i understand this by "log on console(default shell) ---> start DM ----> start x.org (xfce4)  "  am i right?

i do just "log on console ----> type startx (it will do start x.org(xfce4))"

I think there is a point the problem origins at... i don't know why... hmm which display manager do you manager?

Offline

#10 2015-08-24 11:38:22

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [SOLVED] I can't source xprofile to xinitrc

I use LightDM. Basically, the display manager executes one of the .desktop files in /usr/share/xsessions. If you look at /usr/share/xsessions/xfce.desktop, you'll see that it executes the startxfce4 script. So whether you log in using startx or a display manager, you're still executing the startxfce4 script.

My suggestion was to make ~/.xprofile executable and then change:

[ -f ~/.xprofile ] && source ~/.xprofile

to

[ -f ~/.xprofile ] && ~/.xprofile

in your ~/.xinitrc

Offline

#11 2015-08-24 11:44:58

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] I can't source xprofile to xinitrc

Chazza wrote:

My suggestion was to make ~/.xprofile executable and then change:

[ -f ~/.xprofile ] && source ~/.xprofile

to

[ -f ~/.xprofile ] && ~/.xprofile

in your ~/.xinitrc

But then you're only exporting those variables in the shell spawned to run ~/.xprofile. That doesn't affect anything else in ~/.xinitrc.

Offline

#12 2015-08-24 12:19:39

Chazza
Wiki Maintainer
Registered: 2013-06-02
Posts: 506

Re: [SOLVED] I can't source xprofile to xinitrc

Ah fair enough. Ignore my suggestion then. Thanks for the clarification.

Offline

Board footer

Powered by FluxBB