Page 1 of 3 123 LastLast
Results 1 to 10 of 27

Thread: Is it possible to do all this with only one terminal command?

  1. #1
    Join Date
    Feb 2007
    Location
    Topeka, Kansas
    Beans
    2,317
    Distro
    Ubuntu 13.10 Saucy Salamander

    Is it possible to do all this with only one terminal command?

    Edit: I've pulled this off and have edited this first post so people won't assume I still need help. I wanted to share my final results.

    Here's the list of things I wanted to do with a script:


    1. Customize the appearance of Ubuntu (wallpaper, theme, fonts, dockbars, etc.)
    2. Run Update Manager.
    3. Install Flash, Java, Windows Media Codecs and MS fonts with just 4 clicks!
    4. Install Compiz Fusion Advanced Settings Manager with one more click.
    5. Install WINE with one more click and use it to run Windows based software.
    6. Reveal Archive Manager in the Accessories menu and use it to create zip archives.
    7. Install the libdvdcss2 decoder so you can watch DVD’s.
    8. Install Skype from a *.deb file.
    9. Install Google Earth using Terminal.
    10. Install Virtualbox.


    The first item on the list was skipped (that can't be done with a script, at least no for everyone).

    The "Reveal Archive Manager" was also skipped. That left me with a lot.

    So, here's a copy and paste from my most recent post about 3 pages in which contains my final results:

    Just wanted to check back in with this and let you all know that this is what I ultimately came up with:

    Code:
    sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get install -y ubuntu-restricted-extras compizconfig-settings-manager wine libqt4-core libqt4-gui && sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get update && sudo apt-get -y --force-yes install medibuntu-keyring && sudo apt-get update && sudo apt-get install -y libdvdcss2 && sudo apt-get update && sudo apt-get upgrade && wget http://download.skype.com/linux/skype-debian_2.0.0.72-1_i386.deb && sudo dpkg -i skype-debian_2.0.0.72-1_i386.deb && wget http://dl.google.com/earth/client/GE4/release_4_2/GoogleEarthLinux.bin && sh GoogleEarthLinux.bin && wget http://download.virtualbox.org/virtualbox/2.0.4/virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb && sudo dpkg -i virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb* && sudo adduser $USER vboxusers && echo “none /proc/bus/usb usbfs devgid=46,devmode=666 0 0? | sudo tee -a /etc/fstab
    And here is the code for 64-bit (which uses medibuntu as the source for the skype install... this is based upon the instructions found here).

    Code:
    sudo apt-get update && sudo apt-get -y upgrade && sudo apt-get install -y ubuntu-restricted-extras compizconfig-settings-manager wine libqt4-core libqt4-gui && wget -N boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb; sudo dpkg -i getlibs-all.deb; sudo getlibs -p bluez-alsa && sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list --output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get update && sudo apt-get -y --force-yes install medibuntu-keyring && sudo apt-get update && sudo apt-get install -y libdvdcss2 skype && sudo apt-get update && sudo apt-get upgrade && wget http://dl.google.com/earth/client/GE4/release_4_2/GoogleEarthLinux.bin && sh GoogleEarthLinux.bin && wget http://download.virtualbox.org/virtualbox/2.0.4/virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_amd64.deb && sudo dpkg -i virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_amd64.deb* && sudo adduser $USER vboxusers && echo "none /proc/bus/usb usbfs devgid=46,devmode=666 0 0" | sudo tee -a /etc/fstab
    I've attached scripts that can be used instead of copying and pasting the above code. One for 32, and one for 64 bit. To use them, save them to your home folder, open a terminal window and type:

    Code:
    chmod +x megascript.sh
    For 64-bit:
    Code:
    chmod +x megascript64bit.sh
    Then to run the script type:
    Code:
    sudo ./megascript.sh
    OR
    Code:
    sudo ./megascript64bit.sh
    I don't have a computer with a 64-bit processor so I can't test this out myself, but it SHOULD work.

    The only other snag that I wish I could solve is:

    1. When the Java license question comes up and asks you to select Yes (so as to agree to the license)... I wish I could automate that so I wouldn't have to sit next to the PC for that question to be answered.

    2. About the same thing with the Google Earth install, except this has to do with "Where do you want it to be installed" basically. I wish there were a way to have it automatically go with the default location, as well as click "Quit" when it's finished installing to that the rest of the script/code can continue and finish.
    Attached Files Attached Files
    Last edited by diablo75; November 26th, 2008 at 04:15 AM.

  2. #2
    Join Date
    Aug 2007
    Beans
    2,132

    Re: Is it possible to do all this with only one terminal command?

    Quote Originally Posted by diablo75 View Post
    I'm not too sure about item 8. I know how to use wget to download a file, but I've not yet checked the exact path to the deb file that needs to be downloaded and I don't know how to install a deb from the terminal...
    Code:
    dpkg -i <package>

  3. #3
    Join Date
    Feb 2007
    Location
    Topeka, Kansas
    Beans
    2,317
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Is it possible to do all this with only one terminal command?

    Okay, let me work that in....

    So we have steps 2-5:

    Code:
    sudo apt-get update && sudo apt-get upgrade && sudo apt-get install ubuntu-restricted-extras compizconfig-settings-manager wine
    Step 6, still not sure about...

    Step 7:

    Code:
    sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list –output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update && sudo apt-get install libdvdcss2 && sudo apt-get update && sudo apt-get upgrade
    Now the new step 8:

    Code:
    wget http://download.skype.com/linux/skype-debian_2.0.0.72-1_i386.deb && sudo dpkg -i skype-debian_2.0.0.72-1_i386.deb
    And step 9:

    Code:
    wget http://dl.google.com/earth/client/GE4/release_4_2/GoogleEarthLinux.bin && sh GoogleEarthLinux.bin
    And the new step 10 (without the addition to fstab; haven't come up with that just yet):

    Code:
    wget http://download.virtualbox.org/virtualbox/2.0.4/virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb && sudo dpkg -i virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb && sudo adduser $USER vboxusers
    So from the looks of it, what need to figure out is how to add this text:

    none /proc/bus/usb usbfs devgid=46,devmode=666 0 0
    ...to the bottom of the fstab file. What's the best way to do that?

    Edit: Combining together what I've got so far, I've got this whopper of a command:

    Code:
    sudo apt-get update && sudo apt-get upgrade && sudo apt-get install ubuntu-restricted-extras compizconfig-settings-manager wine && sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list –output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update && sudo apt-get install libdvdcss2 && sudo apt-get update && sudo apt-get upgrade && wget http://download.skype.com/linux/skype-debian_2.0.0.72-1_i386.deb && sudo dpkg -i skype-debian_2.0.0.72-1_i386.deb && wget http://dl.google.com/earth/client/GE4/release_4_2/GoogleEarthLinux.bin && sh GoogleEarthLinux.bin && wget http://download.virtualbox.org/virtualbox/2.0.4/virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb && sudo dpkg -i virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb && sudo adduser $USER vboxusers
    Last edited by diablo75; November 9th, 2008 at 09:32 PM.

  4. #4
    Join Date
    Aug 2007
    Beans
    2,132

    Re: Is it possible to do all this with only one terminal command?

    Code:
    echo "none /proc/bus/usb usbfs devgid=46,devmode=666 0 0" >> /etc/fstab

  5. #5
    Join Date
    Apr 2006
    Beans
    149

    Re: Is it possible to do all this with only one terminal command?

    Why not put all of these commands into a bash script? Then you could call the script with just one simple command.

    Keith

  6. #6
    Join Date
    Dec 2007
    Beans
    560

    Re: Is it possible to do all this with only one terminal command?

    I second the script idea..

    e.g. this is my script that I run when I first install ubuntu

    Code:
    #!/bin/bash
    sudo apt-get update
    sudo apt-get remove --purge rhythmbox tomboy gnome-games gnome-games-data pidgin pidgin-data gnome-utils ekiga example-content evolution evolution-common evolution-data-server evolution-webcal tracker f-spot eog
    echo Done removing unneeded packages
    sleep 3;
    sudo apt-get install alien serpentine qps compizconfig-settings-manager emerald beagle gwenview quodlibet thunderbird xchat ksnapshot emesene amsn bmpx apturl ubuntu-restricted-extras lastfm startupmanager htop bitlbee cowsay toilet ud irssi conky youtube-dl ffmpeg audacious audacity
    sleep 3;
    sudo apt-get upgrade
    sleep 3;
    echo Done upgrading
    sleep 3;
    echo Now making a desktop icon of your home
    gconftool-2 --set /apps/nautilus/desktop/home_icon_visible --type boolean "true"
    sleep 3;
    echo Everything is removed and installed, have a good day

  7. #7
    Join Date
    Aug 2006
    Location
    Yellowknife
    Beans
    878

    Re: Is it possible to do all this with only one terminal command?

    Quote Originally Posted by cardinals_fan View Post
    Code:
    echo "none /proc/bus/usb usbfs devgid=46,devmode=666 0 0" >> /etc/fstab
    note that there are two greater than signs. this is VERY IMPORTANT. one greater than sign will blow away the user's fstab and their system will be broken on next reboot

    > = write to file
    >> = append to file

  8. #8
    Join Date
    Feb 2007
    Location
    Topeka, Kansas
    Beans
    2,317
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Is it possible to do all this with only one terminal command?

    Quote Originally Posted by cardinals_fan View Post
    Code:
    echo "none /proc/bus/usb usbfs devgid=46,devmode=666 0 0" >> /etc/fstab
    Okay, I've added this into the big one I had at the bottom of my previous post....

    Code:
    sudo apt-get update && sudo apt-get upgrade && sudo apt-get install ubuntu-restricted-extras compizconfig-settings-manager wine && sudo wget http://www.medibuntu.org/sources.list.d/intrepid.list –output-document=/etc/apt/sources.list.d/medibuntu.list && sudo apt-get update && sudo apt-get install medibuntu-keyring && sudo apt-get update && sudo apt-get install libdvdcss2 && sudo apt-get update && sudo apt-get upgrade && wget http://download.skype.com/linux/skype-debian_2.0.0.72-1_i386.deb && sudo dpkg -i skype-debian_2.0.0.72-1_i386.deb && wget http://dl.google.com/earth/client/GE4/release_4_2/GoogleEarthLinux.bin && sh GoogleEarthLinux.bin && wget http://download.virtualbox.org/virtualbox/2.0.4/virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb && sudo dpkg -i virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb && sudo adduser $USER vboxusers && sudo echo "none /proc/bus/usb usbfs devgid=46,devmode=666 0 0" >> /etc/fstab
    Something else I'm wondering about...

    If I were to make the first command in this long string of commands "sudo -s", could I remove the all the other repeat sudo's in the rest of the string?

    And I don't really object to using a script... but I'm trying to put something together that brand new users will feel just a little more comfortable with doing. Copying and pasting one long command seems pretty easy to me, but I can see where people might mess things up (perhaps they fail to copy all the text into the terminal or something).

    How do you create and execute a script?

  9. #9
    Join Date
    Aug 2007
    Beans
    2,132

    Re: Is it possible to do all this with only one terminal command?

    Quote Originally Posted by diablo75 View Post
    And I don't really object to using a script... but I'm trying to put something together that brand new users will feel just a little more comfortable with doing. Copying and pasting one long command seems pretty easy to me, but I can see where people might mess things up (perhaps they fail to copy all the text into the terminal or something).

    How do you create and execute a script?
    Open a new file in your favorite text editor. Put the following (comments in red; don't enter those):
    Code:
    #!/path/to/shell #!/bin/bash for a bash script
    
    command1
    command2
    etc.
    Save the file. Enter the following:
    Code:
    chmod +x file
    ./file

  10. #10
    Join Date
    Feb 2007
    Location
    Topeka, Kansas
    Beans
    2,317
    Distro
    Ubuntu 13.10 Saucy Salamander

    Re: Is it possible to do all this with only one terminal command?

    Quote Originally Posted by cardinals_fan View Post
    Open a new file in your favorite text editor. Put the following (comments in red; don't enter those):
    Code:
    #!/path/to/shell #!/bin/bash for a bash script
    
    command1
    command2
    etc.
    Save the file. Enter the following:
    Code:
    chmod +x file
    ./file
    So would this work?

    Code:
    #!/bin/bash
    
    sudo -s
    apt-get update
    apt-get upgrade
    apt-get install ubuntu-restricted-extras compizconfig-settings-manager wine
    wget http://www.medibuntu.org/sources.list.d/intrepid.list –output-document=/etc/apt/sources.list.d/medibuntu.list
    apt-get update
    apt-get install medibuntu-keyring
    apt-get update
    apt-get install libdvdcss2
    apt-get update
    apt-get upgrade
    wget http://download.skype.com/linux/skype-debian_2.0.0.72-1_i386.deb && sudo dpkg -i skype-debian_2.0.0.72-1_i386.deb && wget http://dl.google.com/earth/client/GE4/release_4_2/GoogleEarthLinux.bin 
    sh GoogleEarthLinux.bin
    wget http://download.virtualbox.org/virtualbox/2.0.4/virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb
    dpkg -i virtualbox-2.0_2.0.4-38406_Ubuntu_intrepid_i386.deb
    adduser $USER vboxusers
    echo "none /proc/bus/usb usbfs devgid=46,devmode=666 0 0" >> /etc/fstab

Page 1 of 3 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •