![]() |
WANTED: Tiny window-opener
Hey programmer-types,
I wrote a tiny Python app to open a window and put some text in it. But because it is in Python, I need to depend on Python for my package, which otherwise wouldn't have any dependencies. Could someone write a small compiled program (in C or something) that uses the stock libraries to do the same thing? Here's the Python code. I mostly ripped it off from the Maemo Python tutorial. It should be very obvious what I want, and I can't imagine it is difficult for any C programmer to whip something up. Code:
#!/usr/bin/env python2.5 |
Re: WANTED: Tiny window-opener
There are a couple of threads on here for "zenity" and "gxmessage" which may be what you want.
|
Re: WANTED: Tiny window-opener
You can try with Vala too.
|
Re: WANTED: Tiny window-opener
Thanks for your suggestions.
I am familiar with gxmessage and Zenity. I don't want a dialog box, I want a window. I also want no dependencies. As I asked in the first post, I would like someone to post (or PM me) a dependency-free, compiled file that does what the python script does, please. I don't care what language it is written in originally. I don't need the source, either. |
Re: WANTED: Tiny window-opener
Do you want to run it from the menu?
|
Re: WANTED: Tiny window-opener
I want to run it as part of a script that is run from the menu.
If you want more context: I need a host window for the Xephyr nested x-server. This host window supplies the panel icon and task menu entry for Xephyr, which doesn't have such things in Hildon. If you've tried my easy chroot package, you see this window before IceWM starts. EDIT: Here's a screenshot of what the Python script does: Running the following: Code:
/usr/bin/openhostwin.py IceWM "Please log out of IceWM before closing this window."http://farm4.static.flickr.com/3241/...4b67c8b2_o.png |
Re: WANTED: Tiny window-opener
It would really be cool if the program could be linked to an arbitrary png file (say, "hostwin.png") that would show in the left-hand task bar and on the task chooser menu, and that I could modify.
I'm willing to discuss payment via PayPal. I was the recipient of some donations, I should pass on the joy. |
Re: WANTED: Tiny window-opener
I almost done it 2 hours ago, but had to go out :)
|
Re: WANTED: Tiny window-opener
http://bundyo.org/maemo/hostwin.bz2
Is this okay? Btw, if you run it from the menu, i'm registering it with osso_initialize, so i guess it will show you the icon. Or maybe i can do it so you can pass a script to run as third parameter? |
Re: WANTED: Tiny window-opener
Perfect! That does what my Python script does, but faster. That is just what I asked for!
Enhancement talk: So if I made a dbus service entry for it, that would add more integration? The only way I could run it from the menu would be if I could pass a script name that this app could run after opening the window... |
Re: WANTED: Tiny window-opener
You can run it from the menu as a service with the name you give it as a first parameter, that's what i'm initializing it with.
I like your signature :) |
Re: WANTED: Tiny window-opener
I made a new file, /usr/share/dbus-1/services/org.maemobox.bundyo.hostwin.service:
Code:
[D-BUS Service]I think the absolute best enhancement you could give me is the ability to run a shell script from within the program. When the shell script returns, the window closes and your program quits. The second best enhancement would be the ability to have a custom icon associated to the window. But if you do nothing else, you have helped me immensely! |
Re: WANTED: Tiny window-opener
It wouldn't complain about osso_initialize whenever you give at least one parameter. I'll add the other features whenever my wife gets up and stops Skyping ;)
|
Re: WANTED: Tiny window-opener
Redownload the archive - now takes third parameter - a path to start, waits for it to die, then closes. I'm setting an icon with the /usr/share/pixmaps/[first parameter].png, but i think maemo doesn't obey that and instead sets it from the .desktop file. Check older posts for info.
|
Re: WANTED: Tiny window-opener
Wow! That is marvellous! Icon works, script executes fast, window closes automatically...
The window text no longer displays, but everything is so fast now, I barely miss it ;) |
Re: WANTED: Tiny window-opener
That's because I'm calling the script before showing the text and its synchronous, so the text shows after closing your script and before closing the program. :) For a very short time.
EDIT: Never wrote a GTK+ application before, if someone cares to give me a hint which signal i should bind to in order to detect that the text is shown, please be welcome :) |
Re: WANTED: Tiny window-opener
Bundyo, could you please make one more change for me?
Either have the text show as soon as the window opens, and before the script is run (that's what I really want), or remove the text parameter, since it doesn't show anyway. |
Re: WANTED: Tiny window-opener
http://bundyo.org/maemo/hostwin_2params.bz2
If i find a way to show the label, I'll make another one. |
Re: WANTED: Tiny window-opener
I'll have to call the next version of Easy Debian the "Bundyo Build" in your honour. ;-)
|
Re: WANTED: Tiny window-opener
Heh, no need :)
|
Re: WANTED: Tiny window-opener
OK, I'm just a little unsure on how to apply this; I should edit /usr/share/applications/hildon/debwm.desktop and change the
Code:
Exec=/usr/bin/debwm IceWM xpiceI need to write a script that does Code:
sudo debian xpiceIs that all? |
Re: WANTED: Tiny window-opener
edit /usr/bin/debwm and change the line that says
openhostwin.py $1 & to use your hostwin $1 & i think... |
Re: WANTED: Tiny window-opener
Quote:
Code:
Exec=/usr/bin/hostwin IceWM 'sudo debian xpice' |
Re: WANTED: Tiny window-opener
Bundyo, could your "hostwin" app be GPL? If so, could I have the source, so I can include it in my package? I'm trying to assemble a package that can be uploaded to Extras.
|
Re: WANTED: Tiny window-opener
Yeah, but it doesn't have a Makefile :)
Anyway, Jaffa's mud-builder should support Vala builds, so you can actually build your whole deb from waf (not sure if he supports it) - i can give you a newer wscript for it which can autocreate a deb. P.S. I never tried it though, but i'll have to very soon. Tear approaches 0.2... |
Re: WANTED: Tiny window-opener
...getting closer and closer to just calling my package "non-free" even though it is composed entirely of free components...
(no idea what you're talking about with Vala, etc) |
Re: WANTED: Tiny window-opener
Yes, that's the easy way out :)
|
Re: WANTED: Tiny window-opener
The great thing about having it built from source, though, is that when each upgrade comes out (e.g. Maemo 4.2), it should simply be remade automatically from source for any new dependencies. It does look like a major headache for this sort of project, but it's not hopeless. :)
(Ulterior motive: Tried twice, and I still haven't been able to build hostwin; hopefully when you've got it capable of going through the autobuilder, I'll be able to see what I'm doing wrong. :p See, I had an evil scheme to swallow rdesktop in a scrollbar-augmented hostwin mutant, and not being able to build a purebred hostwin really interferes with that.) |
Re: WANTED: Tiny window-opener
Qole, some time before i posted the source for Benson, probably you didn't see it:
http://www.internettablettalk.com/fo...&postcount=122 (Removed the X.VAPI dependencies, included the file anyway) If you want a WAF that can build a deb for it, just tell me. |
Re: WANTED: Tiny window-opener
I just want to upload my easy debian package to the extras repository. It is turning out to be very difficult. Any help would be appreciated.
|
Re: WANTED: Tiny window-opener
I can't offer any help for now, since i didn't test Jaffa's mud-builder, maybe he can chime in here? :)
|
Re: WANTED: Tiny window-opener
Maybe better to chime in over here.
|
Re: WANTED: Tiny window-opener
So, I would like someone to make me a Fremantle version of this.
I need a Fremantle window that is fullscreen but has a way to get to the dashboard (the task manager). Is the transparent fullscreen icon in the lower right that I see in the fullscreen browser window a special browser feature, or is that a feature of the window itself? I suspect that this will be problematic. I want to put a Xephyr window inside this window, and anything that I run inside that window will take over the input, so there's no way to get out of that screen. In Maemo 4 and below, you could hit the task switcher key and get the menu, but in Fremantle you can't do that anymore. So I need some way to first get out of fullscreen mode and then I can switch windows, or some way to switch windows when in the secondary window manager... |
Re: WANTED: Tiny window-opener
Quote:
|
Re: WANTED: Tiny window-opener
Quote:
Quote:
|
| All times are GMT. The time now is 22:09. |
vBulletin® Version 3.8.8