Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jeffbarish

Pages: [1] 2
1
Python / Installing App In Qtopia
« on: April 12, 2005, 11:42:18 am »
I expected to be able to do what you described.  To be precise, I put the name of the script in the Exec= line, and I put the script in /home/QtPalmtop/bin.  However, when I tested this configuration from the command prompt, it would freeze, and from the icon it would fail.  I did some more testing this morning and figured out that the problem arises when I specify the environment variable.  That is, the program will run (from the command line) when the first line is:

#! /usr/bin/env python

but not when it is:

#! /usr/bin/env PYTHONPATH=/home/zaurus/lib/python python

For now, I will stick with the solution that works for me, but I would still be interested in any insights into what is going wrong here.

There is still an advantage to the configuration that I described (geojeff did, actually) in that one can specify redirection using that technique to capture output from your script.

2
Python / Installing App In Qtopia
« on: April 11, 2005, 05:24:02 pm »
OK.  In case anyone is interested, here's the explanation for my problem.  My program uses Pyro, so I have several import statements related to Pyro.  I installed Pyro in /home/zaurus/lib/python and set the environment variable PYTHONPATH to /home/zaurus/lib/python.  When I run the program from the command prompt, all is good.  When I run it from an icon, python cannot find Pyro.  Why?  I modified my program to print out sys.path.  /home/zaurus/lib/python is not in it (although it is when I run the program from the command prompt).  The first line of my program is the usual (#! /usr/bin/env python), so it should be picking up the same environment that exists when I run from a command prompt.  I modified the line to explicitly set PYTHONPATH (#! /usr/bin/env PYTHONPATH=/home/zuarus/lib/python python), but the directory still is not in my path.  I modified the program with sys.path.append('/home/zaurus/lib/python').  Then the program will run from the icon.  

Even better: following the suggestion from geojeff, I put a simple shell script in /home/QtPalmtop/bin.  It contains the single line

/usr/bin/env PYTHONPATH=/home/zaurus/lib/python python /home/zaurus/bin/myprog.py

It is necessary to explicitly set PYTHONPATH.  

Debugging tips: You can append to this line "> /home/zaurus/log 2>&1" to capture output in a file.  This is the technique I used to figure out this problem.  Also, I'm pretty sure that when you make a change to your file in /home/QtPalmtop/apps/Applications, you need to reboot.

3
Python / Installing App In Qtopia
« on: April 10, 2005, 12:47:20 pm »
I made some progress.  

I use a module (Pyro) with the readonly kopsis image by installing it according to the procedure described by optogeek (69777).  As I said, the installation works fine when I run my program from a command prompt.  However, when I try to run the program from the icon, Qt/Embedded apparently tries to run it as root.  I know that Qt/Embedded is trying to run my program as root because the PYTHONPATH as root was wrong.  I put the module in /home/zaurus/lib/Python, but because the environment variable got set using $HOME/lib/python, when running as root, Python was looking in /home/root/lib/python.  After I hardwired PYTHONPATH to the correct directory in the .bashrc for root, I no longer got an error message about not finding the module.

HOWEVER, I now get the error message:

Qt/Embedded data directory is not owned by user 0

So, I still can't run the program from a command prompt as root (which is not something I want to do anyway), and the program still will not start from the icon.  I've been trying to figure out why the program is running as root, but I'm stumped.  I know how to get to a properties page by clicking on the icon and holding the button down for a few seconds.  On the page that appears, one is able to select whether the program should run as root.  That box is not checked (although it doesn't make any difference as far as this problem is concerned).  The permissions and ownership on the file I put in /home/QtPalmtop/bin are the same as for other programs in that directory.  Likewise for the file I put in /home/QtPalmtop/apps/Applications.

4
Python / Installing App In Qtopia
« on: April 08, 2005, 10:02:05 pm »
I found some information here about how to install an application in Qtopia, but I can't get it to work.  It's possible that I misinterpreted some of the directions that I found, so I thought that perhaps someone could point to my error if I carefully describe what I did.

1. I put my app (myapp.py) in /home/QtPalmtop/bin (which is in my path).

2. I made myapp.py executable.  The first line is

#! /usr/bin/env python

The line that calls QPEApplication is:

app = QPEApplication(['myapp.py'])

I do:

from qtpe import QPEApplication

3. I created a file in /home/QtPalmtop/apps/Applications called myapp.desktop.  It contains the lines

[Desktop Entry]
Comment=What my program does
Exec=myapp.py
Type=Application
Name=MyApp

4. I rebooted

An icon appears on the Applications page.  When I click on it, it changes to the clicked icon and I see an hourglass.  Then the hourglass disappears and my app does not run.  I presume that it crashed.  When I run it from a command prompt (by typing myapp.py), it runs fine.  I hope that someone can see what I did wrong -- or can at least suggest a diagnostic procedure.  For example, does Qtopia log error messages somewhere?  Is there a way to capture error messages emitted during program startup?  Thanks.

5
Python / The Qt Included In Kopsis Python Is Out Of Date
« on: April 07, 2005, 12:10:11 pm »
The version of Qt included in the kopsis package is 2.3.2.  The current version is 3.  I am trying to get a multithreaded PyQt application to work, but it seems that support in 2.3.2 for what I need to do (involving custom events) is deficient.  Would it be possible for kopsis to release a new python image with a current version of Qt?  Would it work for me simply to replace the Qt libraries (qt.so, qtcanvas.so, qtnetwork.so, qtpe.so, qttable.so) and perhaps also pyqtconfig.py in the ext2 image?  If so, where do I find the necessary files?

Another approach might be to switch to the Python for arm feed, but people seem to be having trouble getting it to work on the Sharp ROM.  In any case, I don't know that it includes a current version of Qt.

6
Software / Screen Capture
« on: March 24, 2005, 10:34:53 am »
Quote
Where is Screen_Files/?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=72124\"][{POST_SNAPBACK}][/a][/div]
I did

find / -name Screen_Files -print

(in qpe-terminal) to find it.  On my Zaurus, I found it in /mnt/cf.

7
Software / Screen Capture
« on: March 24, 2005, 10:25:11 am »
Quote
whats the link? I'll fix it, or put screenshotapplet somewhere people can find it

Try this one
http://www.cyberphreak.com/zaurus/feed/scr...t_1.1.0_arm.ipk
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]
The broken link is on [a href=\"http://www.killefiz.de/zaurus/showdetail.php?app=112]http://www.killefiz.de/zaurus/showdetail.php?app=112[/url]

8
Software / Screen Capture
« on: March 21, 2005, 04:00:49 pm »
What program are people using for screen capture?  I found ScreenShotApplet, but the link takes me to a web page that does not exist.

9
Linux Issues / Mounting Zaurus On Linux Using Smbmount
« on: March 21, 2005, 11:55:35 am »
Ah, I see what you mean.  I was using the IP address assigned to eth0, which is not the interface to the Zaurus.  When I use the IP address assigned to that interface (usb0), pinging the Linux box from the Zaurus works fine.  Thanks again.  I'm rolling now.

10
Linux Issues / Mounting Zaurus On Linux Using Smbmount
« on: March 21, 2005, 09:43:54 am »
Problem solved.

It is necessary to mount a share, not a directory.  According to smbclient -L zaurus, home is a share, not home/zaurus (which is what I had specified in the mount command).  When I specified home in the mount command, it worked:

mount -t smbfs //192.168.129.201/home /mnt/zaurus -o password=""

Note that it was not necessary to add any lines to smb.conf (nor to change it from the default in any other way).

I am still troubled that ping <client> from the Zaurus produces the error message "Network is unreachable".  Any idea what that's about?

Thanks to everyone for the advice.

11
Linux Issues / Mounting Zaurus On Linux Using Smbmount
« on: March 21, 2005, 09:04:52 am »
/usr/sbin/inetd appears in the output of ps -ef.

smbclient -L produces the following output:

added interface ip=192.168.1.102 bcast=192.168.1.255 nmask=255.255.255.0
added interface ip=192.168.129.1 bcast=192.168.129.255 nmask=255.255.255.0
Password:
Anonymous login successful
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.0.7-ja-2.2]

        Sharename      Type      Comment
        ---------      ----      -------
        home           Disk      for User Data
        IPC$           IPC       IPC Service (Samba 2.0.7-ja-2.2)

        Server               Comment
        ---------            -------
        ZAURUS               Samba 2.0.7-ja-2.2

        Workgroup            Master
        ---------            -------
        WORKGROUP

I am again getting the message "Invalid network name in tree connect" when I run the mount command.

12
Linux Issues / Mounting Zaurus On Linux Using Smbmount
« on: March 20, 2005, 10:56:45 pm »
I may be confused in some cases about which platform your suggestions apply to.  I checked /var/log/samba/log.smbd on the desktop system (the client) and /var/smb/log.smb on the Zaurus (the server).  They are both empty.  I already have an entry in /etc/hosts on the client for the Zaurus.  It permits me to ping the Zaurus.  I tried making an entry in /etc/hosts on the Zaurus for the client, but that change had no effect.

I tried entering the two lines about netbios-ssn and netbios-ns using tabs instead of whitespace.  I then issued the killall command.  I was still unable to mount the Zaurus.  I tried running the smbclient command on the Zaurus (the server), but there is no smbclient command on the Zaurus.  And yes, I am connecting over usbnet.  I tried changing the line in smb.conf to "interfaces = usb0" (rather than usbd0), but that change had no effect.  Yes, inetd is running.

The error message is back to connection refused even though I am still specifying root as the user.

I appreciate all the suggestions.  I hope that there will be others as I am stymied.

13
Linux Issues / Mounting Zaurus On Linux Using Smbmount
« on: March 19, 2005, 07:08:48 pm »
Yes.  Also ftp and VNC.

14
Linux Issues / Mounting Zaurus On Linux Using Smbmount
« on: March 19, 2005, 04:34:30 pm »
No.

15
Linux Issues / Mounting Zaurus On Linux Using Smbmount
« on: March 19, 2005, 03:44:11 pm »
Sticking those lines into my inetd.conf had no effect.  I am not able to mount my desktop system on the Zaurus.  In fact, I am not able even to ping the desktop system (network unreachable).

Pages: [1] 2