Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 388531 - xfce-base/xfce-utils - Xfce startup scripts does not respect user shell environment
Summary: xfce-base/xfce-utils - Xfce startup scripts does not respect user shell envir...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: XFCE Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-26 11:12 UTC by Fab
Modified: 2011-10-29 19:28 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
slim.conf (slim.conf,3.50 KB, text/plain)
2011-10-26 11:29 UTC, Fab
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fab 2011-10-26 11:12:04 UTC
Hi,

My shell is bash. In my ~/.bashrc I set :
> export GNUPGHOME="~/mygnupg"

Then I do :
> $ mv ~/.gnupg ~/.gnupg-backup
> $ touch .gnupg

When I start an Xfce session, I find in logs :

> /usr/share/slim/Xsession: Beginning session setup...
> /usr/share/slim/Xsession: Setup done, will execute: /usr/bin/ck-launch-session /usr/bin/dbus-launch --exit-with-session /etc/X11/Sessions/Xfce4
> /usr/bin/startxfce4: X server already running on display :0.0
> gpg-agent[6330]: can't use `/home/netfab/.gnupg' as home directory

/etc/xdg/xfce4/xinitrc does not read user shell environment rc files, and is starting gpg-agent with a blank environment, gnupg is unusable.

xfce-base/xfce-utils-4.8.3

Thanks.

Reproducible: Always

Steps to Reproduce:
1. export GNUPGHOME="~/mygnupg" in your shell environment rc file
2. startup an Xfce session
3. see error about gnupg home directory in your logs
Comment 1 Samuli Suominen (RETIRED) gentoo-dev 2011-10-26 11:15:35 UTC
Propably wrong setting in slim.conf that doesn't allow the environment to be respected. Attach the slim.conf and any .xnitrc or similar that might be used.
Comment 2 Fab 2011-10-26 11:29:30 UTC
Created attachment 290867 [details]
slim.conf

I do not have any .xinitrc or such file. Do I need one ?

Login command is :
> login_cmd           exec /bin/bash -login /usr/share/slim/Xsession %session
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2011-10-26 14:19:36 UTC
I don't see why ~/.bashrc should be parsed here, but Samuli seems to see merit.
Comment 4 Fab 2011-10-26 17:39:33 UTC
From http://wiki.xfce.org/tips :

> How to customize starting Xfce
>
> Like most UNIX terminal sessions, Xfce runs through user-customizable startup
> file when it starts up. You can edit this init file to run your own scripts,
> send environment variables to the GUI, etc.
>
> To add your own startup code, edit the xinitrc file like this:
>
>   * Copy the file /etc/xdg/xfce4/xinitrc to ~/.config/xfce4/
>   * Add your own code to the file. For example,
>       you could start the rxvt-unicode server:
>     * source $HOME/.bashrc
>     * # start rxvt-unicode server
>     *   urxvtd -q -o -f

I will give it a try, but is sounds strange to me that I must customize the main Xfce startup script simply to reflect a basic shell configuration file.
Comment 5 Fab 2011-10-26 18:23:09 UTC
Ok, I found the explanation. No need to customize the xinitrc script.
In my ~/.bashrc, I just need to export the wanted variable before this block :

> # Test for an interactive shell.  There is no need to set anything
> # past this point for scp and rcp, and it's important to refrain from
> # outputting anything in those cases.
> if [[ $- != *i* ]] ; then
>         # Shell is non-interactive.  Be done now!
>         return
> fi

Coming from /etc/skel/.bashrc.
Comment 6 Samuli Suominen (RETIRED) gentoo-dev 2011-10-29 19:28:27 UTC
Closing as per http://wiki.xfce.org/tips