the linux 'how to' thread

Discussion in 'Software' started by hawklord, Feb 12, 2012.

  1. hawklord

    hawklord Master Sergeant

    one or two of us are dedicated linux users and know what we can do - both the easy way and the .... less easy way:-D

    lots of people are scared witless by just the mention of a terminal and run quickly away at the mention of doing something on linux

    so i thought it may be a good idea to pool all our 'how to's' together, a sort of database for easy reference,
    also to make linux seem less 'alien' and less of a programmers tool,
    that it can be a viable desktop option

    i would like to see use of desktop applications instead of terminal commands, just for that "it's really not that hard" feeling,

    anyone up for it ?
     
  2. hawklord

    hawklord Master Sergeant

    how to stream video from your linux box to your xbox360 using ps3mediaserver

    i'm assuming that most, if not all, common media libraries are installed (basically you can play most avi's on your linux box)

    http://mac.majorgeeks.com/download7191.html

    the link here on majorgeeks gives a dmg file, this is a mac/apple file,
    this link

    http://code.google.com/p/ps3mediaserver/downloads/detail?name=pms-generic-linux-unix-1.50.1.tgz

    gives a generic linux tgz (archive file, similar to a zip file) file,

    download the file and save it in 'Documents',
    right click and extract with ark (or whatever archive manager you use)

    open the extracted file and right click on PMS.sh,
    choose the properties then click the permissions tab and check 'is executable'
    then close the properties window

    now the hard bit:-D

    double click PMS.sh and ps3mediaserver should open (you will need java, but i'm assuming its already installed)

    you will notice a big grey cross in a red button - no worries,

    you need to set a media directory,
    click the navigation/share settings tab,
    you will notice near the bottom left there is a folder with a green + (plus sign), click this,
    you need to navigate to the folder where your stored avi's are, then just click 'open',
    this will auto-add the directory,
    if you have more than one folder then it needs to be done again till you are happy,

    now click 'save' at the top

    right click the black icon in your system tray and quit

    boot your xbox360,
    restart ps3mediaserver, and, if your xbox is on the same internal network, you will now be presented with a big green tick,

    on the xbox, go to video > my video apps > video player,
    you should see an entry for ps3mediaserver, choose this option and your folders will appear,
    just use the controller to access the avi you want to watch,

    alls well and happy, with no terminal commands,

    be aware that some avi's will not play, i've found that avi's encoded to div3 will not play and brings up an error that says unsupported codec, status code: 80-C00DF242,

    mp4, mpg, mkv, divx and iso's can also be played though

    there is a way to create an application launcher to save having to double click PMS.sh when you want to start the server, but due to all the different linux distro's then i would be typing forever, so that would have to be asked,
     
  3. hitest

    hitest Staff Sergeant

    My distro of choice is Slackware Linux. Slackware is a good distro for people that have some experience with Linux. The book is a good resource for starting out with Slackware.

    http://www.slackbook.org/
     
  4. hitest

    hitest Staff Sergeant

    At some point using Linux you may wish to delve deeper and look under the hood of your operating system. The Linux terminal allows you to run programs and edit text files to name but a few. Many system configuration settings can be changed by editing text files. There are excellent GUI text editors like Gedit and Kwrite that will let you edit text files.
    However, there may come a time when you need to edit a text file on the command line interface (CLI).
    In the following example I will use the Debian operating system and the nano text editor.
    1. Open up a terminal prompt and get root access. Type su then enter your root password.
    2. If you don't have nano installed then install it with the following command:
    # aptitude install nano
    3. Let us say that you wish to add the backports repo to your sources.list. At a root shell prompt start-up nano and give the command pathway to your sources.list

    # nano /etc/apt/sources.list

    4. This will display your sources.list which is a list of all software repositories on your Debian system. Add the following line to your sources.list:

    deb http://backports.debian.org/debian-backports squeeze-backports main

    5. To save your file using nano you will issue the following keyboard combination:

    Ctrl+o <--------- that is a lowercase o

    6. To exit nano you will issue the following keyboard combination:

    Ctrl+x

    7. Then update your sources.list by issuing the following command:

    # aptitude update

    You can now install software from the backports repo. A command line interface text editor can be a valuable thing if your system needs to be repaired and X windows no longer functions. Here is another tutorial on how to use the terminal prompt.

    http://linuxcommand.org/
     
  5. hitest

    hitest Staff Sergeant

    How to apply security patches and updates on a Slackware system.

    Slackware now ships with the slackpkg utility which allows you to easily download and install security patches and updates with a few simple keyboard commands.

    1. Use nano or the editor of your choice to uncomment one and only one mirror on your system. Save and exit. I am running Slackware 13.37 in my example.

    nano /etc/slackpkg/mirrors

    Code:
    # USA, 45Mbit
    ftp://slackware.oregonstate.edu/pub/slackware/slackware-13.37/
    Open up a terminal prompt and get root access. Type su, then enter root password. Then run the following commands in this order to update, download, and install security patches and any new programs that are available.

    2. Check for updates:

    Code:
    slackpkg update
    3. Install any new programs that are available:

    Code:
    slackpkg install-new
    4. Upgrade your system:

    Code:
    slackpkg upgrade-all
    5. Run this command if you're upgrading to a new version of Slackware or if you have obsolete packages that you wish to remove:

    Code:
    slackpkg clean-system
     
  6. hitest

    hitest Staff Sergeant

    Last edited: Mar 13, 2012
  7. hawklord

    hawklord Master Sergeant

    hi,

    all good clean stuff and very informative,

    but ..hehe

    i really wanted a general software thread for people who are scared of linux command stuff, who get confused with updating via a terminal,

    basically a 'one size fits all' sort of thing (or in this case 'a one how to fits all'), a thread that could be used for a point of reference,
    to show that linux has progressed into something more, into a viable desktop system and that there is no need for terminal,

    i, personally, know people who think that everything is done by command and think that i am a genius :confused:confused,
    people who think that to update ANY linux its apt-get update and apt-get-??? for software and cannot understand (e.g) urpmi can be used for updates and software,

    there are lots of places on how to use windows software, but not a lot on linux software - and most of them are still command stuff,
     
  8. hitest

    hitest Staff Sergeant

    Greetings hawklord,

    Thanks for the comments, they are all very good points. However, Linux is a very broad topic and I think that there is room for different points of view. This is the Linux how to thread. I really don't think that I will scare people by posting information about how to use the command line. If people do not want to use the command line they are not forced to. At some point though a user may become curious about the terminal prompt and different distros. It is all good. I won't second guess any member of MajorGeeks and assume that they can not use a particular version of Linux or application. Nice to meet you! :)
     
  9. BoredOutOfMyMind

    BoredOutOfMyMind Picabo, ICU

    For all the recognization Ubuntu has brought to the Linux users, there is serious obfuscation. Have you ever tried to get answers on The Orange Side?

    Debian uses apt-get and your use of Mandriva is like Chrysler and Pontiac.

    I remember the pains of RedHat 6.0 and getting ppp to work. Mandrake was better with diskdrake, but not as clean as Mandriva. I considered Fedora Core again, but am so used to how to do it with Debian cli, it was confusing to go back to urpmi and yum.

    Sorry, carry on.
     
  10. Hedon James

    Hedon James Sergeant

    I like Hawk's idea of a "how to" thread for newbies, using GUI tools. On the flip side, I understand why tutorials often provide CLI directions. The CLI is usually pretty consistent across distros, whereas the GUI varies widely, depending on Debian/RPM/Source distro and further by Gnome/Unity/KDE/XFCE/LDE desktop environments.

    Perhaps a solution is to break it down a little. Tutorials for Debian, RPM, and Source-based distros; or tutorials for Gnome, KDE, XFCE, and LDE desktops. Maybe with the categories created, we can provide links to existing tutorials outside of MG forums (legality?), or maybe we just create
    our own "layman" tutorials and sort it out into categories later on?

    Not sure what the answer is, and don't want to hijack someone else's idea or thread...just looking to contribute to the thought process. Until then, I've got a "layman" tutorial for newbies on how to install a Linux distro from a LiveCD or LiveUSB stick...
     
  11. Hedon James

    Hedon James Sergeant

    NEWBIE INSTALLATION OF A DEBIAN-BASED DISTRO, such as Debian, Ubuntu and its numerous derivatives (Kubuntu, Lubuntu, Xubuntu, Edubuntu, Ultimate, etc...), Mint and others. This tutorial MAY also be used for RPM-based distros, such as Fedora, OpenSUSE, etc... Linux GUI (graphical user interface) installation programs are often "tweaked" or swapped out for something new and improved; the specific steps usually vary slightly between different system installers, but the general overview provided below will help you get the job done!

    Also, this overview is prepared under the assumption that you have already obtained, or prepared, a LiveCD or LiveUSB stick (aka a "Live stick") and know how to boot your machine using the LiveCD or Live stick. If you do not have a LiveCD or Live stick, you cannot install a Linux distro on your machine. A LiveCD or Live stick allows you to try out a Linux OS to see how well it integrates with your machine's hardware, a "try before you buy" (yes, I know Linux is FREE, as in "free beer" and "freedom") opportunity without doing ANYTHING permanent to your existing machine; a true "no risk" proposition! I HIGHLY RECOMMEND THIS, AS I BELIEVE MORE PEOPLE WOULD CHOOSE DIFFERENTLY IF TRULY GIVEN A CHOICE (as opposed to the Microsoft mentality of "You will use Windows, and you will LIKE it")! EVEN MORE PEOPLE MIGHT "GIVE IT A TRY" IF THEY KNEW JUST HOW EASY IT WAS, AND HOW EASY IT IS TO CHANGE YOUR MIND!!!

    However, preparing a LiveCD or Live stick is beyond the scope of THIS tutorial; just about every Linux distro website provides directions on their webpage to download and prepare an ISO for LiveCD or Livestick creation. Do that FIRST, learn how to boot your machine in "Live mode" (usually tapping an "Fn" key at boot time) and explore your newly available Linux OS and how it interacts with your machine's hardware. You can do this forever with no risk of harm, but any changes you make to the distro, or any data you create and save, will be lost each time you shut down the machine. This is because a LiveCD or Live stick runs completely in RAM. The pros of this are that no permanent changes are made to your system or your disk; a true no-risk proposition. The cons of this are that a LiveCD may run sluggishly, as a CD is slower than disk hardware, and any changes you make will be lost as soon as the RAM is shut down.

    Once you're confident with your selection of Linux distro, and you want to keep it permanently, the next step would be an installation (otherwise, keep creating LiveCD or Live Sticks until you find one you like). However, before you install, you must ask yourself a very imporant question: Do I want to "overwrite" my existing Windows OS, making Linux the ONLY system on my machine; or do I want to install Linux ALONGSIDE Windows, thereby creating a "dual-boot" scenario where I can choose my OS of choice at each boot time. Many Linux advocates will suggest you overwrite Windows and don't look back, but that is based on THEIR criteria, much like Microsoft presents a Windows OS based on THEIR criteria. I believe you should have the right to impose your own criteria of what an OS should look like and how it should act. While I believe Linux is superior in most ways, I also believe you should have the right to make that judgement based on YOUR PERSONAL CRITERIA, which may not coincide with mine?! That is why I highly recommend a dual-boot situation...but you are free to choose differently!

    Some things to consider when making this decision are your motivations to try Linux. If your Windows is buggered up, or you can't stand Windows anymore, AND you have a Windows install/recovery CD go ahead and overwrite it; otherwise, if you're unsure, I highly recommend the dual-boot option where BOTH systems are available at boot time. If you're leaning towards dual-boot also, just ensure you have around 8GB-10GB of available HD for the Linux installation (Linux typically requires 3GB-4GB for the system itself, approximately 1GB-2GB for a "swap" partition, and the remainder for data that YOU create) before you begin. Additionally, dual-booting provides the easiest path to revert completely back to Windows, or to completely wipe Windows in favor of a full Linux installation. Either way, before you install, I'd recommend a little housecleaning in preparation.

    Most importantly, BACK UP all your data files to an external drive. Assuming dual-boot option, once all data is safely duplicated, I'd also HIGHLY recommend using CCleaner (freeware available here on MG website) to clean up registry entries, data caches, etc... that may reside on the far reaches of your HDD and could possibly be overwritten. Follow that up with Defraggler (also freeware available here on MG) to defrag your system. With those 3 tasks completed, I'd say you're ready for a full install. If you're wiping Windows from the system and replacing with Linux, step 1 (data backup) is all that's required.

    Live boot your CD or USB stick, as before, but with ethernet connection (some wireless cards are detected as having drivers availabe, but cannot be installed because the wireless is not yet active without the driver - a true chicken & egg proposition; the solution is to ALWAYS install with an ethernet connection and allow the ethernet connection to download any wireless drivers/programs you need; most, if not all, wireless issues will be pre-emptively solved in this manner!). Choose the "Install OS" icon and answer all presented questions in order to setup your system (i.e. keyboard layout, time zone location, etc...); it's very intuitive and comprehensive. You will have the opportunity to go back and change your answers/selections until you see a warning screen to the effect of "all selections will be written to disk upon going forward. please go back to change your selections, or go forward to write your selections to disk."

    The only potential trip up will involve disk partitioning when the installer notifies you that "an existing OS has been detected" and asks questions whether you want to "overwrite disk, using entire disk for Linux" or "install Linux side-by-side with existing OS, choosing from either at boot." Referencing the previous discussion above, I highly recommend the dual-boot, and the install program seems tailored for dual-boot selectors. If you want to overwrite the existing OS, choose that option and jump to the paragraph below regarding RAM and "swap" selections. If you're wanting to dual-boot, the Linux installer will likely suggest some partitions to you in a graphical format wherein the "NTFS" partition is your existing Windows OS and "EXT" partitions are the Linux OS to be installed. (NTFS is just the file formatting system Windows uses, while EXT is typically the formatting system that Linux uses; the Linux installer doesn't recognize "operating systems" per se, it recognizes file formatting systems. This is not important to you right now, and you will probably learn more about file systems at a later date in your Linux experience. For now, you just need to be aware that NTFS=Windows and EXT=Linux). Your primary concern, at this point, is that the EXT partitions TOTAL at least 8GB-10GB. If they do not, you MUST go back and choose to overwrite your existing OS, or terminate the installation. If possible, I would recommend clicking on the GUI partition and sliding (or entering disk sizes in the entry boxes, as appropriate) to get as close to a 50/50 partition of Windows/Linux OS as possible, while still allowing Windows some headroom to "grow" in the future (the graphical interface will show "shaded" colors to help you visualize the size of the OS in relationship to the disk size). If it isn't possible, accept the suggested default and move on...

    A related selection of partitioning will involve a "swap" partition, or an area of HDD on the EXT partition to be utilized as RAM when your RAM is fully maxed. A good rule of thumb is that "swap" should be 2x your existing RAM, but not exceeding 2GB. For instance 512MB RAM should be accompanied by 1GB swap; 1GB RAM with 2GB swap; 2GB RAM with 2GB swap (in excess of 2GB swap would generally be considered excessive). With dual-boot versus overwrite selection, and size of swap selections behind you, the rest is smooth sailing!

    Once installed, reboot (Linux will now be at the top of the selection list of available OS and Windows will be at the bottom). Your machine will now default to this selection unless you arrow down to another selection. Use the new system, try out different programs, surf the internet, and verify your install is behaving appropriately. Update your system (the "how to" will become apparent upon your exploration of the Linux OS - each Linux distro is slightly different, but this info is easily acquired if you just play with it). Also, assuming a dual-boot system as recommended, verify the existence of a disk that looks something like "23GB File System." THIS IS YOUR WINDOWS PARTITION, and the "XGB" designation will be dictated by the size of your Windows OS (mine is 52GB File System). And YES, you can access your Windows data from within Linux (sorry, but Windows will never "see" your Linux OS or your Linux data from within Windows: advantage - Linux)! Simply click on that disk directory (__GB File System) and drill down through the Documents & Settings/My Document directory and see if that doesn't look familiar! I would recommend copying the entire My Documents directory and pasting into the /Home directory of Mint. From there, you can separate Music, Photos, Videos, etc... into their appropriate folders. Congrats, you're DONE, enjoy your new system!!!

    For future reference, I'd also highly recommend a LiveCD/stick called GPartEd. It will come in very handy if you decide to revert to Windows (not likely!) or to expand Linux to overwrite Windows. But that's a different how-to! ;-)

    For new, just enjoy the goodness of your new Linux distro...it really IS a NEW COMPUTER!!! Congrats!
     
  12. hitest

    hitest Staff Sergeant

    I am a very new member here. I have a suggestion. I would be very open to the idea of a moderator splitting this thread into two threads. Perhaps my thread could be titled Intermediate Linux Techniques, How To Thread.
    Just a thought. :)
     
  13. hitest

    hitest Staff Sergeant

    One way to try out new versions of Linux is to install a virtual machine application which will allow you to create a virtual PC that will run inside your existing operating system without altering anything on your hard drive. Running a VM (virtual machne) is an excellent way to find out if a version of Linux meets your needs.
    I really like using virtualbox which you can download at the following link:

    https://www.virtualbox.org/

    Once virtualbox is installed for your operating system you can read the documentation on how to create a virtual machine that will run on your OS.

    Just for the fun of it I installed Crunchbang Linux on my Slackware 13.37 work station using virtualbox.
    Have fun! :)
     

    Attached Files:


MajorGeeks.Com Menu

Downloads All In One Tweaks \ Android \ Anti-Malware \ Anti-Virus \ Appearance \ Backup \ Browsers \ CD\DVD\Blu-Ray \ Covert Ops \ Drive Utilities \ Drivers \ Graphics \ Internet Tools \ Multimedia \ Networking \ Office Tools \ PC Games \ System Tools \ Mac/Apple/Ipad Downloads

Other News: Top Downloads \ News (Tech) \ Off Base (Other Websites News) \ Way Off Base (Offbeat Stories and Pics)

Social: Facebook \ YouTube \ Twitter \ Tumblr \ Pintrest \ RSS Feeds