LinuxQuestions.org
Review your favorite Linux distribution.
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 03-30-2007, 06:11 PM   #1
riseinarms
LQ Newbie
 
Registered: Jan 2007
Location: New Hampshire
Distribution: Mandriva 2008
Posts: 29

Rep: Reputation: 15
VNC in command line


I have Mandrake free version and I have it set so it starts in command line, and I wanted to know if I can have it so it automatically starts up a VNC server so I can connect to it without having to do anything on that computer?
 
Old 03-30-2007, 07:10 PM   #2
arfon
Member
 
Registered: Apr 2004
Distribution: Slackware & RHEL
Posts: 370

Rep: Reputation: Disabled
Sure, just add it to your init scripts. Use Sudo to run the script as a user and not root.
 
Old 03-30-2007, 07:14 PM   #3
riseinarms
LQ Newbie
 
Registered: Jan 2007
Location: New Hampshire
Distribution: Mandriva 2008
Posts: 29

Original Poster
Rep: Reputation: 15
Well the catch is I'm rather new and I don't know how to do that.
 
Old 03-31-2007, 04:52 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
I don't know how to do that.
It's easy.

You have mandriva, where I think the init script you want is /etc/rc.d/rc.local
So, you need to become root, open that file with your favourite editor, and add a line like this to the very end of it:

su - yourusername -c "cd /home/yourusername && vncserver :1 -geometry 1024x768 -depth 24"

Save the file.

What this means is "Become the user "yourusername", change to that user name's home directory, then start the vncserver on display :1"

When you reboot, the vncserver will be started.
To connect to it, use the command vncviewer nameofcomputer:1
 
  


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
Is there a single command to list all hardware installed (command line)? davee Linux - Hardware 6 02-28-2009 07:19 PM
Installing and Running Gnome from command line FC6, and VNC mrjeffc Linux - Newbie 1 12-20-2006 04:21 AM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
start VNC server from command line gyost Mandriva 3 08-18-2004 09:27 PM
51 characters only in the 1st Line of command line eggCover Linux - General 2 07-29-2004 01:28 PM

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

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