Announcement

Collapse
No announcement yet.

What does linux use for an autoexec.bat?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    What does linux use for an autoexec.bat?

    I've already found a need to execute commands at start up. How do I do this?
    Registered Linux User: 450747<br />Registered Ubuntu User: 16269

    #2
    Re: What does linux use for an autoexec.bat?

    Read all about it, starting here:

    http://kubuntuforums.net/forums/index.php?topic=13340.0

    Comment


      #3
      Re: What does linux use for an autoexec.bat?

      Originally posted by dibl
      That isn't what I'm asking. That topic is about booting into terminal mode, without the GUI default. Interesting topic though. WHAT I WANT is to go ahead and boot into my normal GUI version, but I'm tired of typing "sudo modprobe ndiswrapper" every time to get my wifi card to start up. Windows would use a batch file autoexec.bat. I could edit that file adding something like "C:\wificard\card.exe" and each time windows/DOS would load, it would execute that command. What does Linux use for autoexec.bat?
      Registered Linux User: 450747<br />Registered Ubuntu User: 16269

      Comment


        #4
        Re: What does linux use for an autoexec.bat?

        Maybe this can help you a little http://www.kde.org/areas/sysadmin/startup.php

        Comment


          #5
          Re: What does linux use for an autoexec.bat?

          I'm thinkin this is what I want to do

          From some other post some place...
          When linux starts up it executes a lot of little programs instead of one big one the way M$ operating systems do. First it runs all the scripts in the /etc/rc.S/ directory then (I'm simplifying a little) it runs the scripts in /etc/rc.2/ then it runs a special script called /etc/rc.local which includes special commands that should be run for all users (mostly hardware things), then after a user logs in to KDE, KDE runs any scripts in the directory /home/<username>/.kde/Autostart/ These are things that are specific for a single user. Then there is a menu entry called System Settings on the K menu that allows you to customize kde for yourself. Finally, nearly all of the KDE apps have a "settings" entry in their menu bar where you can customize the look and feel of that specific app.
          I dont have anrc.S or an rc.2. I do have an rcS.d and rc2.d. But I think I want the /etc/rc.local as it runs for all users and mostly hardware things. BUT it wont let me save the changes that i do to that file. Says I don't haver write access. How do I get write access.
          Registered Linux User: 450747<br />Registered Ubuntu User: 16269

          Comment


            #6
            Re: What does linux use for an autoexec.bat?

            You need to edit the file as root. So if you're using vi or some other command-line text editor you'd type sudo vi to run it instead of just vi. If you want to use kate or some other pretty text editor, run it by typing kdesu kate . In either case you'll get asked for your password and your changes will be saved.
            Linux user #387890

            Comment


              #7
              Re: What does linux use for an autoexec.bat?

              BUT in this particular case, you want to load a kernel module at startup (that's what modprobe does). So, your best bet is to add 'ndiswrapper' to /etc/modules (unless there are other commands you're doing as well, in which case go ahead with the script - but for neatness I'd put the module commands in there anyway).

              Also, note that all the files in /etc/rc*.d/ are symbolic links (think: shortcuts) to scripts actually located in /etc/init.d, so I'd put your script in there (again, this is just a style thing really) and sym-link it over:
              sudo ln -s /etc/rc2.d/SnnMyScript /etc/init.d/MyScript
              where nn controls the order in which the scripts are run.

              Comment


                #8
                Re: What does linux use for an autoexec.bat?

                BUT in this particular case, you want to load a kernel module at startup (that's what modprobe does). So, your best bet is to add 'ndiswrapper' to /etc/modules (unless there are other commands you're doing as well, in which case go ahead with the script - but for neatness I'd put the module commands in there anyway).

                Also, note that all the files in /etc/rc*.d/ are symbolic links (think: shortcuts) to scripts actually located in /etc/init.d, so I'd put your script in there (again, this is just a style thing really) and sym-link it over:

                Quote
                sudo ln -s /etc/rc2.d/SnnMyScript /etc/init.d/MyScript
                where nn controls the order in which the scripts are run.
                Ummm... you lost me. Could you give me more details. Perhaps a step by step instructions on how to add it to the modules. Remember the name of the forum is "help the new guy". I've also found the need for the line "byrle-manager" at boot up. =)
                Registered Linux User: 450747<br />Registered Ubuntu User: 16269

                Comment


                  #9
                  Re: What does linux use for an autoexec.bat?

                  Sorry
                  Code:
                  sudo nano /etc/modules
                  and just add the line
                  Code:
                  ndiswrapper
                  to the end. Ctrl-X; Y; Enter to save and exit.

                  Comment


                    #10
                    Re: What does linux use for an autoexec.bat?

                    That worked thanks. It now loads my wireless card. It still has to ask my password to open my wallet to load the network manager, then it demands my WPA key each time. I'd love to know how to set these entry fields so it remembers what goes into it. But for now, this is an improvement. Thanks =)

                    I'd still like to know how to set up a batch file and set up a startup batch file. Or if these features are even possible in linux. But for now...

                    RESOLVED

                    ps. the six year old loves your avatar
                    Registered Linux User: 450747<br />Registered Ubuntu User: 16269

                    Comment

                    Working...
                    X