LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   After Slackware 12.0 installation (http://www.linuxquestions.org/questions/slackware-14/after-slackware-12-0-installation-637513/)

thedp 04-24-2008 08:15 AM

After Slackware 12.0 installation
 
Hello,

Yesterday I've finally installed Slackware 12.0, and it looks GREAT :)
I would like to configure a couple of things to make it perfect:

- When I start the PC I need to press ENTER for the boot to start when it prompts me for "boot:". How can I skip this and make the Slackware start automatically?

- After Slackware loads it remains in command-line mode, which makes me login and then execute startx. How can I make startx to start automacally before I login, when Slackware finished loading?

- Since this PC is meant to be a remote station without any screen, keyboard or mouse, I need VNC to control it. But currently I need to login and then start vncserver. How can I start vncserver automatically before I login, and login only though the VNC?


Thank you.

Nylex 04-24-2008 08:24 AM

For the first problem, you'll need to edit /etc/lilo.conf and change the timeout field to 0. After doing this, you'll need to run /sbin/lilo for the changes to take effect. Both editing the file and running lilo will need to be done as root.

For the second problem, you'll need to change your default runlevel to 4. This can be done by editing /etc/inittab and changing the line "id:3:initdefault:" to "id:4:initdefault:". Again, you'll need to be root to edit the file.

duryodhan 04-24-2008 08:29 AM

Quote:

- Since this PC is meant to be a remote station without any screen, keyboard or mouse, I need VNC to control it. But currently I need to login and then start vncserver. How can I start vncserver automatically before I login, and login only though the VNC?
You will need to add the command that start vnc to /etc/rc.d/rc.local

for e.g if it is 'vncserver'

do in bash shell
Quote:

#which vncserver
#vim /etc/rc.d/rc.local
add the output of which vncserver to a new line in rc.local

pwc101 04-24-2008 08:32 AM

Quote:

Originally Posted by thedp (Post 3131354)
- Since this PC is meant to be a remote station without any screen, keyboard or mouse, I need VNC to control it. But currently I need to login and then start vncserver. How can I start vncserver automatically before I login, and login only though the VNC?

I've never done this, but I would think adding the appropriate vncserver command to /etc/rc.d/rc.local would do the trick (make sure /etc/rc.d/rc.local is executable). Then, the command will be executed when the machine is turned on, allowing you to connect remotely.

Alien Bob 04-24-2008 09:01 AM

I used to have the following in my /etc/rc.d/rc.local to start a VNC server for my account:
Code:

su - alien -c "vncserver >/home/alien/log/vncserver.log 2>&1"
You need to run vncserver at least once manually in order to setup the vncpassword.

Eric

trashbird1240 04-24-2008 09:28 AM

Quote:

Originally Posted by Nylex (Post 3131366)
For the first problem, you'll need to edit /etc/lilo.conf and change the timeout field to 0. After doing this, you'll need to run /sbin/lilo for the changes to take effect. Both editing the file and running lilo will need to be done as root.

You may want to set it to 5 or 10, to give you a chance to boot a different kernel or different OS on the same machine. On the other hand if 5 seconds is too long...

Joel

thedp 04-24-2008 11:10 AM

Quote:

Originally Posted by Alien Bob (Post 3131402)
I used to have the following in my /etc/rc.d/rc.local to start a VNC server for my account:
Code:

su - alien -c "vncserver >/home/alien/log/vncserver.log 2>&1"
You need to run vncserver at least once manually in order to setup the vncpassword.

Eric

Can you please explain this command?

thedp 04-24-2008 11:20 AM

Quote:

Originally Posted by duryodhan (Post 3131371)
You will need to add the command that start vnc to /etc/rc.d/rc.local

for e.g if it is 'vncserver'

do in bash shell
add the output of which vncserver to a new line in rc.local

It's not working, is it possible that /etc/rc.d/rc.local is not executed at startup?
Also, should it be executed after or before user login?

Another thing is the user attachment to the vncserver, I think I need to specify the user that starts the service.

pwc101 04-24-2008 11:27 AM

If /etc/rc.d/rc.local is executable (check with ls -l /etc/rc.d/rc.local), then it'll be executed at startup (before log in). The
Code:

su - insert_your_username_here
part of the command runs the command as though it had been launched by which ever username is specified by "insert_your_username_here".

Test the command as root to see if it launches the vncserver correctly, and then check who owns that process with
Code:

ps -ef | grep vncserver
That should show you the process's information, including who it's owned by.

thedp 04-26-2008 01:00 PM

Thank you all so much for the replies, everything is working great.


All times are GMT -5. The time now is 08:05 PM.