Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Help creating script

  1. #1

    Help creating script

    Hello everyone,

    I wondered if anyone would help me (totally unknowing how scripts work) by giving a step by step walkthrough how to activate this script?

    Quote Originally Posted by P4man View Post
    for those interested:

    Code:
    #!/bin/bash
    # copy appropriate xorg.conf for your videocard
    cp /etc/X11/default.conf /etc/X11/xorg.conf
    if lspci | grep "VGA compatible controller: nVidia" 
    then
        # nVidia card
        nvidia-xconfig
    fi
    if lspci | grep "VGA compatible controller: ATI Technologies" 
    then
        # ATI card, loading opensource ati driver
        cp /etc/X11/ati.conf /etc/X11/xorg.conf
    fi
    Save it as /etc/rc2.d/S01nvidia-xconfig
    Make it executable.
    Then copy a default (mostly empty) xorg.conf as /etc/X11/default.conf
    And modify one that loads ati driver (i use the opensource) and save it as /etc/X11/ati.conf
    install nvidia drivers (on a machine with nvidia graphics), and off you go.

    I guess it may give problems if you try it on a machine with an old nvidia card no longer supported by the 185 drivers, but other than that, works fine.
    It's to have one Ubuntu install I can boot on different computers;..



    Thank you very much!

    Floven de Sorezé Stockeir
    Last edited by Floven de Sorezé Stockeir; November 4th, 2010 at 09:27 PM.

  2. #2

    Re: Help creating script

    bump

  3. #3
    Join Date
    Oct 2010
    Location
    London
    Beans
    482
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Help creating script

    Check out this website, specifically this webpage. That will inform you about shell scripts.


    Have you tried following the instructions in your quote?



    Assuming you have already saved the script to /etc/rc2.d/S01nvidia-xconfig, to make it executable type into a terminal window:

    chmod 755 /etc/rc2.d/S01nvidia-xconfig

    To copy xorg.conf:

    cp /etc/X11/xorg.conf /etc/X11/default.conf

    I don't know about the rest of it, unfortunately. You should read this in regards to ati drivers.
    Last edited by evilsoup; November 4th, 2010 at 08:41 PM. Reason: to be more useful

  4. #4

    Re: Help creating script

    Hello evilsoup, thank you for helping!

    Yes, I tried following the instructions and so far I'm stuck at "Then copy a default (mostly empty) xorg.conf as /etc/X11/default.conf"

    I don't have any experience whatsoever in writing shell scripts, so I'm a bit afraid to mess things up. I'm trying though, thanks for your links, I'm sure they will help.

    But if you don't mind, can I humbly ask for a step by step explanation for these instructions?

    "Then copy a default (mostly empty) xorg.conf as /etc/X11/default.conf
    And modify one that loads ati driver (i use the opensource) and save it as /etc/X11/ati.conf
    install nvidia drivers (on a machine with nvidia graphics), and off you go. "

    I'm really too afraid to mess things up, as this is the first time I use the terminal actually..

    Thank you.

  5. #5

    Re: Help creating script

    Quote Originally Posted by evilsoup View Post
    Check out this website, specifically this webpage. That will inform you about shell scripts.


    Have you tried following the instructions in your quote?



    Assuming you have already saved the script to /etc/rc2.d/S01nvidia-xconfig, to make it executable type into a terminal window:

    chmod 755 /etc/rc2.d/S01nvidia-xconfig

    To copy xorg.conf:

    cp /etc/X11/xorg.conf /etc/X11/default.conf

    I don't know about the rest of it, unfortunately. You should read this in regards to ati drivers.
    Thanks a lot! I'll keep looking for what the rest means, but this is already a great step forward, thank you!

  6. #6
    Join Date
    Oct 2010
    Location
    London
    Beans
    482
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Help creating script

    Wait a moment
    It's to have one Ubuntu install I can boot on different computers;..
    When you say that, what do you mean?

  7. #7

    Re: Help creating script

    Quote Originally Posted by Floven de Sorezé Stockeir View Post
    Hello evilsoup, thank you for helping!

    Yes, I tried following the instructions and so far I'm stuck at "Then copy a default (mostly empty) xorg.conf as /etc/X11/default.conf"

    I don't have any experience whatsoever in writing shell scripts, so I'm a bit afraid to mess things up. I'm trying though, thanks for your links, I'm sure they will help.

    But if you don't mind, can I humbly ask for a step by step explanation for these instructions?

    "Then copy a default (mostly empty) xorg.conf as /etc/X11/default.conf
    And modify one that loads ati driver (i use the opensource) and save it as /etc/X11/ati.conf
    install nvidia drivers (on a machine with nvidia graphics), and off you go. "

    I'm really too afraid to mess things up, as this is the first time I use the terminal actually..

    Thank you.
    Hmm.. Does anyone know where I can find the script that loads the ATI driver? (I have ATI card)

    I think that's the only thing I still need help for; searching the web doesn't help though I'm afraid, so I can only hope to find the answer here.

  8. #8

    Re: Help creating script

    Quote Originally Posted by evilsoup View Post
    Wait a moment

    When you say that, what do you mean?
    I have ubuntu installed on my external USB HDD. I could plug it into different computers and boot succesfully. Yesterday though I upgraded all my drivers & such, thus my install was only compatible anymore for the specific video card of my laptop. Now I can't boot into Ubuntu on a computer with a different video card.

    I don't know if this script will solve my problem, but I won't know for sure until I try.

  9. #9
    Join Date
    Nov 2009
    Location
    de9fdc5c1ade9d205ac5e2622
    Beans
    Hidden!
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: Help creating script

    Quote Originally Posted by evilsoup View Post
    Wait a moment

    When you say that, what do you mean?

    He means he wants to set up an install on a external drive that uses all generic drivers, or scans the computer it is plugged into before a full boot into Ubuntu and automatically selects drivers that work for the individual computers hardware. I know people have been looking into this type of thing, but I myself, cannot help.

    AlphaA
    Last edited by alphaamanitin; November 4th, 2010 at 11:38 PM.
    "Si Dieu n'existait pas, il faudrait l'inventer" -Voltaire

  10. #10

    Re: Help creating script

    Quote Originally Posted by alphaamanitin View Post
    He means he wants to set up an install on a external drive that uses all generic drivers, or scans the computer it is plugged into before a full boot into Ubuntu and automatically selects drives that work for the individual computers hardware. I know people have been looking into this type of thing, but I myself, cannot help.

    AlphaA
    Exactly!

Page 1 of 2 12 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
  •