I am trying to get a bash script to autostart. It is saved as .sh and located in the ./.kde/autostart folder. Instead of actually running the script, it opens it in Kate on start up. I tried checking the run in terminal and all it does is open the terminal with a normal prompt.
Announcement
Collapse
No announcement yet.
autostart bash script problem
Collapse
This topic is closed.
X
X
-
Re: autostart bash script problem
Assuming you already made it executable with "chmod a+x myscript", and assuming you are running KDE4, then you need to open System Settings, and there's an "Autostart" icon on the "Advanced" tab, and you open that and where it says "scripts" you browse to your script and select it, and then "OK" on the tab. It should run on your next KDE login.
- Top
- Bottom
-
Re: autostart bash script problem
Thanks. I was trying to make it executable via the properties. The command worked better. I was also unaware of the autostart as part of the system settings.
Here is my script:
Code:#!/bin/bash rutilt -p "New profile"
- Top
- Bottom
Comment
-
Re: autostart bash script problem
If it requires you to run it as root, you can open your /etc/sudoers file with `visudo' and add the following line (replace "USERNAME" with your username, and "/path/to/rutilt" with the path to the command):
Code:USERNAME ALL = NOPASSWD: /path/to/rutilt
Code:sudo bash -c 'echo $SUDO_USER ALL = NOPASSWD: $(which rutilt) >> /etc/sudoers'
Code:#!/bin/bash sudo rutilt -p "New profile"
Asus G1S-X3:
Intel Core2 Duo T7500, Nvidia GeForce 8600M GT, 4Gb PC2-5300, 320Gb Hitachi 7k320, Linux ( )
- Top
- Bottom
Comment
-
Re: autostart bash script problem
Thanks!
I've been busy learning and doing other things, but I think I'll begin spending time on the forums againAsus G1S-X3:
Intel Core2 Duo T7500, Nvidia GeForce 8600M GT, 4Gb PC2-5300, 320Gb Hitachi 7k320, Linux ( )
- Top
- Bottom
Comment
Comment