fast hardcoded MKV to xvid/avi Nautilus script

I put this in my nautilus scripts for converting mkv files into xvid, so they can play in XBMC for XBOX

#!/bin/bash
FILEIN=`zenity --file-selection --title="Select mkv file..."`

zenity --info --title="file selected for conversion" --text="OUTPUTFILE = $FILEIN.avi"

xterm -e mencoder $FILEIN -channels 6 -ovc xvid -xvidencopts fixed_quant=4 -vf harddup -oac mp3lame -lameopts cbr:br=160 -o $FILEIN.avi

Publicerat i Okategoriserade | Lämna en kommentar

Make a win 7 installer USB from linux

OK, after unsuccessfully trying all methods mentioned here, I finally got it working. Basically, the missing step was to write a proper boot sector to the USB stick, which can be done from Linux with ms-sys or lilo -M. This works with the Windows 7 retail version.

Here is the complete rundown again:

Install ms-sys – if it is not in your repositories, get it here. Or alternatively, make sure lilo is installed (but do not run the liloconfig step on your local box if e.g. Grub is installed there!)

Check what device your USB media is assigned – here we will assume it is /dev/sdb. Delete all partitions, create a new one taking up all the space, set type to NTFS (7), and remember to set it bootable:

# cfdisk /dev/sdb or fdisk /dev/sdb (partition type 7, and bootable flag)

Create an NTFS filesystem:

# mkfs.ntfs -f /dev/sdb1

Write Windows 7 MBR on the USB stick:

# ms-sys -7 /dev/sdb or (e.g. on newer Ubuntu installs) sudo lilo -M /dev/sdb mbr (info)

Mount ISO and USB media:

# mount -o loop win7.iso /mnt/iso
# mount /dev/sdb1 /mnt/usb
Copy over all files:

# cp -r /mnt/iso/* /mnt/usb/ …or use the standard GUI file-browser of your system

…and you’re done.

After all that, you probably want to back up your USB media for further installations and get rid of the ISO file… Just use dd: # dd if=/dev/sdb of=/win7.img

and reverse if/of next time you want to put the Windows 7 installer onto USB.

As always, double check the device names very carefully when working with dd.

Publicerat i Okategoriserade | Lämna en kommentar

Work in progress

image

Publicerat i Okategoriserade | Lämna en kommentar

Rotera film med ffmpeg

ffmpeg -i video3.mov -vf ”transpose=1” video_s3.mov

Publicerat i Okategoriserade | Lämna en kommentar

Something for the carvingblade maybe.

image

Publicerat i Okategoriserade | Lämna en kommentar

Seed-box on debian

This tutorial will guide you through the setup of a fully-featured seedbox running on a Debian or Ubuntu system, including:

libtorrent 0.13.0
rTorrent 0.9
ruTorrent Web UI (3.0)

This guide has been tested with Debian 6 (x86_64) and Ubuntu 11.04 (x86_64).

To start, access your VPS via SSH (as the root user) and do the following to update your platform and install some required dependencies:
# apt-get update
# apt-get install subversion build-essential automake libtool libcppunit-dev libcurl3-dev libsigc++-2.0-dev unzip unrar-free curl libncurses-dev
# apt-get install apache2 php5 php5-cli php5-curl

Enable scgi for Apache:
# apt-get install libapache2-mod-scgi
# ln -s /etc/apache2/mods-available/scgi.load /etc/apache2/mods-enabled/scgi.load

Install XMLRPC:
# mkdir /install;cd /install
# svn checkout http://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable xmlrpc-c
# cd xmlrpc-c
# ./configure –disable-cplusplus
# make
# make install

Intall libtorrent:
# cd /install
# wget http://vps6.net/src/libtorrent-0.13.0.tar.gz
# tar xvf libtorrent-0.13.0.tar.gz
# cd libtorrent-0.13.0
# ./autogen.sh
# ./configure
# make
# make install

Install rTorrent:
# cd /install
# wget http://vps6.net/src/rtorrent-0.9.0.tar.gz
# cd rtorrent-0.9.0
# ./autogen.sh
# ./configure –with-xmlrpc-c
# make
# make install
# ldconfig

Create required directories:
# mkdir /home/seeder1/rtorrent
# mkdir /home/seeder1/rtorrent/.session
# mkdir /home/seeder1/rtorrent/watch
# mkdir /home/seeder1/rtorrent/download

Setup .rtorrent.rc file (rTorrent config):
# cd ~/
# wget http://vps6.net/src/.rtorrent.rc
# cp .rtorrent.rc /home/seeder1/

(Edit the settings in .rtorrent.rc, like max upload/download speed, max connected peers, etc, as needed.)

Install rTorrent:
# cd /install
# wget http://vps6.net/src/rutorrent-3.0.tar.gz
# tar xvf rutorrent-3.0.tar.gz
# mv rutorrent /var/www
# wget http://vps6.net/src/plugins-3.0.tar.gz
# tar xvf plugins-3.0.tar.gz
# mv plugins /var/www/rutorrent
# rm -rf /var/www/rutorrent/plugins/darkpal
# chown -R www-data:www-data /var/www/rutorrent

Secure /rutorrent:
# a2enmod ssl
# a2enmod auth_digest
# a2enmod scgi
# openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem
# chmod 600 /etc/apache2/apache.pem
# htdigest -c /etc/apache2/passwords seedbox seeder1

(Enter a password of your choice when prompted, you will use this to log in to the ruTorrent web UI.)

# cd /etc/apache2/sites-available/
# rm -rf default
# wget http://vps6.net/src/default
# a2ensite default-ssl
# /etc/init.d/apache2 reload

Install screen:
# apt-get install screen

Start rTorrent in a detached shell using screen:
# screen -fa -d -m rtorrent

(To start rtorrent automatically when the VPS is booted, add the above command to /etc/rc.local)

You can now access ruTorrent at http://xx.xx.xx.xx/rutorrent/ (replace xx.xx with your server’s IP address). You should be greeted with a login prompt, where the username is ”seeder1” and the password is the one you set above in the ”secure /rutorrent” section.

Publicerat i Okategoriserade | Lämna en kommentar

Google Chrome and Flash on Debian Squeeze 64-bit

I recently re-installed Debian Squeeze on my main machine. I’m using the 64-bit version along with 64-bit Chrome.

However, the 64-bit Chrome does not come with a built-in Flash player. Instead, it seems to be finding the plugin by searching the Mozilla plugin folder (/usr/lib/mozilla/plugins/), where it finds flash-mozilla.so, which is a symlink to /usr/lib/gnash/libgnashplugin.so, the Gnash flash plugin.

Don’t get me wrong; I’m happy to see how Gnash is looking, and I’m happy that a free software alternative exists. However, I’m not a FLOSS puritan; I’ll use the best tool for the job which, in my opinion, remains as the official Flash plugin.

So, how to install the Flash plugin?

Adobe says to refer to the browser documentation. Google’s docs mention Flash as being built-in for 32-bit, but I couldn’t find mention of how to install for 64-bit.

Here’s how I did it: since Chrome seems to be using the symlink in the mozilla folder, which is managed by Debian’s “alternatives” system, I installed the plugin and added it as an alternative.

Step 1: Download the 64-bit Flash Player plugin for Linux from http://labs.adobe.com/downloads/flashplayer10_square.html.

Step 2: Install the plugin as follows:

1 sudo mkdir -pv /opt/flashplugin
2 cd /opt/flashplugin
3 sudo tar -xf

Step 3: Install the plugin as a flash-mozilla.so alternative:

sudo update-alternatives –install /usr/lib/mozilla/plugins/flash-mozilla.so flash-mozilla.so /opt/flashplugin/libflashplayer.so 10

Step 4: Select the Adobe plugin for use as the active plugin:

1
sudo update-alternatives –set flash-mozilla.so /opt/flashplugin/libflashplayer.so

That’s it! Flash should now work. If it does not work immediately, restart Chrome and then it should. (As a side effect, the same plugin should now be the Firefox default as well, in case you use both browsers.)

Publicerat i Okategoriserade | Lämna en kommentar

Delete file recursively

find . -name ”FILE-TO-FIND”-exec rm -rf {} \;

Publicerat i Okategoriserade | Lämna en kommentar

Open gmail as default app for links and for Nautilus ”send to” – Debian squeeze

About

Gnome Gmail is software which adds support for Gmail to the Linux Gnome Desktop. It allows Gmail to be selected as the default mail application for the desktop. Unlike other solutions on the net, Gnome Gmail supports ”To:”, ”Subject:”, ”body”, ”CC:”, and ”BCC: fields, and is available in deb and rpm format.

Gnome Gmail supports ”Send to…” from Nautilus. You can send file attachments automatically.

The latest version supports Google Apps accounts.

Download and Installation

Gnome Gmail is included many distributions, or you can download it here. Download the appropriate package for your system, and double-click to install. Ubuntu Oneiric users should download the version from this site.

When you first run Gnome Gmail, under Applications -> Internet, it will offer to become your Preferred Mail client. Or go to System -> Preferences ->Preferred Applications, and select Gmail as the preferred Mail Reader. For GNOME 3, Preferred Applications are set in the System Info utility.

From Firefox, select ”Send Link…” to demonstrate. The page link will open in a Gmail browser window.

From the Nautilus File Browser, right-click on a file and select ”Send To…”. Select ”Send as: Email”, enter a destination email address and click Send. Gnome Gmail will prompt for your Gmail user name and password, then will upload the message to your Gmail ”Drafts” folder. Select the messsage, and click ”Send”.

From LibreOffice or OpenOffice, select File -> Send -> Document as Email…
.. and so on

To use Gnome Gmail with a Google Apps account, select the ”Configure” option from the Send File login dialog, or edit the /apps/gnome-gmail entries in the command-line ’gconf-editor’ application.

Publicerat i Okategoriserade | Lämna en kommentar

Google Chrome and Flash on Debian Squeeze 64-bit

May 26, 2011
I recently re-installed Debian Squeeze on my main machine. I’m using the 64-bit version along with 64-bit Chrome.

However, the 64-bit Chrome does not come with a built-in Flash player. Instead, it seems to be finding the plugin by searching the Mozilla plugin folder (/usr/lib/mozilla/plugins/), where it finds flash-mozilla.so, which is a symlink to /usr/lib/gnash/libgnashplugin.so, the Gnash flash plugin.

Don’t get me wrong; I’m happy to see how Gnash is looking, and I’m happy that a free software alternative exists. However, I’m not a FLOSS puritan; I’ll use the best tool for the job which, in my opinion, remains as the official Flash plugin.

So, how to install the Flash plugin?

Adobe says to refer to the browser documentation. Google’s docs mention Flash as being built-in for 32-bit, but I couldn’t find mention of how to install for 64-bit.

Here’s how I did it: since Chrome seems to be using the symlink in the mozilla folder, which is managed by Debian’s “alternatives” system, I installed the plugin and added it as an alternative.

Step 1: Download the 64-bit Flash Player plugin for Linux from http://labs.adobe.com/downloads/flashplayer10_square.html.

Step 2: Install the plugin as follows:

1
2
3
sudo mkdir -pv /opt/flashplugin
cd /opt/flashplugin
sudo tar -xf Step 3: Install the plugin as a flash-mozilla.so alternative:

1
2
3
4
5
sudo update-alternatives –install \
/usr/lib/mozilla/plugins/flash-mozilla.so \
flash-mozilla.so \
/opt/flashplugin/libflashplayer.so \
10
Step 4: Select the Adobe plugin for use as the active plugin:

1
sudo update-alternatives –set flash-mozilla.so /opt/flashplugin/libflashplayer.so
That’s it! Flash should now work. If it does not work immediately, restart Chrome and then it should. (As a side effect, the same plugin should now be the Firefox default as well, in case you use both browsers.)

posted in Linux by Paul Goins
http://www.vultaire.net/blog/2011/05/26/google-chrome-and-flash-on-debian-squeeze-64-bit/

Publicerat i Okategoriserade | Lämna en kommentar