This tutorial will show you how you can use your webcam feed as your wallpaper (For people who constantly need to look at themselves).
This will NOT make you lose the functionality of icons, conkys, screenlets, or docks.
From this_To This!
*If you are clever enough and have time to do some tinkering, jdong pointed out that you could use this same idea to create a transparent display effect*
1. Check Requirements:
This will only work with Compiz-Fusion enabled as your Window Manager. Click Here for installation instructions.
NOTE: This won't require any special settings in CompizConfig Settings Manager.
This will also require Mplayer being installed. Click Here for installation instructions.
This also requires an already working webcam.
2. Download Xwinwrap.
Installation Option 1
Open Accessories>Terminal
Enter the following codes:
Code:
sudo apt-get install build-essential libx11-dev x11proto-xext-dev libxrender-dev libxext-dev cvs
Code:
cvs -d :pserver:anoncvs@cvs.freedesktop.org:/cvs/xapps co xwinwrap
Code:
sudo cp xwinwrap /usr/bin
Installation Option 2
Go to this URL.
http://www.getdeb.net/app/xwinwrap
Select the option that fits your system.
Click Download Xwinwrap
A download popup should appear.
Select the option
Open with GDebi Package Installer (default)
Click OK
The rest of the installation is automated.[/quote]
You have now successfully installed Xwinwrap.
3. Test it out.
In Terminal
Code:
xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf -- mplayer -wid WID -quiet -fps 15 tv://
If you want a Mirror effect add this to the end of the line aboveNOTICE: When you close the terminal window it will stop Xwinwrap.
4. Create an easy way to start/stop this effect.
In Teminal Paste this in your text editor
Code:
#!/bin/sh
# click to start, click to stop
if pidof xwinwrap ; then
killall xwinwrap
else
exec xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf -- mplayer -wid WID -quiet -fps 15 tv://
fi
NOTE: If you want the Mirror effect, after "tv://" , on the same line add:Save and close.
You now need to make the script executable.
In Terminal
Code:
sudo chmod a+x toggle
5. Create A Launcher:
Right Click on either the desktop or on your panel.
For Desktop select (create Launcher)
For Panel select (click Add To Panel)+(Custom Application Launcher)
For Name input anything.
For Command input You can leave the comment section blank.
Click Ok.
You're done!
-----------------------------------------------------
Dissecting the Xwinwrap code.
Code:
xwinwrap -ni -o 0.20 -fs -s -sp -st -b -nf -- mplayer -wid WID -quiet -fps 15 tv://
-ni means No Input
-o 0.20 is the Opacity setting from 0 to 1
-fs means FullScreen
-s means Sticky(its on all workspaces)
-sp means Skip Pager (window won't appear in pager)
-st means Skip Taskbar (window won't appear in taskbar)
-b means Below
-nf means No Focus
-wid creates a window id
--mplayer means mplayer
-fps 15 means 15 Frames Per Second
tv:// tells mplayer to use the default video input device.
-vf mirror means video filter Mirror.
Feel free to change any of these if you want it to act differently.
More filters and effects can be found by opening Terminal and typing
-----------------------------------------------------
Problems you may run into.
If you have another video input device hooked up to your computer you have to tell mplayer which one to use. The tv:// command alone selects the default device. Ace214 pointed out that you would have to use
Code:
-tv device=/dev/video1
*change the path to where the webcam device is located if not /dev/video1*
Other programs can't use the webcam simultaneously. I suggest turning Off the program before you use other programs.
Suspend-To-Ram won't work while your webcam is on. I suggest turning Off the program when you don't want it in use. You could also add the line killall xwinwrap to /etc/acpi/sleep.sh Which would kill the process before suspending to ram. You can also add the line killall xwinwrap to /etc/acip/hibernate.sh if you have problems suspending to the hard drive.
This apparently only works using the X11 driver in Mplayer. Other drivers tend to not be capable for handling due to the lack of indirect rendering on some Intel cards.
Got to give credit to The Warlock, gaminggeek, Valdi, and cammin for pointing out problems
-----------------------------------------------------
(For more info on Xwinwrap click Here or Here)
Credit for the original idea Here and Here
Bookmarks