Announcement

Collapse
No announcement yet.

Where to add command for startup?

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

    Where to add command for startup?

    Greetings, I need to add the following command to startup:

    sudo iwconfig wlan0 mode auto

    Where would I add this line? It is a wireless problem I have with my broadcom card and typing this line lets me connect but it gets annoying typing it in all the time. So in Gnome I added it to a startup file and it worked fine from startup. What file could I add this line to in Kubuntu?

    #2
    Re: Where to add command for startup?


    Maybe this helps:

    FAQ: How to start programs when KDE starts or stops
    http://kubuntuforums.net/forums/inde...opic=3086795.0
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    Comment


      #3
      Re: Where to add command for startup?

      Sadly no, because I need a line of command to run not a program.

      Comment


        #4
        Re: Where to add command for startup?

        Originally posted by jbaerbock
        Sadly no, because I need a line of command to run not a program.
        You should be able to run commands as well as programs.

        However, unless you specifically want to run the command only when kde starts (and not before), I'd recommend running the command earlier in the boot process.

        You could put the command in /etc/rc.local (it's run at the end of the boot process as root, so no need to sudo the command).

        Another possibility are the X* scripts in /etc/kde3/kdm (if you wish to run the command after Xlogin, for example)

        (P.S I'm not aware of what sort of problem you're having with your wireless, but the problem might be solvable editing the networking scripts or network configuration. But if your 'easy' workaround solution works, there's probably no need to tinker with it )

        Comment


          #5
          Re: Where to add command for startup?

          Yeah no one seems to know why I have to put wlan0 into mode auto before wireless connects. Basically it will sit at 25% forever unless I run that line.

          Comment


            #6
            Re: Where to add command for startup?

            Sadly no, because I need a line of command to run not a program.
            Well - put that line in the file (and call it script )

            Code:
            #!/bin/sh
            sudo iwconfig wlan0 mode auto
            And put that script ~/.kde/Autostart.

            Making my_script.sh executable:
            Code:
            sudo chmod -v 755 /home/USER/.kde/shutdown/my_scrip.sh
            And use "passwordless sudo for the script":
            kubicle told (May 30, 2006, 11:18:55)
            In Topic: Need some help with shell scripts.
            http://kubuntuforums.net/forums/index.php?topic=5493.0


            Or do as kubucle told (/etc/rc.local or /etc/kde3/kdm).

            Before you edit, BACKUP !

            Why there are dead links ?
            1. Thread: Please explain how to access old kubuntu forum posts
            2. Thread: Lost Information

            Comment

            Working...
            X