maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Quote Marks on Scratchbox Xterm (https://talk.maemo.org/showthread.php?t=33139)

rm42 2009-10-20 03:12

Quote Marks on Scratchbox Xterm
 
I have the SDK working very well. Wow! I also managed to install xterm and python as you can see here:

http://i222.photobucket.com/albums/d...aemo_Xterm.jpg

However, I am having trouble entering quote marks. As you can see on the screen shot above, when I try to enter quotes I get a couple of little dots instead on the nice long double quotes shown on the python help text.

I am using a Thinkpad T61 with US keyboard and USA layout in Ubuntu. Is there a way to enter normal quotes into the xterm from the scratchbox so that I do not get the error above?

rm42 2009-10-20 17:56

Re: Quote Marks on Scratchbox Xterm
 
Any ideas?

Nathan 2009-10-20 21:05

Re: Quote Marks on Scratchbox Xterm
 
I just tried it in my xterm inside of scratchbox, and I had no issues using the " key. It showed it as a " and treated it as a ".

[sh]
-sh-2.05b$ echo "hello"
hello
-sh-2.05b$


[python2.5]
>>> print "hello"
hello
>>>

Sorry, not sure how to help you. I'm running ubuntu 9.04 (Jaunty)

Nathan

rm42 2009-10-20 21:15

Re: Quote Marks on Scratchbox Xterm
 
I'm running Ubuntu 9.04 too. When I installed the SDK I did have the layout set as US International. I wonder if that is the issue. Does the scratchbox take on the keyboard layout used during the install? I notice that I still have to hit a space after pressing the " key for it to be entered, when using the scratchbox. I still don't see why the US International layout would be a problem though. But, I am willing to change the layout manually in scratchbox if that will fix this. I guess I'll have to dig around for a way to do this.

allnameswereout 2009-10-20 21:50

Re: Quote Marks on Scratchbox Xterm
 
Quote:

Originally Posted by rm42 (Post 352189)
I am using a Thinkpad T61 with US keyboard and USA layout in Ubuntu. Is there a way to enter normal quotes into the xterm from the scratchbox so that I do not get the error above?

Similar setup here.

Which Ubuntu version? Which architecture? Is Ubuntu your host OS or is Ubuntu running in a VM? Which SDK version?

I notice some of my keys don't work either in SDK GUI, and I cannot use setxkbmap because when I do I get error this extension is not available. My enter key doesn't work, for example. When I enable virtual keyboard my enter key pops up the virtual keyboard.

To isolate/workaround/fix the problem:
  • Use Python from SDK CLI. No need to use in GUI.
  • Update your Python. You are not using the latest version. Maybe your whole SDK is out of date. What SDK version are you using?
  • Check if problem exists when you run shell in xterm instead of Python in shell in xterm.
  • In Scratchbox (not from X but in terminal of host) to use " see if this works. Now start Python and see if " works.
  • From Ubuntu use Terminal, export DISPLAY=:2, execute gnome-terminal and test keys, compare with both host and SDK.
  • Install x11-utils in SDK and use xev to see binds.
  • Check output of xorg.conf and setxkbmap -print on host platform and SDK. In my case, setkbmap does not work in SDK/Xephyr but you can check if you can fix problem by passing flags to Xephyr.

rm42 2009-10-20 22:47

Re: Quote Marks on Scratchbox Xterm
 
Quote:

Originally Posted by allnameswereout (Post 353253)
Similar setup here.

Which Ubuntu version? Which architecture? Is Ubuntu your host OS or is Ubuntu running in a VM? Which SDK version?

Ubuntu 9.04 on my Thinkpad in its own partition. The SDK is 5.0 straight from Nokia's website.

Quote:

Originally Posted by allnameswereout (Post 353253)
I notice some of my keys don't work either in SDK GUI, and I cannot use setxkbmap because when I do I get error this extension is not available. My enter key doesn't work, for example. When I enable virtual keyboard my enter key pops up the virtual keyboard.

Ah, the virtual keyboard. I hadn't thought of trying that. Ahhh, the Enter key does the same thing for me as it does for you, toggle the virtual keyboard. The virtual keyboard does let me enter proper quotes, so I thought about toggling on the virtual keyboard for the quotes, flipping over to settings to disable the keyboard, and use the Enter key to enter the command. But, now the Enter key doesn't want to work in the terminal (even using Ctrl + Enter). Yup, Enter key is dead even after restarting the GUI. :confused:

If I go to setting to "Restore original settings" I get prompted for a password, and I don't know what it is, should I? Also, all my Save, Cancel, or, yes, no buttons have "wdgtb" before the actual name of the button. (I think it happened after I tried to change the language & region settings.)

Wait a minute. Now the virtual keyboard is working and the Enter key on the virtual keyboard works too. Crazy! :rolleyes:

To isolate/workaround/fix the problem:

Quote:

Originally Posted by allnameswereout (Post 353253)
  • Use Python from SDK CLI. No need to use in GUI.

True, I guess I was just having fun with the interactive shell exploring its potential. I am sure it will work fine in the device. Right? :rolleyes:

Quote:

Originally Posted by allnameswereout (Post 353253)
  • Update your Python. You are not using the latest version. Maybe your whole SDK is out of date. What SDK version are you using?

I installed python after doing an apt-get update in the scratchbox. :confused:

Quote:

Originally Posted by allnameswereout (Post 353253)
  • Check if problem exists when you run shell in xterm instead of Python in shell in xterm.

Well, now the virtual keyboard works fine in plain xterm and in the Python shell. Let me see what happens if I disable the virtual keyboard in settings.

Well I didn't get to it because it crashed. After restarting I went back to xterm, typed in:
python Ctrl + Enter (with my laptop keyboard)
and it entered the command plus lauching the virtual keyboard. The virtual keyboard's Enter key worked to enter commands but it likewise would toggle the virtual keyboard at the same time. Now it crashed again. I think I'm going home now.

Quote:

Originally Posted by allnameswereout (Post 353253)
  • In Scratchbox (not from X but in terminal of host) to use " see if this works. Now start Python and see if " works.

Yes, that works fine.

Quote:

Originally Posted by allnameswereout (Post 353253)
  • From Ubuntu use Terminal, export DISPLAY=:2, execute gnome-terminal and test keys, compare with both host and SDK.

Yes, that works fine, just like in scratchbox outside the GUI.

The other points I will have to try latter. I'll get back to this. Right now I have to run. Thanks for the help.
Quote:

Originally Posted by allnameswereout (Post 353253)
  • Install x11-utils in SDK and use xev to see binds.
  • Check output of xorg.conf and setxkbmap -print on host platform and SDK. In my case, setkbmap does not work in SDK/Xephyr but you can check if you can fix problem by passing flags to Xephyr.


rm42 2009-10-21 00:19

Re: Quote Marks on Scratchbox Xterm
 
The Python version in scratchbox, outside the GUI is 2.3.4. I'm confused. How many python installations do I have? :confused:

When I installed it in the virtual N900 I used the following command:

fakeroot apt-get install python

rm42 2009-10-21 01:27

Re: Quote Marks on Scratchbox Xterm
 
Well, at this point my original issue is resolved. I am now able to use the virtual keyboard to enter quotes and double quotes, and the Ctrl Enter key combination is working, as well as the virtual keyboard Enter key. How did it get fixed, I do not know. But, I am all set for now in this regard. I am left with a feeling that the SDK is still very fragile, but it is almost there.

Nathan 2009-10-21 01:37

Re: Quote Marks on Scratchbox Xterm
 
Quote:

Originally Posted by rm42 (Post 353355)
The Python version in scratchbox, outside the GUI is 2.3.4. I'm confused.

If your talking to me; then in my Scratchbox I have already pulled down Python 2.5, Ruby 1.8, Perl, and a whole boat load of "dev" type stuff.

If not, then I'm confused. ;-)



Nathan.

rm42 2009-10-21 01:54

Re: Quote Marks on Scratchbox Xterm
 
Quote:

Originally Posted by Nathan (Post 353391)
If your talking to me; then in my Scratchbox I have already pulled down Python 2.5, Ruby 1.8, Perl, and a whole boat load of "dev" type stuff.

If not, then I'm confused. ;-)



Nathan.

So, I assume you had to enable some other repository for being able to download Python 2.5 in scratchbox. Right?


All times are GMT. The time now is 23:12.

vBulletin® Version 3.8.8