VectorLinux
October 30, 2014, 06:18:58 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 8040 times)
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #15 on: September 17, 2008, 08:49:07 am »

Phreon I suggested a link to how to do autologin near the top of this thread, but it's pretty easy here is the jist of it.

Make sure you use KDM as your login manager.
Edit the file /usr/share/config/kdm/kdmrc, change three lines:
AutoLoginEnable=true   
AutoLoginUser=   <-- insert user name
PreselectUser=    <-- insert user name

If you are not finding the appropriate file are you sure you are using the KDM window manager.

I can find it on my system and I have these two items loaded via GSlapt. kdm-small 3.5.5-i586-2vl58 and kdmtheme-Bela 1-noarch-2vl59

To be honest I never chose to switch to the KDM window manager it just seemed to happen when I loaded Amarok. (because Amarok pulls in kdebase)

Just to be sure I was not sending you on a wild goose chase I did it myself.

Using Super File Manager I followed the path above and opened kdmrc in mousepad.
I removed the # before the AutoLoginEnable=true
then I entered the two other lines below that one, inserting my own user name.
AutoLoginUser=   <-- insert user name
PreselectUser=    <-- insert user name
Then I saved.
Restarted my machine to see what would happen and, baddabing, it worked.

Let me know if it is as simple as putting your tightvnc server into autostarted applications after that.
Logged

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


WWW
« Reply #16 on: September 17, 2008, 09:26:55 am »

To be honest I never chose to switch to the KDM window manager it just seemed to happen when I loaded Amarok. (because Amarok pulls in kdebase)

Actually, no, it has nothing to do with Amarok.  Also, KDM Is NOT a window manager.  It is a display manager that controls graphical login and nothing more.  kdm-small is the default display manager that is part of every install of Vector Linux.    You can't install VL with X without getting kdm installed.

Your window manager in Xfce is Xfwm. 

Let's try to keep terminology straight so that we don't confuse people, OK?
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
stretchedthin
Administrator
Vectorian
*****
Posts: 3780


WWW
« Reply #17 on: September 17, 2008, 10:05:17 am »

ok Wink
Logged

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



« Reply #18 on: September 18, 2008, 08:22:21 am »

I just cought on to this thread... so excuse me if i'm stating something that's already been said.

If this is a local LAN (like your home network), you may be better off with X over ssh.
Edit your /etc/ssh/sshd_config and find the line that says "#X11Forwarding no" and change it to read "X11Forwarding yes"
then ssh your box from the remote box like this
Code:
ssh -X -Y you_name@ip.to.your.box
Logged

phreon
Member
*
Posts: 52


« Reply #19 on: September 18, 2008, 11:19:52 am »

Hi Folks,

My machine will auto login but it still does not start vncserver.

As Caitlyn suggested, I appended to the end of the rc.local file, while logged as root, /usr/bin/vncserver. It did not start on boot up after the system automatically logged in.

I typed /usr/bin/vncserver in a terminal window after boot up and the vncserver works fine.

Just to test rc.local I appended to rc.local,  Krellm. (The system monitor.) It would not automatically start at either. The re.local file I edited was /etc/rc.d/rc.local

I must still be missing something.

Thanks
P
Logged
M0E-lnx
Administrator
Vectorian
*****
Posts: 3186



« Reply #20 on: September 18, 2008, 12:47:35 pm »

which WM are you using?
XFCE4?
KDE?
LXDE?
Fluxbox?
A better place for your line would be in your wm's startup script
Logged

caitlyn
Packager
Vectorian
****
Posts: 2876


WWW
« Reply #21 on: September 18, 2008, 01:39:43 pm »

He's trying to run a headless server -- no monitor, no login, no WM.  I don't have the time to install TightVNC and figure this out for him but an rc script is the correct answer.  I suspect he needs more than just "vncserver" to make it run in the background or as a daemon but without it installed to test I have no way to check.
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
newt
Vectorian
****
Posts: 1132



« Reply #22 on: September 18, 2008, 02:15:22 pm »

These commands come from: http://www.linuxquestions.org/questions/linux-networking-3/howto-start-vncserver-before-login-177406/
touch /var/lock/subsys/local
su - user -c "/usr/bin/vncserver :1 > /tmp/vncserver.log 2>&1 &" &


If you don't want the logging part then I think you can simplify to:
touch /var/lock/subsys/local
su - user -c "/usr/bin/vncserver :1 &" &


Perhaps skip the 'touch' part and only use:
su - user -c "/usr/bin/vncserver :1 > /tmp/vncserver.log 2>&1 &" &

Hopefully this helps.  Wish I had time to try it out first - oh well!
« Last Edit: September 18, 2008, 10:35:18 pm by newtor » Logged
newt
Vectorian
****
Posts: 1132



« Reply #23 on: September 18, 2008, 10:33:52 pm »

I found some time to test this and what has worked for me (in 5.9 Standard) is:
su - <your_username> -c "/usr/bin/vncserver :1 &" &

Hope this helps!
Logged
phreon
Member
*
Posts: 52


« Reply #24 on: September 19, 2008, 08:27:10 am »

Hi Newtor,

i read the link you suggested and I added to my rc.local file ...

su -phreon -c "/usr/bin/vncserver :1 &" &

No luck. This still will not start the vncserver on automatic boot.

Thanks again for your suggestion.
Phreon
Logged
newt
Vectorian
****
Posts: 1132



« Reply #25 on: September 19, 2008, 08:41:58 am »

Perhaps it was just a typo in your post, but a single space is missing in the command.  I've used a red underscore to illustrate the missing space:
su -_phreon -c "/usr/bin/vncserver :1 &" &
Logged
phreon
Member
*
Posts: 52


« Reply #26 on: September 19, 2008, 07:37:38 pm »

Hi Newtor,

You have an eagle eye. That was my mistake. I left out a space. It is working now.

I can power up  any of my computers using wake on lan and work on them from any computer with a display. That means I can now access any one of 5 computers, using different operating systems, and see each of thier desktops, run their apps, transfer files, and administrate changes remotely from my laptop.  I can use the VNC Viewer or just type their ip address in my browser. It is interesting to note that the Vector machine produces the a more clear and crisp display on the remote ( Windows) machine then any of the remote Windows boxes. Probably due to the way vnc can handle X-Windows in Linux.

By the way, the command I used in rc.local was ...

su - phreon -c "/usr/bin/vncserver" &

I looked up the man page for "su" and it did not have an explanation of "- username" switch. I am guessing it allows the named user to do whatever follows the  the - username switch as root and then reverts back to regular user.


YeeHaa!

Thanks
to all
Logged
caitlyn
Packager
Vectorian
****
Posts: 2876


WWW
« Reply #27 on: September 19, 2008, 08:06:14 pm »

The - and the username aren't a switch.  The isolated dash tells su to retain the existing environment.  The username tells su which user to become.  The -c is a switch, which tells su to execute the command that follows. It is in the su manpage.
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 #28 on: September 19, 2008, 11:23:43 pm »

I would be nice to give us a guide or how to on how you install VNC and make it work on VL5.9. Thanks.
Logged
phreon
Member
*
Posts: 52


« Reply #29 on: September 20, 2008, 06:19:51 am »

Hi hata_ph,

Thanks for the info on "su".

I will be happy to write up my vnc experience for the forum. Though i am not the expert, I will post what I have discovered and let the Forum polish it. I will do it in a new post.

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!