Linux Blog

Package management on Slackware

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 6:38 am on Friday, December 21, 2007

People complain that Slackware is hard to use. I don’t believe that thats true. I don’t think that its any harder to use than any other Linux distribution. I also believe that there is perfection in simplicity. Believe me that it isn’t the easiest to set up but once its up it is actually easy to update and maintain once you learn how.

Despite popular believe Slackware does have good package management software. The main ones that come to mind are slapt-get, slackbuilds, pkgtools, swaret and slackpkg. Below is a small amount of information about each of them.

I’ve never myself used swaret so I don’t know too much about it other than its a package manager that manages dependencies. I also know that a new version will be released soon. If your interested in finding the best package management for Slackware you might want to check swaret out.

slapt is a mashup of the two words slack & apt. Those familiar with Debian or Ubuntu will know apt-get is at the heart of these systems, slapt-get is a clone of this system. Its been in Beta since its creation but works perfectly. There are graphical front ends for this software. I personally don’t use it because I can not find a fast repository in my area.

slackbuilds are kind of like the Gentoo package management. They are distributed with the source code on the Slackware DVD. They are basically scripts that help compile the source code. Its pretty easy to use, for more information visit: slackbuilds.org

pkgtools are the base of Slackware package management. Basically it is a suite of utilities that you can use to install, remove and upgrade software. The best source I’ve found for finding extra packages is linuxpackages.net.

My favorite for updating Slackware is slackpkg. It uses pkgtools to install and remove packages. It comes on the Slackware CD’s / DVD’s in the extras folder and is pretty easy to use. Basically you install it, select a mirror from the config file and then run:

slackpkg update

Once its finished doing its thing you can then do:

slackpkg upgrade-all

This will start a fairly lengthy process of downloading and installing all of the new packages. Other options are available such as options to install new packages, remove packages revert to vanilla system and many more. One thing I have to caution on is updating to current. Its not as easy as upgrading from release X to slackware-current all the time. This is due to the different versions of GCC, glib, solibs and various other types of libraries. Always read the UPGRADE.TXT or at least have a back up of all of your critical data before attempting to upgrade.

There are a lot of options, if your interested in running Slackware I suggest you try them all and then use the one you like. If you don’t want to run Slackware because another distribution suits you better try not to use the “I don’t use Slackware because its hard to maintain” card.

Linux Torrent Client

Filed under: General Linux,Linux Software — TheLinuxBlog.com at 11:15 am on Wednesday, December 12, 2007

Introduction
Every body these days knows what BitTorrent is. For those that don’t BitTorrent is a great way to download large files. Some times it is faster to download an ISO of a Linux distribution by torrent then by ftp or http. This is because bit torrent is Peer-to-Peer meaning that many people share the file rather than one bogged down server. If your interested in how BitTorrent works, check out WikiPedia’s BitTorrent Page

In order to download a .torrent file you need a client. Fortunately Linux users are in luck because there are a lot of Linux Torrent clients out there.

Every one has favorites, in this post I’m listing my favorite Linux Torrent Client, both graphical and command line based. If you know of a better client suited to download torrents please let me know!

My Favorite Linux Torrent Clients

My favorite graphical torrent client is actually a cross platform BitTorrent client. Many people will have already heard of this one as it is one of the most popular: Azureus
It has a really neat graphical interface that has a lot of features. The client can be skinned which means you can make it match your desktop if your into eye candy. For screenshots check the Azureus website and the google image search results for Azureus Linux screenshots.

Now don’t get me wrong I’m all about graphical interfaces. Computing as we know it today would not be the same if it was not for the user interface, but there are still great uses for shell applications. Primary development of a killer app doesn’t always start with a pretty interface. Which is why I bring up the next client that I really like. This is the Linux client by Bram Cohen. In Slackware the package can be installed with slackpkg or slapt-get. In Debian or Ubuntu with apt-get. The package has a couple of clients but the best one in my opinion is bittorrent-curses. Once installed all you have to do to start downloading is the following:

bittorrent-curses <TORRENTFILE.torrent>

Many advanced options for the client are available check them out:

Usage: bittorrent-curses [OPTIONS] [TORRENTFILE]

arguments are -
–ip <arg>
ip to report to the tracker (has no effect unless you are on the same
local network as the tracker) (defaults to ”)

–forwarded_port <arg>
world-visible port number if it’s different from the one the client
listens on locally (defaults to 0)

–minport <arg>
minimum port to listen on, counts up if unavailable (defaults to
6881)

–maxport <arg>
maximum port to listen on (defaults to 6999)

–bind <arg>
ip to bind to locally (defaults to ”)

–display_interval <arg>
seconds between updates of displayed information (defaults to 0.5)

–rerequest_interval <arg>
minutes to wait between requesting more peers (defaults to 300)

–min_peers <arg>
minimum number of peers to not do rerequesting (defaults to 20)

–max_initiate <arg>
number of peers at which to stop initiating new connections (defaults
to 60)

–max_incomplete <arg>
max number of outgoing incomplete connections (defaults to 100)

–max_allow_in <arg>
maximum number of connections to allow, after this new incoming
connections will be immediately closed (defaults to 80)

–check_hashes, –no_check_hashes
whether to check hashes on disk (defaults to True)

–max_upload_rate <arg>
maximum kB/s to upload at, 0 means no limit (defaults to 20)

–min_uploads <arg>
the number of uploads to fill out to with extra optimistic unchokes
(defaults to 2)

–max_files_open <arg>
the maximum number of files in a multifile torrent to keep open at a
time, 0 means no limit. Used to avoid running out of file
descriptors. (defaults to 50)

–start_trackerless_client, –no_start_trackerless_client
Initialize a trackerless client. This must be enabled in order to
download trackerless torrents. (defaults to True)

–upnp, –no_upnp
Enable automatic port mapping (UPnP) (defaults to True)

–save_as <arg>
file name (for single-file torrents) or directory name (for batch
torrents) to save the torrent as, overriding the default name in the
torrent. See also –save_in (defaults to ”)

–max_uploads <arg>
the maximum number of uploads to allow at once. -1 means a
(hopefully) reasonable number based on –max_upload_rate. The
automatic values are only sensible when running one torrent at a
time. (defaults to -1)

–save_in <arg>
local directory where the torrent contents will be saved. The file
(single-file torrents) or directory (batch torrents) will be created
under this directory using the default name specified in the .torrent
file. See also –save_as. (defaults to ”)

–responsefile <arg>
deprecated, do not use (defaults to ”)

–url <arg>
deprecated, do not use (defaults to ”)

–ask_for_save <arg>
whether or not to ask for a location to save downloaded files in
(defaults to 0)

–spew, –no_spew
whether to display diagnostic info to stdout (defaults to False)

–data_dir <arg>
directory under which variable data such as fastresume information
and GUI state is saved. Defaults to subdirectory ‘data’ of the
bittorrent config directory. (defaults to ”)

–filesystem_encoding <arg>
character encoding used on the local filesystem. If left empty,
autodetected. Autodetection doesn’t work under python versions older
than 2.3 (defaults to ”)

–language <arg>
ISO Language code to use: af, bg, ca, cs, da, de, el, en, es, es_MX,
fr, he, hu, is, it, ja, ko, nb_NO, nl, pl, pt, pt_BR, ro, ru, sk, sl,
sv, tr, vi, zh_CN, zh_TW (defaults to ”)

–keepalive_interval <arg>
number of seconds to pause between sending keepalives (defaults to
120.0)

–download_slice_size <arg>
how many bytes to query for per request. (defaults to 16384)

–max_message_length <arg>
maximum length prefix encoding you’ll accept over the wire – larger
values get the connection dropped. (defaults to 8388608)

–socket_timeout <arg>
seconds to wait between closing sockets which nothing has been
received on (defaults to 300.0)

–timeout_check_interval <arg>
seconds to wait between checking if any connections have timed out
(defaults to 60.0)

–max_slice_length <arg>
maximum length slice to send to peers, close connection if a larger
request is received (defaults to 16384)

–max_rate_period <arg>
maximum time interval over which to estimate the current upload and
download rates (defaults to 20.0)

–max_rate_period_seedtime <arg>
maximum time interval over which to estimate the current seed rate
(defaults to 100.0)

–max_announce_retry_interval <arg>
maximum time to wait between retrying announces if they keep failing
(defaults to 1800)

–snub_time <arg>
seconds to wait for data to come in over a connection before assuming
it’s semi-permanently choked (defaults to 30.0)

–rarest_first_cutoff <arg>
number of downloads at which to switch from random to rarest first
(defaults to 4)

–upload_unit_size <arg>
how many bytes to write into network buffers at once. (defaults to
1380)

–retaliate_to_garbled_data, –no_retaliate_to_garbled_data
refuse further connections from addresses with broken or
intentionally hostile peers that send incorrect data (defaults to
True)

–one_connection_per_ip, –no_one_connection_per_ip
do not connect to several peers that have the same IP address
(defaults to True)

–peer_socket_tos <arg>
if nonzero, set the TOS option for peer connections to this value
(defaults to 8)

–bad_libc_workaround, –no_bad_libc_workaround
enable workaround for a bug in BSD libc that makes file reads very
slow. (defaults to False)

–tracker_proxy <arg>
address of HTTP proxy to use for tracker connections (defaults to ”)

–close_with_rst <arg>
close connections with RST and avoid the TCP TIME_WAIT state
(defaults to 0)

–twisted <arg>
Use Twisted network libraries for network connections. 1 means use
twisted, 0 means do not use twisted, -1 means autodetect, and prefer
twisted (defaults to -1)

More Hardware to add to my collection. Toshiba Tecra M2

Filed under: Linux Hardware — TheLinuxBlog.com at 1:23 am on Monday, December 10, 2007

If you read my post about my Toshiba Portege 4010 you would know that I mentioned in their that it was a little too slow. I couldn’t do the things I needed to do, such as virtualization or play Quake3. So for an early Christmas present to I sold my Toshiba Portege 4010 and I purchased a used Toshiba Tecra M2 laptop. The specs are pretty decent for the amount I paid for it.

CPU: 1.7GHz PM
RAM: 512MB (Needs upgrading)
HD: 40GB -> Upgraded to 100GB
Graphics: GeForce Fx 5200 toGo 64MB.
Media: CDRW-DVD Combo, Firewire, USB 2.0, 2PCMCIA Card Slots
Network: 10/100/1000 B/G Wireless

The battery life is not as good as my old Portege 4010 but with the time I save by not waiting on the CPU I can normally get my Quake3 I mean work done in time to find a power outlet.

The Tecra M2 has excellent support for Linux. The only thing thats not supported that I’m working on is the SD Card reader. This is the same situation as the Portege’s as they use the same hardware.

I’ll be making a post for any body wanting to run a real Linux distribution on a Toshiba Tecra M2.