! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfrun doesn't handle ~


Description Yves-Alexis Perez editbugs 2008-04-27 15:55:47 CEST

a Debian user requested to be able to use “~” for home folder in xfrun. It'd be a nice thing to have, but as it doesn't run a shell, it's not currently.

Having a complete shell run inside a tiny app like this doesn't make sense, but adding this kind of feature may be nice.

Thanks and cheers,
Comment 1 James Stanley 2010-07-25 18:21:15 CEST
Created attachment 3044 
Patch to the current git master of xfce-utils to add tilde expansion to xfrun.
Comment 2 James Stanley 2010-07-25 18:23:51 CEST
I've attached a patch that will expand a leading tilde to the user's home directory as returned by g_get_home_dir().

Potential caveats:
 - It won't expand ~otheruser/ to otheruser's home directory
 - It will ignore the HOME environment variable
 - If the user's home directory in /etc/passwd has a trailing slash then the "~/" will expand to "/home/user//"

I don't believe any of these are problems, and they should be easy enough to change if necessary.
Comment 3 Jérôme Guelfucci editbugs 2010-10-25 14:58:16 CEST
The xfrun part of this bug is fixed, we just need to fix xfce_expand_variables now. This is bug #6742.
Comment 4 Jérôme Guelfucci editbugs 2010-10-25 14:59:50 CEST
James, thanks a lot for your patch, but we have a function in Xfce (xfce_expand_variables) which is supposed to do that. It needs to be fixed, but that's another story.

Bug #4041

Reported by:
Yves-Alexis Perez
Reported on: 2008-04-27
Last modified on: 2010-10-25


Jérôme Guelfucci
CC List:
2 users



Additional information