Very simple:
# setxkbmap
My Personal Website
Very simple:
# setxkbmap
Hey,
If you want to try different Operating Systems before actually committing to a complete switch, you might have come across Virtual Machines. A Virtual Machine is essentially an emulated computer system inside your running Operating System.
As far as I know, there are two major virtual machine products on the market:
VMWare Player is free and there are versions for Windows and Linux available for download. There are also some ‘applications’ – pre-build virtual machines available for download…
However, you will discover that there is a small hurdle to overcome: You can’t create your own machine and if you do want to run Microsiff operating systems, you need to create your own appliance. This is where this site: EasyVMX is coming in handy. Simply fill in the information and download the empty virtual machine. This you will then be able to use to install your favourite operating system…
One last step:
Once you installed the Operating system, you will need the VMWare Tools to connect your Virtual Machine to your regular Operating System to allow things like file sharing… Again, these do not ship with VMWare Player. You will need to download server or workstation’s LINUX version.
In the tar-ball are the tools… Have a look for any additional *.iso files. Normally the name gives them away ‘Linux.iso’, ‘WinXP.iso’… something like that.
Either mount the iso in your virtual machine as a CD or you burn it and actually put in the CD…
If you do want to use an ISO as a Disk in your virtual machine, this can be very easily achieved with these settings in the *vmx file:
# Settings for physical CDROM drive:
ide1:0.present = “TRUE”
ide1:0.deviceType = “cdrom-raw”
ide1:0.startConnected = “TRUE”
ide1:0.fileName = “auto detect”
ide1:0.autodetect = “TRUE”
# Settings for iso as CD:
ide1:0.present = “TRUE”
ide1:0.fileName = “office.iso”
ide1:0.deviceType = “cdrom-image”
ide1:0.autodetect = “TRUE”
Have fun with your new virtual machine and let me know if you found this post useful…
Hi,
It often happens to me that I get sent a video and it turns out to be unnecessarily huge. I think nowadays people record videos with a digital camera or an older camcorder – but this isn’t really important…
If you use Windoze, there are probably hundreds of programmes that you could use to re-encode videos, provided you pay a license fee or steal the software. Linux however this comes free for all of us and it’s fairly easy to do from the trusty shell (console, prompt…). In addition you will find that you can change aspect ratio, frame rates and do other processing functions easily using MPlayer. In addition, MPlayer crosscodes nearly all media files, certainly most I have ever come across…
The prerequisit is that you get MPlayer and their codec-pack installed. You can find that here: http://www.mplayerhq.hu/. If you use ubuntu, you should be able to do something like:
sudo apt-get MPlayer
to install the player using the package manager.
Let me know if there is need for more detailed instructions on how to install MPlayer…
There are different codecs for re-encoding for both audio and video. It’s also not always possible to convert the audio part of a file into something much better – and why would you, it’s not going to sound better!
Next, we need the massive video file that we’d like to shrink. Simply navigate to the folder it is in. To encode with standard settings, using the liblav codec (for DivX), try this command:
mencoder -ovc lavc inputFile -oac mp3lame -o outputFile
This will re-encode the file, but this mightn’t be using the best settings for your needs, so I’m going to intruduce a few more features:
Need to fix a broken index in your video file:
mencoder -idx input.avi -ovc copy -oac copy -o output.avi
Want to merge a few media files? This is for you (be sure that they are the same format etc…):
cat 1.avi 2.avi | mencoder -noidx -ovc copy -oac copy -o output.avi
Here’s a simple command that converts an MPG file to AVI format:
mencoder file.mpg -o file.avi -ovc lavc -oac lavc
-ovc and -oac represent the options for the video and audio codecs that mencoder will use. To find out what video codecs are installed on your system, use mencoder -ovc help and mencoder -oac help.
Suppose you need a file with no compression on the audio part and decide to use PCM. You can specify the type of audio codec you want by using the acodec option:
mencoder file.mpg -o file.avi -ovc lavc -oac lavc -lavcopts acodec=pcm
When it comes to MP3 compression, you can also choose a bitrate using abitrate:
mencoder file.mpg -o file.avi -ovc lavc -oac lavc -lavcopts acodec=libmp3lame:abitrate=128
You can use lameopts if you have libmp3lame installed and want to add extra options to the encoding process. You can also create files with variable bit rate audio compression:
mencoder file -o file.avi -ovc lavc -oac mp3lame -lameopts vbr=2:q=3
where q can be any number between 0 and 9.
You can do the same thing with the video part of the file:
mencoder file.mpg -o file.avi -ovc lavc -oac lavc -lavcopts acodec=libmp3lame:abitrate=128 vcodec=xvid
If you don’t want to use video compression, try vcodec=copy. With that option, the frames will be copied one by one from the source file.
You can use xvid or divx directly, without going through lavc:
mencoder -ovc xvid -oac mp3lame -o destination.avi source.avi
If you need customized quality, you can add a few options to the XviD compression:
mencoder -ovc xvid -oac mp3lame -xvidencopts bitrate=878 -o destination.avi source.avi
The higher the bitrate, the better quality the video file will be. The downside is a larger file size.
Now let’s get fancy and make an XviD copy of a DVD using two passes. During the first pass, mencoder analyzes the content of the file; on the second pass mencoder encodes the new file based on the information obtained. By using two passes you can produce a better compressed file, but you’ll have to wait a little longer for it, and you’ll probably see CPU usage at 90% during the conversion:
mencoder dvd:// -oac mp3lame -ovc xvid -xvidencopts pass=1 -o /dev/null
mencoder dvd:// -oac mp3lame -ovc xvid -xvidencopts pass=2:bitrate=800 -o xvidfile.avi
You can use whatever bitrate option you want. If you need to squeeze a DVD into a 700MB XviD file, you could use the following command, which forces the file size of the resulting AVI to 700MB.:
mencoder dvd:// -ovc xvid -oac mp3lame -xvidencopts bitrate=-700000 -o file.avi
If you don’t like the CPU being used to the max and want to leave resources for launching other applications, use the nice option, which will run the program with the lowest priority when it comes to process scheduling:
nice -n 19 mencoder dvd:// -ovc xvid -oac mp3lame -xvidencopts bitrate=-700000 -o file.avi
Suppose you have a folder full of small video files of different types and would like to merge them into one big movie for easy watching. First, rename them so that they’re in the order you want them to appear in the final video, then use:
mencoder * -o output.avi
If you want to add a particular audio file to a movie, use:
mencoder source.avi -o destination.avi -ovc copy -oac mp3lame -audiofile file.wav (for uncompressed files)
mencoder source.avi -o destination.avi -ovc copy -oac copy -audiofile file.mp3 (for compressed files)
To convert a video file to run on a device running iPodLinux, use:
mencoder -ovc raw -ofps 15 -oac pcm -vf scale=176:-2,expand=176:132,format=bgr16 input.file -o output.avi
This produces a RAW AVI file with uncompressed audio data and scales it so it fits the Nano’s tiny screen perfectly.
I have a Pocket PC that I sometimes bring with me on business trips. I take a couple of movies I haven’t seen in a while and convert them to fit on a 512MB SD card:
mencoder -oac mp3lame -lameopts mode=3:preset=24 -ovc lavc -lavcopts vcodec=mpeg4:vhq:vbitrate=384:keyint=250 -vop expand=”320:240″ -o outputfile.avi inputfile.avi
or
mencoder input.avi -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=200:abitrate=48 -vop scale=320:240 -oac copy -o output.avi
The difference here is that the latter command scales the file and the former fills the PDA’s 320×240-pixel screen with the movie.
If you have a webcam and want to record the output, use:
mencoder tv:// -tv driver=v4l:device=/dev/video0:width=640:height=480:forceaudio -ovc lavc -oac lavc -lavcopts vcodec=mpeg4:acodec=mp3 -ffourcc divx -o test.avi
The command records anything output by /dev/video0 in 640×480 resolution, using DivX with MP3 audio as an output result.
As you can see, you can use mencoder to convert almost any type of video file in several ways. It works fast, it works well, and I wouldn’t change it for any other application, be it GUI-friendly or not.
Kindest Regards to Kivilcim Hindistan – from whom I ripped some parts of this tutorial…
Hi,
If you like music and you are lucky enough to live in a country where it is available, you should get an account with Spotify (www.spotify.com).
It contains a huge catalogue of music albums and samplers from most of the major record labels and I’m amazed how many -what I thought, would be- rare tunes can be found there.
If I find out how I can get my playlist published, I will try to do so here.
If you are anything like me, you will find it annoying that your hand sometimes brushes against the touchpad of your laptop and – bang – the mouse has moved, the courser is misplaced and you have to correct what you have just written on…
Normally switching off the touchpad on laptops is easy, there will be a hotkey, but in Linux you will find not all ACPI options are working well and properly – or at all.
But it can be quite simple switching the touchpad on and off.
We need one step of preperation:
Open your xorg.conf as root (in my distro):
# sudo gedit /etc/X11/xorg.conf
Somewhere there should be this section:
Section “InputDevice”
Identifier “Synaptics Touchpad”
Driver “synaptics”
Option “SendCoreEvents” “true”
Option “Device” “/dev/psaux”
Option “Protocol” “auto-dev”
Option “HorizEdgeScroll” “0”
Option “SHMConfig” “on”
EndSection
It is important that you have this in there:
Option “SHMConfig” “on”
If that’s done, save and exit.
Next you will need to restart your graphic interface (so xorg.conf get’s loaded again). Simply press CTRL + ALT + BACKSPACE
Great, that’s done – now you can do this (as root):
# synclient touchpadoff=1
to switch it off, and:
# synclient touchpadoff=0
to switch it back on…
Beginner Tip: You must use sudo when editing these files.
Such as:
gksudo gedit /etc/modules
Blackmagic’s solution:
Edit /etc/modules
gksudo gedit /etc/modules
Add these two lines onto the end:
-r usbhid
usbhid mousepoll=2
reboot.
Alternate solution that may work on Feisty (try the first one first):
Add
options usbhid mousepoll=2
on its own line at the end of /etc/modprobe.d/options
and then add
usbhid
on the end of /etc/modules
reboot
Alternate solution that may work on Edgy:
Add
options usbhid mousepoll=2
to /etc/modprobe.d/usbhid
and then add
usbhid
on its own line at the end of /etc/modules
reboot
aidanr’s alternate feisty solution
Create a file at /usr/local/bin/mymousesettings with the following inside:
#!/bin/bash
rmmod usbhid && modprobe usbhid mousepoll=2
or if you want to use lomoco (a program for changing the resolution on Logitech mice) you can use this instead:
(G5 and G7 mice don’t need lomoco because they are software-independant)
{
Install:
sudo apt-get install lomoco
lomoco’s Homepage: http://lomoco.linux-gamers.net/
#!/bin/bash
# -4 for 400 cpi, -8 for 800 cpi, -m for 1200 cpi, -h for 1600 cpi, -g for 2000 cpi
lomoco -h && rmmod usbhid && modprobe usbhid mousepoll=2
}
After doing either method enter the command
sudo visudo
and replace the line that says
%admin ALL=(ALL) ALL
with
%admin ALL=(ALL) ALL, NOPASSWD:/usr/local/bin/mymousesettings
Use Control + O and then hit enter to save and then use Control + X to exit.
Add that command to startup in System –> Preferences –> Sessions by clicking add and then adding
sudo sh /usr/local/bin/mymousesettings
as a new entry.
reboot
hanging the mouse polling?
I added
options usbhid mousepoll=2
to /etc/modprobe.d/usbhid
(using “sudo nano”)
and then I added
usbhid
on the end of /etc/modules
=)
$ cat /sys/module/usbhid/parameters/mousepoll
2
1 = 1000Hz
2 = 500Hz
4 = 250Hz
8 = 125Hz
10 = 100Hz (Default)
As a Linux lover, I’m always happy to find games that are a) free and b) cross-platform (that means my non-linux friends can also play with me…
The latest of such games is OpenArena, a 3D First Person Shooter based on the now openly available source code ID Tech 3 (which was Quake 3, lots of COD parts and many more). Aparently the creator of OpenArena took the liverty of also smoothing out some of the bugs of Q3 and the result is an unbelievably rocking experience.
But not enough: the existing mods for Quake 3 (baseq3, OSP, CPMA, …) are working on it too!
Because it’s free it’s still very much played online, I saw a lot of servers and will probably try to get my own dedicated server up in a few days…
The address will be posted here.
For all of you looking for a good online shooter, I can very much recommend OpenArena:
http://openarena.ws/
I came across an interesting dilema just now trying to install Office 2007.
Before actually starting to install the product the setup stalled with:
The windows installer service cannot update one or more protected windows files.
I was a little stunned, this is clean installed box. So I checked the Event Viewer:
Product: Microsoft Software Update for Web Folders (English) 12 -- Error 1933.
The Windows Installer service cannot update one or more protected Windows files. SFP Error: -536870654.
List of protected files:rnc:program filescommon filesmicrosoft sharedweb server extensions40binfp4autl.dll
Ah ok, this is a customised installation of windows (I’ll post how this happend later) and its looking for the frontpage extensions which (in this install) doesnt exist. So how to fix? Simple, download a copy of the missing file from DllDump, place it into the c:program filescommon filesmicrosoft sharedweb server extensions40bin folder and retry installation!
Hi everybody,
it’s a very quick how-to that will help you to solve the problem of those webcams who give back upside-down images/videos!!!
This help is intended only for those who have a UVC capable webcam.
But it will be usefull only if your webcam supports YUV image format and the applications that use your webcam request YUV format to your webcam!!! I’ve tested it and it works with:
skype, amsn, kopete, luvcview, mplayer!!
So…let’s start!!!!
In order to know if your webcam is UVC capable you just need to open your shell and run:
lsusb
you will get something like this:
Bus 002 Device 001: ID 0000:0000 Bus 001 Device 002: ID xxxx:yyyy “Your_Webcam_Model” Bus 001 Device 001: ID 0000:0000 |
Then type:
sudo lsusb -d xxxx:yyyy -v | grep "14 Video"
If you get something like the following, your webcam is UVC capable:
bFunctionClass 14 Video bInterfaceClass 14 Video bInterfaceClass 14 Video bInterfaceClass 14 Video |
If your webcam passes this test, you can go on reading. Otherwise, your camera needs to use propertary driver, because it doesn’t use standard protocol/command.
Well,
now you need to donwload the UVCVIDEO driver sources, but they are on a SVN repository, so you need to install the SVN client:
sudo apt-get install subversion
and now you can download the sources:
svn checkout svn://svn.berlios.de/linux-uvc/linux-uvc/trunk
The sources will be saved into a folder called “Trunk” in the path from where you run the previous command.
Next, you need to use a patch to update your clean uvcvideo driver. Please download this.
Then proceed..
patch < patch_solution1_mirrored.patch
Well, now the worst part has been done!!!
We just need to compile our modded file and to install the new driver, so from shell you have to go to the "Trunk" directory and type:
make
there shouldn't be errors!!
Then, ONLY if you are using one of the Ubuntu distributions (ubuntu, kubuntu, etc.), open with you editor the "Makefile" and change the following line:
INSTALL_MOD_DIR := usb/media
with
INSTALL_MOD_DIR := ubuntu/media/usbvideo
Now we just need to remove uvcvideo module (if you have previously installed it):
sudo modprobe -r uvcvideo
Then:
sudo make install
sudo modprobe uvcvideo
Now everything should work!!!
Let me know!!
PERMANENT FIX: The permanent fix is actually very simple. The problematic file is the General Settings file, “Adobe Photoshop CS2 Prefs.psp”, which references the default fonts Adobe expects to be installed. If for any reason these fonts, or any other files, are not installed or not functioning as expected, the application will terminate to the desktop. This settings file is located here:
In Wine:
/home/[USER PROFILE]/.wine/drive_c/windows/profiles/[USER PROFILE]/Application Data/Adobe/Photoshop/9.0/Adobe Photoshop CS2 Settings/Adobe Photoshop CS2 Prefs.psp
In Crossover Office:
/home/[USER PROFILE]/.cxoffice/[CS2 INSTALLATION BOTTLE NAME]/drive_c/windows/profiles/crossover/Application Data/Adobe/Photoshop/9.0/Adobe Photoshop CS2 Settings/Adobe Photoshop CS2 Prefs.psp
Naturally, replace [USER PROFILE] with the user name you are working under, and replace the CS2 INSTALLATION BOTTLE NAME with whatever you named the bottle you installed Photoshop CS2 under in Crossover.
Now, if you’ve encountered this error, you’ve already run CS2 twice, and the settings file has already been created and corrupted. Although deleting it will allow you to start CS2, it will again store a corrupted file when you exit the application, and next time you start the application, you’ll repeat the same fatal error as usual.
So, having located this file, perform the following steps:
(1) Rename or delete the corrupted file
(2) Start CS2. It should start just fine.
(3) IMMEDIATELY after it has started, change the permissions on the newly re-created settings file (Adobe Photoshop CS2 Prefs.psp) to READ ONLY. You can do this in your file browser, or, if you are at the command line, use the following command:
chmod -w ./Adobe Photoshop CS2 Prefs.psp