Project XYplorer on Linux: 15/03 New Video!

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
freecicero
Posts: 13
Joined: 17 Dec 2014 00:34

Re: Project XYplorer on Linux: 15/03 New Video!

Post by freecicero »

No problem and fully understood. But when you say Crossover, I am still wondering if the problem is mine alone (in Crossover) or whether people on other systems using Wine or Playonlinux with different settings are able to make it work. If anyone is running it successfully in Linux I would appreciate them posting here or otherwise letting me know that, as then I can try again. thanks ---

nerdweed
Posts: 593
Joined: 25 Feb 2012 07:47

Re: Project XYplorer on Linux: 15/03 New Video!

Post by nerdweed »

@40k,

How did you manage to get PFA to work. I need to quote everything - python path, helper script and final program. However; I don't get a custom name then and it shows the python path instead.

nerdweed
Posts: 593
Joined: 25 Feb 2012 07:47

Re: Project XYplorer on Linux: 15/03 New Video!

Post by nerdweed »

Not sure how many of you are using XY on Linux. I've tried using it on Manjaro Gnome Shell. It does look good. Some issues that I encounted - most of them reported already

1. PFA - If I start the path with / it appends the XY path before trying to open it. If I quote it the caption is lost. Would be great if there is some intelligence added to not add XY path if the path starts with / so that I don't need to quote them and caption issue gets auto resolved
2. Startup error
3. Cannot drag
4. Cannot customize toolbar (can someone share a list of all available toolbar buttons- I don't have a windows installation currently)
5. Cannot check for updates
6. Configuration dialog is slow to open
7. The captions for Customising columns appear with a delay
8. A new toolbar button added recently (last 5 months) between Type Stats and Mini Tree on fresh installation cause a crash
9. Same as 1 - I can't add a path starting with / in address bar. It appends the xy path


Most of the issues can be lived with except for 1 and 9. If you could add a small intelligence not to append xy path ahead of / and not convert to / to \ - it will defeat all existing file managers on Linux. I know - I have explored many of them across last 5 months.

jupe
Posts: 1373
Joined: 20 Oct 2017 21:14
Location: 20H2 x64

Re: Project XYplorer on Linux: 15/03 New Video!

Post by jupe »

nerdweed wrote:4. Cannot customize toolbar (can someone share a list of all available toolbar buttons- I don't have a windows installation currently)
You should be able to enter the following in the XY address bar to get a comma seperated list of all the buttons

Code: Select all

::text toolbar(, , 1);
if that doesn't work for you then viewtopic.php?f=5&t=18172&p=154308#p154259
nerdweed wrote:8. A new toolbar button added recently (last 5 months) between Type Stats and Mini Tree on fresh installation cause a crash
That was the touchscreen mode button :tsm, just for my own interest what does the %OS% variable resolve to?, and or what does it say as an OS under Help | Various Information ?

nerdweed
Posts: 593
Joined: 25 Feb 2012 07:47

Re: Project XYplorer on Linux: 15/03 New Video!

Post by nerdweed »

Thanks Jupe. That worked - it gave me a list. OS says Windows_NT and windows version is 10
%OS% = Windows_NT
%winver% = 10.0
Can you check on WIndows if the captions in PFA/POM are lost when you quote the path

jupe
Posts: 1373
Joined: 20 Oct 2017 21:14
Location: 20H2 x64

Re: Project XYplorer on Linux: 15/03 New Video!

Post by jupe »

No the captions aren't lost on Windows when you quote the path, I have lots of path's quoted because it is a requirement if you use command switches, Linux requires single quotes when running apps instead though doesn't it?, I have no idea how that works considering XY is designed for Windows. One suggestion I have that you may or may not have already tried, is instead you could try loading a script to run the app, something like:

Code: Select all

"Caption|Icon.exe" txt>::load 'runapp.xys';
and then do all the double quoting etc in that script file instead.

nerdweed
Posts: 593
Joined: 25 Feb 2012 07:47

Re: Project XYplorer on Linux: 15/03 New Video!

Post by nerdweed »

Linux requires single double quote only when spaces.

The below command shows the caption and invokes the program - however; the variable isn't resolved. I believe because of ''

Code: Select all

"Mover|<xy>" *;\ >run '"/usr/bin/python" "/home/naveed/xyassist.py" "/data/code/projects/filer/filer.py" <pfaitems>';
Need to find a way to get this to work

jupe
Posts: 1373
Joined: 20 Oct 2017 21:14
Location: 20H2 x64

Re: Project XYplorer on Linux: 15/03 New Video!

Post by jupe »

You could try this or something similar using quote(), no promises:

word wrapped:

Code: Select all

"Mover|<xy>" *;\ >::run '"/usr/bin/python" "/home/naveed/xyassist.py" "/data/code/projects/filer/filer.py" ' . quote(<pfaitem>);
Or if brevity isn't of a concern another option:

word wrapped:

Code: Select all

"Mover|<xy>" *;\ >::run quote('/usr/bin/python') . ' ' . quote('/home/naveed/xyassist.py') . ' ' . quote('/data/code/projects/filer/filer.py') . ' ' . quote(<pfaitem>);
It will probably be easier to just try to get 1 item at a time going at the moment before you worry about multiple items, so I changed the variable to <pfaitem> for the time being.

PeterH
Posts: 2594
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Project XYplorer on Linux: 15/03 New Video!

Post by PeterH »

I didn't follow the story, only the very last part. And it seems to me that you got something wrong...

So: the run command's operand is a string, this is XY-syntax. A string must be specified quoted, either double (variables are resolved) or single (variables are seen as plain text). As the outer quotes are single, no variables are resolved. :arrow: So use double quotes.

It seems the string itself must contain double quotes. The rule says: double quotes inside double quotes must be specified twice. (Else they are end-of-string!) So I think instead of

Code: Select all

run '"/usr/bin/python" "/home/naveed/xyassist.py" "/data/code/projects/filer/filer.py" <pfaitems>';
I'd expect:

Code: Select all

run """/usr/bin/python"" ""/home/naveed/xyassist.py"" ""/data/code/projects/filer/filer.py"" <pfaitems>";
to work as intended.
W7(x64) SP1 German
( +WXP SP3 )

jupe
Posts: 1373
Joined: 20 Oct 2017 21:14
Location: 20H2 x64

Re: Project XYplorer on Linux: 15/03 New Video!

Post by jupe »

PeterH wrote: It seems the string itself must contain double quotes. The rule says: double quotes inside double quotes must be specified twice.
I think you may of missed this, thats the logic behind my suggestions:
nerdweed wrote:1. PFA - If I start the path with / it appends the XY path before trying to open it. If I quote it the caption is lost. Would be great if there is some intelligence added to not add XY path if the path starts with / so that I don't need to quote them and caption issue gets auto resolved
nerdweed wrote:Can you check on WIndows if the captions in PFA/POM are lost when you quote the path
Captions being lost when using double quotes without being contained in single quotes, I'm under the impression that it is behaving different than on Windows, although now that you mention it PeterH I don't think I was thinking clearly because Linux was involved, but you're right this is before it gets to the linux shell so it is completely XY syntax, so if it is actually the same as on Windows I would have done it like this:

Code: Select all

"Mover|<xy>" *;\ >::run """/usr/bin/python"" ""/home/naveed/xyassist.py"" ""/data/code/projects/filer/filer.py"" ""<curitem>""";
because I don't think (unconfirmed) your example will work on items with spaces in their name (or multiple items) because <pfaitems> will be unquoted and | separated, but I think my previous example should also work too.

PeterH
Posts: 2594
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Project XYplorer on Linux: 15/03 New Video!

Post by PeterH »

My intention was just to modify the given

Code: Select all

"Mover|<xy>" *;\ >run '"/usr/bin/python" "/home/naveed/xyassist.py" "/data/code/projects/filer/filer.py" <pfaitems>';
which has the problem of not resolving <pfaitems> (as being in a single quoted string), to an equivalent string *with* substitution.

And I'm still convinced that the meaning of the outer quotes, and the rules for possibly doubling inner quotes, is just XY-syntax.
The necessity/meaning/interpretation of the inner quotes might well be linux-dependent. (And if the variable can contain spaces it should be quoted as the other sub-expressions, too.)
W7(x64) SP1 German
( +WXP SP3 )

nerdweed
Posts: 593
Joined: 25 Feb 2012 07:47

Re: Project XYplorer on Linux: 15/03 New Video!

Post by nerdweed »

Thanks. These two worked. I was double quoting the outer quotes rather than doubling the inner ones earlier.

Code: Select all

"Mover|xy" *;\>::run """/usr/bin/python"" ""/home/naveed/xyassist.py"" ""/data/code/projects/filer/filer.py"" <pfaitems>";

Code: Select all

"Mover|<xy>" *;\ >::run '"/usr/bin/python" "/home/naveed/xyassist.py" "/data/code/projects/filer/filer.py" ' . quote(<pfaitems>);

jupe
Posts: 1373
Joined: 20 Oct 2017 21:14
Location: 20H2 x64

Re: Project XYplorer on Linux: 15/03 New Video!

Post by jupe »

Does that top one work on files with spaces in their name though? I'd be surprised if either of them work on multiple items too.

nerdweed
Posts: 593
Joined: 25 Feb 2012 07:47

Re: Project XYplorer on Linux: 15/03 New Video!

Post by nerdweed »

It does work with spaces and multiple items. Actually I changed the <pfaitems> to <selitems>. <pfaitems> gives | separated list which wasn't handled in the script. The assist script was also working with single item only and I had to change it to accomodate multiple files. I need to improve this further to work with both <pfaitems> and <selitems>

Code: Select all

#!/usr/bin/python
import os
import subprocess
import sys

class Assistant(object):
    def __init__(self, wp=[], *args):
        self.linux_path = []
        #self.linux_path.append(str(len(wp)))
        #if len(wp) == 2:
        #    self.windows_path = wp[1].split("|")
        #else:
        self.windows_path = wp
        
        # extract the file name from full windows path
        for p in self.windows_path:
            filename = p.replace('\\', '/')
            if filename.startswith('/') is False:
                if filename[1] == ":" :
                    filename = filename[2:]
                else:
                    filename = '/'.join([os.getcwd(), filename])
            self.linux_path.append(filename)

    def start(self):
        subprocess.call(self.linux_path)
      

if __name__ == '__main__':
    assistant = Assistant(sys.argv[1:]) 
    assistant.start()

jupe
Posts: 1373
Joined: 20 Oct 2017 21:14
Location: 20H2 x64

Re: Project XYplorer on Linux: 15/03 New Video!

Post by jupe »

nerdweed wrote:Actually I changed the <pfaitems> to <selitems>. <pfaitems> gives | separated list which wasn't handled in the script.
That was the point I was trying to make, if it was an app not a script you were sending them to it was doubtful it would accept that format, and if you are just going to adapt the receiving app (a script in this case) to accept that format then yes, it would work. You also needed to change the variable, I wouldn't call that working as it was, at least you got it going though. You could also use a foreach and send the filenames 1 at a time so you didn't have to adapt the py script if you wanted.

Post Reply