LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-08-2008, 04:13 PM   #31
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269

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.
 
Old 10-08-2008, 04:27 PM   #32
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Original Poster
Rep: Reputation: 88
thanks Trickykid! I'll try it later! I appreciate your help!
 
Old 10-08-2008, 10:25 PM   #33
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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.
 
Old 10-09-2008, 07:35 AM   #34
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by trickykid View Post
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 07:44 AM. Reason: Added assumption about script.
 
Old 10-09-2008, 11:37 AM   #35
ceantuco
Member
 
Registered: Mar 2008
Location: New York
Distribution: Debian
Posts: 809

Original Poster
Rep: Reputation: 88
Hi David,

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.
 
Old 10-09-2008, 12:01 PM   #36
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Quote:
Originally Posted by David1357 View Post
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.
 
Old 10-09-2008, 12:08 PM   #37
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
ceantuco, how exactly does the script prompt you? Are you using any kind of gui dialog, or just the terminal prompt? Perhaps you could post it here for us?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
automatic executing shell script at booting raj_deep2k1 Linux - Networking 3 01-25-2006 07:36 AM
How to run a shell script on boot up? AussieGit Linux - Newbie 4 11-02-2005 06:10 PM
Run shell script in RedHat after boot dmorse Linux - General 1 08-23-2005 01:54 PM
RH8 - how to automatically run a shell script at boot time nu-B Linux - Newbie 2 11-03-2003 02:47 PM
RH8 - how to automatically run iptables rules shell script at boot time nu-B Linux - General 1 10-29-2003 08:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration