[Q][n00b] Could anyone develop a program for me? - Raspberry Pi Q&A, Help & Troubleshooting

Hello everybody,
I recently bought my RaspberryPi for a school project, but I have no experience with python or coding in general.
My guess this isn't too hard to develop, but with no knowledge I won't come far.. I really hope one off you would like too help me
I am setting op a 'Hall of Fame' in my school, but I want to make it more interactive, so I figured this;
My RaspberryPi connected to a flatscreen and a numberlockpad, to show people short video clips of people in this 'Hall of fame'.
The idea is this;
1. On the screen is a box that states; "Insert birthdate here and hit enter".
2. When people do that, a short clip, about 1 - 2 minutes and stored on the SD, will be shown.
3. When it's ended, the screen with "Insert birtdate here and hit enter" has to come back.
I hope this is will be possible, and that anyone would like to help me..
You will definately be credited!

I'd imagine you'd want to use PyGame for the interface and then pass a command to omxplayer. I'd love to help you out but life is a bit frantic at the moment.
Sent from my GT-S5830 using Tapatalk 2
---------- Post added at 10:37 PM ---------- Previous post was at 10:35 PM ----------
Check my python thread. It has links to some resources.
Sent from my GT-S5830 using Tapatalk 2

That is definitely possible and probably won't require much programming to get working. Making it pretty will be more challenging, but so long as you focus on the underlying script first you should be fine.
You should start by learning some Bash and/or Python.
Create a script that will prompt the user for birthday inputs (i.e. Enter Month of Birth).
Create another for script for launching the video in full screen (i.e. Enter Name of Video to Play).
Then you only need to tie these scripts together in another script such that when a user enters each input (year, month and day) it will funnel the strings into the video launching script. If your videos are named logically (i.e. with date codes as thier names) it will be trivial to set up.
I'm happy to help out in my free time when I can, but you have to make the effort yourself first. If you ask specific questions you'll be more likely to get help too. I doubt anyone here is willing to just code this for you. The whole point of the Raspberry Pi is that it is supposed to promote education and insprire people to learn how to code

m2xtreme said:
That is definitely possible and probably won't require much programming to get working. Making it pretty will be more challenging, but so long as you focus on the underlying script first you should be fine.
You should start by learning some Bash and/or Python.
Create a script that will prompt the user for birthday inputs (i.e. Enter Month of Birth).
Create another for script for launching the video in full screen (i.e. Enter Name of Video to Play).
Then you only need to tie these scripts together in another script such that when a user enters each input (year, month and day) it will funnel the strings into the video launching script. If your videos are named logically (i.e. with date codes as thier names) it will be trivial to set up.
I'm happy to help out in my free time when I can, but you have to make the effort yourself first. If you ask specific questions you'll be more likely to get help too. I doubt anyone here is willing to just code this for you. The whole point of the Raspberry Pi is that it is supposed to promote education and insprire people to learn how to code
Click to expand...
Click to collapse
Hi, Thanks for your reply, and you are completely right. I am going to do that!
Do you maybe know a way to start with python? Could this be a good starting point?
Great idea, to split the action in 2 seperate scripts, I guess, but I am going to try to make it work.
NathanBookham said:
I'd imagine you'd want to use PyGame for the interface and then pass a command to omxplayer. I'd love to help you out but life is a bit frantic at the moment.
Sent from my GT-S5830 using Tapatalk 2
---------- Post added at 10:37 PM ---------- Previous post was at 10:35 PM ----------
Check my python thread. It has links to some resources.
Sent from my GT-S5830 using Tapatalk 2
Click to expand...
Click to collapse
Thank you for your reply, I am going to learn some python basics and will definately check out your stuff, thanks!
-------------------------
(I don't have much spare time, but I'll update on my progress here )
(oh and I am dutch, so I am sorry for my englisch..)

I have heard of codecademy but never used it so I cannot comment on the quality of it.
First you should look into what version of Python you are using on your development computer. You can check this by running from terminal:
Code:
python --version
I learned Python the old fashioned way; by reading through the official documentation. The official documentation can be found here, just make sure you select the correct version since there are (mostly minor) discrepancies between versions:
http://docs.python.org/2/tutorial/
Also, check out Kahn Academy. They have video walkthroughs of some of the basics of Python that are very good. If you aren't into reading through loads of documentation I would say this is your best bet. Admittedly, the official documentation can be quite hard to read at times. Watching a video to learn supplemented with exercises seems easier to me.
https://www.khanacademy.org/science/computer-science
I believe all the computer science stuff on Kahn Academy is only Python and is in order so click on the first one even if it doesn't say "Python" in the title.
Best of luck! Let us know how it goes and if you have any more questions.

I am currently learning python, if you need some help let me know, id be glad to help where i can
[email protected]

Some questions..
Hello
I am trying to get my code together, learned the basics of the basics, but I have some questions, this is my code so far;
Code:
print "Hallo, en welkom in deze Hall of Fame!" #Hello and wecome in my hall of fame
print "Kies een van de personen uit waarover u meer zou willen weten te komen" #Choose one
print " "
print "Vul hieronder de geboortedatum van uw keuze in en druk op 'enter'" #Enter bithdate of your choice
print " "
y = " "
while y != "stop" :
x = str(raw_input("Geboortedatum: ")) #Geboortedatum = Birthdate
print " "
if x == "26-10-1994" or x == "26101994" or x == "26 10 1994":
print "De gekozen geboorte datum is 26 Oktober 1994, dit is de geboortedatum van Bjorn van Beek." #Chosen bithdate is the one from Bjorn etc..
elif x == "01-11-2003":
print "De gekozen geboorte datum is 1 November 2003"
else:
print "Oeps, waarschijnlijk heeft u een foutje gemaakt tijdens het typen." #Oops, You have probably entered something wrong
print "Probeer opnieuw.."
print " "
y = x
else : print "Finish"
- What is the command to execute a videofile? so when someone enters a birthdate the video starts instead of a line of text
- A clear command? refres of the windows?
thanks for the feedback so far!!

B-vb said:
- What is the command to execute a videofile? so when someone enters a birthdate the video starts instead of a line of text
- A clear command? refres of the windows?
thanks for the feedback so far!!
Click to expand...
Click to collapse
Happy to hear you have made some progress. There are many ways to play this video so you will have to decide yourself how you want to do it. First you must choose what videoplayer to use and install it. In this example I will use 'mplayer' as it is probably sufficient for your needs. I would probably so something like this:
Code:
import os
videoplayer = "mplayer"
options = "-fs" # Play in fullscreen
date = "26101994"
#
# Write code to match your input videofile string to the actual filename
#
# It should look like 'videofile' below...
#
videofile = "/path/to/file_26101994.ext"
# mplayer [options] [file]
# i.e. "mplayer -fs /path/to/file_26101994.ext"
os.system("%s %s %s" %(videoplayer, options, videofile))
print "Now playing your videofile. Enjoy!"
Make sure you put the 'import os' at the top of the script. I'm not sure what you are asking in the second question. Perhaps you can explain a bit more?

m2xtreme said:
Happy to hear you have made some progress. There are many ways to play this video so you will have to decide yourself how you want to do it. First you must choose what videoplayer to use and install it. In this example I will use 'mplayer' as it is probably sufficient for your needs. I would probably so something like this:
Code:
import os
videoplayer = "mplayer"
options = "-fs" # Play in fullscreen
date = "26101994"
#
# Write code to match your input videofile string to the actual filename
#
# It should look like 'videofile' below...
#
videofile = "/path/to/file_26101994.ext"
# mplayer [options] [file]
# i.e. "mplayer -fs /path/to/file_26101994.ext"
os.system("%s %s %s" %(videoplayer, options, videofile))
print "Now playing your videofile. Enjoy!"
Make sure you put the 'import os' at the top of the script. I'm not sure what you are asking in the second question. Perhaps you can explain a bit more?
Click to expand...
Click to collapse
Hi,
Thanks for your feedback!
First I had to start everything from my pi, but that's already the point where I get stuck..
I can't seem to figure out, how to start my script? double click does nothing, choosing a program to launch it with doesn't do anthing too.
Even making it executable by $ chmod +x myscript.py
And the first line is; #! /usr/bin/env python
So what am I doing wrong?
m2xtreme said:
I'm not sure what you are asking in the second question. Perhaps you can explain a bit more?
Click to expand...
Click to collapse
Well, someone has entered a birthdate and a video has been show, I would like the windows to be cleared (fresh window).
A restart or something, is there a command for that?
Thanks in advance!

B-vb said:
I can't seem to figure out, how to start my script? double click does nothing, choosing a program to launch it with doesn't do anthing too.
Even making it executable by $ chmod +x myscript.py
And the first line is; #! /usr/bin/env python
So what am I doing wrong?
Click to expand...
Click to collapse
You can try running it from the terminal, that might give you a hint as to what is happening:
Code:
python myscript.py
B-vb said:
Well, someone has entered a birthdate and a video has been show, I would like the windows to be cleared (fresh window).
A restart or something, is there a command for that?
Click to expand...
Click to collapse
what windows are you referring to? do you mean the terminal and the videoplayer? Perhaps you can describe what you are using more? What operating system are you running on your Pi?

Related

[Developement] Computer App to Control Phone

i know we have a few applications that allow us to use our phone's screen and keyboard to control our computer, and while it is cool, it's just not something that i have a use for currently. i was wondering if there were any apps that you know of that allow me to have a window on my comp that is my home screen on my phone and control things on the phone from the comp. i hate when i am working on my themes and i get 100 texts and i have to go from using the comp it using the phone and back and forth. WM had several apps like that and i loved them when i was running windows but now i run linux(ubuntu 8.10) and i would love to be able to type texts and run apps on my phone while using the computer keyboard.
i have looked through the market and can't seem to find anything on there and i was hoping someone could point me to one elsewhere or if i missed one on the market. thanks in advance
That would be cool. A VNC Server has already been ported to iPhone, so it's probably not too difficult for someone who knows what they're doing (i.e, not me =P)
It would definitely be great to be able to type text messages and whatnot using the computer's keyboard and screen instead of that tiny little G1 keyboard.
or if there are some commands i can run from adb shell that would work too, all i have been able to figure out how to do is play an mp3 on the phone by typing the command. cool but not what i would like.
alright, for those that care i have figured out how to start an app on the phone by using the adb shell commands, and i can even start to compose a text if i do it correctly
to start the messaging app you need to type in the adb shell(or android terminal but the point is to be able to do it from the comp
adb shell
am start -a android.intent.action.MAIN -n com.android.mms/com.android.mms.ui.ConversationList
the above line brings up the conversation list to allow you to choose a list, but i have yet to figure out how to atually pick a convo from that page
to bring up the compose message to start a new text type in the following
am start -a android.intent.action.MAIN -n com.android.mms/com.android.mms.ui.ComposeMessageActivity
from there i can input the number to send the message to but not what i want the text to say,
input text <string> #that inputs a single word and no more after the word text
so if i were to type
'input text hello android' my phone would act as if i had just typed hello, this also works on the home screen to search your contacts. i am working on in[utting more than one word and also choosing your conversation from the comp
Cool! nice progress. Maybe other Android intents can be used...
progress
i know i can start any app by knowing the commands for it now and typing it in. but for right now my main concern is getting a multi word string to appear in the text box. if i can get that then i just need to figure out how to attach "input keyevent 66" to it as well so it runs cleanly. key 66 is the enter key and i figured out several others along the way but i will list them later. i pulled the input file from the /system/bin directory and maybe someone else should have a look at it and figure out how to acheive multi word texts without placing "_" between all the words, cause right now that's where i'm at. i'm attaching the file for the guru's to take a look at. obviously it isn't saved as a .txt file on the phone but that's how i uploaded it to here.
CALLING THE ANDROID GURU'S TAKE A LOOK AT THIS
Cool. Once you figure out a bunch of commands, I could try making a user interface for it as a project...
just wanna drop this lines here, there is an app from motorola MPT Motorola Phone tools, and it does all that you want and more, the phone can be connected to the pc via USB or Bluetooth... you can send receive msg, phone calls, see and edit contacts, drop images, ringtones browse the files etc
juangil said:
just wanna drop this lines here, there is an app from motorola MPT Motorola Phone tools, and it does all that you want and more, the phone can be connected to the pc via USB or Bluetooth... you can send receive msg, phone calls, see and edit contacts, drop images, ringtones browse the files etc
Click to expand...
Click to collapse
Im not sure if you know that your posting in a forum dedicated to the G1/android but MPT supports, as the name would suggest, motorola phones only.
juangil said:
just wanna drop this lines here, there is an app from motorola MPT Motorola Phone tools, and it does all that you want and more, the phone can be connected to the pc via USB or Bluetooth... you can send receive msg, phone calls, see and edit contacts, drop images, ringtones browse the files etc
Click to expand...
Click to collapse
does said program work with the G1? i can't imagine moto being nice and making a program that works for everyone else's phone
kp126 said:
Im not sure if you know that your posting in a forum dedicated to the G1/android but MPT supports, as the name would suggest, motorola phones only.
Click to expand...
Click to collapse
yeah I know, my bad.. just wanted to put an example of an app (that of course is only for motorola) for any1 wanting to do something like it
i know there's several out there for different phones, but nothing for android. hell i'd be satisfied if i could just have the emulator read from my phone and let me control it that way. right now i don't like what i have to do to send a text
input text hello
input keyevent 62
input text android
input keyevent 66
that is a whole lot of typing for a simple text that says "hello android" and then sends it
would it be possible to write a program that takes what you type and breaks it into one word or one letter segments and runs the proper keyevent for each charecter there?
from what i remember of my programming in java and visual basic from years ago is that it would basically be set to read an input and use a case method to say if $input=="hello" then adb shell input text hello. it would be easier i would assume to just break it down into words and place "adb keyevent 62" between each word to input the spaces, and at the end of the line of input you would have to have the code "input keyevent 66"
i have the keyevent mapped out for each button and such on the phone if anyone is interested. i will see what i can come up with on my own though for now
Hope!
I would <3 who ever release's this in some form or another =)
I could really use an application that lets me use my phone from my computer. Preferably it'd show the desktop of the phone, and allow remote access to all the features.
I don't know if it's possible, but it sounds like some of you are progressing, so I hope for the best.
that is the goal, but right now i think i want to just get a java script written by the end of the week next week that reads the key i press on the computer and inputs it into the phone. so i have a lot of relearning to do since i haven't written javascript in 4 years and even then it was just simple stuff to be run in a console. if someone wants to take whatever i get done and run with it to make a FREE APP then by all means. if i find my work in a paid app then you better hope the US gov't can't find you cause i'll be at your door ready to kick your ass.
i'm not sure how one would go about coding the computer to display the phone desktop, but however it gets done i would prefer it to be written in java so all users of linux, mac, and windows can use it.
alright i have found a program that allows me to display the phone screen on the computer using java *hooray* but it does not switch to landscape when the phone does, and i can't control the phone from the app. it was written so that people could do presentations with the phone instead of using the emulator. the gist of it is described here
http://groups.google.com/group/cw-android/browse_thread/thread/d2dbcabee6bcba1a
i have already emailed the developer asking politely to see the code and for permission to try and run with it to make the ideal app. at this point the only thing i could come up with would be to make a javascript that had a case for each key on the keyboard and when a key is pressed it sends the corresponding command(adb shell input keyevent ##) to the phone. this would work fine to use the arrow keys to control the phone, and i am not sure how to code the mouse into it yet. i will be waiting for a response from the dev hopefully he will give his permission and blessing for us to use the app.
Tubaking182,
Perhaps I could offer some help. Brad Fitz has written a program that injects keys into the Linux input layer. Perhaps the source code to his project can help you. It appears to contain a key code map. Here is the link to his code:
http://github.com/bradfitz/android-misc/blob/master/type.pl
Also, here is a link to his live journal entry regarding his program.
http://brad.livejournal.com/2400054.html
All of this would be wonderful to have with my G1. I wish all involved the best of luck!
the developer of the program i posted gives his blessing but he claims what we are trying to do is impossible without certain firmware. he claims that android does not support remote control. i have already proven it can be done though but you have to use keyvalues instead of the mouse. i don't know much java, but i know i need a case switch that executes adb shell input keyevent when i press a key on the computer. if someone wants to tell me the proper syntax and java command to run a run a command then awesome i can write this up *hopfully* and start testing it.
would it work if i typed it as
int key = evt.getKeyCode();
switch (key){
case 65: run.exec(adb shell input keyevent 29);
break;
what would be the proper way to execute the adb command
tubaking182 said:
the developer of the program i posted gives his blessing but he claims what we are trying to do is impossible without certain firmware. he claims that android does not support remote control. i have already proven it can be done though but you have to use keyvalues instead of the mouse. i don't know much java, but i know i need a case switch that executes adb shell input keyevent when i press a key on the computer. if someone wants to tell me the proper syntax and java command to run a run a command then awesome i can write this up *hopfully* and start testing it.
would it work if i typed it as
int key = evt.getKeyCode();
switch (key){
case 65: run.exec(adb shell input keyevent 29);
break;
what would be the proper way to execute the adb command
Click to expand...
Click to collapse
I've been doing Java for about 4 or 5 years now, nothing to fancy, but anyway,
Code:
int key = evt.getKeyCode();
switch (key)
{
case 65:
Runtime.getRuntime().exec("adb shell input keyevent 29"); // I dont know if this is what you "run" variable is referring to. and you would need quotes around your command as it takes a String parameter.
break;

Better Terminal Emulator Magic

Just showed up in the market. Awesome works the 1.5 soft keyboard. Has its quirks but does have some good uses, an update was put out this morning to fix the enter key problem.
great find! it's so hard to sort through the **** apps these days. can't wait until we get a well needed market update.
Just to let people know they have a message saying it doesn't work on some modified Roms. I'm on 6.0h and it didnt work for me. it went into a force close loop even when i wasnt using it.
Its a step in the right direction, but its not all there quite yet. VERY HELPFUL though
1) There is a problem getting the <enter> key working. I find that I need to roll around the scroll button a bit before the enter key will work after starting or switching users.
** another way to deal with this is to use a different shell. For some reason, using full bash instead of sh works. There are other (great) advantages to this (more on that later).
2) You can't see what you're typing when in landscape mode, which is the only way that the VK is actually practical -- keys are too small to use effectively in portrait.
3) If you use a colored shell, the colors screw up when switching to/from the vk. Must be something to do with how he's buffering and redrawing the console.
On using bash instead of sh...
Advantages:
1) color
2) BASH HISTORY
3) scroll wheel = arrow keys
4) lots more -- http://en.wikipedia.org/wiki/Bash
How:
copy bash into some executable part of the filesystem
create a bashrc file anywhere at all in the filesystem.
put in your bashrc the following:
Code:
PS1="[\w]\\$ "
HISTFILE=/some/path/file/with/write/permissions
** this is of course a regular shell script, so add whatever startup code you like in there, like a custom PATH, etc.
IN the "better terminal emulator" program, menu --> preferences --> command line and set it to "/path/to/bash --rcfile /path/to/bashrc"
And of course, running the following:
Code:
su -c "/path/to/bash --rcfile /path/to/bashrc"
will give you root with bash and the same setup as your regular user, including a shared history file (note that the history file is only updated when bash EXITS and so it is current as of the moment you initially LAUNCHED the terminal app.
Note: I like to write that su -c line into a wrapper I call "subash" that I place in the path.
bash is attached for convenience, its a .tar.gz file with an extra extension to confuse the newbs (and trick the forum filter into allowing it).
@lbcoder
Thanks Great tip!
@lbcoder
Thanks Great tip!
using bash as default shell
Id love to use bash, its the shell im used to and since Im not that good at *nix having bash would help, 1 cyanogen rom had ash(i think) and then none of the scripts floating around worked and so they needed to be edited(something that sounds a bit tedious)
Id also like a decent prompt, maybe color ls and all those bells and whistles, I think this could be well received with all the bugs worked out and maybe a script that would make any scripts found on the device into a format that bash needs...
the biggest is the lack of history, I have used a good variety of linux and unix shells and droids is the first without cmd history, a prompt with 'pwd' and tab auto complete...
cant we just get a REAL shell, is that so wrong?
bhang
Job Control
lbcoder said:
On using bash instead of sh...
Advantages:
1) color
2) BASH HISTORY
3) scroll wheel = arrow keys
4) lots more ...
Click to expand...
Click to collapse
Very nice and very useful. Thanks for providing this!
One feature lost in this build of bash: Job Control (^Z, jobs, fg, bg, and %number commands to manipulate jobs). Hitting Ctrl-Z suspends the bash shell and all its child processes.
The existing sh shell supports job control. This build of bash does not.
I'm going to have to learn how to set up a cross-compilation environment. Another project to add to the list...

Bluetooth Keyboard HID fix - HELP!

Hi I found this over at http://i-miss-erin.blogspot.com/2009/09/connect-bluetooth-keyboard-in-android.html and needed some help as to how to input the following code.
I have CM 5.0.4.1 with all the right things in the xbin folder. I have GScript and the Terminal Emulator (which I notice doesn't accept numbers!?!).
Is there a way of setting it up in GScript somehow so there is a simple shortcut I could place on my homescreen to make sure it runs easily if this doesn't set it up permanently?
Thanks in advance!! Paul.
# hciconfig
hci0: Type: UART
BD Address: 00:22:A5:B8:AD:65 ACL MTU: 1021:4 SCO MTU: 180:4
UP RUNNING PSCAN
RX bytes:8672 acl:98 sco:0 events:285 errors:0
TX bytes:3336 acl:102 sco:0 commands:89 errors:0
# hcitool dev
Devices:
hci0 00:22:A5:B8:AD:65
# hcitool scan
Scanning ...
00:1D:4F:A7:9A:49 Apple Wireless Keyboard
00:22:43:C6:5B:B9 daydreamer-0
00:18:C5:42:18:78 Erin-Nokia N73
# hidd --connect 00:1D:4F:A7:9A:49
# hcitool con
Connections:
< ACL 00:1D:4F:A7:9A:49 handle 1 state 1 lm MASTER
Here's my thread on the topic
http://forum.xda-developers.com/showthread.php?t=629416
TheMathMan said:
...and the Terminal Emulator (which I notice doesn't accept numbers!?!).
Click to expand...
Click to collapse
That's a limitation of the basic Terminal Emulator with soft keyboards. Get a real terminal emulator--I use a ConnectBot local session, and it's also a great SSH client, but Better Terminal for Magic is also popular. I don't know if there's an N1-specific version of the latter.
Silent Mobius - is the only thing I need to do the hidd connect bit?
Where would I run that from? Do I need to be in the xbin folder or will it "just work" from anywhere?
PS...
I can get all the hciconfig and hcitool scripts to run fine but when I try running the hidd bit it says hidd "not found" despite it being in /system/xbin
Ideas?
OK... finally got hidd recognised by deleting the .bin extension.
Now the problem is I get this error:
Can't open HIDP control socket: Operation not permitted
Anyone?
You need root access. su
I have root access.
I have set GScript to run it as root.
I also tried in Terminal running it as su.
Neither worked. Do I need to change permissions on anything or what? I'm lost now!!!
hidd needs to be executable, owned by root (I prefer it to be suid, but that's just me) Read through the thread in Accessories, it's pretty much all there.
Also, if you don't know that "file not found" means "the file isn't there" you probably aren't ready to be messing with standalone daemons. This is _very_ raw hack, expect problems that you need to be able to debug.
E.G. If you'd looked up what each command did, you'd know that only the hidd line is needed, if a command has the filename xxx.bin then running xxx is not going to execute it, etc etc
If you are trying to portray an all-knowing condescending show off then you do it well.
I'm well aware of what it means when it says file not found. I had moved hidd into the correct folder. Nowhere had it said to delete the .bin extension.
I imagine people come here to experiment and try new things and learn about Android and hacking and the programming side. This takes time and practice and patience.
Your comments are just rude and unhelpful I'm afraid. If you don't want to be constructive, don't comment at all.
TheMathMan said:
If you are trying to portray an all-knowing condescending show off then you do it well.
I'm well aware of what it means when it says file not found. I had moved hidd into the correct folder. Nowhere had it said to delete the .bin extension.
I imagine people come here to experiment and try new things and learn about Android and hacking and the programming side. This takes time and practice and patience.
Your comments are just rude and unhelpful I'm afraid. If you don't want to be constructive, don't comment at all.
Click to expand...
Click to collapse
I agree completely, everyone is a begginer at one point and its not like you can do anything a nandroid restore can't fix.
Hey I was the one that posted the thread explaining what I'd done so that anyone else who hadn't seen the wonderful explanation by Miss Erin could see what could be achieved.
Please remember that this is a developers' board. It is not unfair to expect people to do a little research rather than clamour for an expansive blow by blow. A simple Google for hidd, hcitool and hciscan would have told you a lot.
Pointing out that failing to make the connection between a commands' name and the execution of that command may indicate that you have some pretty basic stuff yet to learn isn't rude nor unfair.
And posting error messages expecting others to correct you without any indication of the will to research doesn't look good, neither does all caps "HELP" nor gratuitous exclamation points!!!
TheMathMan said:
If you are trying to portray an all-knowing condescending show off then you do it well.
I'm well aware of what it means when it says file not found. I had moved hidd into the correct folder. Nowhere had it said to delete the .bin extension.
I imagine people come here to experiment and try new things and learn about Android and hacking and the programming side. This takes time and practice and patience.
Your comments are just rude and unhelpful I'm afraid. If you don't want to be constructive, don't comment at all.
Click to expand...
Click to collapse
Apparently, others disagree but I don't think his comments were rude. I think he was trying to help you prevent getting in over your head. If you don't understand enough to call a binary that you just copied to your phone I would back up and read some basic Linux/Unix books.
I am also a noob to Android also but not to Linux/Unix. Seriously, though as people who come and read this and understand what's going on I think they'll agree he wasn't being rude. We're just trying to make sure you know how to swim before you go and jump in the deep end.
Something else that needs to be said is that everything here is bleeding edge stuff. You really need to understand what you're doing and not just blindly typing commands. Otherwise I think you're going to be well on your way to a brick.
Moved to Q&A

Webtop Reloaded

SEE LATEST UPDATE AT THE BOTTOM OF POST.
After quite a bit of tinkering, I have finally gotten to a point where I have nice spartan webtop. It's sad that it doesn't come this way from the factory. I am dropping a few pics, and if there is enough interest, I can share some of the files and mods needed. I am no dev so, don't expect a pretty script you can run to make it one click, but it shouldn't be to hard to replicate. I am pretty much running a full lxde desktop with all of the appropriate hooks and dependencies to allow you to use it pretty "normally". All of the preferences apps, tools, panels work properly. The lxde menus are all intact as well.
I have not destroyed my system and rebuilt it from scratch, but the basics are pretty straight forward.
1. [webtop] webtop2sd 2.0.1
2. WebTopScripts - Fixing apt-get dependencies on WebTop
After you have completed those setups, you will need to modify your startup scripts like so:
WARNING DRAGONS AHEAD, TURN BACK IF YOU ARE NOT COMFORTABLE BREAKING STUFF!!
sudo apt-get install nano (it's just easier this way )
sudo nano -w /usr/local/bin/start-oshwt-1.sh
Bottom of start-oshwt-1.sh
# Cache Firefox files to improve startup times
#[ -x /usr/bin/firefox-readahead ] && /usr/bin/firefox-readahead &
# start OSHWT 1 scripts
update-font.sh
sfalv -w "webdaemon -d -n"
#gnome-settings-daemon **NOTE** Leave this uncommented if you want to keep webtop-panel
lxde-settings
#sfalv -i "xscreensaver"
#sfalv -i "aiw -d"
sfalv -i "docking_manager"
fcitx
webtop-smartfolder-monitor
webtop-refresh-bookmark
Click to expand...
Click to collapse
Press Ctrl+x and overwrite that file.
nano -w /usr/local/bin/start-oshwt-2.sh
Bottom of start0oshwt-s.sh
# start OSHWT 2 scripts
#sfalv -i "awn-autostart"
#sfalv -i "webtop-panel"
#sfalv -i "webtop-wallpaper"
sfalv -i "lxpanel"
sfalv -i "pcmanfm"
sfalv -i "evbridge"
sfalv -i "window_switcher"
sr-test avahi_start &
Click to expand...
Click to collapse
Ctrl+x and overwrite
What we are basically doing is stopping startup of all non-essential services, and the lxde+gnome soup that Motorola used, and reverting to all ldxe pieces. You should be able to customize you panel, icons, and desktop by just right-clicking as you normally would in lxde. All of the existing icons from awn should still show up in the lxde menu. It's so simple , once I got it all working, that I am not sure why Motorola choose to slap all the random gui stuff together.
Getting the window manager to behave was a little trickier, the theme is hard to get changed and I don't remember which setting worked. I will have to revert to find the right process. I also wanted to nuke the desktop compositing, but it looks like it is baked in somewhere, and I was never able to completely disable it.
Updates 2011/1/16:
I personally hate the default window decoration. I choose to switch to Metabox
Window Decoration
Change the default window decoration:
Edit /osh/etc/gconf/gconf.
Find the section name="metacity"
Change the <stringvalue>webtop-theme</stringvalue> to something like Metabox
Click to expand...
Click to collapse
XFCE4 Notes
In order to get a fully functioning xfce4 session, you need to use the following settings...For bonus points, running xfwm4 seems to disable compositing as well, so there is a gconf flag I can probably find to turn it off by default later.
--start-oshwt-1.sh--
gnome-settings-daemon
--start-oshwt-2.sh--
sfalv -i "xfce4-panel"
sfalv -i "xfwm4 --replace"
#NOTE: The --replace tells linux to replace the active WM after it is started, there is a cludge of scripts that startup lxsession and call the default window managers that I am still untangling.
Click to expand...
Click to collapse
Disable desktop compositing (shadows)
To disable compositing run this from lxterminal:
gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool false
Click to expand...
Click to collapse
Why does switching themes not work?
I ran across the primary reason that theme switchers are broken. Motorola did something really silly and hardcoded gtk to include the gtkrc of the webtop theme by default.
Open /osh/etc/gtk-2.0/gtkrc and comment out the include line. Once you comment out this line, you can use normal theme tools to swap settings. The best tool is going to be gnome-appearance-properties. ENJOY!
Click to expand...
Click to collapse
Please do. Peace
MB860 - ROM junkie
berniesteven said:
Please do. Peace
MB860 - ROM junkie
Click to expand...
Click to collapse
+1
Does it work with 2.3.6?
I would be interested also, thanks.
Nice looking peace of work man!
Yea, please share this! Looks a lot better than what I'm running! +1
Please share. It seems very interesting.
Yes! Yes!
Beer Money may be available if your of age!!!
I can help you make a nice script if you pm me
sent from my AL60R!THM Atrix
My first post and so worth it lol. Please share would be much appreciated ...
Shouldn't be to difficult to reconstruct. I have consolidated most of it to the startup scripts and used pieces that should already be present.
Dude this is nice. I was looking to get LXDE running on my webtop, but it is already on there.
This is quick and easy just edit the 2 files and you have LXDE running without having to use Synaptic to add anything.
I want to put iOs on my webtop or windows
This is really slick. the only problem I have right now is that awn manager can't save the config file & I had to start aiw from lxterm
ycavan said:
This is really slick. the only problem I have right now is that awn manager can't save the config file & I had to start aiw from lxterm
Click to expand...
Click to collapse
If you are using my files, you aren't using awn anymore. lxpanel has it's own settings. Just right click on the panel and choose "Add/Remove Panel Items". You can add whatever icons/executables you want to the panel. I have icons for lxterm, firefox, ysclient and aiw on my dock.
blingmaster said:
Dude this is nice. I was looking to get LXDE running on my webtop, but it is already on there.
This is quick and easy just edit the 2 files and you have LXDE running without having to use Synaptic to add anything.
Click to expand...
Click to collapse
Yup, the main reason I used the other steps were to add programs I needed like tsclient for vnc and remote desktop connections. I have profiles for all of my windows and linux servers, so the laptop running fullscreen rdp is actually very very very productive. I use virtual servers I rent with linux and windows via rdp on the web, and I have all of my heavy-lifting tools on-call 24/7.
ssmr2t said:
I want to put iOs on my webtop or windows
Click to expand...
Click to collapse
Remote Desktop FtW...
But how is this dev ? Its like theming webtop really .......
helfrez said:
I also wanted to nuke the desktop compositing, but it looks like it is baked in somewhere, and I was never able to completely disable it.
Click to expand...
Click to collapse
dude if you can make that happen you will be my personal hero for at least a week =D
dicksteele said:
But how is this dev ? Its like theming webtop really .......
Click to expand...
Click to collapse
i agree it's not exactly dev, but it's hard to fit this into the other categories.. i know i probably come off like i'm defending my own theme switching thread, but eh. this seems like the best place for this stuff. maybe we need a webtop specific forum?
Post about a separate subforum here http://forum.xda-developers.com/showthread.php?t=976354
We really need one place to collaborate on things. Either one main one or a separate one on each device subcategory that supports webtop.

Create, Edit & Install A Custom Watch Face for the Gear 2 Neo

This is not a full blown, how to program tutorial. It's a simple "Getting started with Tizen SDK for Wearables"
First, you will need to Download and Install the Tizen SDK for Wearables.
Once installed, Start the Tizen IDE.
We need to make a quick emulator to emulate our Gear 2 Neo.
On the lower left panel, the Connection Explorer, click on the first icon to start the Emulator Manager.
Click "Add New".
Choose a Name in the Detail panel, ie 'Gear2Neo'
Change the 'Density' to 278. Leave the rest of the settings default.
Click [Confirm]
Give it a moment to create your emulator.
Now your Gear 2 Neo emulator has been created.
Start your emulator by clicking the blue 'Play/Run' button at the bottom of your newly created emulator.
You can minimize the Connection Explorer now.
Once the emulator starts, you can choose to right click on it, and click "Always on top"
Next, Maximize the Tizen IDE.
Let's start playing with a sample project.
Click File > New > Tizen Wearable Web Project.
In the new window, click Sample > Web App > ClockWidget > and choose a Project name (ie. MyWatchFace)
You will now be back to the Tizen IDE and you will have a project (MyWatchFace?) in the Project Explorer.
Double click on the name of the project and you will see the project files.
You can edit these with custom images and code or you can just test the stock project.
At the top of the Tizen IDE, click on the green Play/Run button. This will install and start the project on the emulator. It will also build a file in your Project Explorer named the same as your project, but ending with a .wgt extention. In this case, MyWatchFace.wgt. This file can be pushed directly to your Gear 2 via USB using SDB.
At this point you should have a pretty plain and simple black watchface on your emulator thanks to the sample we just built, but let's add a custom background.
Make a custom 320x320 pixel image to use as a background with photoshop, gimp, etc. I'll name mine 'mywatchface.jpg'. Now paste it into your Project Explorer.
While you are in the Project Explorer, double click on the css folder.
Next, double click on the style.css to open that style file.
Locate the background: #000 line and replace it with this line.. background: url(../mywatchface.jpg);
Click the Save icon to save the style.css.
Click the green Play/Run button to install and build the new version.
If you don't see the new watch face load immediately on the emulator, you may need to go into settings on the emulator and select the new watch face.
Now that we have played with the ClockWidget sample and edited the css to add a custom background, we can play around with java coding and more down the road, but let's put this watch face onto our Gear 2 Neo.
You will need to copy the MyWatchFace.wgt file that was built in the Project Explorer into the same directory that your SDB.exe is located... (ie. C:\Tizen\tizen-wearable-sdk\tools)
It's easier if you make sure that the emulator is no longer running.
Turn on USB Debugging (Settings/Gear Info) and then plug your watch into your PC/Laptop via USB.
If you have issues with your computer detecting your watch, you may need to install the Samsung USB drivers for your watch.
Start a CMD Prompt
Switch to the directory with the SDB.exe and MyWatchFace.wgt
Run a simple test to see if the watch is being seen..
Type: sdb devices
If you get an error, something is wrong. You should see "List of devices attached" and one should be a series of numbers and letters and display as "SM-R381"
Now that you know the device can be seen, you can push your watch face to the Gear 2 Neo.
Type: sdb install MyWatchFace.wgt
You will see text scroll by and then it will indicate that it is done. You should now have a new watch face on your watch!!
To manually uninstall the watch face, you will need to look at in your Project Explorer, Open the config.xml and click the Source tab at the bottom to locate the package id for this app.. In my case, it's package="rlfNgozRkA"
Type: sdb uninstall rlfNgozRkA
Now have fun. Share your experiences, ask questions.. and most of all.. Share your custom watch faces here for everyone. As a community we can all help each other learn how to program for our Tizen wearables.
<- Please click Thank You!
Breach said:
This is not a full blown, how to program tutorial. It's a simple "Getting started with Tizen SDK for Wearables"//cut//Thank You!
Click to expand...
Click to collapse
Thank you for this .. . it is a great way for us to start!
I actually would like to make a 24 hour analogue watch face --something like military time or international time, but to start off this will be very helpful!
I noticed when I DL the Tizen SDK, I thought it asked me to install Java --how much of that do I need to install (there seem to be several Java options for my Windows 7 64bit system! Or, can I skip that?
sorry to bug you with such a basic question, but I am trying to get it right step-by-step! :good:
Awesome, Thanks for taking the time to make this :victory:
markbc01 said:
Thank you for this .. . it is a great way for us to start!
I actually would like to make a 24 hour analogue watch face --something like military time or international time, but to start off this will be very helpful!
I noticed when I DL the Tizen SDK, I thought it asked me to install Java --how much of that do I need to install (there seem to be several Java options for my Windows 7 64bit system! Or, can I skip that?
sorry to bug you with such a basic question, but I am trying to get it right step-by-step! :good:
Click to expand...
Click to collapse
I already had Java JDK installed, but you can grab it here if you need it...
http://www.oracle.com/technetwork/java/javase/downloads/jdk-7-netbeans-download-432126.html
Once installed, you will probably want to put it into your Environmental Variables.. Just right click on the "This PC" icon on your desktop. Then click 'Properties' and then 'Advanced System Settings', then click the [Enviromental Variables] button. Scroll down until you find PATH. It should have a several paths, add the following to the beginning... C:\Program Files\Java\jdk1.7.0_51\bin; (Note that this path will depend on where you installed the Java JDK and the version)
You can save it. To test it.. Open a CMD Prompt and type javac and if you get an error, something didn't work.
neonfreak20 said:
Awesome, Thanks for taking the time to make this :victory:
Click to expand...
Click to collapse
It was my pleasure. I am learning too.. but I figured I would share what I learn so that we can all learn together..
.
.
thank you soo much for this , had this installed for a while now been playing around a bit but this has been so helpful.
only problem I have is my background image isn't showing up ,
I have background: url(../mywatchface.jpg); set in the style.css and pasted "mywatchface.jpg" into "mywwatchface" project but when I set the above and hit save then the green start, it loads however the watch emulator that is open doesn't change , and I have no errors in the problems box.
ex-28 said:
thank you soo much for this , had this installed for a while now been playing around a bit but this has been so helpful.
only problem I have is my background image isn't showing up ,
I have background: url(../mywatchface.jpg); set in the style.css and pasted "mywatchface.jpg" into "mywwatchface" project but when I set the above and hit save then the green start, it loads however the watch emulator that is open doesn't change , and I have no errors in the problems box.
Click to expand...
Click to collapse
I was having this issue also, and it may not be the answer to your issue but to the right of the play button (to run it on the emulator), there is a dropdown. Make sure you select the one you want to run. By default, mine kept running the same one.
thanks for the reply but I wonder if this has something to do with it .
when the emulator opends , I get an error see screen shot.
compositor warning your screen does not support OpenGL.
Falling back to software engine.
when I click ok I get the watch face but still no background under the play button menue its set to mywatchface
im running windows 7 Enterprise 32 bit.
trying to good it but all I can come up with is for Linux users.
ex-28 said:
thank you soo much for this , had this installed for a while now been playing around a bit but this has been so helpful.
only problem I have is my background image isn't showing up ,
I have background: url(../mywatchface.jpg); set in the style.css and pasted "mywatchface.jpg" into "mywwatchface" project but when I set the above and hit save then the green start, it loads however the watch emulator that is open doesn't change , and I have no errors in the problems box.
Click to expand...
Click to collapse
Is the image the proper size (320 x 320)? Are you sure you saved it as a jpg? (If you save as a png or something else, you will need to edit the background url.) Are you sure the mywatchface.jpg is in the root of your project and not in the css or js folder? Are you sure there is no typo in your style.css?
I noticed that in your comment, there is a typo in your project name. Is there a typo in your project name or only in your comment above?
Breach said:
Is the image the proper size (320 x 320)? Are you sure you saved it as a jpg? (If you save as a png or something else, you will need to edit the background url.) Are you sure the mywatchface.jpg is in the root of your project and not in the css or js folder? Are you sure there is no typo in your style.css?
I noticed that in your comment, there is a typo in your project name. Is there a typo in your project name or only in your comment above?
Click to expand...
Click to collapse
type only in comment as far as I see. and I belive the image is in the correct folder.
mywatchface.jpg looking at it it was at 320x240 changed it now to 320x320.
testing in a second here
yup same results wont load the background I just see the black background with a white digital watch and the date under it as in screenshot.
sorry I attached screenshot now forgot it.
ex-28 said:
type only in comment as far as I see. and I belive the image is in the correct folder.
mywatchface.jpg looking at it it was at 320x240 changed it now to 320x320.
testing in a second here
yup same results wont load the background I just see the black background with a white digital watch and the date under it as in screenshot.
sorry I attached screenshot now forgot it.
Click to expand...
Click to collapse
What are the settings in your emulator?
ex-28 said:
thank you soo much for this , had this installed for a while now been playing around a bit but this has been so helpful.
Click to expand...
Click to collapse
What version of the Tizen for Wearables IDE are you running? Version : 1.0.0b1 ?
Breach said:
What are the settings in your emulator?
Click to expand...
Click to collapse
just clock and display
helps if I select the watch face I guess.,. lol now I get it , thank you soo much
Breach said:
What are the settings in your emulator?
What version of the Tizen for Wearables IDE are you running? Version : 1.0.0b1 ?
Click to expand...
Click to collapse
running
Version : 1.0.0b2
Build id : 20140411-1449
ex-28 said:
helps if I select the watch face I guess.,. lol now I get it , thank you soo much
Click to expand...
Click to collapse
Glad we got it sorted out. Enjoy.. After you get it tweaked the way you like, give it a custom name and feel free to share your watchface.wgt here for everyone to try out.
Breach said:
Glad we got it sorted out. Enjoy.. After you get it tweaked the way you like, give it a custom name and feel free to share your watchface.wgt here for everyone to try out.
Click to expand...
Click to collapse
maybe add that to the op that once you make the changes you have to go into settings on the emulator and select the new watch face , lol , I just had a brain fart moment there. but totally forgot and maybe helpful for new users
ex-28 said:
maybe add that to the op that once you make the changes you have to go into settings on the emulator and select the new watch face , lol , I just had a brain fart moment there. but totally forgot and maybe helpful for new users
Click to expand...
Click to collapse
Done.
only problem I had I was getting an error so I deleated my project compleatlly and started over , but its still throwing the same error.
when I click on the green Play/Run button to start the project under problems window I have Description Resource Path Location Type
Expected '===' and instead saw '=='. main.js /MyWatchFace/js line 135 JavaScript Problem
it highlights this if (e.keyName == 'back') {
removed and restarted it again and same thing. any ideas ?
this is happening before I make any changes to any files , and just following the steps in op
Here are a couple very basic animated analog watch faces as samples..
.
them are nice ! iris pulse looks good
Q is there anyway to have shortcuts at the bottom on an analog clock ? just wondering if possible.
and when we pop a .wgt into the tools folder and install it via cmd , how do you uninstall it ? as theres no package id in the sdk anymore
ex-28 said:
only problem I had I was getting an error so I deleated my project compleatlly and started over , but its still throwing the same error.
when I click on the green Play/Run button to start the project under problems window I have Description Resource Path Location Type
Expected '===' and instead saw '=='. main.js /MyWatchFace/js line 135 JavaScript Problem
it highlights this if (e.keyName == 'back') {
removed and restarted it again and same thing. any ideas ?
this is happening before I make any changes to any files , and just following the steps in op
Click to expand...
Click to collapse
That makes no sense, first because there was no change made to the main.js, and secondly because that is the eventListener and it should be '==' and not '==='

Categories

Resources