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 04-06-2008, 04:13 PM   #1
zurkeyon
LQ Newbie
 
Registered: Apr 2008
Posts: 20

Rep: Reputation: 0
Unhappy Need to open A Console and issue a command at boot...


Hello Linux Peoples !!!

Thanks for all the help on my tightvnc and x issues. All are now resolved!!!

I need to open a console window and make that console issue a command at boot on a mandriva 2008 system...

Any suggestions ?

Thanks in advance !!!

Last edited by zurkeyon; 04-06-2008 at 07:03 PM.
 
Old 04-06-2008, 04:26 PM   #2
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,986

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
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.
 
Old 04-06-2008, 04:44 PM   #3
zurkeyon
LQ Newbie
 
Registered: Apr 2008
Posts: 20

Original Poster
Rep: Reputation: 0
I need to run this command from a regular console.

I have mandriva set to boot automatically into the user "musicshare"

I need to run VNC on a private network behind a firewall using the command....

x11vnc -password (mypassword)

I need the console window to remain open for the x11vnc server to remain on.
 
Old 04-06-2008, 06:50 PM   #4
zurkeyon
LQ Newbie
 
Registered: Apr 2008
Posts: 20

Original Poster
Rep: Reputation: 0
Please ? Anyone know how to do this ?

I am just trying to have a console window open at startup and run a certain command as the user.

no need to run as root...

Anyone ?
 
Old 04-06-2008, 07:05 PM   #5
mcmillan
Member
 
Registered: Jul 2005
Distribution: Arch
Posts: 489

Rep: Reputation: 30
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:

konsole -e x11vnc -password (mypassword)
 
Old 04-08-2008, 02:25 PM   #6
zurkeyon
LQ Newbie
 
Registered: Apr 2008
Posts: 20

Original Poster
Rep: Reputation: 0
I tried this and the console window will not open or run any programs.

I need to be able to run x11vnc from the command line in webmin.

So that one can remote in and take full command of the system.

It is the only way I can see to make x11vnc to run any time I want it to.

As I do not really want it running all the time.

Any suggestions there ?

Thanks again guys for all the continued help. Thanks to you I have made the switch from Windows Platforms to Linux and WILL NEVER go back.

Thanks!
 
Old 04-10-2008, 04:06 PM   #7
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,986

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
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.
 
Old 04-21-2008, 12:18 PM   #8
zurkeyon
LQ Newbie
 
Registered: Apr 2008
Posts: 20

Original Poster
Rep: Reputation: 0
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)

Thanks !
 
  


Reply

Tags
boot, commands, console, startup



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
Issue with Fedora DS Console??? ajeetraina Linux - Server 1 01-08-2008 01:45 AM
Boot into console/command line instead of X sosborne Ubuntu 11 12-10-2007 05:18 AM
Slack 10.1 Console Issue failure_man Slackware 1 07-26-2006 01:22 PM
xine and console issue Carpo Slackware 5 10-18-2005 02:03 PM
why must i issue a "pump" command after every boot? mushmaster Linux - General 4 09-12-2004 08:56 PM

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

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