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

    and with the content bellow

    cd /opt
    Does someone know how to do ?

  2. #2
    Join Date
    Jul 2007
    Quote Originally Posted by ffrr View Post

    Does someone know how to do ?

    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, 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 ?


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

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


    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
    Moscow, Russia
    ~/.profile из sourced during login to /bin/sh

    you may change your login shell in /etc/passwd

Similar Threads

  1. Превью новой версии прошивки
    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