View Issue Details

IDProjectCategoryView StatusLast Update
0002237Double CommanderDefaultpublic2025-01-17 07:28
Reporterzeroconf Assigned ToAlexx2000  
PriorityimmediateSeverityblockReproducibilityalways
Status resolvedResolutionfixed 
ProjectionnoneETAnone 
PlatformLinuxOSLinux MintOS Version19.1
Product Version0.9.1Product Build8664 
Summary0002237: native location of portable version causes: Argument list too long
DescriptionUsually applications by user are stored in Linux ~/.local/bin/ folder as it is usually automatically in path if it exist (may depend on Linux distro). As the Double Commander is not a single binary app then it locates under subfolder. Sounds not a good idea to extract the app archive directly into ~/.local/bin/ folder... As understood the file in case of portable version to run is doublecmd.sh inside the application folder as also written in the beginning of that script.

For example I create ~/.local/bin/doublecmd-bin/ folder and unpack the app archive there. Could not use the folder name doublecmd as intending to create a symlink with same name. Then I create the symlink with absolute paths:
ln -s /home/user/.local/bin/doublecmd-bin/doublecmd.sh /home/user/.local/bin/doublecmd

Then trying to run doublecmd there will be certain delay and then error message:
./doublecmd: 9: ./doublecmd: ./doublecmd: Argument list too long

Tried to leave symlink name doublecmd.sh as original file but then error message:
/home/user/.local/bin/doublecmd.sh: 9: /home/user/.local/bin/doublecmd.sh: ./doublecmd: not found

When using the original binary for symlink, I could run the app but seeing also some error messages and lots of output and as portable app should be run from that bash script and not directly then currently there is that situation not solved. As we know, in case of portable app there should be app run folder contain in appropriate variable path before to run, as in doublecmd.sh:
#!/bin/sh
# Use this script for execute portable version of Double Commander
cd "`dirname "$0"`"
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
./doublecmd
Steps To Reproduce1. mkdir -p ~/.local/bin/

2. ensure you have ~/.profile file and at least lines inside it:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
    PATH="$HOME/.local/bin:$PATH"
fi

3. relogin to system or source the ~/.profile file:
source ~/.profile

4. download portable Gtk2 version and unpack the DoubleCMD into ~/.local/bin/doublecmd-bin/ folder

5. ln -s /home/user/.local/bin/doublecmd-bin/doublecmd.sh /home/user/.local/bin/doublecmd

6. doublecmd #try to run from command line then you see the error message

The idea is that we could use in .desktop file:
Exec=doublecmd
...without any paths and we just ensure the running command is in current path.

Certainly we can add every app folder separately into path but it would be more logical to ensure the app running command itself can be put into folder of existing path and not every app independently. Would it be possible in case of portable app?
Additional InformationDouble Commander
Version: 0.9.1 beta
Revision: 8664
Build date: 2019/02/16
Lazarus: 1.8.4.0
FPC: 3.0.4
Platform: x86_64-Linux-gtk2
OS version: Linux Mint 19.1 Tessa (using MATE desktop)

Widgetset library: GTK 2.24.32
TagsNo tags attached.
Fixed in Revision
Operating systemLinux
WidgetsetGTK2
Architecture64-bit

Activities

j2969719

2019-02-25 01:26

reporter   ~0003060

ln -s /home/user/.local/bin/doublecmd-bin/doublecmd.sh /home/user/.local/bin/doublecmd

#!/bin/sh
# Use this script for execute portable version of Double Commander
cd "`dirname "$0"`" <- /home/user/.local/bin/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)
./doublecmd <- doublecmd

so you just created a symlink that executes itself in a loop?

Alexx2000

2019-02-25 11:18

administrator   ~0003061

Last edited: 2019-02-25 11:19

Needs to use "realpath" in script file. Something like this:

#!/bin/sh

# Use this script for execute portable version of Double Commander

export BIN="$(dirname "`realpath "$0"`")"

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:"$BIN"

"$BIN/doublecmd"

Issue History

Date Modified Username Field Change
2019-02-25 00:50 zeroconf New Issue
2019-02-25 01:26 j2969719 Note Added: 0003060
2019-02-25 11:18 Alexx2000 Note Added: 0003061
2019-02-25 11:18 Alexx2000 Status new => confirmed
2019-02-25 11:19 Alexx2000 Note Edited: 0003061
2025-01-17 07:28 Alexx2000 Assigned To => Alexx2000
2025-01-17 07:28 Alexx2000 Status confirmed => resolved
2025-01-17 07:28 Alexx2000 Resolution open => fixed