Powered By

Powered by Blogger

Tampilkan postingan dengan label command-line. Tampilkan semua postingan
Tampilkan postingan dengan label command-line. Tampilkan semua postingan

Minggu, 13 Desember 2009

Compile And Set Up rTorrent and wTorrent In Debian 5 Lenny [Complete How-to]

wtorrent rtorrent

The reason I am writing this post is because I tried many howto's which didn't work and I eventually ended up combining some to get both rtorrent and wtorrent to install and run on my Debian 5 Lenny VPS (thanks to Costin for the VPS).

In case you don't know: wtorrent is a WebUI for rtorrent, a command line Bittorrent client.

Be aware, there are quite a few steps on doing this, so you need a lot of patience and time. Let's get started!

1. Install needed packages (for most of this tutorial) from the repositories:

apt-get install apache2.2-common apache2-utils apg autoconf automake autotools-dev binutils build-essential bzip2 ca-certificates comerr-dev cpp cpp-4.1 dpkg-dev file g++ g++-4.1 gawk gcc gcc-4.1 libapache2-mod-php5 libapr1 libaprutil1 libc6-dev libcurl3 libcurl3-openssl-dev libexpat1 libidn11 libidn11-dev libkadm55 libkrb5-dev libmagic1 libncurses5-dev libneon26 libpcre3 libpq5 libsigc++-2.0-dev libsqlite0 libsqlite3-0 libssl-dev libssp0-dev libstdc++6-4.1-dev libsvn1 libtool libxml2 lighttpd linux-kernel-headers lynx m4 make mime-support ntp ntpdate openssl patch perl perl-modules php5 php5-cgi php5-common php5-sqlite unzip pkg-config screen sqlite subversion ucf zlib1g-dev


If you get an "lighttpd" error, it means there is something already running on port 80. So edit the lighttpd config file:
nano /etc/lighttpd/lighttpd.conf

Scroll down to the port and uncomment the line "server.port = 81" and save the file.
Now run:
apt-get install -f


If that doesn't do it, you may also use:
/etc/init.d/lighttpd force-reload


And run this again:
apt-get install -f

All the packages should be now installed and configured.

Also, make sure you don't have rtorrent or libtorrent installed:
apt-get remove rtorrent libtorrent*


2. Download and compile xmlrpc-c
cd
svn co https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/stable xmlrpc-c
cd xmlrpc-c
./configure --disable-cplusplus
make
make install


3. Download and compile libtorrent and rtorrent

Revision 1105 is needed because the last one fails to compile.
mkdir rtorrent-svn
cd rtorrent-svn
svn co svn://rakshasa.no/libtorrent/trunk --revision 1105
cd trunk
cd libtorrent
./autogen.sh
./configure
make
make install
cd ../rtorrent
./autogen.sh
./configure --with-xmlrpc-c
**after that command make sure you see "checking for XMLRPC.... OK" near the end of the outputted text**
make
make install


4. Downloading and setting up wtorrent

-Download:
wget "http://www.wtorrent-project.org/trac/changeset/latest/trunk/?old_path=%2F&format=zip" \
--output-document=/tmp/wtorrent.zip


-Extract it:
unzip -d /tmp/ /tmp/wtorrent.zip


-Move the wtorrent source:
mv /tmp/trunk/wtorrent /opt/wtorrent


-Setting the file permissions:
find /opt/wtorrent -type f | xargs /bin/chmod 644


-Create folders needed by wtorrent and setting their permissions:

mkdir --parent /var/lib/wtorrent/data
mkdir --parent /var/lib/wtorrent/db
mkdir --parent /var/lib/wtorrent/tpl_c
mv /opt/wtorrent/torrents /var/lib/wtorrent/torrents
chown -R www-data:www-data /var/lib/wtorrent
chown -R rtorrent:www-data /var/lib/wtorrent/data


-Create symbolic links
ln -s /var/lib/wtorrent/tpl_c /opt/wtorrent/tpl_c
ln -s /var/lib/wtorrent/torrents /opt/wtorrent/torrents


-Making sure wtorrent can add configuration files:
chown www-data:www-data /opt/wtorrent/conf/


-Configuring wtorrent:
sed -i -e "/\$defaults/,/\$user_options/s|^\(.*db_file.*=>\).*$|\1 '../../var/lib/wtorrent/db/database.db',|" \
-e "/\$defaults/,/\$user_options/s|^\(.*dir_torrents.*=>\).*$|\1 'torrents/',|" \
-e "/\$defaults/,/\$user_options/s|^\(.*dir_exec.*=>\).*$|\1 '/opt/wtorrent/',|" \
-e "/\$defaults/,/\$user_options/s|^\(.*dir_download.*=>\).*$|\1 '/var/lib/wtorrent/data/',|" \
/opt/wtorrent/cls/install.cls.php


5. Setting up rtorrent

-Make sure we can run rtorrent as a daemon:
apt-get install screen


-Create a user dedicated to running rTorrent in the background:
adduser --system --shell /bin/sh --home /var/lib/rtorrent rtorrent


-Create the files that will be used by rtorrent:

mkdir --parent /var/lib/rtorrent/sessions
mkdir --parent /var/lib/rtorrent/torrents/doing
mkdir --parent /var/lib/rtorrent/torrents/watch
mkdir --parent /var/lib/rtorrent/torrents/done
chown -R rtorrent:nogroup /var/lib/rtorrent


-Getting the rtorrent config file:
wget http://howto.landure.fr/gnu-linux/debian-4-0-etch/installer-wtorrent-sur-debian-5-0-lenny/rtorrent.rc \
--output-document=/etc/rtorrent.rc

-And create a symbolic link:
ln -s /etc/rtorrent.rc /var/lib/rtorrent/.rtorrent.rc


-In the same way, we set up the init.d script:
wget http://howto.landure.fr/gnu-linux/debian-4-0-etch/installer-wtorrent-sur-debian-5-0-lenny/rtorrent \
--output-document=/etc/init.d/rtorrent
chmod +x /etc/init.d/rtorrent


-Start the rtorrent daemon:
/etc/init.d/rtorrent start


-Make the daemon start automatically:
update-rc.d rtorrent defaults


Note: if rtorrent doesn't start after a crash, delete the lock file:
rm /var/lib/rtorrent/sessions/rtorrent.lock


6. Setting up the SCGI server

-Create a random username and password for the SCGI server:
SCGI_LOGIN=$(/usr/bin/apg -q -a  0 -n 1 -M NCL)
SCGI_PASSWORD=$(/usr/bin/apg -q -a 0 -n 1 -M NCL)


-Use htpasswd to store them in a file used by lighttpd:
htpasswd -cb /etc/lighttpd/rtorrent.pwd ${SCGI_LOGIN} ${SCGI_PASSWORD}


-Configure wTorrent to use these authentication settings:
sed -i -e "/\$defaults/,/\$user_options/s|^\(.*rt_user.*=>\).*$|\1 '${SCGI_LOGIN}',|" \
-e "/\$defaults/,/\$user_options/s|^\(.*rt_passwd.*=>\).*$|\1 '${SCGI_PASSWORD}',|" \
-e "/\$defaults/,/\$user_options/s|^\(.*rt_auth.*=>\).*$|\1 true,|" \
/opt/wtorrent/cls/install.cls.php


-Configure Lighttpd to "serve" the SCGI server to rtorrent. Paste all of the following lines at once in the terminal:

echo '# rTorrent SCGI configuration.

server.modules += ( "mod_scgi", "mod_auth" )

scgi.server = (
"/RPC2" => # RT_DIR
( "127.0.0.1" =>
(
"host" => "127.0.0.1", # Ip where rtorrent is listening
"port" => 5000, # Port specified in .rtorrent.rc
"check-local" => "disable"
)
)
)

auth.backend = "htpasswd"
auth.backend.htpasswd.userfile = "/etc/lighttpd/rtorrent.pwd"
auth.require = (
"/RPC2" =>
(
"method" => "basic",
"realm" => "XML-RPC",
"require" => "valid-user"
)
)
' | /usr/bin/tee /etc/lighttpd/conf-available/10-rtorrent.conf


-Activate the recent configuration:
/usr/sbin/lighty-enable-mod rtorrent


-Reload lighttpd:
/etc/init.d/lighttpd force-reload


7. Configure wtorrent

-Create a user configuration file by default, and we make writable by wtorrent:
cp /opt/wtorrent/conf/sample.user.conf.php /opt/wtorrent/conf/user.conf.php
chown www-data:www-data /opt/wtorrent/conf/user.conf.php


-Make wtorrent accessible on the internet by creating a symbolic link in /var/www:
ln -s /opt/wtorrent /var/www/wtorrent


8. The almost final wtorrent configuration via web interface

Open a browser with: http://localhost/wtorrent/install.php (or, if you are doing this remotely like me, enter the IP instead of 'localhost').

Now click on "Try configuration" and if everything is fine, click on "Save configuration".

Important:
a) If you modified the lighttpd port to 81 (see step 1), enter port 81 here instead of 80
b) If you get a database error such as: "Error: cannot create database file, please check permissions.", modify the "Database file" input box to "db/database.db" like this:

wtorrent install

and run these commands:
chown -R www-data:www-data /var/www/wtorrent
chmod 777 /var/www/wtorrent

Alternatively, you can try to only chown the /db/ folder:
chown www-data:www-data /var/www/wtorrent/db


If you still get this error, try removing the database.db file:
rm /var/lib/wtorrent/db/database.db 

, reload the /install.php web page and click on "Try configuration". wtorrent will create a new configuration file.

9. Removing install.php and reverting file permission for the conf file

If everything works ok now, remove the install.php file and protect the conf file:
rm /opt/wtorrent/install.php
chown root:root /opt/wtorrent/conf/user.conf.php


Now launch wtorrent by going to http://localhost/wtorrent (or the IP of the machine running wtorrent instead of localhost).


Further reference / credits:

wtorrent Debian / Ubuntu installation guide
rtorrent with wtorrent on debian etch complete HOWTO
Installer wTorrent sur Debian 5.0 Lenny - the most substantial part of this post. Thanks!
How To Compile rTorrent From SVN In Ubuntu 9.10 Karmic Koala / Debian 5 Lenny With Magnet Link Support

Hopefully I have not forgotten any steps. If something does no work, try consulting the 4 links above.

Sabtu, 12 Desember 2009

Remove Unused Linux Kernel Headers, Images And Modules With One Command [Ubuntu]

If you've installed Ubuntu Karmic since it's Beta like me, you probably have a lot of unused Linux Kernel headers, images and modules. Actually, even if you did a fresh install of the final version, you should have a few of those which you no longer use.

We've posted this command before in a larger post (and I forgot about it), but I've remembered it today when I had realized I have ~500 MB of packages which I could remove to free up some space, so I wanted to share it again with you.

Remove Unused Linux Kernel Headers, Images And Modules With One Command


To remove all the unused Linux Kernel headers, images and modules, simply run this command:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge

Kamis, 10 Desember 2009

Gleebox: Keyboard Surfing In Firefox And Google Chrome

Gleebox is a Greasemonkey script for Firefox / Google Chrome extension which allows you to navigate through any webpage in Firefox / Google Chrome using your keyboard only.

Gleebox can be triggerd by pressing the "G" key (or Alt + G if you are focused on an input field) and it basically looks like a command line floating panel. After entering a command (see below), press TAB and Gleebox will cycle through the items you have selected with the given command.

gleebox


Examples of using Gleebox:

-The default behavior is to cycle through all the links on a web page. Type "Google", then press TAB and it will only cycle to all the links containing the word "Google".

-Type "?h" and Gleebox will cycle through all the headings in a web page (usually post titles) - great for quickly reading the headlines.

-"?img" - Gleebox will jump from one image to another.

- "??": Navigate through all the input fields on the page.

Other useful thing Gleebox can do:

  • !read
    Transform the page for a better reading experience using Readability
  • !shorten
    Shorten the URL of the current page using bit.ly
  • !tweet
    Redirect to twitter with the URL of the current page in the text field
  • :fbshare $
    Share the current page on Facebook
  • :wp cricket
    Search Wikipedia for cricket
  • :tube elvis
    Search YouTube for elvis
  • :site2pdf $
    Get a PDF for the current page.

There is, however, a downside to Gleebox: it does not work properly for sites that define their own shortcuts. For example: Gmail, Google Reader, Wave, etc. It also may not work properly in iframes.




Install Gleebox (Firefox users will need Greasemonkey) | For more info, see the Gleebox user manual.


Rabu, 02 Desember 2009

Reinstall Ubuntu With A Single Command [Quick Tip]

The following command will reinstall all the packages and reconfigures them automatically:

sudo dpkg-reconfigure -phigh -a


This is very useful in case of an unsuccessful upgrade or when something went very bad and you don't have a back-up.

If, however, you have some minor dependency errors, instead of the command above (which will take about an hour to finish), use this command instead (I'm sure you already know it):

sudo apt-get install -f


[tip via aldeby.org]

Sabtu, 14 November 2009

Twidge: Command Line Twitter Client For Linux And MacOSX

twidge

Twidge is a command-line microblogging client for Twitter and Identi.ca. It is designed to be useful when you're sitting at a shell prompt.

While I prefer TTYtter, Twidge may be easier to use and also can be install with just one command.

To install Twidge in Ubuntu, open a terminal and paste this:
sudo apt-get install twidge

For other Linux distributions, search for Twidge in your package manager.

Twidge also works in Mac OSX. Here is what you need to do:

1. Install GHC: sudo port install ghc
2. Install Cabal: sudo port install hs-cabal
3. Update Cabal package list: cabal update
4. Install twidge with cabal: cabal install twidge
5. Run twidge: ~/.cabal/bin/twidge


Using a command line Twitter client can be very useful because you can use the power of a shell to tweak everything you need. For instance, you can scheduling future updates (with at), ignore certain updates (with grep), etc. You can see some thing you can do with Twidge, HERE.

Also, by default, Twidge will attempt to shorten URLs in your updates via the TinyURL.com service.

Getting started with Twidge


To use Twidge, you must firstly set up your username and password. For this, use the following command:
twidge setup


To post a tweet:
twidge update "STATUS"


To follow somewhone:
widge follow "nick"

Or use "unfollow" to unfollow.

Other Twidge commands:
lsarchive: List your own posts.
lsdm: List direct messages sent to you.
lsdmarchive: List direct messages you have sent.
lsrecent: Lists recent posts made by you or those you follow.
lsreplies: Lists all recent replies made to you.
lsfollowers: Lists those following you.
lsfollowing: Lists those you are following.

To see all the available commands:
twidge lscommands


You can also see help for a certain command. For example, to see help for the lsrecent command:
twidge lsrecent --help


For a complete command list, either use the command I mentioned above, or see THIS page.

[via gHacks]

Jumat, 30 Oktober 2009

aria2: Cross Platform Command Line Tool To Download Files From HTTP, FTP and Bittorrent

aria2 is a command line utility for Windows, Linux and Mac OSX you can use for downloading files, which supports HTTP(S), FTP, BitTorrent, and Metalink. The cli tool can download a file from multiple sources/protocols and tries to utilize your maximum download bandwidth. Really speeds up your download experience. Also, aria2 has all the features you want in a BitTorrent client: DHT, PEX, Encryption, Web-Seeding and Selective Downloads.

To install Aria2 in Ubuntu, simply run the following command in a terminal:
sudo apt-get install aria2

There is also an Ubuntu PPA.

If aria2 is not present in your Linux distribution repositories - download it (downloads also for Windows and Mac OSX). There is also a PAGE for distribution specific download / installation instructions.

Performance


aria2 is as lightweight as it gets and uses from about 4MiB of RAM (normal HTTP/FTP downloads) to 9MiB (BitTorrent downloads). CPU usage in BitTorrent with download speed of 2.8MiB/sec is around 6%.


Why aria2 and not Wget or another tool?


There are other alternatives, such as wget and curl, but aria2 has two distinctive features:

- aria2c can download a file from several URIs(HTTP(S)/FTP/BitTorrent)

- If you give aria2 a list of URIs, aria2 downloads them concurrently. You don't have to wait for the current download queue to finish one file at a time anymore. aria2 tries to utilize your maximum download bandwidth and downloads files quickly.


aria2 usage


-BitTorrent Download:
aria2c http://site/yourfile.torrent


- BitTorrent Download (torrent yourfile present locally)
aria2c –max-upload-limit=40K yourfile.torrent


- Repair damaged downloads (only for bitTorrent and metalink)
aria2c –check-integrity=true yourfile.metalink


- Download/upload speed throttling
aria2c –max-download-limit=100K http://server/yourfile


- Quickly specify multiple urls
aria2c -P http://{server1,server2,server3}/yourfile
aria2c -Z -P http://server/image[000-100].png (to download multiple sequentially named yourfiles)


A simple file download:
aria2c http://server/yourfile


To see all the available options, open a terminal and type: man aria2c or see THIS page.


GUIs for Aria2

If the command line tools scare you, there are some graphical front-ends for Aria2, and you can find all of them HERE.


Thanks to Gnome Tips for pointing out the application.

Selasa, 22 September 2009

Quick Tip: Check Gmail From Command Line [ Linux & Mac OS X ]

Using the following command, you can check your unread messages in Gmail, via a simple terminal:

curl -u username:password --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "\t" if /<name>/; print "$2\n" if /<(title|name)>(.*)<\/\1>/;'


For other very useful Linux commands (some also work on Mac OS X), visit THIS and THIS post.

[via commandlinefu]

Senin, 21 September 2009

Download Files From Megaupload, Rapidshare and Others In Linux, via Command-Line, With Plowshare

Plowshare is a command-line downloader and uploader for some of the most popular file-sharing websites. It works on UNIX-like systems and presently supports: Megaupload, Rapidshare, 2Shared, 4Shared, ZShare, Badongo, DepositFiles and Mediafire. It's basically a wget for the websites mentioned above.


Installing Plowshare in Ubuntu


1. First, we must install the dependencies:
sudo apt-get install curl recode imagemagick tesseract-ocr-eng spidermonkey-bin aview


2. Download Plowshare, and extract the contents of the archive:
tar xvzf plowshare-0.8


3. Now let's set up Plowshare:
cd plowshare-0.8
sudo bash setup.sh install
That's it



Using Plowshare


Download

* Download a file from rapidshare:

plowdown http://www.rapidshare.com/files/86545320/Tux-Trainer_25-01-2008.rar


* Download a list of files (one link per line):

plowdown file_with_links.txt


* Download a file from megaupload using a free membership account:

plowdown -a myuser:mypassword http://www.megaupload.com/?d=132348234


* Download a password-protected file from megaupload:

plowdown -p somepassword http://www.megaupload.com/?d=ieo1g52v


* Get only the file URL without actually downloading it. Very handy if you want to use another web downloader:

plowdown --link-only http://www.2shared.com/file/4446939/c9fd70d6/Test.html | xargs -rt wget


* A more complex example for advanced users: you have a found a webpage containing a bunch of megaupload files and want to download, let's say, the first ten links. You could then write:

curl http://some-website.com/page.html | \
grep -o "http://www.megaupload.com/[^\"< ]*" | uniq | head -n10 | plowdown -


* Filter alive links in a text file

plowdown -c file_with_links.txt > file_with_active_links.txt


Upload

* Upload a file to megaupload with a free membership account:

plowup -a myuser:mypassword -d "My description" /path/myfile.txt megaupload


* Upload a file to megaupload with a Premium account and multifetch upload:

plowup -a myuser:mypassword -d "My description" --multifetch http://www.somewherefarbeyond.com/somefile megaupload


* Upload a file to rapidshare anonymously changing uploaded file name:

plowup /path/myfile.txt rapidshare:anothername.txt


[via gnometips]

Customize Bash, Readline, Nano and Vim With BashStyle-NG

BashStyle-NG

BashStyle-NG is a graphical Tool for changing the look and feel for Bash, Readline, Nano and Vim. It comes with 15 pre-defined styles that you can change as well as creating your own. You can also control the type and amount of commands in history to remember, use a welcome message, change the startup path and lots of other options.

Download

Minggu, 20 September 2009

How To Create .nfo Files [Windows, Linux and Mac OSX]

mediainfo

MediaInfo is a free, open source and multi-platform (works on Windows, Linux and Mac OSX) application which supplies technical and tag information about a video or audio file, which we are going to use to create .nfo files.

What information can I get from MediaInfo?

  • General: title, author, director, album, track number, date, duration...
  • Video: codec, aspect, fps, bitrate...
  • Audio: codec, sample rate, channels, language, bitrate...
  • Text: language of subtitle
  • Chapters: number of chapters, list of chapters
DivX, XviD, H263, H.263, H264, x264, ASP, AVC, iTunes, MPEG-1, MPEG1, MPEG-2, MPEG2, MPEG-4, MPEG4, MP4, M4A, M4V, QuickTime, RealVideo, RealAudio, RA, RM, MSMPEG4v1, MSMPEG4v2, MSMPEG4v3, VOB, DVD, WMA, VMW, ASF, 3GP, 3GPP, 3GP2

What format (container) does MediaInfo support?

  • Video: MKV, OGM, AVI, DivX, WMV, QuickTime, Real, MPEG-1, MPEG-2, MPEG-4, DVD (VOB)...
    (Codecs: DivX, XviD, MSMPEG4, ASP, H.264, AVC...)
  • Audio: OGG, MP3, WAV, RA, AC3, DTS, AAC, M4A, AU, AIFF...
  • Subtitles: SRT, SSA, ASS, SAMI...
Download MediaInfo [Downloads for Windows, Mac, Ubuntu, Debian, RedHat, Mandriva, Fedora, CentOS, openSUSE, and ArchLinux]

MediaInfo comes with a very easy to use GUI for Windows which, unfortunately is incomplete for Linux so Windows users can just use that, and I'm going to cover how to create the .nfo file in Linux using command-line. In Windows, just export the info to a .txt file and rename it to .nfo.

Using MediaInfo in Linux

Actually, it's quite easy to use. Just open a terminal and navigate to the folder containing the file you want to create the .NFO file for. Then, type this:

mediainfo --LogFile=nfo_file_name.nfo movie.avi

(presuming you want to create a NFO file for an avi).

Just replace the text in bold with the appropriate values and that's it:

mediainfo linux

Here is a NFO file I just created.

[via paraisolinux]

Kamis, 17 September 2009

[How-to] FTP In Linux Via Command-Line

Although not a lot of people are using it, connecting and uploading/downloading files to a FTP server is really easy to do via command-line. Especially for quick jobs, I always use it and would like to share a little info with Web Upd8 readers.

Connecting to a FTP server is quite easy. Just open a terminal and type FTP. Then, here is a list of commands to use (really easy to remember):

open server:ip - connects to the FTP server
cd - change directory
dir - list the content of current directory
get FILE - download FILE (replace FILE with the file you want to download from the FTP server).
put FILE - upload FILE (same as above, but for uploading a file).
bye - exit

Here is a screen shot for better understanding (I had to censor a few things, but you'll get the idea):

ftp command line

Selasa, 15 September 2009

Graphical Alternative For Command Line Disk Usage utility "du": Gt5 [Linux]



gt5 is a graphical alternative for command line Disk usage utility "du". It is very useful for finding the size of each folders in your system.

To install this in Ubuntu, simply:
sudo apt-get install gt5


Features:
  • displays the diskspace used by files and directories within a directory
  • optionally provides links to the files, so you can also browse them
  • displays entries with their size and the percentage of their parent
How to use -> gt5 is very easy, you have to use just 5 keys on your keyboard: cursor left to go one directory up, cursor right to open selected directory, cursor up/down to move the cursor up or down, insert/delete to scroll and Ctrl + C to quit.

For more info, visit gt5 homepage | via shibuvarkala

Jumat, 11 September 2009

TTYtter Is A Complete Twitter Client Which Runs In a Console [Linux]

ttytter

TTYtter is a console console Twitter client. It's not an application but a python script that allows you to use Twitter just like any advanced Twitter client, but within a terminal. And it's not just for posting tweets, but has advanced options like any other well-known Twitter desktop client.

TTYtter features:
  • In interactive mode, it is a fully interactive client with asynchronous background updates and commands. Use it over telnet, ssh or even a dummy terminal. Supports ANSI colour, hashtags and Twitter Search!
  • Works within your favourite environment: modify prompt and input methods for many popular window and session managers, or use a compatible readline library. Or don't: basic editing and screen management features built-in.
  • From the command line, use it to update your Twitter in shell scripts, from cron, and so on.
  • Notification support with Growl and libnotify (and extendable to others via the API).
  • Supports standard timelines and automatically fetches direct messages.
  • Extensible using the -lib option.
  • Run detached in -daemon mode, and make your own Twitter bot!



To use it, firstly you need to install Curl (which doesn't come by default on some Linux distributions such as Ubuntu):
sudo apt-get install curl

Then you need to download the script from HERE (scroll down to "Download and change-log"), we remove the .txt extension and make the script executable:
mv ttytter.txt ttytter && chmod +x ttytter
then move it to your /bin folder:
sudo mv ttytter /usr/bin

And now, to start using it, open a terminal and:
ttytter -user=username:password -ansi

(replace username and password with your Twitter credentials).

Here are some basic commands to get you started:

/refresh (/r)
Thumps the background process to do another update for new tweets right away instead of waiting for the next one scheduled. Remember, Twitter only gives us the last twenty tweets, so you will therefore only get the last twenty too (important if you're watching the public timeline, or have a lot of friends). If nothing new is available, the background process will politely tell you so.
/replies (/re)
Displays your last twenty @ replies. This may be affected by your Twitter account notifications settings. This command is synchronous and the foreground process will pause until the replies are received or timed out.
/reply [menu code] [tweet] (/re), /vreply [menu code] [tweet] (/vre), /thread [menu code] (/th)
This set of commands respectively replies directly to a tweet or direct message using threading if possible (the first using conventional replies; the second using a publicly visible reply a la "r @al3x Twitter API roxx"), and the last displays the thread a tweet is part of (if any).
/retweet [menu code] (/rt), /eretweet [menu code] (/ert), /fretweet [menu code] (/frt)
Retweets a tweet and threads it (direct messages, wisely, not allowed). /eretweet loads the tweet into the special substitution variable %RT% which you can use at the beginning or end of your next tweet; regular /retweet just sticks on RT @username: and sends it right away. If you really like the tweet, then /fretweet will favourite it for you at the same time as you retweet it.
/search [query] (/se)
Queries the Twitter Search API, as if you had typed it into the box on search.twitter.com, and displays the most recent results. See the section on Search API integration below. This command is synchronous and the foreground process will pause until the data is received or timed out.
For complete commands and user manual, see TTYtter home page and/or of course, use the /help command.

For best usability, I suggest using this with Yakuake!

Rabu, 09 September 2009

Install AVG Free Anti-Virus For Linux

AVG Anti-Virus Free Edition for Linux provides basic antivirus protection and is available for private and non-commercial use only.

You can download the free Linux version from HERE (.Deb, .Rpm, .sh and tar.gz files availoable).

Please note that this version of AVG is command-line so you must use a terminal to use it.


Using AVG Free Anti-Virus for Linux

After installing the packages for your Linux distribution, open a terminal and:

-to start AVG, type the following command:
sudo avgctl --start
-to update the virus definitions:
sudo avgupdate
-scanning is very simple, just use "sudo avgscan <folder to scan>". For example, to scan your home directory:
sudo avgscan ~

For more info, "man" command is your friend. Use:
man avgscan
or
man avgupdate