Pandora New Thunar on Pandora


HelenF

Very Active Member
Joined
Jun 22, 2013
Messages
615
Location
UK
The main change I'm after was in 1.6.3 - "Allow keyboard shortcuts for user customizable actions (bug #1941)".
Slackware for Pandora, and PyraOS, have 1.6.3 already.

I built 1.6.10 using Slackware and have been trying to make a PND out of it. The 1.0.2 in SuperZaxxon is old enough that they can run at the same time (in Slackware it was necessary to make sure one version was completely closed before opening the other).

The current PND basically works. But when trying to use "Open Terminal Here", it fails with "exo-open: error while loading shared libraries: libgtk-3.so.0: cannot open shared object file: No such file or directory". I did copy that file, so I guess it's losing the environment variables at that point, or maybe there's another environment variable I need to set. I still need to test actual custom actions that don't use exo-open.

And then there's the problem of what to do about home directory config. The PND launcher remaps the relevant environment variables to the appdata, which is good for Thunar itself, but opening other programs from it (e.g. Mousepad) creates new config files for these other programs in the appdata too. If I set these folders back to the system locations, config for the new Thunar would end up in the same place as the system Thunar, and system Thunar will probably break it. Before bringing different versions into it, system Thunar has already clobbered my custom actions and accels.scm in a seemingly arbitrary way - it can go for several reboots and be fine, and then one day it's gone.

It should be possible to change the config directories in the source code, from "Thunar" to something else. But it's not a neat change. Would need to figure out which of the following should be changed, and whether there are any more scattered about which don't look like that...

Code:
[thunar-1.6.10]$ grep -r "Thunar/"
Thunar-bulk-rename.desktop.in.in:Exec=@HELPERDIR@/Thunar/ThunarBulkRename %F
FAQ:    $XDG_CONFIG_HOME/Thunar/thunarrc
FAQ:    $XDG_CONFIG_HOME/Thunar/accels.scm
FAQ:  Thunar/accels.scm in one of the $XDG_CONFIG_DIRS. For example, if /etc/xdg
FAQ:    /etc/xdg/Thunar/accels.scm
plugins/thunar-sendto-email/thunar-sendto-email.desktop.in.in:Exec=@HELPERDIR@/Thunar/thunar-sendto-email %F
plugins/thunar-sendto-email/Makefile.am:desktopdir = $(datadir)/Thunar/sendto
plugins/thunar-uca/thunar-uca-model.c:  filename = xfce_resource_lookup (XFCE_RESOURCE_CONFIG, "Thunar/uca.xml");
plugins/thunar-uca/thunar-uca-model.c:  path = xfce_resource_save_location (XFCE_RESOURCE_CONFIG, "Thunar/uca.xml", TRUE);
thunar/thunar-renamer-dialog.c:      rc = xfce_rc_config_open (XFCE_RESOURCE_CONFIG, "Thunar/renamerrc", TRUE);
thunar/thunar-renamer-dialog.c:  rc = xfce_rc_config_open (XFCE_RESOURCE_CONFIG, "Thunar/renamerrc", FALSE);
thunar/thunar-sendto-model.c:  specs = xfce_resource_match (XFCE_RESOURCE_DATA, "Thunar/sendto/*.desktop", TRUE);
thunar/thunar-preferences.c:  filename = xfce_resource_lookup (XFCE_RESOURCE_CONFIG, "Thunar/thunarrc");
thunar/thunar-application.c:#define ACCEL_MAP_PATH "Thunar/accels.scm"
thunar/thunar-dialogs.c:  logo = gdk_pixbuf_new_from_file (DATADIR "/pixmaps/Thunar/Thunar-about-logo.png", NULL);

Any thoughts on the best strategy here?
 

Attachments

  • thunar.hf.001.pnd
    17.4 MB · Views: 269
I actually am having a similar issue with my dmenu PND I put together. I can launch apps from it, but then files for the launched apps are created in the dmenu appdata.

Also, launching Telegram from dmenu prevents it from seeing the panel, so the panel applet gets created off in its own panel rather than being added to the current one.

Not quite sure how to fix yet. Canseco seemed to figure out App launching in his Albert PND, so I may look there for inspiration.
 
Well, I was able to figure out one of my issues on my dmenu PND. When I was exporting my environment variables in my startup script (including home/cache/etc), all these variables were passed to the next PNDs, just like you said. It seems that Telegram looks in the NAND home directory for where to put systray icons. The .out file for Telegram said it was looking for the .Xauthority file.

I simply stopped exporting my variables in my launch script for dmenu and systray icons work fine now. I still am setting the variables prior to running the dmenu executable, but not using "export". I'm hoping that any cache dmenu creates will not be written to NAND, but PND's launched from dmenu can still find the NAND home directory if they need it.

For your terminal launching, I'd recommend simply putting in a custom command for "Open Terminal Here".

I haven't tried myself, but I'd recommend either:
1. Call the default SZ terminal directly and pass the -f parameter for the starting directory.

or

2. Write a script that sets the environment variables you need and call exo-open from there. Then specify this script for the terminal command. Pass -f into the script and then $@ into exo-open for the directory parameter.
 
Thanks for the replies. I didn't get around to trying anything else yet since my last post.

Well, I was able to figure out one of my issues on my dmenu PND. When I was exporting my environment variables in my startup script (including home/cache/etc), all these variables were passed to the next PNDs, just like you said. It seems that Telegram looks in the NAND home directory for where to put systray icons. The .out file for Telegram said it was looking for the .Xauthority file.

I simply stopped exporting my variables in my launch script for dmenu and systray icons work fine now. I still am setting the variables prior to running the dmenu executable, but not using "export". I'm hoping that any cache dmenu creates will not be written to NAND, but PND's launched from dmenu can still find the NAND home directory if they need it.

Strange - I'm not exporting those variables myself, they are getting set by the default PND launcher.

I could make my launch script change them back, but like I said, that would make my Thunar config collide with the SuperZaxxon one unless I take other steps to prevent it.

For your terminal launching, I'd recommend simply putting in a custom command for "Open Terminal Here".

I haven't tried myself, but I'd recommend either:
1. Call the default SZ terminal directly and pass the -f parameter for the starting directory.

or

2. Write a script that sets the environment variables you need and call exo-open from there. Then specify this script for the terminal command. Pass -f into the script and then $@ into exo-open for the directory parameter.

SuperZaxxon support only gtk2. having a dependancie to gtk3 seems bad. Maybe you can build Thunar with a gtk2 only flag if it exist?

So far, looks like only exo-open depends on gtk3, and I probably don't need that. I'm going to try a custom terminal launching script.
 
If we can, we should try to get the latest XFCE stuff in SuperZaxxon. Can all of it be made to work with GTK2?
 
Thanks for the replies. I didn't get around to trying anything else yet since my last post.

Strange - I'm not exporting those variables myself, they are getting set by the default PND launcher.

I could make my launch script change them back, but like I said, that would make my Thunar config collide with the SuperZaxxon one unless I take other steps to prevent it.

It was my understanding that any changes to environment variables had to be done in your start script. See here.

Looking in your run.sh:

Code:
#!/bin/sh

export LD_LIBRARY_PATH=/mnt/utmp/thunar.hf/lib:/mnt/utmp/thunar.hf/slacklib
export GTK_PATH=/mnt/utmp/thunar.hf/slacklib

/mnt/utmp/thunar.hf/bin/thunar

What would happen if you "export" the default system config locations, but then locally set the thunar specific ones prior to launching Thunar?

Something like

Code:
#!/bin/sh

#set environment variables for programs launched from within Thunar
export XDG_CONFIG_HOME=~/.config

#set environment variables for Thunar only
LD_LIBRARY_PATH=/mnt/utmp/thunar.hf/lib:/mnt/utmp/thunar.hf/slacklib
GTK_PATH=/mnt/utmp/thunar.hf/slacklib
XDG_CONFIG_HOME=/mnt/utmp/thunar.hf/.config

/mnt/utmp/thunar.hf/bin/thunar
 
It was my understanding that any changes to environment variables had to be done in your start script. See here.
I think that's out of date.

What would happen if you "export" the default system config locations, but then locally set the thunar specific ones prior to launching Thunar?
It's my understanding that non-exported variables are only visible within the shell script, and Thunar can't see them. There's no "make variables visible to only one level of subprocess" command.
 
Non-export variables can't be seen by child processes, but I guess I was thinking that the library linking for Thunar was occuring within the current shell, which is why the locally defined variables might still work.

I guess I just thought that because I was able to remove all of the "exports" from the Qupzilla launch script and it still launched okay.
 
Maybe, but the link paths don't seem to be causing any problem.

XDG_CONFIG_HOME and its relatives are the main issue here, and those are used inside Thunar.
 
Confirmed that "export" is needed on LD_LIBRARY_PATH.

As for what variables the system PND launcher is setting, I haven't found that documented anywhere, so I made a PND where the launch script is just:
Code:
#!/bin/sh

env

On SZ 1.74, get output of "env" from a normal terminal, and from the pndrun.out, sort and diff:

Code:
1c1
< COLORTERM=Terminal
---
> APPDATADIR=/media/CC_CARD/pandora/appdata/envtest.hf
12c12
< HOME=/home/helen
---
> HOME=/mnt/utmp/envtest.hf
15a16
> OLDPWD=/home/helen
17,18c18,23
< PS1=\h:\w\$ 
< PWD=/home/helen
---
> PND=/media/CC_CARD/pandora/menu/envtest.hf.001.pnd
> PND_NAME=envtest.hf
> PND_TASK_NAME=Starting the application ( run.sh  )
> PWD=/mnt/utmp/envtest.hf
> REAL_HOME=/home/helen
> _=./run.sh
24c29
< TERM=xterm
---
> TERM=linux
28,29d32
< _=/usr/bin/env
< WINDOWID=52428803
31c34
< XDG_CACHE_HOME=/home/helen/Applications/Cache
---
> XDG_CACHE_HOME=/mnt/utmp/envtest.hf
33c36
< XDG_CONFIG_HOME=/home/helen/Applications/Settings
---
> XDG_CONFIG_HOME=/mnt/utmp/envtest.hf
35c38
< XDG_DATA_HOME=/home/helen/Applications/Data
---
> XDG_DATA_HOME=/mnt/utmp/envtest.hf
 
Back
Top