Closed Thread
Results 1 to 7 of 7

Thread: Run script after login

  1. #1
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20

    Run script after login

    I was able to get Ubuntu to authenticate with Active Directory and now I am working on mounting their network shared drive. The question is, where to I place the script to mount the drive? It cannot be placed in one of the rc*.d directories since those get ran at boot time and the user needs to authenticate before the drive can be mapped. Calling the script in their .profile file is not reasonable either since that only works on a per user basis. Is there a single common file that all users run at login where I can call my script?

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Location
    Advertising world
    Posts
    Many

     
  3. #2
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20

    Re: Run script after login

    The solution was to create a launcher and place it in /etc/xdg/autostart/

  4. #3
    Jordan Guest

    Re: Run script after login

    What is a launcher, just a shell script?

  5. #4
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20

    Re: Run script after login

    Im not exactly sure, but if you right click on your desktop there is a Create Launcher option. My launcher contains a link to my shell script in /usr/share:

    Code:
    #!/usr/bin/env xdg-open
    
    [Desktop Entry]
    Encoding=UTF-8
    Version=1.0
    Type=Application
    Terminal=false
    Icon[en_US]=start
    Name[en_US]=startup
    Exec=sh /usr/share/startup.sh
    Name=startup
    Icon=start

  6. #5
    Jordan Guest

    Re: Run script after login

    Interesting, good to know. How did you ever find out about this?

  7. #6
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20

    Re: Run script after login

    Ubuntu forums

  8. #7
    Join Date
    Jul 2006
    Location
    Amherst, New York, United States
    Posts
    6,277
    Blog Entries
    26
    Rep Power
    20

    Re: Run script after login

    I'm a dumb ass - you can just put scripts in /etc/profile.d/. The users .profile calls /etc/profile which runs all the .sh scripts in /etc/profile.d/. No need for a crappy launcher...

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Im having problem with a login script
    By doingit08 in forum PHP Development
    Replies: 3
    Last Post: 10-26-2010, 01:30 PM
  2. PHP login script
    By welton122 in forum PHP Development
    Replies: 5
    Last Post: 10-15-2010, 08:32 AM
  3. Login Script - Help
    By jthom263 in forum PHP Development
    Replies: 15
    Last Post: 04-12-2010, 04:19 AM
  4. need help with login script
    By lordwittie in forum PHP Development
    Replies: 3
    Last Post: 03-28-2010, 12:33 PM
  5. Login/Register Script
    By Whitey in forum PHP Development
    Replies: 6
    Last Post: 06-07-2008, 10:34 AM

Tags for this Thread

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