Results 1 to 4 of 4

Thread: Run script after login ?

  1. #1

    Run script after login ?

    I want to execute a script after login

    I login with root level account

    I try to set up a file .bashrc at the follow location

    Code:
    /tmp/local/root/.bashrc
    and with the content bellow

    Code:
    cd /opt
    date
    Does someone know how to do ?

  2. #2
    Join Date
    Jul 2007
    Location
    Austria
    Posts
    1,336
    Quote Originally Posted by ffrr View Post

    Does someone know how to do ?
    http://www.wl500g.info/showthread.php?t=21776

    Just add your commands at the end of bashrc
    At least you can have for each user an own basrc. Add the home dir of the user to your passwd file and store for each user an own basrc in the homedir.
    have fun
    Last edited by newbiefan; 20-03-2010 at 13:00.
    Alle HowTo's, all howto's

    RT-N16 1.9.2.7-rtn-r3121, Samba, VSFTP, Lightthpd, PHP, Perl, MySQL, Serendipity, Aria2web, HDD 640GB
    RT-N66U, 16GB MicroSD/ 2 Partitions, 2,5" HDD 1TB, running with Merlin's FW and Entware, 16 Mbit A1,
    Netgear DGND 3700V2, QNAP TS119PII 4 TB, QNAP TS209 2 TB Raid1, Backup Synology DS107+ 1 TB, HP CP1515n

  3. #3
    Thank you for reply,and I try the Tutorial

    sorry for my English :P

    there is a few question,may I ask ?

    1.

    after login I need to keyin "bash" by hand everytime to run the content

    of ".bashrc" ,Or it doesn't seem to work automatically.


    2.

    I need to install the 'bash' ,then I could use ".bashrc"

    Is there something like "post-boot" , that I could use?

    BTW I have try ".shrc" , but it doesn't work :P
    Last edited by ffrr; 21-03-2010 at 02:20.

  4. #4
    Join Date
    Feb 2007
    Location
    Moscow, Russia
    Posts
    3,805
    ~/.profile из sourced during login to /bin/sh

    you may change your login shell in /etc/passwd

Similar Threads

  1. Превью новой версии прошивки 1.9.2.7-9
    By Oleg in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 804
    Last Post: 14-03-2009, 19:42

Posting Permissions

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