maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   Running Maemo SDK on Windows Desktop (https://talk.maemo.org/showthread.php?t=32537)

Nathan 2009-10-07 18:03

Running Maemo SDK on Windows Desktop
 
3 Attachment(s)
I had outlined an idea in this thread and have set out to see how hard each piece of it would be. So far the initial results looks VERY promising.

I am currently running the Final Maemo 5 SDK, with several programs from the fremantle repository to "play" with it. :D


Here is a standard SSH connection to the scratchbox:
http://talk.maemo.org/attachment.php...1&d=1254935891
with full control since it is using ssh.

You can still either run the sh/bash session scratchbox inside the Linux VM Host window or through a SSH session from your windows desktop. Having a ssh session working perfectly outside means we can fully control the scratchbox stuff outside of the VM. That is very important, for my next part of the project!

And in this case the entire time I was playing with it, installing stuff from the repository and controlling it -- I had my Virtual PC minimized. Leaving me no need to unlock my mouse cursor or wasting my screen space showing the linux VM. I'm loving it!


And here is the holy grail of this message; Xephyr running on Windows XP linked to a running scratchbox session from inside the vm:
http://talk.maemo.org/attachment.php...1&d=1254935905

I installed a couple widgets, and here is me "playing" in Xephyr/Maemo running a game --
http://talk.maemo.org/attachment.php...1&d=1254935916

The good:
- Completely stable
- Speed is either the same or possibly faster
- Work flow is much smoother; no more having to unlock mouse from VM. (& Alt-Tab works!) and I can use all the programs like I would normal do, during development.
- You can mix and match programs inside and/or outside vm now. - Simple setup.

The bad:
- You do need to install some stuff on your windows side. Around 150 megs worth of stuff -- but it is all automatically installed for you, from one installer (and optionally one zip file).

The crazy:
- Maemo Fremantle development on my Windows Desktop!!!! WOOHOO!!!!! :D

If anyone is interested in this; let me know and I'll get some instructions put up on how to get it working. But either way; it is just plain COOL!

Nathan

nymajoak 2009-10-07 18:30

Re: Running Maemo SDK on Windows Desktop
 
That is ... really really nice. I've just recently started toying with the SDK and have so far been running the scratchbox as well as compiling etc via ssh and editing with winscp's inbuilt editor anyway, so the only thing I need to mess with inside the VM is Xephyr. It didn't even occur to me however to get it running outside the VM as well...

Thanks for the tip! :)

Nathan 2009-10-07 18:45

Re: Running Maemo SDK on Windows Desktop
 
Quote:

Originally Posted by nymajoak (Post 341263)
That is ... really really nice. I've just recently started toying with the SDK and have so far been running the scratchbox as well as compiling etc via ssh and editing with winscp's inbuilt editor anyway, so the only thing I need to mess with inside the VM is Xephyr. It didn't even occur to me however to get it running outside the VM as well...

Thanks for the tip! :)

I knew SSH would work externally, in fact I made sure in my vm image to install sshd, and samba and configure them for external access.

It was actually because of something that SubCore said that made me decide to try getting this working. And I'm very pleased with the outcome.

Nathan.

joshua.maverick 2009-10-07 18:55

Re: Running Maemo SDK on Windows Desktop
 
Does this mean we can dev on windows without ubuntu and such?

nymajoak 2009-10-07 19:01

Re: Running Maemo SDK on Windows Desktop
 
Quote:

Originally Posted by joshua.maverick (Post 341292)
Does this mean we can dev on windows without ubuntu and such?

Well, once you have it set up Ubuntu in the VM and done the initial tinkering, you only need to fire it up and have it running in the background. Besides that you essentially don't have to touch Ubuntu and such.

The scratchbox and all code is still running inside the VM, but you work with it from outside, in your Windows environment.

Nathan 2009-10-07 20:38

Re: Running Maemo SDK on Windows Desktop
 
Quote:

Originally Posted by joshua.maverick (Post 341292)
Does this mean we can dev on windows without ubuntu and such?

No, as nymajoak stated, the VM Ubuntu machine is still running. But instead of having to do everything inside the Gnome desktop of the linux machine you are able to "control" everything externally in your Windows desktop.

This technique basically allows you to start the VM running, and then minimize it. Then you can run a "batch" file in windows that will start a ssh session, and start xephyr in windows and then link the VM to your xephyr session. So then you are running everything from windows programs that will also behave like windows programs. You can alt-tab, move your mouse and interact with them as a normal windows program.

At this point because of the way the sdk works you have to run a linux host machine of some sort. My objective is to "windowize" (and simplify) this to hide it as much as possible for new windows developers. Those who are familiar with Linux this whole technique probably is not all that interesting too. But if I can make it better for the Windows developers, that is my goal. And on top of that it gives me a good excuse to "play" around and learn new things!

Nathan

iKneaDough 2009-10-07 20:48

Re: Running Maemo SDK on Windows Desktop
 
Quote:

Originally Posted by Nathan (Post 341226)
If anyone is interested in this; let me know and I'll get some instructions put up on how to get it working. But either way; it is just plain COOL!

Nathan

+1 for an official request for instructions.

BTW have you looked into Portable Ubuntu Remix ? It basically allows you to run linux within windows using colinux, and supposedly runs much quicker/smoother, than a full VM.

Nathan 2009-10-07 21:21

Re: Running Maemo SDK on Windows Desktop
 
Quote:

Originally Posted by iKneaDough (Post 341380)
+1 for an official request for instructions.

BTW have you looked into Portable Ubuntu Remix ? It basically allows you to run linux within windows using colinux, and supposedly runs much quicker/smoother, than a full VM.

Interesting idea -- I'll pull down it and "andLinux" and see how easily I can get the images working. I suspect based on the prior work I did with the Ubuntu VM that my simple scripts probably will probably port over pretty easily and they do all the "heavy" lifting right now. But what I am really attempting to focus on is getting Scratchbox 2 working... That I think will add a lot more to the picture.

Nathan.

nilchak 2009-10-07 23:37

Re: Running Maemo SDK on Windows Desktop
 
Nathan , thanks for the VPC image for windows users. This is a great thing.

Is there any image you made as yet with the new Maemo 5 final SDK on the VPS as an image as yet ?
On the garage page I see the older one as of 9/15 - so assuming that does not include the Maemo 5 final SDK that just got release this month ?

Nathan 2009-10-08 00:18

Re: Running Maemo SDK on Windows Desktop
 
Quote:

Originally Posted by nilchak (Post 341478)
Nathan , thanks for the VPC image for windows users. This is a great thing.

Is there any image you made as yet with the new Maemo 5 final SDK on the VPS as an image as yet ?
On the garage page I see the older one as of 9/15 - so assuming that does not include the Maemo 5 final SDK that just got release this month ?

Actually it does -- it is "self" updating image. Basically I use the garage project to host all the scripts. Pretty much every install step runs the svn update to pull the latest scripts. ;-)

As of last night, I had the new Final SDK scripts put into svn and integrated. (In fact the images above are from my VM machine built from scratch using the new version of the scripts)

However, I will be releasing a new vhd though because apparently I forgot to chmod some files on my final .02 release... Ergh... And they apparently are the first install script. ;-(

Nathan.

fahdriyami 2009-10-10 15:55

Re: Running Maemo SDK on Windows Desktop
 
Hey, please post instructions on how to get this working, i would really appreciate it...

Thanks

varunkrish 2009-10-10 21:32

Re: Running Maemo SDK on Windows Desktop
 
https://garage.maemo.org/plugins/wik...id=1033&type=g

I followed the instructions here and got it working

sevla 2009-10-12 03:41

Re: Running Maemo SDK on Windows Desktop
 
Are you compiling code in windows or just running Xephyr? If so how are you compiling from windows.

Nathan 2009-10-12 13:54

Re: Running Maemo SDK on Windows Desktop
 
Quote:

Originally Posted by sevla (Post 344121)
Are you compiling code in windows or just running Xephyr? If so how are you compiling from windows.

I'm running Xephyr as a window program in this case -- but compiling has to be done in the linux scratchbox. (I'm using a virtual machine that runs Ubuntu 9.04 (Jaunty) and has scratchbox installed in it on my WinXP machine)

Nathan

Nathan 2009-10-15 19:42

Re: Running Maemo SDK on Windows Desktop
 
This is actually pretty easy to do; but I've been busy working on other things that I forgot to document this for you guys.

Steps to do this:
1. You need to download Cygwin Setup and Install it
2. Install the Xinit from the x11 category
3. Start Xwin Server in Windows
4. Type in the Xwin Shell
Xephyr :2 -host-cursor -screen 800x480x16 -dpi 96 -ac

5. Start your VM and start scratchbox.
6. In your scratchbox you need to do
export DISPLAY=<IP ADDRESS>:2
where <IP ADDRESS> is the ip address of the windows os. So in my case; my VM is 192.168.0.184 and my XP desktop is 192.168.0.240 so in scratchbox I type
export DISPLAY=192.168.0.240:2
7. in scratchbox type:
af-sb-init start

And you should be connected. If it doesn't connect you might need to run xauthority in your xwin shell. You can also edit the xwinrc file and add Xypher to it as a quick load program.

Nathan

allnameswereout 2009-10-15 19:51

Re: Running Maemo SDK on Windows Desktop
 
@ Nathan, just for the record, there is no Ubuntu 9.03. What you are referring to is Ubuntu 9.04 (Jaunty).

joshua.maverick 2009-10-15 19:53

Re: Running Maemo SDK on Windows Desktop
 
Installing Cygwin now, what are the benefits of running maemo sdk in windows btw? Better frames when testing or anything?

Nathan 2009-10-15 20:48

Re: Running Maemo SDK on Windows Desktop
 
Quote:

Originally Posted by allnameswereout (Post 347683)
@ Nathan, just for the record, there is no Ubuntu 9.03. What you are referring to is Ubuntu 9.04 (Jaunty).

Thanks, for some reason I though Jaunty was 9.03... Ergh -- I bet I've made this mistake elsewhere too. ;-)

Nathan.

Nathan 2009-10-15 20:57

Re: Running Maemo SDK on Windows Desktop
 
Quote:

Originally Posted by joshua.maverick (Post 347688)
Installing Cygwin now, what are the benefits of running maemo sdk in windows btw? Better frames when testing or anything?

Actually your running the maemo sdk still in a linux vm. What I've done is moved the two windows for controlling everything from inside the scratchbox/vm to outside of the vm so that they are both like normal Windows applications. I then minimize the VM so it is just a task bar item.

I can now copy and paste between them and other windows apps. This has been very very useful from the Browser -> ssh window.

I also no longer have to deal with the VM eating my mouse and having to hit the "Alt" key to let it go. I can click in the SSH session, then in the Xephyr window and back to my browser w/o having to remember to unlock the mouse.

Speed wise (Xepyhr)-- it as least as fast; (I actually think it is faster). But the actual work flow is much, much faster. I can alt-tab between the dozen or so windows now and not get locked inside the vm.

Nathan.

joshua.maverick 2009-10-15 20:58

Re: Running Maemo SDK on Windows Desktop
 
Very true, that is a great benefit!
Thanks Nathan

Corwin_bg 2009-10-15 21:25

Re: Running Maemo SDK on Windows Desktop
 
That's a nice setup :)

Just wanted to share my take on the problem as well. I'm using Ubuntu running in VirtualBox in seamless mode (Host+L). The result is close to what you have here, but without installing anything on the host.

No input problems either - with the VirtualBox additions this is managed automatically. The input is automatically redirected to the VM when it's hovered.

Here's how it looks:

http://img243.imageshack.us/img243/3...0910160021.png

Chrome is running on the Windows host. Essentially, you can "see through" the VMs desktop.

Nathan 2009-10-15 22:07

Re: Running Maemo SDK on Windows Desktop
 
Actually, the reason I can't do that is because I'm currently using Virtual PC. (I have a lot of OS images Win 95 -> Vista, Server 2000 -> Server 2008) for day job type stuff. So I figured I would make a VPC image. I don't have vmware or VirtualBox installed on my machine.

However, I am possibly looking at using the portable ubuntu to see if I can make a image with that and scratchbox that might even be sweeter. I understand it runs much faster than a VM, and has sound. But I have no idea at this time. It is a low priority. (I do some of this just to learn <G>)

At the moment other than sound, I've very happy with the VM w/ cywin/x setup I have running right now.

Nathan.

allnameswereout 2009-10-16 06:13

Re: Running Maemo SDK on Windows Desktop
 
The Xephyr window also uses much less space (800x480). Instead of full desktop you can run say command line terminal besides it. Or not.

Provided your Xephyr uses hardware rendering this is a good solution.

To stop Xephyr from eating your mouse in the VM you need to install VMware tools (or VBox equiv) in the guest OS.

You're also missing out on e.g. Eclipse which comes with the SDK VM images.

You can also run SSHd on the VM and use SSH client (e.g. PuTTy) to log in from Windows.

You probably won't need the VM desktop. So keep it minimized except for Xephyr.

What I'd like to do is get Xephyr working on a remote computer via remote desktop. Granted, the 3D stuff won't work well then, but at least it will use less battery juice from laptop.

Nathan 2009-10-16 18:13

Re: Running Maemo SDK on Windows Desktop
 
Quote:

Originally Posted by allnameswereout (Post 348105)
To stop Xephyr from eating your mouse in the VM you need to install VMware tools (or VBox equiv) in the guest OS.

Unfortunately VPC doesn't have working guest os drivers for Linux...


Quote:

You're also missing out on e.g. Eclipse which comes with the SDK VM images.
Only if you want Eclipse (I personally have a strong dislike for it -- but I know others who love it). ;-D

Quote:

You can also run SSHd on the VM and use SSH client (e.g. PuTTy) to log in from Windows.
Actually that is what I am doing. Xephyr and putty are running on my windows machine talking to the vm. (I actually run two ssh sessions, one for inside the scratchbox and one outside. )

Quote:

What I'd like to do is get Xephyr working on a remote computer via remote desktop. Granted, the 3D stuff won't work well then, but at least it will use less battery juice from laptop.
Depends on how "remote" it is. If it is on the same network; you can just use "export DISPLAY=x.x.x.x:2" from the scratchbox and then run Xepyhr on the x.x.x.x machine and it will forward the data over the network to that machine. I could technically run my VM on my server and have it forward everything to my development machine w/o any slow downs. But I've been too lazy to move my vm to the server.... ;-D

Nathan.

allnameswereout 2009-10-16 21:43

Re: Running Maemo SDK on Windows Desktop
 
Hmm, I was thinking of using NX for that. I don't run VPN when on home (W)LAN, only on WWANs. So IP differs, and I want some kind of session management. I want to keep sbox and the X11 server running and continue where I left from whereever I am at that moment.

Nathan 2009-10-16 23:30

Re: Running Maemo SDK on Windows Desktop
 
Sorry, I haven't done anything remotely besides use a vnc over a ssh tunnel to my server. Hmm, I wonder if I use a ssh tunnel to my server if I can redirect the Xephyr session over it... That might be a possibility. Otherwise if you figure something out -- I'd love to know.

Nathan.


All times are GMT. The time now is 10:32.

vBulletin® Version 3.8.8