[Thunar-dev] Thunar in xubuntu edgy launched with wrong settings?

Jelle de Jong jelledejong at powercraft.nl
Tue Dec 26 13:57:10 CET 2006


Hello,

I now believe this is not a thunar related bug but xubuntu edgy can
someone confirm this?

I have done some more debugging and simplified the debug test:

You have to make the script (attached to mail) executable first!
chmod +x ~/scripts/thunar/print-file.sh

Test 1:
1: Open a terminal like xfce4-terminal or xterm.

2: execute the script with or without arguments:
~/scripts/thunar/print-file.sh
~/scripts/thunar/print-file.sh *

This should give you a working script with color lines and no errors.
Correct?

Now the debug test 2:
execute this command in your opened terminal:
xfce4-terminal -x ~/scripts/thunar/print-file.sh
xfce4-terminal -x ~/scripts/thunar/print-file.sh *
xterm -e ~/scripts/thunar/print-file.sh
xterm -e  ~/scripts/thunar/print-file.sh *

This will deliver me a failing script, what the hack is wrong here?

If my intuition is correct this is going wrong:

Normally when opening a terminal it will load env variables and then
execute the script in the bash shell.

Now it will create the shell in the script and it is missing a lot of
settings that is letting the script fail.

I made a test for that by adding the following command in the script
printenv > printenv-thunar.txt

That way you can compare the files between test 1 and test 2

Can someone confirm my findings?

Jelle de Jong wrote:
> No "replace ~ with $HOME or /home/jelle?" thats not it. (however that is
> a issue with createting desktop launchers, but that for a other time)
> 
> I gome op with a small test to print the enviorment variables.
> 
> I used the printenv > tofile.txt in a the xfce4-terminal xterm and xterm
> launched true the thunar custom action feature. There a indeed some
> differences. Is there something of in it?
> 
> I attached them in this mail.
> 
> Mike Massonnet wrote:
>> On Sun, Dec 24, 2006 at 04:51:09PM +0100, Jelle de Jong wrote:
>>> Hello,
>>>
>>> I have strong suspicions that Thunar is in a completely different local
>>> mode then the default used in Linux?
>>>
>>> A lot of my Thunar scripts are not behaving properly
>>>
>>> I have attached a script that workt perfectly fine executed form the
>>> command line.
>>>
>>> But with the custom action it will not work:
>>> xterm -e ~/scripts/thunar/print-file.sh %F
>>>
>>> What is the problem here? It is causing some serious issues on the
>>> production machines here.
>> What if you replace ~ with $HOME or /home/jelle?
>>
>>
>> Just a thought,
>> Regards,
>> Mike
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Thunar-dev mailing list
>> Thunar-dev at xfce.org
>> http://foo-projects.org/mailman/listinfo/thunar-dev
>>
>> ------------------------------------------------------------------------
>>
>> SSH_AGENT_PID=4443
>> TERM=xterm
>> SHELL=/bin/bash
>> WINDOWID=33567712
>> USER=jelle
>> LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.flac=01;35:*.mp3=01;35:*.mpc=01;35:*.ogg=01;35:*.wav=01;35:
>> SSH_AUTH_SOCK=/tmp/ssh-cqSpsL4407/agent.4407
>> SESSION_MANAGER=local/xubuntu:/tmp/.ICE-unix/4455
>> USERNAME=jelle
>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
>> DESKTOP_SESSION=xfce4
>> GDM_XSERVER_LOCATION=local
>> PWD=/home/jelle
>> LANG=en_US.UTF-8
>> GDMSESSION=xfce4
>> HISTCONTROL=ignoredups
>> SHLVL=1
>> HOME=/home/jelle
>> LANGUAGE=en
>> LOGNAME=jelle
>> XDG_DATA_DIRS=/etc/xdg/xubuntu:/usr/share:/usr/local/share:/usr/share
>> DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-D2Gosw8YAY,guid=418d8f45602e4d6175e7997fe8f3bb00
>> LESSOPEN=| /usr/bin/lesspipe %s
>> DISPLAY=:0.0
>> LESSCLOSE=/usr/bin/lesspipe %s %s
>> COLORTERM=Terminal
>> XAUTHORITY=/home/jelle/.Xauthority
>> _=/usr/bin/printenv
>>
>> ------------------------------------------------------------------------
>>
>> LANGUAGE=en
>> USER=jelle
>> SSH_AGENT_PID=4443
>> HOME=/home/jelle
>> DESKTOP_SESSION=xfce4
>> GDM_XSERVER_LOCATION=local
>> DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-D2Gosw8YAY,guid=418d8f45602e4d6175e7997fe8f3bb00
>> LOGNAME=jelle
>> WINDOWID=37748768
>> XTERM_SHELL=/home/jelle/scripts/thunar/print-file.sh
>> TERM=xterm
>> USERNAME=jelle
>> SESSION_MANAGER=local/xubuntu:/tmp/.ICE-unix/4455
>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
>> DISPLAY=:0.0
>> LANG=en_US.UTF-8
>> XAUTHORITY=/home/jelle/.Xauthority
>> SSH_AUTH_SOCK=/tmp/ssh-cqSpsL4407/agent.4407
>> SHELL=/bin/bash
>> GDMSESSION=xfce4
>> PWD=/home/jelle
>> XDG_DATA_DIRS=/etc/xdg/xubuntu:/usr/share:/usr/local/share:/usr/share
>> XTERM_VERSION=XTerm(216)
>>
>> ------------------------------------------------------------------------
>>
>> SSH_AGENT_PID=4443
>> TERM=xterm
>> SHELL=/bin/bash
>> WINDOWID=41943072
>> XTERM_SHELL=/bin/bash
>> USER=jelle
>> LS_COLORS=no=00:fi=00:di=01;34:ln=01;36:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.gz=01;31:*.bz2=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.avi=01;35:*.fli=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.flac=01;35:*.mp3=01;35:*.mpc=01;35:*.ogg=01;35:*.wav=01;35:
>> SSH_AUTH_SOCK=/tmp/ssh-cqSpsL4407/agent.4407
>> SESSION_MANAGER=local/xubuntu:/tmp/.ICE-unix/4455
>> USERNAME=jelle
>> PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games
>> DESKTOP_SESSION=xfce4
>> GDM_XSERVER_LOCATION=local
>> PWD=/home/jelle
>> LANG=en_US.UTF-8
>> GDMSESSION=xfce4
>> HISTCONTROL=ignoredups
>> XTERM_VERSION=XTerm(216)
>> SHLVL=1
>> HOME=/home/jelle
>> LANGUAGE=en
>> LOGNAME=jelle
>> XDG_DATA_DIRS=/etc/xdg/xubuntu:/usr/share:/usr/local/share:/usr/share
>> DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-D2Gosw8YAY,guid=418d8f45602e4d6175e7997fe8f3bb00
>> LESSOPEN=| /usr/bin/lesspipe %s
>> DISPLAY=:0.0
>> LESSCLOSE=/usr/bin/lesspipe %s %s
>> XAUTHORITY=/home/jelle/.Xauthority
>> _=/usr/bin/printenv
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Thunar-dev mailing list
>> Thunar-dev at xfce.org
>> http://foo-projects.org/mailman/listinfo/thunar-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: print-file.sh
Type: application/x-shellscript
Size: 2370 bytes
Desc: not available
URL: <http://mail.xfce.org/pipermail/thunar-dev/attachments/20061226/958532e7/attachment.bin>


More information about the Thunar-dev mailing list