Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm new in using shell scripts. I managed to create a simple script that allows me to input and view schedules. I heard it's possible to setup a script to automatically run once I log in. I was hoping to have my schedules for the day display on the screen once I logged in. Say for example I logged in today and all my schedules for 07/31/2012 will be shown.
Thanks for the swift reply. I hope this is mainly an error on my part but I can't seem to locate the bash profile. I found a .bash_history and .bash_log but no .bash_profile.
If your entry in /etc/passwd says you are using bash, then normally you would have installed .bash_profile & .bashrc.
Basic versions are usually available in /etc/skel, although it may be different in Ubuntu.
See the link mentioned above http://www.cyberciti.biz/faq/howto-c...-user-account/
You can create them via an editor if necessary, with following perms/ownerships
Get the values for username, usergrp from your entry in /etc/passwd
Typical contents
Code:
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# This seems to work
HOST=`hostname`
PS1='${LOGNAME}@${HOST}:${PWD}> '
export PS1
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
and/or look in another user's home dir if possible.
I've tried add the run command for my script at the end of .bashrc and it only works when I open terminal. It doesn't show after I logged in.
I also tried the same using .bash_profile and it has the same result.
I tried the suggestion from another site to include the run command for the script in the Startup Applications and still unsuccessful. Is this step not applicable to Ubuntu 12.04 LTS because that is what I'm using. Hopefully this is of the source of this issue.
I'll try adding the script in the /etc/init.d/ directory though a friend of mine said it doesn't work with his script.
Are there any other possible ways? I do remember when using Windows we had a autoexec.bat. Is there an equivalent of this kind of file in Ubuntu?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.