Argument list too long
Dear all,
I'm running since some months Zotero 4.0.11 standalone 64b under linux, but since few days I'm experiencing the following problem when executing zotero.
I open a terminal and execute the "zotero" command.
`which zotero` = /usr/local/bin/zotero which is a symlink
/usr/local/bin/zotero -> /opt/Zotero_linux-x86_64/run-zotero.sh
The PC works a while without opening a zotero window; meanwhile I can see "zotero" process with the top command, but after ~30 seconds (much more it usually takes to start) it exits with:
/usr/local/bin/zotero: line 142: /usr/local/bin/zotero: Argument list too long
/usr/local/bin/zotero: line 142: /usr/local/bin/zotero: Success
Just discovered with some relief, and curiously enough, it works if I execute, instead of the symlink, the file it points to i.e. /opt/Zotero_linux-x86_64/run-zotero.sh
So now I can run zotero, but let me post this information which maybe useful also to others, and I'd like to understand the reason for the problem above.
Maybe useful, my zotero.sqlite file is 76MB large.
Thank you
I'm running since some months Zotero 4.0.11 standalone 64b under linux, but since few days I'm experiencing the following problem when executing zotero.
I open a terminal and execute the "zotero" command.
`which zotero` = /usr/local/bin/zotero which is a symlink
/usr/local/bin/zotero -> /opt/Zotero_linux-x86_64/run-zotero.sh
The PC works a while without opening a zotero window; meanwhile I can see "zotero" process with the top command, but after ~30 seconds (much more it usually takes to start) it exits with:
/usr/local/bin/zotero: line 142: /usr/local/bin/zotero: Argument list too long
/usr/local/bin/zotero: line 142: /usr/local/bin/zotero: Success
Just discovered with some relief, and curiously enough, it works if I execute, instead of the symlink, the file it points to i.e. /opt/Zotero_linux-x86_64/run-zotero.sh
So now I can run zotero, but let me post this information which maybe useful also to others, and I'd like to understand the reason for the problem above.
Maybe useful, my zotero.sqlite file is 76MB large.
Thank you
Linux XXXXXX 3.2.0-54-generic #82-Ubuntu SMP Tue Sep 10 20:08:42 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
guido@:~$ ln -s /opt/Zotero_linux-x86_64/run-zotero.sh .
guido@:~$ ./run-zotero.sh
run-zotero.sh: Cannot execute .
[EXIT immediately]
guido@:~$ ln -s /opt/Zotero_linux-x86_64/run-zotero.sh zotero
guido@:~$ ./zotero
/home/guido/zotero: line 142: /home/guido/zotero: Argument list too long
/home/guido/zotero: line 142: /home/guido/zotero: Success
[EXIT after 30s]
guido@:~$ /opt/Zotero_linux-x86_64/run-zotero.sh
[WORKS]
In the three cases, I'm accessing the same file...
(Are you sure you want to be running Zotero from the command line, though? Unless you're doing development or trying to generate debug output, there's not really any reason to do so.)
A common model for running gui applications in Linux is to open a GUI-based command-line launcher [ctrl][f2] from which you can type the name you want and it opens the GUI application. This is a Linuxy alternative to clicking a link in the menu with your mouse. not exactly running the application from the command line, any more than opening the main menu and clicking the application there is.
ln -s target link is a way to add a shortcut. For instance, if you entered "/Zotero_directory/zotero ~/Desktop/zotero" on your command line, it would create a desktop shortcut.
The problem is a Zotero problem, because a link should behave exactly like the original file, and this one plainly isn't.
/usr/local/bin/zotero #This is a soft link#
professor@telcontar-2:/usr/local/bin$ valgrind zotero
==9910== Memcheck, a memory error detector
==9910== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==9910== Using Valgrind-3.10.0.SVN and LibVEX;
==9910== Command: zotero
Could not read application.ini
professor@telcontar-2:/usr/local/bin$ ls -l zotero
lrwxrwxrwx 1 root root 18 Apr 15 23:41 zotero -> /opt/Zotero/zotero
So using the link, the zotero executable couldn't find the application.ini file, and that is why it is failing.
The following bash script, placed in /usr/local/bin does work (at least in the [ctrl] [f2] command line or by calling it by /usr/local/bin/zotero or by changing to the /usr/local/bin directory and using ./zotero):
###########
#!/bin/sh
cd /opt/Zotero
./zotero
###########
https://forums.zotero.org/discussion/22721/zotero-standalone-cannot-start-from-symlink-in-linux-could-not-read-applicationini/
Running Zotero via GUI launcher (in my case Ubuntu Dash) works w/o problems for me though.
```
warning: directory permissions differ on /usr/lib/zotero/
filesystem: 757 package: 755
warning: directory permissions differ on /usr/lib/zotero/xulrunner/
filesystem: 757 package: 755
warning: directory permissions differ on /usr/lib/zotero/xulrunner/gmp-fake/
filesystem: 757 package: 755
warning: directory permissions differ on /usr/lib/zotero/xulrunner/gmp-fake/1.0/
filesystem: 757 package: 755
```
So I `chmod`ed 755 all those files and I was all set. Anyone know what the root cause of the issue is though? Along the way, I went to line 142 in the script and tried `echo ${1+"$@"}`. It appearing to be printing a lot of newline.