VectorLinux
October 25, 2014, 06:09:28 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1] 2
  Print  
Author Topic: How does one run an app/package on power up?  (Read 8001 times)
phreon
Member
*
Posts: 52


« on: September 15, 2008, 03:18:39 pm »

Hi,
I want to start the VNCServer when my machine boots. I do not have a monitor on the computer and need VNCViewer running to show the Vector desktop on a remote computer.

In a terminal window I type "vncserver" to start it. I tried to add "vncserver" at the end of the rc.local file but the computer seems to just wait for me to login. (I can't login until vncserver is running and I can see it on the remote computer.) Maybe I need to add more then "vncserver" to rc.local.

Any ideas what the solution would be?

Thanks
P

Logged
lagagnon
Global Moderator
Vectorian
*****
Posts: 1922



WWW
« Reply #1 on: September 15, 2008, 03:52:35 pm »

You did not state what desktop environment you are using - that is important. So I looked through your previous posts and you mentioned xfce so that is what I am assuming.

Menu, Settings, Autostarted Applications  - add the command in there.
Logged

"As people become more intelligent they care less for preachers and more for teachers". Robert G. Ingersoll
caitlyn
Packager
Vectorian
****
Posts: 2876


WWW
« Reply #2 on: September 15, 2008, 03:56:42 pm »

lagagnon:  That won't work for him.  He has a system without a monitor and isn't logging in. Xfce will never run in that situation.  HE's effectively setting up a headless server.

The path variable is probably not set when rc.local is called during the boot process.  Instead of just vncserver you probably need to put the full path to the application.  I don't have vncserver installed on my system but if you go into a terminal window and type in:

which vncserver

the full path will be displayed.

HTH,
Cait

Logged

eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1
hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« Reply #3 on: September 15, 2008, 05:38:35 pm »

Are you setting up your machine as server?
you may try using SSH...

http://forum.vectorlinux.com/index.php?topic=7196.0
Logged
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #4 on: September 15, 2008, 05:56:39 pm »

Caitlyn and hata_ph would this work...

1st he sets up autologin as discribed here...
http://forum.vectorlinux.com/index.php?topic=7193.0

Then he does as hata_ph suggested.

Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #5 on: September 15, 2008, 06:03:09 pm »

Sorry lagagnon's suggestion. And of course he would need a monitor on it temporarily for the set-up.
Logged

Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee
hata_ph
Packager
Vectorian
****
Posts: 3258


-- Just being myself --


« Reply #6 on: September 15, 2008, 06:34:56 pm »

We still dunno what is the purpose of the machines, he want to set up as a server or workstation?

For workstation with Xfce as WM, you can follow lagagnon's advise, either using manual login or autologin. (But then it seem the chances of being a workstation is low as phrenon's statement...)

Quote
I want to start the VNCServer when my machine boots. I do not have a monitor on the computer and need VNCViewer running to show the Vector desktop on a remote computer.

For server, setup X11 forwarding via SSH. It work for me so far using VL5.9 as a samba server in my office. It will not have the full function as VNC but with a little bit of CLI command it do work nicely....beside you can try x11vnc too.....
Logged
phreon
Member
*
Posts: 52


« Reply #7 on: September 16, 2008, 07:10:55 am »

Hi Folks,
I want to run the VNC server on a Vector machine with no monitor. this means.
>The machine needs to boot up and run vncserver on power up.
>There should be no required login *or* the login can occur after vnc is running and I can connect on a remote machine using vnc.
>The Vector machine has no monitor, mouse, or keyboard.

The executable is vncserver and it is in /usr/bin/.
I am using Xfce.

What exactly do I add to rc.local to make this work? Is rc.local the correct file or is one of the other rc.* files better? Can I disable a login or force an auto login?

Thanks
P
Logged
bigpaws
Vectorian
****
Posts: 1856


« Reply #8 on: September 16, 2008, 07:43:16 am »

Have you searched for any of this?

There is sooo much information out there. Part of
the beauty of Linux and Open source is that you do
not need to reinvent the wheel, or answering the same
questions thousands of times. Information is shared in
this environment not horded.

http://www.walkernews.net/2007/07/05/how-to-setup-linux-vnc-server/

That should show you how.

Bigpaws
Logged
phreon
Member
*
Posts: 52


« Reply #9 on: September 16, 2008, 10:53:31 am »

Hi Bigpaws,

I think you did not understand my post. I am not asking how to make vnc work. I am asking how to make it automatically run on boot on a headless machine. I have posted this several times.

Your suggested link was redundant.
I have already done that and posted as much in ...
http://forum.vectorlinux.com/index.php?topic=7240.30

If the answer to my question is out there, my many searches could not find the complete answer.

I suspect I need to tell Vector Linux to auto-login; edit a rc. file like rc.local to find the executable vncserver; and then start it. I need someone to describe auto-login in Vector and then how to edit whatever file to find and start vncserver at boot. I can't find this in searches of the Vector forums or anywhere else.

Thanks
P
Logged
bigpaws
Vectorian
****
Posts: 1856


« Reply #10 on: September 16, 2008, 11:47:47 am »

In that post you stated it is working.

Quote
I have been successful.

Is that correct? You apparently have two seperate
posts for the same thing. Which is hard to follow.

You are stuck on one way of doing things which is Windows,
not Linux. One problem is that you are not understanding the
way a true mutli user system works. Many users at the same
exact time using system, not logging in and switching users.
That is why you need to specify a user in the rc.local file since
everything there will be started as root.

Why not just do the autologin and the start the process from XFCE?

There are many ways to accomplish the same task in Linux. The
reason that it is that is so that someone can customize it for themselves,
and to adapt it for specific needs. Just like your need of controlling several
computers from the same Desktop.

Just to add some fun for you why not look at synergy, that is another
great way to accomplish what you want.

Bigpaws

Logged
phreon
Member
*
Posts: 52


« Reply #11 on: September 16, 2008, 12:08:43 pm »

Bigpaws Dude! Did you read my posts?!

I posted in this forum ...

"I want to start the VNCServer when my machine boots. I do not have a monitor on the computer and need VNCViewer running to show the Vector desktop on a remote computer.

In a terminal window I type "vncserver" to start it. I tried to add "vncserver" at the end of the rc.local file but the computer seems to just wait for me to login. (I can't login until vncserver is running and I can see it on the remote computer.) Maybe I need to add more then "vncserver" to rc.local.

Any ideas what the solution would be?"


That is quit different from my other forum post where I figured out how to download vnc and get it to run.

You keep answering my post in the "Migrating" forum.

New question; I am getting closer to an answer on my own ... need to run the Linux chkconfig command but it doesn't work in Vector. What it does is ...

chkconfig provides a simple command-line tool for maintaining the /etc/rc[0-6].d directory hierarchy by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories.

This implementation of chkconfig was inspired by the chkconfig command present in the IRIX operating system. Rather than maintaining configuration information outside of the /etc/rc[0-6].d hierarchy, however, this version directly manages the symlinks in /etc/rc[0-6].d. This leaves all of the configuration information regarding what services init starts in a single location.

chkconfig has five distinct functions: adding new services for management, removing services from management, listing the current startup information for services, changing the startup information for services, and checking the startup state of a particular service. 


By the way, Synergy doesn't do anything close to my question. It just shares keyboard and mouse but requires monitors on every computer.

Any ideas.
thanks
P
« Last Edit: September 16, 2008, 12:10:44 pm by phreon » Logged
caitlyn
Packager
Vectorian
****
Posts: 2876


WWW
« Reply #12 on: September 16, 2008, 12:15:59 pm »

chkconfig is an SGI thing used by *some* Linux distributions (i.e.: Red Hat) to turn on and off services.  The majority of Linux distros don't hve or use chkconfig.  Even if we did have chkconfig you would need to write your own control script for vncserver in order for chkconfig to act upon it.  You just don't need to do that.

Adding:

/usr/bin/vncserver <switches>

to /etc/rc.d/rc.local should do it.  <switches> is not to be typed in literally.  It's where you enter whatever switched or options TightVNC needs to run in the background as a daemon.  Since I don't have TightVNC on this box I don't have the ability to walk you through it right now, nor do I have the time to set it up here at the moment.
Logged

eMachines EL-1300G desktop, 1.6GHz AMD Athlon 2650e CPU, 4GB RAM, nVidia GeForce 6150 SE video
CentOS 6.5 (will try VL64-7.1 soon)

Toshiba Satellite A135-S4727,  Intel Pentium T2080 / 1.73 GHz, 2GB RAM, Intel GMA 950

HP Mini 110 netbook, 1.6GHz Intel Atom CPU, 2GB RAM, Intel 950 video, VL 7.1
bigpaws
Vectorian
****
Posts: 1856


« Reply #13 on: September 16, 2008, 05:57:41 pm »

Quote
Bigpaws Dude! Did you read my posts?!

I have read all of them. My point was you have comments about
the same program in more than one post. The other post has that
you have this already working. I degress.

Synergy comment (I stand corected)

Solution one is to have autologin for
XFCE, then in the XFCE config start the vncserver.
This will also keep the user you have setup without
having files everywhere. I am sure that with you know
that using the root account for this or any other use besides
configuration is not recommended.

Solution two use ssh with Xforwarding start a local
X server and export the screen from the headless
machine to the machine you are using.

Many solutions for the same problem. Your last response
was to add a command to the rc.scripts using chkconfig,
that tool is a RedHat tool, although you can adapt the
Vector system to use it, you will need to setup the RedHat
style boot up system (This was a workaround for vmware 1 or
2 versions ago).

Have you tried using Slackware in your google attempts at
information?

Bigpaws
Logged
phreon
Member
*
Posts: 52


« Reply #14 on: September 17, 2008, 05:29:24 am »

Hi Bigpaws,

Thanks for your suggestions. I will read up on autologin on Xfce and Xfce config.

I am not familiar enough or  expert enough on ssh and x to do try that yet. I have been using vnc on all of my other machines and this seemed the path of least resistance. Also, the Linux vnc server looks great in the vnc viewer on my main machine. Much better then the windows servers.

Caitlyn ... adding "/usr/bin/vncserver - start" to rd.local does not start the vnc server on bootup. "vncserver" is in /usr/bin and will start from a terminal window.

Thanks
P
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!