This blog has now a new home, http://www.childsplay.mobi/blog
No updates will be done to this blog.
When running on a slower system or laptop synchronizing can take some time when you have a lot of binary files. The solution is to exclude them.
Settings -> Deployment -> Exclude items by name:
I still was unable to connect to http(s) from an android device and after some test cases with simple xmlrpc server/clients I noticed I’ve got socket errors claiming that I have no permission to use sockets.
So the real fix was to build the package with “–permission INTERNET”.
Now I have proper http(s) support
When making a kivy app for Android I came across some issues and while I informed the kivy devs I just put them here also just in case I need them later
Just follow the manual for packaging for Android.
First of all when you install the dependencies you must use python-pip iso pip.
When building the python binary I had problems with the httplib module which did have https support.
This what adb logcat told me:
I/python (19347): your version of httplib doesn’t support HTTPS
As it turned out the order in which you build the various modules matter.
So when building the Python binary you must use the order.
Put C lib first, then python lib, then kivy.
eg ./distribute.sh -m “sqlite3 libxml2 pyopenssl pil kivy”
Now there’s HTTPS support.
When you still haven’t HTTPS support try to clean the python4android git tree.
git clean -dxf
More android specific stuff I encountered:
To write to the filesystem use CWD/.kivy/….
sys.platform is on android ‘linux3′ (GNU/Linux is ‘linux2′)
Found an excellent post on ‘Ask Ubuntu’:
And in addition to the tip in the above post I copied the whole Ambiance theme into my home directory as I also have eclipse installed in my home directory which lives on a external HD so I have always a proper theme “with me”
This is not rocket science but more a reminder for myself
When working with eclipse and the egit plugin I noticed that a ‘git refresh’ would take minutes in certain projects. The particular project has a few directories containing 10000+ .ogg and .png files which are not included in the git repo. I have git exclude files and global .gitignore files in place but egit seems to ignore them.
So I added the file patterns to the egit ‘Ignored Recources’.
(For example I want to exclude everything in my */lib/Sounds)
Open Window -> Preferences -> Team -> EGit -> Add pattern
The pattern to add: */lib/Sounds/* (duhhh)
Push ‘apply’ and presto, the refresh just takes seconds
Just for completeness I include my .gitignore_global, the relevant parts and the projects exclude file.
To have the git global ignoring stuff do:
git config --global core.excludesfile ~/.gitignore_global
# Custom stuff
The .git/info/exclude file:
# exclude patterns (uncomment them if you want to use them):
To install Ubuntu Linux on your samsung series 5 ultrabook with SSD you should change some stuff in your BIOS as well as change some things in your Ubuntu Linux install.
I used Ubuntu 12.10 as that’s the most current version at this moment.
You must first disable ‘secure boot’ as it’s a Microsoft thing we don’t need it and would make things a lot more complicated.
Start the laptop and keep pressing the F2 button.
Your now in the BIOS setup.
‘Advanced’ -> ‘Fast Biosmode’ > Disabled
‘Security’ -> ‘Secure boot configuration’ > Customized signatures
‘Boot’ -> Move USB HDD to the top
-> ‘Secure Boot’ > Disabled
-> ‘OS mode selection’ > CSM OS
‘Exit’ > Save and exit
That’s it, no more secure boot crap.
Connect your usb-stick.
Boot the laptop.
When installing Ubuntu remove all the partitions on sda (HDD) and sdb (SSD).
Make one new partition on sdb (SSD) with mount point ‘/’ (root)
Make on sda (HD) the following (extended) partitons:
(Size is a personal issue but you get the idea)
sda5 swap 6GB
sda6 /var 20GB
sda7 /home remaining space
When the install is finished no want to set some mount options in to keep the write actions to the SSD to a minimum.
Open you /etc/fstab file and make sure you have the following mount options for your SSD:
So your fstab line for SSD would look something like this:
(This is actually one line in fstab)
UUID=c1526b35-193f-4573-9817-b0fa06100b93 / ext4 noatime,nodiratime,discard,errors=remount-ro 0 1
(Of course your UUID would be different.)
You should also move the /tmp directory to a ramdisk so that the directory would no longer be on SSD but lives in RAM.
Again it’s something you do in fstab:
tmpfs /tmp tmpfs defaults,noatime,mode=1777 0 0
You could also set a different scheduler for the SSD to get the most out of it.
Edit /etc/rc.local and add the following line ABOVE the line ‘exit 0′.
echo deadline >/sys/block/sda/queue/scheduler
Your done, reboot and enjoy your 3 seconds boot time
If you are using remote git repository with ssh on widows and you use the program “git gui/bash” you may get tired of constantly entering your ssh passphrase every time you do a push or pull.
To prevent this you must fix it the Linux way, what else
Add to you home dir, or what ever it is called on windows, a .bashrc file. (mind the dot in front of the name.
With the following contents:
That’s it, now you are only asked for your passphrase once at when you start “git bash”