Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 05 Mar 2015, 22:43
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
gtkdialog: "Argument list too long"... [SOLVED]
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [12 Posts]  
Author Message
Argolance


Joined: 06 Jan 2008
Posts: 1906
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 28 Feb 2015, 09:39    Post subject:  gtkdialog: "Argument list too long"... [SOLVED]  

Bonjour,
Code:
 /usr/bin/gtkdialog4: Argument list too long

... This is what I get when the files of the directory to be handled are too numerous. Embarassed
So, the script works perfectly if the number of files do not exceed a "certain" quantity (which I couldn't count exactly=100?).

Is there a way to bypass this annoying gtkdialog behavior?
Thanks.

Cordialement.

_________________


Last edited by Argolance on Sat 28 Feb 2015, 13:17; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website 
LazY Puppy


Joined: 21 Nov 2014
Posts: 311
Location: Germany

PostPosted: Sat 28 Feb 2015, 10:00    Post subject:  

Usually gtkdialog can handle several thousands of files.

An exception would be if you are using a code like this:
Code:
export GDAM_GUI=$(echo "$GDAM_GUI" | sed 's/#[#~].*$//') # Strip comments
gtkdialog4 --class=GDAM_GUI -G $WIN_POS -p GDAM_GUI > /dev/null

to bring the GUI up to the Screen.

In this code you can add comments to the gtkdialog xml code that will be strippted out by command sed.

Command sed fails if there are too many arguments and suddenly gtkdialog will fail also because it could not handle comments in its xml code structure.

So there must be something else causing the your problem.

And so you might be forced to offer more and more detailed information to come to the clue...

_________________
RSH
No Smart-Phones, no FaceBook, no Twitter etc...
but: LazY Puppy!
Copyright is NOT Copyleft: good people are aware of this and respect both of them!
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1906
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 28 Feb 2015, 11:00    Post subject:  

Bonjour,
Thanks for replying.
Sed is not used in my script, only grep, which may cause the same issue?
Note that I already made something to try to solve this, following your own advice Arrow seen here, that is to say, I replaced my variables with temporary /tmp/files but the result is the same. Sad
Quote:
And so you might be forced to offer more and more detailed information to come to the clue...

Probably.

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
LazY Puppy


Joined: 21 Nov 2014
Posts: 311
Location: Germany

PostPosted: Sat 28 Feb 2015, 11:09    Post subject:  

Argolance wrote:
Note that I already made something to try to solve this, following your own advice Arrow seen here

No!

RSH is not SFR. Wink

_________________
RSH
No Smart-Phones, no FaceBook, no Twitter etc...
but: LazY Puppy!
Copyright is NOT Copyleft: good people are aware of this and respect both of them!
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1906
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 28 Feb 2015, 11:38    Post subject:  

Embarassed Embarassed Confused
Sorry! A thousand apologies!
Quote:
And so you might be forced to offer more and more detailed information to come to the clue...

Not easy because this script works with specific ToOpPy directories which are not present on standard Puppies, so it would be difficult to test in another context. I know that, instead of a single script with several alphabetical <notebook> tabs, I could do a separate window for each, but it is not so convenient.

_________________

Back to top
View user's profile Send private message Visit poster's website 
SFR


Joined: 26 Oct 2011
Posts: 1217

PostPosted: Sat 28 Feb 2015, 12:03    Post subject:  

They often get us confused with each other, you weren't the first nor the last. Cool

Anyway, did you save the whole GUI description to a file?
Code:
echo '<window>
...more stuff...
</window>' > /tmp/gtkdialog_gui

gtkdialog -f /tmp/gtkdialog_gui

Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 311
Location: Germany

PostPosted: Sat 28 Feb 2015, 12:09    Post subject:  

I had give this a quick test on my directory /usr/share/pixmaps, that has 2372 Icons included. Used the following code for a widget called comboboxentry:
Code:
   <comboboxentry>
      <input>ls -1 /usr/share/pixmaps/</input>
   </comboboxentry>

Worked out of the box.

The GUI did take appr. one second to appear on the screen and the combobox-es list was opened also in appr. one second after clicking its button.

_________________
RSH
No Smart-Phones, no FaceBook, no Twitter etc...
but: LazY Puppy!
Copyright is NOT Copyleft: good people are aware of this and respect both of them!
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1906
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sat 28 Feb 2015, 13:14    Post subject:  

Hello,
Thanks guys for your posts.
SFR wrote:
Anyway, did you save the whole GUI description to a file?

No I didn't. Doing this, it works perfectly!
But, It takes a bit time to be displayed...
I (meanwhile) tried to make test building my script with several subscripts, each window "takes appr. one second to appear on the screen" and lets user go forward/back using buttons easily.
LazY Puppy wrote:
I had give this a quick test on my directory /usr/share/pixmaps, that has 2372 Icons included. Used the following code for a widget called comboboxentry:

My script doesn't only list objects from a directory but displays additional text and buttons, tooltips and so on to act on each of them too, and the whole script is much more complicated than what you tested.

So, my problem is duly [SOLVED].
Now, I have to make a choice: that's not the easier position to be in! Wink

Cordialement.

_________________

Back to top
View user's profile Send private message Visit poster's website 
LazY Puppy


Joined: 21 Nov 2014
Posts: 311
Location: Germany

PostPosted: Sun 01 Mar 2015, 08:51    Post subject:  

Quote:
My script doesn't only list objects from a directory but displays additional text and buttons, tooltips and so on to act on each of them too, and the whole script is much more complicated than what you tested.

That's why I was asking for more detailed information.

_________________
RSH
No Smart-Phones, no FaceBook, no Twitter etc...
but: LazY Puppy!
Copyright is NOT Copyleft: good people are aware of this and respect both of them!
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1906
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Sun 01 Mar 2015, 12:40    Post subject:  

Bonjour,
LazY Puppy wrote:
That's why I was asking for more detailed information.

That's why I was a bit embarrassed to explain things!
Thanks.

_________________

Back to top
View user's profile Send private message Visit poster's website 
LazY Puppy


Joined: 21 Nov 2014
Posts: 311
Location: Germany

PostPosted: Sun 01 Mar 2015, 13:07    Post subject:  

Argolance wrote:
Bonjour,
LazY Puppy wrote:
That's why I was asking for more detailed information.

That's why I was a bit embarrassed to explain things!
Thanks.

Though, could have saved me doing useless testings and postings here. Laughing

_________________
RSH
No Smart-Phones, no FaceBook, no Twitter etc...
but: LazY Puppy!
Copyright is NOT Copyleft: good people are aware of this and respect both of them!
Back to top
View user's profile Send private message 
Argolance


Joined: 06 Jan 2008
Posts: 1906
Location: PORT-BRILLET (Mayenne - France)

PostPosted: Mon 02 Mar 2015, 07:08    Post subject:  

LazY Puppy wrote:
Though, could have saved me doing useless testings and postings here. Very Happy

Embarassed

_________________

Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [12 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0769s ][ Queries: 11 (0.0062s) ][ GZIP on ]