|
Linux Napster Client: User GuidePeter Selinger (selinger@users.sourceforge.net)Created March 28, 2001. Updated December 9, 2002 for nap version 1.5.1.
This document describes the linux napster client "nap". It covers basic installation, configuration, and usage, as well as some finer points. 1. General2. Author and copyright3. Downloading and installation
4. Basic nap usage
5. More on searching and downloading
6. Messages, channels, and hotlists
7. Configuration and user variables
8. Advanced features9. Obsolete features10. Summary of command line options [updated 1.5.1]11. Summary of nap commands [updated 1.5.0]1. General1.1. IntroductionNap is a console napster client for linux and other operating systems, written by Kevin Sullivan. This user guide summarizes some of its most important features, from a user's point of view. Additions and corrections are welcome.1.2. Brief historyNap, written by Kevin Sullivan sometime in 1999, was one of the first napster clients besides Shawn Fanning's original Windows client. It was also the first client that ran on Linux. Kevin learned much about the inner workings of the napster protocol by collaborating with Jordan Ritter, who was one of the co-founders of Napster and its chief server architect at the time.After a period of inactivity, development of nap resumed in early 2001, when I took over the project. Since then, nap has been polished, and many new features have been added, while the original "look and feel" has been preserved as much as possible. Today, nap is one of the most reliable and stable napster clients. Nap has been packaged for a variety of popular platforms, and it is shipped with distributions of some operating systems such as Debian Linux and OpenBSD. 1.3. Reporting bugsNap has a sourceforge project page. You are encouraged to use sourceforge's facilities for bug reports, feature requests etc. You can also send me bug reports by email. When you report a bug, please be as specific as you can about what happened and what you were doing when the bug occurred.2. Author and copyrightThis user guide can be freely copied, modified, and distributed under the GNU public license.The nap software is copyrighted by Kevin Sullivan, under conditions set forth in the file COPYRIGHT. 3. Downloading and installationThe current release of nap is available from http://nap.sourceforge.net/. You can download nap in one of several formats. In the following,XXX stands for a version number.
3.1. Source distributionThis is the most complete distribution of nap, since it contains all the source code necessary to compile nap. On the other hand, this means you have to compile it yourself. This is not very difficult, but if nap is available in precompiled form for your platform, you might find that easier.
Instructions: download the file tar -zxf nap-XXX.tar.gz cd nap-XXX ./configure make su (type root password) make install 3.2. Linux precompiled distributionInstructions: download the filenap-XXX.linux-i386.tar.gz .
Install nap as follows:
tar -zxf nap-XXX.linux-i386.tar.gz cd nap-XXX.linux-i386 su (type root password) cp nap napping /usr/local/bin chmod 0755 /usr/local/bin/nap chmod 4755 /usr/local/bin/nappingIf you are running Linux on a different architecture, such as Alpha, just substitute "alpha" for "i386" in the above instructions. Napping is a helper application for nap which can be safely installed suid (with permissions 4755). For more on napping, see 5.2. Pings. 3.3. RPM packageRPM is the Redhat Package Manager. It allows for easy installation of packages on Redhat Linux systems, and on other systems where it is available. Instructions: download the filenap-XXX.i386.rpm .
As root, install nap with the single command
rpm -ivh nap-XXX.i386.rpm 3.4. Debian packageA nap package is distributed with the next relase (2.3) of Debian. To install nap on a properly configured Debian system you should use the "apt-get" command:apt-get install napAlternatively you can download the latest nap_XXX.deb
package from the Debian
nap page
and install it manually with the "dpkg" command:
dpkg -i nap_XXX.debYou must be root to do this. If you are not root, read section 3.9. 3.5. OpenBSD packageInstructions: download the filenap-XXX.tgz .
Install it with the single command
pkg_add nap-XXX.tgzNote: this file is an OpenBSD Package, not a regular tar archive. It should be installed with "pkg_add". If you unpack it with "tar", do it in an empty directory, as it will spill some files into the current working directory. If you do unpack this as a tar file, you will find an executable binary in the "bin" subdirectory. 3.6. Windows precompiled distributionInstructions: download the filenap-XXX.cygwin32.zip .
Unpack it with
pkunzip nap-XXX.cygwin32.zip(Note: pkunzip is a relatively dumb program. My version of it, which came with Windows 98, does not understand long filenames, and you may have to type something of the form "pkunzip nap-1.~1.zip". Instead of creating a directory, it may decide to dump the files in the current working directory, and it may rename them. Use "unzip" instead of "pkunzip" if it is available.) Among the unpacked files, you will find an executable file nap.exe and two DLL's (dynamically linked libraries): cygncurses5.dll and cygwin1.dll. You need to put these DLL's in a place where Windows can find them, before running nap.exe. One way to do this is to copy the two "*.dll" files to a location (such as C:\WINDOWS) where Windows looks for DLL's. Another way is to amend your PATH environment variable, by adding something like the following line to C:\AUTOEXEC.BAT: PATH=%PATH%;C:\DIRECTORY\WHERE\DLLS\ARESpecial care is needed with nap for Windows regarding the location of the configuration files. Nap normally looks for its configuration files in a directory called ".nap" in the user's home directory. Under Windows, there is no such thing as a user's home directory, and nap will by default look for the .nap directory in the current working directory. You can change this behavior by defining an environment variable HOME. I do this by something like the line set HOME=C:\SOME\DIRECTORYin the file C:\AUTOEXEC.BAT. This will cause nap to look for (and create) its configuration files in the directory C:\SOME\DIRECTORY\.nap. See also the file README.win which comes with the distribution. 3.7. Binary distributions with ncurses [new 1.5.1]Some binary distributions for operating systems which do not normally ship with the ncurses library, such as Solaris, come with a filencurses.so.5 or similar. If nap complains that it cannot
find this file, you need to put it somewhere where the dynamic linker
can find it. You need to do one of two things:
terminfo database is located at
/usr/share/lib/terminfo . If it is in a different
location, you must set the TERMINFO environment variable
to the location, e.g.
export TERMINFO=/usr/share/terminfo 3.8. Other formatsNap may be available in other formats, for instance in precompiled form for other operating systems. Something similar to the above instructions should work.3.9. "What if I don't have root privileges on my machine?"Don't worry. It is not really necessary to install nap in/usr/local/bin ; you can install it anywhere you like.
All that is really necessary is that the nap binary is
somewhere in your PATH . The recommended steps are as
follows:
1. create a directory mkdir $HOME/bin mv nap $HOME/bin2. If the shell you are using is sh or bash ,
put the following lines in the file .bashrc in your home
directory:
PATH=$PATH:$HOME/bin export PATHIf the shell you are using is tcsh , put the following
line in the file .tcshrc in your home directory:
setenv PATH ${PATH}:$HOME/bin3. Restart the shell. You should now be able to invoke nap by typing nap .
4. Basic nap usageThis section gives a brief overview of the most important features of nap, particulary how to search and download files, and how to navigate nap's three screens. This should be enough to get you started. Later sections of this userguide will cover these and other features in more detail.4.1 Starting napCongratulations, you have installed nap, and you are ready to give it a try. Simply invoke nap by typingnapYou will be prompted for any necessary information, and you will be asked whether you want to save the information in a configuration file. It is a good idea to answer yes [y]. Eventually you will see nap's main screen, which looks more or less like this:
The very last line, after the status line, has a cursor. This is where you can enter commands. All commands start with a slash "/"; if you forget the slash, nap will complain that you are "not on a channel". But more about that later. 4.2. Simple searches and downloadsTo perform a search, you use the/search command. For
instance, if you want to search for a song called "Yucky green goo",
you type
/search yuckyThis will cause nap to search for files that contain the word "Yucky". Napster queries are case insensitive, so it doesn't matter if you search for "yucky" or "Yucky". If fact, napster is generally very tolerant regarding search queries. After a few moments, another screen will pop up with the search results. This is called the result screen. It might look as follows:
Note that not all files listed actually contain the word "yucky". For instance, some of them might be found in a directory named "yucky", but the directory name is not displayed in the results list. The files are listed in decreasing order of connection speed (or, if available, in increasing order of ping response). On the result screen, you can move up and down with the respective arrow keys, or you can move faster with the "PgUp" and "PgDn" keys. The red line at the bottom displays the full filename of the song currently selected; if it does not fit on the screen, you can scroll it from side to side with the left and right arrow keys. If you press "h", a help message is displayed at the bottom of the screen, which can also be scrolled via the left and right arrow keys. You can hit "return" for any song you wish to download. Note: do not use nap to download or distribute any copyrighted material. 4.3. The download/upload screen [new 1.5.0]If you press "tab" while viewing search results, you will be taken to a third screen which displays all current downloads and uploads in a split-screen format (downloads above, uploads below), and their progress. Typically, this screen might look as follows:
You can scroll through the tasks via the up and down arrow keys, or "PgUp" and "PgDn". You can switch between the download and upload sections by pressing 'o', or "Alt-up" and "Alt-down". There are a number of keystrokes available to manipulate the displayed tasks: 'd' to delete the task under the cursor, 'r' to retry a failed/incomplete download, 'R' to retry all failed tasks, 'f' to force an immediate download, and 'P' to purge stopped tasks from the current section. You can also type 'h' for help and left/right to scroll help, as on the results screen. Press "tab" to go back to search results, or type "q" from either screen to return to the main screen. You can also switch between the three screens (main screen, search result screen, download/upload screen) by using the function keys "F1" thru "F3", or "Alt-1" thru "Alt-3". 4.4. Browsing another user's filesBrowsing works almost exactly like searching. Just type/browse userand that user's files will appear on the result screen. If the remote user's client supports it, you can also directly browse that user's files, without going via the napster server. To do this, use the command /browse2 instead of /browse . This
can be useful if the server limits the number of browse results that
you can see. See also 5.9. Direct browsing.
4.5. Where your music files goWhen you start nap for the first time, it prompts you to enter three directories: Your "upload", "download" and "incomplete" directories.The "upload" directory contains files that you want to share. Do not use nap to share any copyrighted material. Files that are currently being downloaded are kept in the "incomplete" directory. Completed downloads are moved to the "download" directory. You can specify the location of these directories on the command line, in the configuration file, or when nap prompts you for this information. If you do not specify a download directory, nap will use the current working directory. If you do not specify an incomplete directory, nap will use the download directory. If you do not specify an upload directory, nap will be unable to share any files. It is possible to specify more than one upload directories; multiple directories are separated by semicolons. If an incomplete download results in a file of 100000 bytes or less, the file will be considered a "turd" and removed. Larger incomplete files will be kept in the "incomplete" directory. You can change this behavior; see 5.5. Incompete downloads and turds. 4.6. Navigating the main screen [updated 1.5.0]The text of the main screen can be scrolled up and down by using the "PgUp" and "PgDn" keys. This allows you to see stuff that has disappeared off the top of the screen. If you prefer, you can use the alternative keybindings "Ctrl-P" and "Ctrl-N" or "Ctrl-V" for the same purpose.
To switch between screens, use the keys "F1" thru "F3", or "Alt-1"
thru "Alt-3". In addition, the commands
You can type When entering a command, a number of standard keybindings are available. "Ctrl-U" deletes the current line, while "Ctrl-K" truncates the input, and "Ctrl-W" deletes everything from the current word to the end of the line. "Ctrl-D" or "delete" deletes the current character. "Backspace" deletes the previous character and "Alt-backspace" deletes the previous word. You can use "Ctrl-A" or "home" to move to the beginning of the line, and "Ctrl-E" or "end" to move to the end of the current line. "Ctrl-L" refreshes the screen.
The "up" and "down" keys provide a history of previously typed
commands scroll through a history list of previous commands. This can
save you time when using the same commands repeatedly. You can also
use the "tab" key for completing partially typed commands. For
instance, 4.7. Quitting napTo quit nap, type/quit . If there are any uploads or
downloads going on, nap will refuse to quit unless you type
/quit yes . You can also give the command
/tquit , which will schedule the program to quit after all
current transfers (including queued ones) have been completed. When
/tquit is in effect, no new uploads will be accepted, but
you can still initiate new downloads. You can undo the effect of
/tquit with /unquit , in case you change
your mind.
An emergency exit from nap is to press "Ctrl-C" twice in short succession. Note that a single "Ctrl-C" does not usually cause nap to quit. 4.8. Napster vs. OpenNapSince June 2001, Napster Inc. has modified their servers to use a new client authentification scheme, and nap users can no longer connect to Napster Inc.'s servers. Thus, nap is configured to connect to the OpenNap servers by default. The OpenNap system is a network of napster servers that are independently owned (not run by Napster, the company). When starting up, nap will automatically download a list of servers from www.napigator.com, and it will connect to the first available one. You can change this behavior if you want; see 7.3. Meta-servers.4.9. News about new releasesAt startup, nap will check online whether a newer release is available. If this is the case, it will inform you of the new release while starting up, as a gentle reminder to upgrade. If you never want to be informed of new releases in this way, putnonews=1
in your config file or start nap with the option
-ononews . You can also check for news from the main
screen by typing /news .
4.10. If you are behind a firewallMost firewalls allow only outgoing connections, not incoming ones. The napster protocol can compensate for this to a certain extent, by arranging things so that firewalled clients initiate connections to non-firewalled clients, and not the other way around. In this way, both uploads and downloads are possible between a firewalled and a non-firewalled client. However, between two clients that are both firewalled, neither uploads nor downloads are possible.
If you are behind a firewall, then nap needs to know about it, in
order to be able to compensate for it. However, nap can't find this
out on its own. The way to tell nap that you are behind a firewall is
to set If you are behind a firewall, you may also need to set up an http proxy so that nap can read its server list; see 7.4. Http proxies. 5. More on searching and downloading5.1. Advanced searches [updated 1.5.1]The/search command has several options. They are:
-m n return at most n search results -l local search: do not search on linked servers -p toggle sending ping requests -f list full filenames (only if noresultscreen=1) -b=rate, -b<rate, -b>rate bitrate equal to, at most, or at least rate. -c=speed, -c<speed, -c>speed link speed equal to, at most, or at least speed. -r=freq, -r<freq, -r>freq sample rate equal to, at most, or at least freq. -s=size, -s<size, -s>size file size equal to, at most, or at least size, in bytes (opennap and slavanap only). -d=duration, -s<duration, -s>duration duration equal to, at most, or at least duration, in seconds (opennap and slavanap only). [new 1.5.1] -x keyword exclude results that match keyword (opennap and slavanap only). Multiple -x options are possible. [new 1.5.1] -t filetype search for the specified filetype, which must be one of: audio, video, text, image, application, mp3, any. [new 1.5.1]The "-s" option only works on OpenNap servers; it has no effect on Napster. The "-l" option will cause the search to only be performed on the server you're connected to, and not on any other servers that might be linked to it in a network. The "-m" option limits the number of results returned. However, even if n is greater than 100, most servers will only return 100 results. 5.2. PingsPings are test packages that are sent to other clients to see how "far away" they are in the internet. A ping result is the time, in milliseconds, that it took the package to travel to the other client and back. Normally, nap will try to collect ping results with each search request. You can switch off pinging by giving the "-p" option to the/search command, or by setting the user variable
noping to 1.
Nap implements pings via a separate helper application called "napping". The reason is that sending and receiving ping packets requires raw network protocol access, which usually requires root privileges on Linux. However, it would be dangerous to run nap with root privileges. The program "napping", written by Sebastian Zagrodzki, solves this problem. Napping is a very small program which is called by nap to handle pings. Napping, unlike nap, can be run "suid", i.e., with root privileges. This is safe because napping drops root privileges immediately after opening the network socket, which is in fact the first thing it does. For napping to work, it must be installed somewhere in your $PATH, it must be owned by root, and it must have "suid" permissions. Thus, the permissions of napping should look like this: -rwsr-xr-x 1 root root 48417 Aug 29 17:54 napping*The "s" in the permissions is called the "suid" bit, and it means that napping will be run with the effective user id of root, rather than that of the user who actually runs it. You can set the right ownership and permissions with the following commands (assuming that napping is installed in /usr/local/bin): chown root:root /usr/local/bin/napping chmod 4755 /usr/local/bin/nappingYou can specify an alternative name for the napping program by setting the napping user variable. You can also use this to
specify an absolute filename, which is useful in case napping is
installed outside your $PATH (see 7.2. User
variables).
5.3. Advanced navigation of the search result screenBy default, the result screen displays the bitrate and length of each song, as well as the connection speed and/or ping results. However, you have full control over what information is displayed: The following keys toggle each category of information on and off:b - bitrate l - length m - megabytes f - frequency u - user name s - speed p - pingThe "m" key also toggles between displaying the file size in megabytes and in bytes. Moreover, if you press "a", all categories of information will be turned on, and if you press "n", they will all be turned off (i.e., you will only see the filenames). The search results can also be sorted by various different criteria. Pressing the uppercase equivalents of the above keys ("B", "L", etc) will sort the search results by that particular category (bitrate, length...). You can also press "N" (uppercase) to sort by filename, and "D" to sort by directory name. Sorting by directory name is useful if there are many files whose names start with "01", "02", and so on. If you press a sort key more than once, the items will alternately be sorted in ascending and descending order.
When you sort, the cursor will remain on the same item that it was
on. Thus, if your cursor is on an item shared by a particular user,
and you press "U", you will see other items of the same user
nearby. Notice that after sorting, the search results are re-numbered
starting from 1. Any subsequent
If you prefer an appearance of the search result screen different from
the default appearance, you can set the 5.4. Shortcut searches [new 1.5.0]A convenience features allows you to enter a new search directly from the search result screen or download/upload screen. Just type "space", and an input window will open in the status line with the prefix "/search " entered for you. You can also type '/' to take you back to the main screen and start a new command (a shortcut for 'q', '/').5.5. Incomplete downloads and turdsFiles that are currently downloading are kept in your "incomplete" directory. They also have the suffix ".incomplete" added to their filename (or alternatively the suffix defined by the user variable "incompletesuffix", if any). When a download has been successfully completed, the suffix is removed and the file is moved to your "download" directory.Nap will, by default, delete any incomplete files whose size is 100000 bytes or smaller. Nap considers such files "turds": they are too small to be of any value, and just tend to clutter up your hard drive. You can override the default cutoff of 100000 bytes by setting the user variable "turdsize" (see 7.2. User variables). In particular, if you set turdsize to 0, only empty files will be deleted, and if you set it to -1, no files will be deleted at all. Note that the turdsize only applies to incomplete files. Nap will never delete a completed file, even if the file size is very small. Note that the convention on incomplete files makes it possible to choose the same directory as your download directory and your incomplete directory (incomplete files will still be recognizable because they have the suffix ".incomplete"). On the other hand, you may choose to include your download directory in your upload path. However, you should never include your incomplete directory in your upload path, as people will probably not be too happy about downloading your incomplete files. If you try to download two files with identical names, nap will automatically rename one of the files before saving them. 5.6. Upload and download limits and queueing [updated 1.5.0]Ifmaxuploads is set, it defined a limit on the total
number of simultaneous uploads. A per-user limit can be set in the
variable maxupuser .
You can limit the maximal number of simultaneous uploads and
downloads, both globally and for each remote user. To limit the
number of simultaneous uploads or downloads, set the user variables
maxuploads and maxdownloads to the desired
number. To limit the number of simultaneous uploads or downloads from
each user, use the user variables maxupuser and
maxdownuser . By default, there are no limits.
When the download limit is reached, nap will queue any additional downloads, and it will start them as soon as space is available. Queued downloads will be listed along with all other downloads on the download/upload screen. If you want to force a queued download to be started immediately, you can do so by pressing 'f' on the download/upload screen. 5.7. Purging and retrying failed items [updated 1.5.0]By default, items which are stopped (finished, interrupted, timed out, or failed) are not automatically removed from the download list. They remain on the list until you remove them explicitly. Individual items can be removed from the download screen by pressing 'd'. You can also press 'P' to purge all stopped items in the current section (i.e., all uploads or all downloads).
If you prefer stopped items to be automatically purged, you can set
the user variable A download which has been interruped, or which has timed out or failed, can be retried by pressing 'r' on the item on the download screen. You can also retry all such items with a single keystroke by pressing 'R'. 5.8. Limiting bandwidthIt is possible to limit the bandwidth of up- and downloads. It is possible to set a limit on the bandwidth per connection, and to set an overall limit on the total bandwidth taken by all connections. This is done separately for uploads and downloads. Up- and download bandwidth limits are given in kilobytes per second, and they are set via the user variablesbandwidthup , bandwidthup1 ,
bandwidthdown , bandwidthdown1 . See 7.2. User variables.
It is possible to change the bandwidth limits at any time. Such changes will immediately take effect, even for transfers that are already in progress. Note that bandwidth limits for downloads only affect the rate at which nap reads data, not the rate at which data arrives from the network. If data arrives on the network at a higher rate than nap reads it, then the operating system will usually buffer such data. Thus, the actual network bandwidth may not go down until the buffer is full. If you plan to limit your upload bandwidth, please be sure to claim an appropriate connection speed. This is out of fairness to other users. For instance, if you limit your bandwidth to 10k/s, you should probably set your connection speed to 56k, even if you are really on a T3 connection. To some extent, nap will try to enforce this kind of etiquette. 5.9. Direct browsingNap supports direct browsing, also known as client-to-client browsing. This is implemented through a new command,/browse2 ,
which works essentially the same way as /browse , except
it gets the file list directly from the other client, rather than from
the server. Nap supports both outgoing direct browsing connections
(you browsing another client's files) and incoming ones (another
client browsing your files).
Direct browsing can be useful if the server limits the number of browse results that it returns. However, there are several caveats which limit the usefulness of direct browsing. The most important is that not many other clients support it. So you will be out of luck if you are trying to directly browse a client that does not support it - most likely, your browse request will time out after 30 seconds. Nufsi, who implemented direct browsing support for nap, writes: "Of the Napster-branded clients, only BETA 8 and BETA 9 support it, but even those clients don't support directly browsing a firewalled remote client. I think the only other client I found that supports direct browsing is Lopster." Another caveat is that if your direct browsing request leads to an error of some kind, there is no way to stop it, and you will not be able to perform another search until the direct browsing request times out after 30 seconds. This is because, due to a bug in OpenNap, nap has no way of differentiating between an error due to a direct browsing request and any other kind of error. 5.10. Sharing non-music filesBy default, nap will only share files that it can validate as music files. Currently, this means files in the mp3 or Ogg Vorbis formats. Nap will generally refuse to share mp3 or ogg files that it recognizes as broken.
Since nap version 1.4.7, it is also possible to share non-music
files. You have a certain amount of control over which types of files
are shared through the
Please note that whether a file is shared or not is decided at the
time the library is built, not at the time the file is
requested. Thus, any changes to 5.11. Managing uploads and downloads from the main screen [updated 1.5.0]Prior to nap version 1.5.0, the download/upload screen did not exist. Instead there were a number of commands for managing uploads and downloads directly from the main screen. It is no longer really necessary to use these commands, but they are still available so we summarize them here.
To see the download list on the main screen, type /ddown 3The corresponding commands for uploads are /pup and
/dup . The command /retry can be used to
retry a specific failed download, and the command
/retryall can be used to retry all of them. To force a
queued or stopped download to be (re)started immediately, use
/force .
Stopped downloads or uploads can be purged from the lists with the
commands
You can also limit the output of the /pdown [filter]where filter is any combinations of the letters "d", "q", "s", "f". These stand respectively for "downloading", "queued", "succeeded", and "failed". If a filter is given, then only the respective downloads will be displayed.
6. Messages, channels, and hotlistsOne of the nice things about napster is that it allows you to communicate with other users. This is done through messages or channels.6.1. Private messagesA "private" message is a message that you send to a specific user. You do this by typing/msg user msgIf you don't want to receive such messages from a particular user, you can ignore the user by typing /ignore userYou will no longer see that user's messages or files. If you have regrets later, you can also /unignore a user. To see a
list of users you are currently ignoring, just type
/ignore without any arguments.
If you intend to carry on an extended conversation with another user,
it quickly becomes annoying to type /query userNap will now open a private channel to that user. The name of the user you are querying will be shown on the top blue status line, and also at the command prompt. You can now talk to the user just by typing messages and hitting return. Messages can be distinguished from commands because commands start with a "/". If you query more than one user, or you are querying a user while also on a channel, you can switch between users and channels by pressing "Ctrl-X". If you want to end the query with a user, just type /part userYou can also just type /part to end the current query.
If you're going to be away from your computer, and you are worried that other users might consider you rude for not replying to them, you can set the user variable "autoreply" to any string which will then be used as an automated reply. For instance, you can set it to "Hi, this is an automated reply. I'm away from my computer. Sorry for not responding personally." Nap will not autoreply a second time to a user it has just autoreplied to; this is to discourage infinite chats between two autoreplying clients! 6.2. Napster channelsWhen you join a channel, you can post messages to the channel and see what other users on the channel are saying. Type/clist or /clist2to see a list of available channels. /clist lists only
the official channels, while /clist2 also lists
user-defined ones (see 6.3. Creating your own channel). To
join a channel, type
/join channelBeing on a channel is very similar to querying a user. You can be on several channels simultaneously. To switch between channels, press "Ctrl-X". The top blue status line shows the "topic" of the current channel. Press "Ctrl-T" to scroll the topic if it does not all fit on the screen. To leave a channel, type /part channelYou can omit the channel name if you want to leave the current channel. You can save the set of currently open channels to a file, or join all the channels previously saved in a file, by typing /savechannels [filename] and /loadchannels [filename]If you omit the filename, the default file .nap/channels-username (relative to your home
directory) will be used. Also, if the user variable
savechannels is set to "1", nap will save your channels
automatically when quitting and rejoin them when starting. See 7.2. User variables.
While you're on a channel, you will see a special prompt telling you what channel is currently active. To say something on that channel, simply type the message. This is why all command names start with a slash "/": so that when you're on a channel, nap can distinguish between a command and a post to a channel. A word of caution about double quotes ("). The napster protocol is extremely dumb when it comes to double quotes. It cannot tolerate any data which contains double quotes. Thus nap will replace double quotes by single quotes when you say something to a user or on a channel.
To see a list of all channels you are currently on, type
Just like for private messages, you can /help commandfor more info.
6.3. Creating your own channelYou can easily create a new channel. Simply join a channel that does not already exist, and it will be created. Normally, such channels have names that start with "#", although the official Napster servers do not enforce this. Once you have created your channel, you are probably the only person on it, but you can invite others to join the channel as well. The channel will continue to exist as long as there are users on it; it will be deleted when the last user parts. You can see a list of all channels, including user-defined ones, by typing/clist2 .
You can set or change the topic on a channel by typing /topic channel topicHowever, this does not work on the official Napster servers. It works on OpenNap servers, if you are the user who created the channel. 6.4. IRC channelsNap can also be used as an IRC client. I have not yet have time to find out how, so probably there will be more information here in a future version of this User Guide.6.5. The hotlistNapster allows you to specify a "hotlist" of users, and you will be notified whenever these users log on or off napster. In nap, simply type/notify user and /unnotify userto add a user to your hotlist, or respectively, to remove a user. To see who is on your hotlist, and which of those users are currently on napster, just type /notify without argument.
/hotlist and /unhotlist are alternative
names for /notify and /unnotify .
Hotlists in nap are permanent; each time you make a change to your
hotlist, it is automatically saved to a file (usually
7. Configuration and user variables7.1. The configuration filesNap uses a configuration file, by default~/.nap/napconf ,
to store information about your default settings. If the configuration
file does not already exist, nap will prompt you for the relevant
information and create a new configuration file. It is possible to
edit this file if you want to change your default settings. The format
of the configuration file looks something like this (except that the
actual file is rather longer):
This is the file which nap will create automatically for you, except it will use the settings that you enter. Note that the password entry is left blank or set to a question mark. If you want, you can edit your configuration file and put your password in it; in this case, nap will not prompt you for it in the future. But nap will never save your password for you; whenever you save your config file, your password will show up as a question mark. If you tend to use several different accounts on napster, and you don't want to be prompted for passwords, you can now also specify passwords and email addresses for each different account. Simply add some lines such as pass.username1=passwd1 pass.username2=passwd2 email.username1=email1 email.username2=email2to your config file. If you specify passwords in this way, it is understood that you don't want to be prompted for them; thus, such passwords never get be replaced by "?". Any options that are set in the configuration file can be overridden on the command line, by using the "-o" option. It is also possible to have more than one alternative configuration file (for instance, if you have two different napster accounts with different usernames and passwords), and to specify on the command line which one to use.
There is also the possibility to read a global configuration
file, usually called 7.2. User variables [updated 1.5.1]Nap has a general mechanism called "user variables". These are internal variables that correspond to nap's settings; for instance, anything you specify in your config file corresponds to such a setting. You can type/set variable value and /unset variableto set a variable to a value, or to unset a variable. If you just type /set variablethen the current value of this variable will be displayed. Finally, if you just type /set , a list of all currently set variables
and their values will be displayed.
Here is an alphabetical list of most user variables that have a special meaning.
/saveconfig filename and /loadconfig filenameThe filename can be omitted, in which case your settings will be saved to your default configuration file (usually ~/.nap/napconf ).
7.3. Meta-serversNormally, when starting up, nap downloads a list of available servers from http://www.napigator.com/servers.php. This list will be stored in the "servers" user variable and can be used for later/reconnect commands.
If you want the server list to be refreshed while you are already
logged into nap, use the /server IP:portTo see the current list of servers, type /set servers .
The URL to look for a server list can be customized by setting the "metaserver" user variable to the desired URL. Note that the format of the servers file must be that used by napigator. The timeout for the connection to the metaserver can be set with the "metatimeout" variable. The default is 5 seconds. If you would like to define your own "servers" variable in you config file and do not want it to be overwritten on startup, add "nometa=1" to your config file. It is still possible to specify a particular server to connect to on the command line. Whenever you specify a "-s" option on the command line, nap will respect this and not get a server list from the metaserver. 7.4. Http proxies [new 1.5.0]Nap uses the http protocol (the same protocol that is used by web browsers) to read the server list from napigator.com, and to check for news about new releases. If you are behind a firewall, you may need to use an http proxy to access the world-wide web. In this case, set the user variableproxy to the URL of your proxy server,
for instance http://proxy.mydomain.com/ . See 7.2. User variables.
7.5. Building your libraryNap maintains a list of the files that you sharing in the file~/.nap/shared . This file is called the "library". Normally,
when you start nap, it will automatically detect whether the
information in the library is up-to-date, and rebuild it if
necessary. This may take a few moments, especially if you are sharing
a lot of files.
You can force nap to rebuild your library by giving it the
You can also issue the 7.6. "Some files in my upload directory don't show up on napster."There are two common reasons why some of your files may not show up on the server. The first reason is that some napster servers attempt to block copyrighted content. In doing so, they often end up blocking non-copyrighted content as well.The other reason some files do not show up is that nap does a basic sanity check on your music files before it adds them to your shared library. Nap will refuse to share music files that it considers broken, because such files would only pollute the network. Please consider repairing such files before you share them. For example, notlame is a high quality free mp3 encoder which allows you, among other things, to reencode existing mp3 files. You just type something like notlame --mp3input infile outfileNeedless to say that this process does not actually fix any audible problems with mp3 files. If you want to share non-music files, see 5.10. Sharing non-music files. 8. Advanced features8.1. User defined commands and handlersOne interesting feature of nap is the ability to add new user-defined commands. This is done via so-called aliases (also called macros). I mostly use aliases for defining shortcuts to commands that I use often. An alias definition is of the form/alias name replacementFor instance, if you type /alias x get $1this will define "x" to be an alias, and you can henceforth type "/x arg" instead of "/get arg". In the replacement text, you can use variables such as "$1", "$2" etc to stand for the first, second argument and so on. You can also use "$1-" to stand for the first and all remaining arguments, "$2-" for the second and all remaining arguments, and so on. This is useful, for instance, in a alias like this: /alias s search -b>128 -c>7 $1-The replacement text for an alias can contain several commands separated by "|", as in /alias f finger $1 | browse $1 or /alias i ignore user1 | ignore user2 | ignore user3Commands can also be grouped with braces "{" and "}". It is also possible, although maybe less useful, to construct more complex aliases, using control features such as "if" and "while".
To see a list of aliases currently defined, just type
There is also the ability to add user-defined "handlers". Handlers are similar to aliases, but they react to messages from the server, rather than to commands from the user. Handlers are automatically loaded from a file "~/.nap/handlers", and they can also be saved there. Warning: Handler code is not debugged very well and may cause program crashes. The basic syntax for handlers is /handler code commandswhere code is the napster message code in
decimal. As with aliases, you can use "$1", "$3-5", "$2-" and so on to
stand for selected parts of the incoming message. See napster.txt for the napster protocol
specification.
The details of the syntax and semantics of aliases and handlers is a bit obscure, and to my knowledge they have not been documented anywhere. This part of the code is definitely very buggy. If you ever have any serious use for them (other than defining a shortcut for a command), let me know. 8.2. Daemon modeSometimes you might want to share your files on napster, even when you're not currently actively using it. For instance, if you're on a multi-user system, you might want to run a napster client in the background at all times, even when you're not logged in. (Beware though that downloads generate quite a bit of network traffic, so you better had a fast connection and be sure it is not going to upset other users).Nap's daemon mode allows you to do exactly that. If you invoke nap as follows: nap --daemon --autorestartit will connect to the napster server and then run silently. While connecting, it will still print the usual informational messages, and prompt you for any missing information. As soon as the connection succeeds, it will print something like Connected to 208.184.216.40:8888and then fall silent. It will produce no further output, nor react to input. Moreover, if your config file is complete, and you are sure that nap will not prompt you for any information, you can even suppress the informational messages by redirecting its output: nap --daemon --autorestart > /dev/null
By the way, the You can also get nap to reconnect by sending it a SIGUSR1 signal: kill -USR1 process-idThis works both in daemon mode and in interactive mode. When nap receives this signal, it executes the /reconnect command.
Two words of caution on using the If you feel uncomfortable with nap's silence, and you would rather like to see whether it is actually working (and not just dozing off), you have the ability to write something to a log file. The option --log logfilewill cause nap to log all uploads and downloads to the specified file. (But beware that log files might later be used against you in court). If you'd like even more information, you can specify --logall logfile2and nap will log everything that would have normally been written to the main screen to that file. Note that these log files can take up a tremendous amount of disk space, so you might want to delete them and restart nap periodically, for instance once a week. If a log file already exists, nap will append its output to the end of the existing file. 8.3. Running nap as a nohup processOn unix systems, it is possible to run a process as a "nohup" process - this means, the process will not be killed when you log out. This might come in handy if you want to run nap in the background while you're not logged in. Nap's daemon mode is perfect for a nohup process. For instance, the following works:nohup nap --daemon --autorestart --log logfile >/dev/null &Note that you have to put an explicit ampersand "&", or otherwise the process will not fork to the background. To stop such a process, you will have to kill it explicitly, by saying kill -KILL pid or killall -KILL napwhere pid is the process id, as reported by the command ps -e . The second form kills all processes whose name is
nap.
9. Obsolete features9.1. Creating a new napster accountThis section is obsolete, since nap can no longer connect to the "official" Napster servers, and accounts do not need to be created on OpenNap servers. Thus, the "-m" option is now pretty much useless. That said, here is a description of what it does:If you do not have an account on napster yet, you can easily use nap to create a new account. Just type nap -m -u usernameYou will be prompted for your password and email address as usual, and possibly for some other information. Then your account will be created, and you immediately get logged into your new account. If the username is already taken, you will get an error message (or several) to that effect; you'll have to choose a different username until you find one that is not taken. 10. Summary of command line optionsUsage: nap [options] Options: -h, --help - print this help message -v, --version - print version info and exit -b, --build - build library of shared files to send to server -B, --build-only - build library and exit -N, --nobuild - do not build library, even if it is out of date -m, --create - create new account on server (obsolete) -r, --reconnect - keep reconnecting until server connection established -a, --autorestart - automatically reconnect when connection to server lost -q, --daemon - run without user interface; file sharing only -t, --notitle - do not display title bar (fixes messed-up displays) -l, --nxterm - try using a terminal which is compatible with most systems (fixes some messed-up displays) -T, --transparent - use terminal's default background instead of black -n, --noserver - start up without connecting to a server [new 1.5.1] -f, --config fn - config file to use (default $HOME/.nap/napconf) -x, --log fn - log all transfers to a specific filename -g, --logall fn - log everything to a specific filename -s, --server sv:port - select a specific server (multiple -s opts possible) -d, --debug n - set debug level -u, --user str - specify napster username -p, --pass str - specify user's password -e, --email str - specify user's email address -U, --upload dir - specify upload directory (multiple -U opts possible) -D, --download dir - specify download directory -I, --incomplete dir - specify directory for incomplete files -P, --dataport n-m - specify port(s) to use for incoming upload requests -C, --connection n - specify connection speed number (see README) -M, --maxuploads n - specify maximum number of simultaneous uploads -o, --option var=value - set user variable 11. Summary of nap commands [updated 1.5.0]I did not have time to write a detailed description of each command. Here is the complete list of commands, along with the short descriptions given by/help . Some command have additional
options which are not documented.
about alias aliaslist announce ban banlist block blocklist break browse browse2 cban cbanlist chupload clear clearalias clearhandler clist clist2 cloak conf cunban ddown dec debug disconnect dlul dns done dtimer dup echo eval exec fdown finger force fup g get getservers gusers handler handlerlist help hotlist if ignore ignoreclear ignorelist inc irc join kick kickall kill lastlog loadalias loadchannels loadconfig loadhandler me msg muzzle names news noprint notify opsay part pchans pdown ping psocks pup purge purgedown purgeup pvars query q quit rebuild reconnect reload repeat results retry retryall savealias savechannels saveconfig savehandler say search serv server set setdataport setlevel setlinespeed setpassword setuserlevel sraw stop sver tell timer tlist topic tquit unalias unban unblock unhandler unignore unmuzzle unnotify unquit unset update while whois window wstats
/about - Shows credits |