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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I don't know about KDE but under Gnome, you should have a Sessions in System > Preferences > Personal > Sessions
This is where you can add startup programs. I'm sure KDE has the same options, just couldn't tell you exactly the path to configure programs to startup within KDE at login.
But you can add all you want to your bash initialization scripts, it's not going to work since you're not logging into a console and you're using a plain old bash script. It needs to be run in a terminal to work.
Have you made sure you have proper execute permissions on the script as well? Perhaps you should tell us in more detail exactly what you've tried, i.e. what lines you've tried addding to the files and whatnot.
And pay attention to trickykid's comment about the script itself needing a gui. If the thing only runs in a terminal, then you're not going to see anything because it doesn't know how to open up a terminal window on startup so that it can ask you for input. You either have to use something like xdialog, kdialog, or gtkdialog in your script in order to get a window, or perhaps start it from a shortcut with the "run in terminal" option selected.
~/.kde/Autostart (or the equivalent in gnome) really should work, provided you have everything else working right. You could also keep the script somewhere else and create a shortcut to it in that directory.
It still won't work unless this script is either a GUI program or it's launched within a terminal like I've pointed out.
That is not true. I tried it on an Ubuntu machine, and the commands in my "~/.profile" got executed when I logged in via the GUI.
Now if the script is doing something like "read", then you are right about needing to launch a terminal. However, I have been operating under the assumption that the script asked the question using a dialog.
Last edited by David1357; 10-09-2008 at 08:44 AM.
Reason: Added assumption about script.
I ran chmod 755 [file] to give the proper permissions to my script and I'm able to run it when I type my file name and then hit enter. I just can't get the damm thing to run when I log in! This is very frustrating.
However, I have been operating under the assumption that the script asked the question using a dialog.
I wouldn't assume that. ceantuco's description said it prompted the user for input, but didn't make it clear exactly how it does that. Since he called it his "first script", the reasonable assumption is that he's using a simple read prompt. If he hasn't arranged for either a terminal window or a gui dialog to pop up, then the script is certainly being executed, but hanging or failing because there's no way to give it the input it needs.
Of course a good way to test if it's actually getting executed is to add a few debugging lines and then check if anything new has been logged after login.