Need to open A Console and issue a command at boot...
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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What command(s) and what type of privileges do you want the command to execute with, eg. root, ordinary user, etc ?
If you just want to run a few commands and the end of your init scripts, edit your /etc/rc.d/rc.local by adding your commands at the end of rc.local. The rc.local file is the last init script to run and is commonly edited to run commands you want executed every time you boot.
It depends a little on which desktop environment you use. You want to do whatever you need for you environment to start a program when you log on, and set it to run the console you want. Most consoles have some option to run commands in the terminal and close the terminal when it ends. For example for konsole (the KDE terminal) you could run:
If you can run this in a console after logging in:
x11vnc -password (mypassword)
without having to enter a password then you should be able to create a bash script to run that command and set it to autorun every time you login. If you need to manually enter the password after running:
x11vnc -password
then a simple bash script won't work. You still haven't answered which desktop environment(DE) you are running, eg kde, gnome, etc. Each DE has it's own way of setting up what autoruns on login. Since mandriva defaults to kde, I assume that's what you are running. In that case, after making your script, you would just place it in /home/<username>/.kde/Autostart. Every time you login to kde, the script will run.
I am running KDE with Mandriva One 2008. I am trying to make it so that X11VNC can be run from a console at any time. The bash script sounds interesting...
I am trying to make it so that one can log into the PC remotely at any time by running a small script or command from the WEBMIN command shell at another PC in the office.
I am able to open a konsole manually and type x11vnc -passwd (Mypassword)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.