This evening, I double clicked an audio file in explorer, to play it. It's long filename resulted in the file extension running off the screen edge: I scanned the filename and icon and concluded it was a .mp3.
It wasn't. It was a compressed executable which promptly ran and infested my machine, turning off the firewall; slowing the machine to a halt; triggering multiple warnings (credit to Microsoft for one of their patches managing that, at least) and eventually (10 seconds or so) blue screening.
On reset, wallpaper change and lots of warnings.
Fuck it. Back to linux. Grab all the data off the drive and reinstall.
No. This was XP on sda5 or so. Do I trust the windows installer not to interfere with the other (perfectly operational) linux partitions? In short, no.
So, good bye XP. You had your chance, but if double clicking a single file is enough to hose my system, I'd be acting irresponsibly if I were to use it. It was only for games anyway.
So, now, World of Warcraft on Linux. First, mplayer audio track selection.
mplayer -vo null -ao null -frames 0 -v filename | grep audio
shows the audio tracks available. To run `2' (if it's there):
mplayer -aid 2 filename
For example:
mplayer -vo null -ao null -frames 0 -v VTS_02_1.VOB | grep audio
shows
==> Found audio stream: 128
==> Found audio stream: 129
==> Found audio stream: 130
==> Found audio stream: 131
==> Found audio stream: 132
So, try
mplayer -aid 129 VTS_02_1.VOB
or even add some lf cut EQ:
mplayer -aid 129 -af equalizer=-12:-6:0:0:0:0:0:0:0 VTS_02_1.VOB
http://www.linuxjournal.com/article/9787
is interesting.
Dont forget full screen!
mplayer -aid 129 -af equalizer=-12:-6:0:0:0:0:0:0:0 -fs VTS_02_1.VOB
and finally, deinterlace:
mplayer -aid 129 -af equalizer=-12:-6:0:0:0:0:0:0:0 -fs -vf lavcdeint VTS_02_1.VOB
The obvious thing to do is to substitute a command, say `play',
to execute all that spuff, followed by the filename.
Set up the mplayer defaults!
http://liquidweather.net/howto/index.php?id=98
shows ~/.mplayer/config
if created, contains the defaults. Great! Send all mplayer screen output to
the file ~/.mplayer/output and refer to it from conky!
---------------------------------------
ALSA stuff.
Avoid OSS, as it seems the hardware gets locked during use.
aplay -l
to list the playback devices connected. There will be card numbers,
devices and subdevices.
mplayer addresses them as,
mplayer *.mp3 -ao alsa:device=hw=0.1
where this addresses card zero, device 1. At least, I think so.
Thursday, 11 February 2010
Tuesday, 9 February 2010
Python list comprehension with logic
test= [i if i in [1,2] else 0 for i in xrange(5)]
test= [i if i in [1,2] else 2*i if i in [3,4] else 0 for i in xrange(5)]
ie, the trailing `else' is essential.
test= [i if i in [1,2] else 2*i if i in [3,4] else 0 for i in xrange(5)]
ie, the trailing `else' is essential.
Monday, 8 February 2010
Xlib: extension "Generic Event Extension" missing on display "localhost:10.0"
This occurred with a fresh installation of ubuntu 9.10 (karmic). The machine had an ATI graphics card. The error listed below occurred with
ssh -x ipaddress
and then running gmsh on the remote machine. Firefox worked ok, forwarding graphics as hoped.
The fix was to install the restricted drivers for the card, an operation achieved from gnome on prompting that there were restricted drivers available.
Error follows:
Xlib: extension "Generic Event Extension" missing on display "localhost:10.0".
Insufficient GL support
[englinux02:12698] *** Process received signal ***
[englinux02:12698] Signal: Segmentation fault (11)
[englinux02:12698] Signal code: Address not mapped (1)
[englinux02:12698] Failing at address: 0x18
[englinux02:12698] [ 0] /lib/libc.so.6 [0x7fec9f45a530]
[englinux02:12698] [ 1] /usr/lib/libfltk_gl.so.1.1(_ZN12Fl_Gl_Window12make_currentEv+0x59) [0x7feca7e35cc9]
[englinux02:12698] [ 2] gmsh [0x480ba1]
[englinux02:12698] [ 3] gmsh [0x41b497]
[englinux02:12698] [ 4] /lib/libc.so.6(__libc_start_main+0xfd) [0x7fec9f445abd]
[englinux02:12698] [ 5] gmsh [0x41afe9]
[englinux02:12698] *** End of error message ***
Segmentation fault
ssh -x ipaddress
and then running gmsh on the remote machine. Firefox worked ok, forwarding graphics as hoped.
The fix was to install the restricted drivers for the card, an operation achieved from gnome on prompting that there were restricted drivers available.
Error follows:
Xlib: extension "Generic Event Extension" missing on display "localhost:10.0".
Insufficient GL support
[englinux02:12698] *** Process received signal ***
[englinux02:12698] Signal: Segmentation fault (11)
[englinux02:12698] Signal code: Address not mapped (1)
[englinux02:12698] Failing at address: 0x18
[englinux02:12698] [ 0] /lib/libc.so.6 [0x7fec9f45a530]
[englinux02:12698] [ 1] /usr/lib/libfltk_gl.so.1.1(_ZN12Fl_Gl_Window12make_currentEv+0x59) [0x7feca7e35cc9]
[englinux02:12698] [ 2] gmsh [0x480ba1]
[englinux02:12698] [ 3] gmsh [0x41b497]
[englinux02:12698] [ 4] /lib/libc.so.6(__libc_start_main+0xfd) [0x7fec9f445abd]
[englinux02:12698] [ 5] gmsh [0x41afe9]
[englinux02:12698] *** End of error message ***
Segmentation fault
Sunday, 7 February 2010
Thursday, 4 February 2010
Latex for each loops.
Credit to Gavin for this one.
To create a for loop, iterating over a list:
\def\freqlist{17000,17100,17200,17300}
\foreach \freq in \freqlist
{
%\input{chapters/\TeXName}
\freq
}
This was used to select filenames for multiple image imports; the images
were generated externally and were named according to the frequency.
To create a for loop, iterating over a list:
\def\freqlist{17000,17100,17200,17300}
\foreach \freq in \freqlist
{
%\input{chapters/\TeXName}
\freq
}
This was used to select filenames for multiple image imports; the images
were generated externally and were named according to the frequency.
Monday, 1 February 2010
In-line text replacement / ascii filter
The file conky is displaying from mplayer, contains non-ascii characters.
Filter its display.
http://www.devdaily.com/unix/edu/un010011/
shows the `tr' command helps:
tr -cd '\11\12\40-\176' < $INPUT_FILE > $OUTPUT_FILE
Those are octal numbers?! Unusual.
Filter its display.
http://www.devdaily.com/unix/edu/un010011/
shows the `tr' command helps:
tr -cd '\11\12\40-\176' < $INPUT_FILE > $OUTPUT_FILE
Those are octal numbers?! Unusual.
Subscribe to:
Posts (Atom)