I am using ubuntu 10.04 and I want to run "gnome-panel &" command after my system starts.Because my desktop top panel is missing when i restart my system.and when i m running gnome-panel & comand it is coming back. If i put in .bashrc i m getting continously enter password prompt because my usrt is not in sudo group , can i put in /home/user/.bashrc or /root/.bashrc.Or can anyone tell me alternate methode to run command or shell script after system start automaticaly.
答案1
Put your command at last of /etc/rc.local
but before exit
. Or add your command to ~/.profile
file or /etc/profile
file
Add these lines (to give your user root access without password) to sudoers file (/etc/sudoers) as :
Execute sudo gedit /etc/sudoers
in terminal and add following lines to it at the end of "%admin ALL = (ALL) ALL"
user_name ALL = (ALL) NOPASSWD:ALL
Replace user_name with your user name