LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 12-13-2005, 08:01 AM   #1
spx2
Member
 
Registered: Dec 2005
Distribution: debian
Posts: 160

Rep: Reputation: 30
running at kde startup


i just tried almost everything to make a bash script run at kde startup
i tried to put it in .kde/Autostart a symbolic link i tried to put
the script also
didnt work.

I dont know what to do.
i just need these settings for only a user not all of them
 
Old 12-13-2005, 08:33 AM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
That should be the right place, but are you sure that the correct permissions are set on the bash script itself to allow it the be executed by a normal user? What is it the script contains and so is trying to do?
 
Old 12-13-2005, 08:43 AM   #3
spx2
Member
 
Registered: Dec 2005
Distribution: debian
Posts: 160

Original Poster
Rep: Reputation: 30
the script asks permission of the user with y/n answer
to open a bunch o programs
if it gets y it runs them and closes
else it returns user control over shell
here is the script
http://www.linuxquestions.org/questi...d.php?t=392237
last post

you talk about permissions
do you think i should go root with su
and make some chmod +777 bashscript first ?
 
Old 12-13-2005, 08:57 AM   #4
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
If the script can be ran fine from the command line as user, that's enough - it shouldn't need root permissions for launching apps as your script does.

However, I'm not sure whether the KDE autostart allows you to run interactive shell apps like yours, as it doesn't actually display the shell on screen to allow you make your selection. I don't know how to enable interactive scripts like that even through a console login I'm afraid, or even if it's possible.
 
Old 12-13-2005, 09:18 AM   #5
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Cool

Try making a desktop icon with this in the "Application" entry:
Code:
konsole -noclose -e <your script>
If that works (from the desktop), just move the .desktop file from ~/Desktop to ~/.kde/Autostart

(The "-noclose" option leaves the konsole open after the command termination, so you might not need it.)

Let us know if it works, please. (I haven't done this yet myself.)

Edit: O.K., I just tried it (with a sudo <command> and no -noclose), and it prompted me for the input (i.e., the sudoer password), ran the script, and vanished. Cool!

Last edited by PTrenholme; 12-13-2005 at 10:07 AM.
 
Old 12-14-2005, 02:12 AM   #6
spx2
Member
 
Registered: Dec 2005
Distribution: debian
Posts: 160

Original Poster
Rep: Reputation: 30
No it doesnt work.
 
Old 12-14-2005, 02:29 AM   #7
spx2
Member
 
Registered: Dec 2005
Distribution: debian
Posts: 160

Original Poster
Rep: Reputation: 30
i dont know how you made it run.
i dont understand you 100% from the post.
please be more explicit.
and also another question my user stef is not in list of sudoers
at least thats what the bash says if i do sudo <somecommand> it asks for pass
i give pass and it says its not it list of sudoers.
what do i do to make it be ?
 
Old 12-14-2005, 09:33 AM   #8
berbae
Member
 
Registered: Jul 2005
Location: France
Distribution: Arch Linux
Posts: 540

Rep: Reputation: Disabled
Here is the format of the .desktop file

[Desktop Entry]
Exec=konsole -e <your script>
Name=Interactive script
Type=Application
X-KDE-StartupNotify=false

Put the file in ~/.kde/Autostart

and restart KDE
 
Old 12-14-2005, 09:34 AM   #9
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by spx2
i dont know how you made it run.
i dont understand you 100% from the post.
please be more explicit.
O.K., here's a "step-by-step:"

1. Bring up your desktop menu and select Settings->Desktop->Behavior. Check your button assignments to see where the "Desktop Menu" is assigned. (Mine is assigned to the right-hand button, so that's why I refer to a "right-click" below.)

2. Go to an empty spot on your desktop and click on it with your right-hand button to display the "Desktop Menu."

3. Select "Create New"->"Link to Application" from the displayed desktop menu.

4. Click on the "Application" tab in the displayed "Properties" box.

5. In the "Command" box displayed after (4), enter konsole -e <the full path to the script you want to run> <any arguments needed by the script> where, of course, the angle brakets ("<" and ">") and the text are replaced with the actuall path to the script you want to executate and, if you need them, the actual arguments. (Note that the script should be execuatable. Use the chmod command to make it so.)

6. Fill in the description under the "General" tab (to be displayed under the icon, and the name of the .desktop file you're creating), and -- if you wish -- the "Description" and "Comment" in the "Application" tab (for the pop-up).

7. Also, if you wish, click on the icon displayed in the general tab and select an icon to be used on the desktop from the displayed list of available icons.

8. Close the "Properties" window. You should now see a new icon on you desktop.

9. Click on the new icon to execute it. (Um, my system is set for single-click operation. You may need to double-click.)

10. If the new icon works properly, open "Konqueror," and move the icon's .desktop file from ~/Desktop to ~/.kde/Autostart.

Quote:
Originally Posted by spx2
and also another question my user stef is not in list of sudoers
at least thats what the bash says if i do sudo <somecommand> it asks for pass
i give pass and it says its not it list of sudoers.
what do i do to make it be ?
Look at info sudoers for a description of the contents of /etc/sudoers and info visudo for information on how to edit it. (You can actually use other editors, but visudo is set up to do some checking for you.) Note that you must be "root" to make any changes in /etc/sudoers, and granting of root privileges to users in, generally, not a good thing.

Last edited by PTrenholme; 12-14-2005 at 09:36 AM.
 
Old 12-14-2005, 09:44 AM   #10
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Quote:
Originally Posted by berbae
Here is the format of the .desktop file

[Desktop Entry]
Exec=konsole -e <your script>
Name=Interactive script
Type=Application
X-KDE-StartupNotify=false

Put the file in ~/.kde/Autostart

and restart KDE
Yes, you can create your desktop file by hand, if you wish. F.Y.I., here's what my test file looks like (created as discribed above, not by hand):
Code:
$ cat Desktop/Remount\ SMB\ shares.desktop
[Desktop Entry]
Comment=
Comment[en_US]=
Encoding=UTF-8
Exec=konsole -e sudo /etc/rc.d/remountsmb
GenericName=Remount SMB shares
GenericName[en_US]=Remount SMB shares
Icon=
MimeType=
Name=Remount SMB shares
Name[en_US]=Remount SMB shares
Path=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
 
Old 01-04-2006, 05:20 AM   #11
mr fidget
LQ Newbie
 
Registered: Dec 2005
Location: london
Distribution: Mandrake Linux LE
Posts: 6

Rep: Reputation: 0
Thumbs up

Quote:
Originally Posted by PTrenholme
O.K., here's a "step-by-step:"
THANKS! This is a great explanation!

I used it to start hotkeys and it works wonderfully.

The only things I would like to point out is that I had to remove the konsole -e part and just use the <program> <parameters> bit.

All the best.
 
  


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
KDE startup lookup using SuSE 9.1 (KDE 3.2.3 - /home over NFS) dbertolo Linux - Software 1 08-24-2004 10:26 AM
couple of qs, gnome ftp, removing kde or improving speed of kde, startup modprobe darkleaf Linux - Software 2 07-20-2004 09:54 AM
Running a service at startup correro Linux - General 14 02-18-2003 07:00 PM
running a program at startup beccala33 Linux - Newbie 3 04-25-2002 05:00 PM
running a program at startup beccala33 Programming 1 04-23-2002 04:10 PM

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

All times are GMT -5. The time now is 03:58 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