Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


Posts posted by grep420

  1. Check your BIOS to see if ACPI is enabled.

    - grep


    The computer is only three years old.


    How do I configure / know if my computer has ACPI technology?

    I hope this is significant: this was never a problem until after I upgraded from Fedora 7 to 8. Before the upgrade, the computer would switch the power off completely on shut down.

  2. I decided I would like to listen to my vast mp3 collection from anywhere. I went with shoutcast as I have several friends that use it and it looked like it would serve my needs perfectly. First you need to get the shoutcast source and to send the stream to the shoutcast server you will need to get sc_trans. I read that you can use winamp to stream to shoutcast but I don't use windows or winamp so I used sc_trans. It takes a playlist of mp3s and sends it to the server. The playlist is just a list of mp3s using full paths. I will include examples at the end of this little explanation.

    First you should create a user to run the server and sc_trans { useradd shoutcast } You really don't want this to be ran as the root user for safety sake. Now that you have your user created you need to become that user with su { su - shoutcast } this will give you a login shell as the shoutcast user. Now let's grab the files you will need { wget http://www.shoutcast.com/downloads/sc1-9-5...x-glibc6.tar.gz && wget http://grep420.net/linux/sc_trans_040.tar.gz } Now that you have the files you need lets get them untar'd and gunzip'd. { tar -xvzf shoutcast-1-9-5-linux-glibc6.tar.gz && tar -xvzf sc_trans_040.tar.gz } First lets make this easier to work with { mv shoutcast-1-9-5-linux-glibc6 shoutcast } { mv sc_trans_040 sc_trans }

    Now let's get started with the configuration. { cd shoutcast } Now you need to open the server configuration file in your text editor of choice. I use vi, so I would type vi sc_serv.conf you can usually find nano on your system if you are unable to figure out vi, or type vimtutor for a quick lesson on the basics of vi. Now that you have sc_serv.conf open you need to set a few values for this to work the way you want.


    # sc_serv.conf

    MaxUser=20 # set this to the maximun number of people you want to connect to the stream

    Password=YourPassword # this is the password you use in the sc_trans.conf file

    PortBase=8000 # this is the port it will listen on

    AdminPassword=MyPassword # this is your admin login for the web based admin tool


    That's all you really need to edit in the server conf. Save that file and go configure sc_trans. { cd ~/sc_trans } You will need to edit sc_trans.conf the same way we did sc_serv.conf



    PlaylistFile=/home/shoutcast/playlist.lst # this is your list of mp3s you want to stream

    ServerIP=localhost # most likely this is what you want

    ServerPort=8000 # this is the port that you set in sc_serv.conf

    Password=YourPassword # this is the password you set from above in sc_serv.conf, not the admin

    StreamTitle=blah # set this to what you want displayed in the players

    StreamURL=http://grep420.net # set this to your domain or the site you want

    Shuffle=1 # set this to 0 if you don't want it to shuffle, it will play each sonf from your list in order


    The playlist is very simple. It is just a list of each mp3 you want to stream. It needs full paths and the user shoutcast will need read access to the files. { chmod 755 /nfs/mp3 }


    #example playlist.lst





    Now you have them configured, here is the last tricky part. If you are using NAT ip's behind a linux router/gateway you will need to forward some ports to the internal ip of the shoutcast server. I will give you an example.


    # iptables example is assuming eth0 is your external interface on the router/firewall box.

    /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8000 -j DNAT --to

    /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8001 -j DNAT --to


    Now lets start the server. { cd ~/shoutcast && ./sc_serv sc_serv.conf & } and sc_trans { cd ~/sc_trans && ./sc_trans sc_trans.conf & } You will start to see the output of what is happening in your terminal. Now login to the web tool and check the status. Open your browser to the servers ip on port 8000 { } You should be able to click on admin login and use the password you set in sc_serv.conf above.


    I hope this works for you as easily as it did for me, and if I left anything out please feel free to post your questions here.

  3. AuthName grep420.net

    AuthUserFile /home/grep420/www/htpasswd

    AuthGroupFile /dev/null

    AuthType Basic

    require valid-user


    This is an example of a .htaccess file. This will require a password from anyone trying to access the directory this file is located in via the web. When you create your own .htaccess file the AuthName section can be anything you want for the title. AuthUserFile needs to point to the file you are storing your user/password information. You can generate a user/password combination with the htpasswd command. AuthType Basic is probably what you want. The most important part is require valid-user, this is basicly telling apache to ask for a user/password for access.



    shell#> htpasswd .htpasswd linux-noob

    New password:

    Re-type new password:

    Updating password for user linux-noob

    shell#> cat .htpasswd




    Now by placing your .htaccess file into a web directory it will prompt for a user and a password for access. Make sure you keep the htpasswd file in a secure area.

  4. Here is an example of what I use for my Eterms, this has transparency, shading, gemoetry settings and no borders.


    Eterm -g 80x35 -f white --scrollbar=no --shade 15 --buttonbar=no -O -x

  5. ## Here is a very simple way to do that, you may need to add a step to verify the file such as `grep [A-Z]*[a-z]*[0-9].doc` and you would of course have to be root. This will also only work if the file has no spaces in the name. In that case you would have to convert the file to remove the spaces before the chmod.


    updatedb && locate *.doc |xargs chmod 644

  • Create New...