maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Camera toggle (enable/disable camera) (https://talk.maemo.org/showthread.php?t=63462)

MohammadAG 2010-10-06 21:18

[Announce] Camera toggle (enable/disable camera)
 
As requested here: http://talk.maemo.org/showthread.php?t=63033

At first, I was going to make a script which unloads the module, forcing a module unload isn't possible (at least to my knowledge), and it might require a reboot, so I opted for a replacement window, you can use AppLocker to hide shortcuts related to other camera apps (such as fcamera), however, I'd say one window is enough to convince the guys at uni :)

http://i56.tinypic.com/2mnrscn.jpg

This is a script coupled with a GTK window, when the script is run, it:
  • Renames camera-ui in /usr/bin to camera-ui.disabled.
  • Disables the XSession startup scripts for the camera UI.
  • Copies a binary so a window with a message is displayed.
  • Kills the camera-ui daemon, so you don't have to reboot between toggles.

To use the script, run togglecamera --enable (or -e), or --disable (-d) in terminal.
Code:

Usage: togglecamera [OPTIONS]

Options:
    --enable, -e        Enable camera.
    --disable, -d        Disable camera.
    --status, -s        Check status.
    --help, -h            Show this help message.

This should be enough to fool schools and universities, at least it worked for me :p

Package uploaded to -devel, should be there in about 15 minutes.

WhiteWolf 2010-10-07 20:12

Re: [Announce] Camera toggle (enable/disable camera)
 
Thanks! As always make a difference.

Mentalist Traceur 2010-10-07 20:22

Re: [Announce] Camera toggle (enable/disable camera)
 
You. Are. Awesome. I don't even need this where I live, but nevertheless, the amount of good you bring to the Maemo 5 ecosystem is ridiculous. Whenever you end up moving on will be a sad day for the community indeed.

MohammadAG 2010-10-08 00:28

Re: [Announce] Camera toggle (enable/disable camera)
 
I really don't plan on leaving anytime soon :p

TiagoTiago 2010-10-08 03:07

Re: [Announce] Camera toggle (enable/disable camera)
 
seems you shouldn't enable it before having disabled it, on the original thread some guy ended up with reboot loop for doing it :(

warhawk007 2010-10-08 03:40

Re: [Announce] Camera toggle (enable/disable camera)
 
I get the dialog in a window. In the screenshot, it appears in the usual yellow box. How?


All times are GMT. The time now is 16:45.

vBulletin® Version 3.8.8