Connect to wep with terminal

23 10 2009

$ iwconfig wlan0 essid key s:
$ dhclient wlan0





Extract sound from video e.g youtube

6 10 2009

Download the video, using e.g clive, then enter the following line:

$ mplayer -vo null -ao pcm:file="audio_output":fast "video_file"





Transfer files via SSH

6 10 2009

There are a lot more simpler ways to do this operation, you can e.g use nautilus and type in address:

sftp://user:password@IP

or you can use an sftp-application like FileZilla. If you are a little more curious, do it the shell-way:

$ scp /din/lokale/filplassering/fil.txt bruker@IP-adresse:/servers/disk/plassering/fil.txt

scp is a standard shell-command and is an acronym for secure cp (copy)





SUN’s Java for firefox

6 10 2009

The standard java-plugin that comes with firefox for ubuntu have several I heard of had problems with, especially regarding netbanks. This is how you install SUN’s Java for your ff:

First thing, remove all installed java plugins:

$sudo apt-get remove -y icedtea-gcjwebplugin openjdk-6-jre openjdk-6-jre-lib

Install SUNs java:

$sudo apt-get install --reinstall -y sun-java6-jre sun-java6-plugin

Make SUN system standard:

$sudo update-alternatives --auto java

Make SUN standard in web browser:

$sudo update-alternatives --auto xulrunner-1.9-javaplugin.so

Restart firefox/opera:

$pkill firefox





Alternative to ConvertXtoDVD for Ubuntu (XviD to DVD etc)

5 10 2009

ConvertXtoDVD for windows has been working excellent, but it didnt work out quite well under wine so I figured something had to work out native in Ubuntu. I found DeVeDe:

It’s an ease to use and you can install it from apt:

$ sudo apt-get install devede





Use backspace to navigate back in firefox

5 10 2009

In Windows this is standard, but for Ubuntu, there is only the “alt+arrow” option, so you have to do a little firefox trick to be able to use the backspace button to browse backwards in history:

In the adress field, type: about:config
Then filter “browser.backspace_action” and change the value to 0.





HOW TO: µTorrent in Ubuntu 9.04

5 10 2009

There are alternatives to µTorrent like deluge, transmission and the official bittorrent client, but I just like µTorrent a lot better, and wanted to see how it performed through wine, and the outcome was splended. The road to making it work like it should is a little tricky, but here it is:

Innstallation:

Download wine:

$ sudo apt-get install wine

Then download and install µTorrent through wine:

$ wget http://download.utorrent.com/1.7.5/utorrent.exe
$ wine utorrent.exe

Choose yes to all when prompted to add shortcuts. You will now have a shortcut on your desktop and one under the wine menu. Please be sure this works before continuing.

Open a document called utorrentu under /usr/local/bin/

$ sudo nano /usr/local/bin/utorrent

and add the lines:

#!/bin/sh

if [ "$1" ]; then
torrent_file=”Z:`echo $1 | sed ‘s/\//\/g’`”
env WINEPREFIX=”/home/USER/.wine” wine \
“C:\Program Files\uTorrent\uTorrent.exe” “$torrent_file”
else
env WINEPREFIX=”/home/USER/.wine” wine \
“C:\Program Files\uTorrent\uTorrent.exe”
fi

Replace all USER with whats suits you. Then run make the file executable

$ sudo chmod +x utorrent

This is the script we will run µTorrent with. It will help us to make µTorrent change locations from windows to linux-format (Z:\tmp\torrent.torrent to /tmp/torrent.torrent)

The we need to edit the .desktop file:

$ sudo nano ~/.local/share/applications/wine/µTorrent.desktop

This looks a little something like this:

[Desktop Entry]
Name=µTorrent
Exec=env WINEPREFIX=”/home/sinnadyr/.wine” wine \
“C:\Program Files\uTorrent\uTorrent.exe”
Type=Application
StartupWMClass=Wine
Icon=6948_utorrent.0

Replace the Exec-line with:

Exec=/home/sinnadyr/bin/utorrent %f

and add these to lines to the document:

Categories=Network;FileTransfer;P2P
MimeType=application/x-bittorrent

Now the µTorrent.desktop should look like this:

[Desktop Entry]
Name=µTorrent
Exec=/home/sinnadyr/bin/utorrent %f
Type=Application
StartupWMClass=Wine
Icon=6948_utorrent.0
Categories=Network;FileTransfer;P2P
MimeType=application/x-bittorrent

To make µT run as standard torrent-client, run

$ sudo nano ~/.local/share/applications/defaults.list

and add the line

application/x-bittorrent=µTorrent.desktop

Then what we need to do is update the Gnome fileassociations:

$ update-desktop-database ~/.local/share/applications

In the end, open firefox, Edit -> Preferences -> Applications -> Bittorent seed files -> use other > and type in:

/usr/local/bin/utorrent

GREAT SUCCESS!








Follow

Get every new post delivered to your Inbox.