Results 1 to 7 of 7

Thread: Running a binary after login in the console

  1. #1
    Associate
    Join Date
    Sep 2006
    Posts
    24

    Running a binary after login in the console

    People I want to know how I can run a script after enter my login and password in the console.

    I dont have X in that machine.

    Someone can help me ?

  2. #2
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    What's your distro?
    LinuxVillage - The truely community run Linux/Floss forum !

    No IT BS !!

  3. #3
    how about chmod 755 <file> then ./<file>
    telnet mtrek.game-host.org 1701

  4. #4
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    I thought he/she wanted to know how to make it automagically... like putting it in rc.d directory and stuff ..
    LinuxVillage - The truely community run Linux/Floss forum !

    No IT BS !!

  5. #5
    ahh...
    telnet mtrek.game-host.org 1701

  6. #6
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760
    if the file doesnt exist create it, but the file is .bash_profile

    Just add a line with the command to be executed. For example,

    you have a script called /opt/bar/bin/drink_beer.sh,

    add the following line to .bash_profile:

    exec /opt/bar/bin/drink_beer.sh

  7. #7
    Associate
    Join Date
    Sep 2006
    Posts
    24
    Yes, Well I am Using Debian.

    The .bash_profile and .bashrc works thanks.

    nevertheless with programs that use ncurses expend a lot of time oppening the application tha is curious.

    I just test putting the mc editor in .bashrc

    But thanks that is the answer!
    Last edited by roche; 09-15-2006 at 06:02 PM.

Similar Threads

  1. X Window console access from remote login
    By subir2381 in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 08-08-2007, 09:18 AM
  2. single user login. no login at startup
    By donovan in forum Linux - General Topics
    Replies: 3
    Last Post: 01-12-2005, 08:57 AM
  3. running remote command, then leave it running
    By Blaqb0x in forum Linux - General Topics
    Replies: 1
    Last Post: 10-03-2003, 10:36 PM
  4. Binary Clock
    By gmoreno in forum General Chat
    Replies: 8
    Last Post: 06-01-2002, 02:46 PM
  5. binary or source ?
    By boblucci in forum Linux - General Topics
    Replies: 6
    Last Post: 01-22-2002, 08:26 PM

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
  •