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 Tue 29 Jul 2014, 11:09
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
Made New App and Some error i Don't understand...
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [10 Posts]  
Author Message
Lord_Solrac2

Joined: 22 Dec 2010
Posts: 35
Location: Gurabo, Puerto Rico

PostPosted: Tue 01 Feb 2011, 11:05    Post subject:  Made New App and Some error i Don't understand...  

Hey, I was Making an app (I'm a total noob in the gktdialog3 so yea ^^") For iMount (1st Puppy App Very Happy) When I Tried The Script (3 Tries) I Got the Same...

Here's The Code::
(I Still Own it xD)

The main (1st error) is removed and replaced with the sands line
The Main Error (Fixed Though)
Code:

#iMount Process

#iDevice
if [ $IDEV = "iPod" ]; then
 fty=/mnt/$name-iPod
elif [ $IDEV = "iPhone" ]; then
 fty=/mnt/$name-iPhone
elif [ $IDEV = "iPad" ]; then
 fty=/mnt/$name-iPad
fi

#Mount
if [ $mnt2 = "/" ]; then
 mnt3=/
elif [ $mnt2 = "/var/mobile" ]; then
 mnt3=/var/mobile
fi


New Error::
Code:

!/bin/bash
#iMount 1.7
export CHOOSER="
<window title=\"iMount 1.7 by Lord_Solrac2\"icon-name=\"gtk-cdrom\">
<vbox>

<frame Select an iDevice>
 <combobox>
  <variable>IDEV</variable>
  <item>iPod</item>
  <item>iPhone</item>
  <item>iPad</item>
 </combobox>
</frame>

<frame Select Mount Area>
 <combobox>
  <variable>mnt2</variable>
   <item>/</item>
   <item>/var/mobile</item>
 </combobox>
</frame>

<frame What's Your Name?>
<hbox>
 <entry editable=\"true\">
 <variable>name</variable>
  </entry>
 </hbox>
</frame>

<frame IP Address (Settings > Wifi > Connection = DHCP) >
<hbox>
 <entry editable=\"true\">
 <variable>ipa</variable>
  </entry>
 </hbox>
</frame>

<hbox>
<button>
<variable>start</variable>
<input file icon=\"gkt0ok\"></imput>
<label>Start iMount (Remember Pass = alpine)<label>
<visible>true</visible>
<action type=\"exit\">EXIT_NOW</action>
</button>
</hbox>
</vbox>
</window>
"
CHOOSER2=='gtkdialog3 --program=CHOOSER --center'

if [ "`echo $CHOOSER2 | grep EXIT_NOW`" != "" ]; then
exit 0
fi

urxvt -e sshfs root@$ipa:$mnt2 /mnt/$name-$IDEV


Can Some one Explain? D: It Crashes the instant it opens... And No Error on the Terminal.
Back to top
View user's profile Send private message AIM Address Yahoo Messenger 
zigbert


Joined: 29 Mar 2006
Posts: 5649
Location: Valåmoen, Norway

PostPosted: Tue 01 Feb 2011, 15:01    Post subject:  

You could try this:

Code:
#!/bin/bash
#iMount 1.7
export CHOOSER="
<window title=\"iMount 1.7 by Lord_Solrac2\"icon-name=\"gtk-cdrom\">
<vbox>

<frame Select an iDevice>
 <combobox>
  <variable>IDEV</variable>
  <item>iPod</item>
  <item>iPhone</item>
  <item>piece of crap</item>
 </combobox>
</frame>

<frame Select Mount Area>
 <combobox>
  <variable>mnt2</variable>
   <item>/</item>
   <item>/var/mobile</item>
 </combobox>
</frame>

<frame What's Your Name?>
<hbox>
 <entry editable=\"true\">
 <variable>name</variable>
  </entry>
 </hbox>
</frame>

<frame IP Address (Settings ... Wifi ... Connection = DHCP) >
<hbox>
 <entry editable=\"true\">
 <variable>ipa</variable>
  </entry>
 </hbox>
</frame>

<hbox>
<button>
<variable>start</variable>
<input file icon=\"gtk-ok\"></input>
<label>Start iMount (Remember Pass = alpine)</label>
<visible>true</visible>
<action type=\"exit\">EXIT_NOW</action>
</button>
</hbox>
</vbox>
</window>
"
CHOOSER2==`gtkdialog3 --program=CHOOSER --center`
[ ! "`echo $CHOOSER2 | grep EXIT_NOW`" ] && exit 0

urxvt -e sshfs root@$ipa:$mnt2 /mnt/$name-$IDEV

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
rcrsn51


Joined: 05 Sep 2006
Posts: 8919
Location: Stratford, Ontario

PostPosted: Tue 01 Feb 2011, 17:24    Post subject:  

Code:
CHOOSER2==`gtkdialog3 --program=CHOOSER --center`

Do you really want the double equal sign?
Back to top
View user's profile Send private message 
Lord_Solrac2

Joined: 22 Dec 2010
Posts: 35
Location: Gurabo, Puerto Rico

PostPosted: Tue 01 Feb 2011, 17:56    Post subject:  

zigbert wrote:
You could try this:

Code:
#!/bin/bash
#iMount 1.7
export CHOOSER="
<window title=\"iMount 1.7 by Lord_Solrac2\"icon-name=\"gtk-cdrom\">
<vbox>

<frame Select an iDevice>
 <combobox>
  <variable>IDEV</variable>
  <item>iPod</item>
  <item>iPhone</item>
  <item>piece of crap</item>
 </combobox>
</frame>

<frame Select Mount Area>
 <combobox>
  <variable>mnt2</variable>
   <item>/</item>
   <item>/var/mobile</item>
 </combobox>
</frame>

<frame What's Your Name?>
<hbox>
 <entry editable=\"true\">
 <variable>name</variable>
  </entry>
 </hbox>
</frame>

<frame IP Address (Settings ... Wifi ... Connection = DHCP) >
<hbox>
 <entry editable=\"true\">
 <variable>ipa</variable>
  </entry>
 </hbox>
</frame>

<hbox>
<button>
<variable>start</variable>
<input file icon=\"gtk-ok\"></input>
<label>Start iMount (Remember Pass = alpine)</label>
<visible>true</visible>
<action type=\"exit\">EXIT_NOW</action>
</button>
</hbox>
</vbox>
</window>
"
CHOOSER2==`gtkdialog3 --program=CHOOSER --center`
[ ! "`echo $CHOOSER2 | grep EXIT_NOW`" ] && exit 0

urxvt -e sshfs root@$ipa:$mnt2 /mnt/$name-$IDEV

The GUI Works But Then The Terminal Doesn't D:
Back to top
View user's profile Send private message AIM Address Yahoo Messenger 
zigbert


Joined: 29 Mar 2006
Posts: 5649
Location: Valåmoen, Norway

PostPosted: Wed 02 Feb 2011, 03:36    Post subject:  

Quote:
The GUI Works But Then The Terminal Doesn't D:


you could probably do something like this:

Code:
echo "urxvt -e sshfs root@$ipa:$mnt2 /mnt/$name-$IDEV" > /tmp/exec
chmod 722 /tmp/exec
/tmp/exec

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Lord_Solrac2

Joined: 22 Dec 2010
Posts: 35
Location: Gurabo, Puerto Rico

PostPosted: Wed 02 Feb 2011, 08:05    Post subject:  

zigbert wrote:
Quote:
The GUI Works But Then The Terminal Doesn't D:


you could probably do something like this:

Code:
echo "urxvt -e sshfs root@$ipa:$mnt2 /mnt/$name-$IDEV" > /tmp/exec
chmod 722 /tmp/exec
/tmp/exec

Still The Same Problem :S
imnt-2.0-alpha.tar.gz
Description  Test.sh File
gz

 Download 
Filename  imnt-2.0-alpha.tar.gz 
Filesize  683 Bytes 
Downloaded  191 Time(s) 
Back to top
View user's profile Send private message AIM Address Yahoo Messenger 
zigbert


Joined: 29 Mar 2006
Posts: 5649
Location: Valåmoen, Norway

PostPosted: Wed 02 Feb 2011, 09:12    Post subject:  

hello Lord_Solrac2
I have rewritten the execution part to be similar the way I use gtkdialog. This is how I keep values from gtkdialog variables. There are sure many ways to do this. I don't have sshfs installed, so I couldn't check the output. To be sure the values are saved, I included the echo-line....

To hold on the terminal window when finished (to see result/errors.....) you should use the -hold switch

Code:
I=$IFS; IFS=""
for STATEMENTS in  $(gtkdialog3 -p CHOOSER); do
   eval $STATEMENTS
done
IFS=$I

if [ $EXIT = EXIT_NOW ]; then
   urxvt -hold -e echo "$ipa:::$mnt2:::$name:::$IDEV"
   urxvt -hold -e sshfs root@$ipa:$mnt2 /mnt/$name-$IDEV
fi



good luck
Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5649
Location: Valåmoen, Norway

PostPosted: Wed 02 Feb 2011, 09:13    Post subject:  

Have you looked at this?
_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
Lord_Solrac2

Joined: 22 Dec 2010
Posts: 35
Location: Gurabo, Puerto Rico

PostPosted: Wed 02 Feb 2011, 10:31    Post subject:  

zigbert wrote:
Have you looked at this?
No, To Be Honest, I Didn't Use any Guide ^^" Anyways Thanks
EDIT: The GUI Works Fine Though... It's Actually When it reaches the Terminal where the error Occours... D:
Back to top
View user's profile Send private message AIM Address Yahoo Messenger 
Lord_Solrac2

Joined: 22 Dec 2010
Posts: 35
Location: Gurabo, Puerto Rico

PostPosted: Thu 03 Feb 2011, 12:43    Post subject:  

zigbert wrote:
hello Lord_Solrac2
I have rewritten the execution part to be similar the way I use gtkdialog. This is how I keep values from gtkdialog variables. There are sure many ways to do this. I don't have sshfs installed, so I couldn't check the output. To be sure the values are saved, I included the echo-line....

To hold on the terminal window when finished (to see result/errors.....) you should use the -hold switch

Code:
I=$IFS; IFS=""
for STATEMENTS in  $(gtkdialog3 -p CHOOSER); do
   eval $STATEMENTS
done
IFS=$I

if [ $EXIT = EXIT_NOW ]; then
   urxvt -hold -e echo "$ipa:::$mnt2:::$name:::$IDEV"
   urxvt -hold -e sshfs root@$ipa:$mnt2 /mnt/$name-$IDEV
fi



good luck
Sigmund

Didn't Notice This Post ^^" And The Result is
Code:

read: Connection reset by peer

So I'm Guessing It's sshfs the error...
Back to top
View user's profile Send private message AIM Address Yahoo Messenger 
Display posts from previous:   Sort by:   
Page 1 of 1 [10 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.0927s ][ Queries: 13 (0.0050s) ][ GZIP on ]