[manjaro-dev] [Manjaro Linux Support] Correct assumptions on $HOME in /etc/skel obmenu-generator files

Philip Müller philm at manjaro.org
Mon Mar 3 18:43:33 CET 2014


Thx Sunny,

@Dan, Joshua, can you guys check it?

Am 03.03.2014 06:52, schrieb Sunny:
> From: Sunny <octo.nebula at gmail.com>
> Subject: Correct assumptions on $HOME in /etc/skel obmenu-generator files
>
> Message Body:
> The incorrect assumption made in the OpenBox config is that the $HOME will always be /home/$(whoami). Prime example being the root user where $HOME is /root not something like /home/root.
>
> The fix is to populate proper usage of the $HOME environment variable instead of hardcoded /home/$(whoami).
>
> In file /etc/skel/.config/obmenu-generator we should do:
>
> sed -i 's,/home/_user_,_homedir_,' /etc/skel/.config/obmenu-generator/*.pl
> # basically, replace string /home/_user_ with just _homedir_
>
> Also, replace lines 35 and 36 in /etc/skel/.xinitrc with:
>
> diff:
> @@line 35,36@@
> - sed s/_user_/$(whoami)/ ~/.config/obmenu-generator/schema.pl
> - sed s/_user_/$(whoami)/ ~/.config/obmenu-generator/config.pl
> + sed -i "s,_homedir_,${HOME}," ~/.config/obmenu-generator/schema.pl
> + sed -i "s,_homedir_,${HOME}," ~/.config/obmenu-generator/config.pl
>
> This will populate the correct $HOME instead of the /home/$USER
>
> --
> This mail is sent via contact form on Manjaro Linux http://manjaro.org
>



More information about the manjaro-dev mailing list