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.
Mmmm, that script all worked... Thank you! Sorry for all the confusion, but thank you for the help, all of you! I do have one more question:
Quote:
Is there a way to have the script launch when I start my GNOME session. Like, to where there is a terminal open asking the first question when I'm logged in?
I'm glad it's working. Do some comparison with what's in it versus what wasn't working on your end. It might explain some things or give you some new ideas.
As for the other question, yes, you can launch it automatically when you log in. In the desktop, use the top menu bar and select:
System -> Preferences -> Startup Applications
In the window that opens, click the "Add" button
In the new window that opens, put the following information in each field: Name: This can be anything; It's just used to label the command Command: What you would execute at the terminal. Use full paths just to be safe (for example: "/bin/bash /home/username/startup_script.sh" ) Comment: More text to describe what the program does--in case the label doesn't jog your memory
Then click the "Add" button.
You should now see a new entry in the list of startup programs that includes your script.
Last edited by Dark_Helmet; 11-23-2010 at 07:17 PM.
Reason: oh my word... I should proofread sometimes before clicking "submit"
Okay, I know I made this thread solved, but I realized a problem. The script does work when I start Ubuntu, but when it is all through it shuts off the terminal killing Chrome, Thunderbird, etc... How to I make this stop, or make it where they aren't dependent, per say, on if the terminal is open? I made some changes to the script, so the one I'm working with is attached. At the end you'll notice I added "Would you like to kill the terminal?" and no matter what I put, even no, it closes, but I think that's not because the if is wrong, I think it's because the terminal is sensing the end of the script.
Last edited by Slightly Disoriented; 11-25-2010 at 11:47 AM.
Since using bash, maybe try one of the following methods of starting things from your script:
Instead of:
Code:
google-chrome &
try one of:
Code:
google-chrome & disown
# or
nohup google-chrome & disown
The former disowns the google-chrome process from the spawning terminal, and the latter goes further by using `nohup` on the chrome, making it resistant to HUP (hang up) signals. You may not want or need that, so try the first method first.
Note that `disown` may be bash only; I do not believe the command exists in (all) other shells.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.