LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-06-2004, 11:35 AM   #1
anthjaz
Member
 
Registered: Sep 2003
Distribution: RH9
Posts: 37

Rep: Reputation: 15
autorun at boot


I need for mozilla to autorun after the system boots. I am running an input program through a browser and do not want ANY user interaction with the OS. The machines actually have no keyboard or mouse, just a bc scanner.

Also, is there any way to get VNC or Xwin to share the same desktop as the locally logged in user like Windowz does with VNC. This way if I need to see that actual desktop I can see what the user is doing.

Thanks for any help!

I am running Fedora Core 1.

Last edited by anthjaz; 05-06-2004 at 11:37 AM.
 
Old 05-06-2004, 02:34 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Re: autorun at boot

Quote:
Originally posted by anthjaz
I need for mozilla to autorun after the system boots. I am running an input program through a browser and do not want ANY user interaction with the OS. The machines actually have no keyboard or mouse, just a bc scanner.
You could make init 3 the default runlevel,
create a user mozilla,
give the user mozilla a ~/.xinitrc
with exec mozilla as the last line
and then, from rc.local,
do a
su -c startx mozilla



Cheers,
Tink
 
Old 05-06-2004, 03:38 PM   #3
anthjaz
Member
 
Registered: Sep 2003
Distribution: RH9
Posts: 37

Original Poster
Rep: Reputation: 15
I was just trying to add "mozilla" to the end of the rc.local file. I created a special user called "track" that I am using but I also need that user to autologin to the system. How would I have the user autologin to run level "init 3"?

Also, I am not sure what you meant by:

"give the user mozilla a ~/.xinitrc
with exec mozilla as the last line"

Are you saying create a file /home/track/.xinitrc
and inserting "exec mozilla"? Sorry, I am not completely sure what you are suggesting.
 
Old 05-06-2004, 04:17 PM   #4
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
If track is the user you want to run mozilla as,
yes.

You don't run mozilla from rc.local, though, but that line
su -c startx track



Cheers,
Tink
 
Old 05-06-2004, 04:47 PM   #5
anthjaz
Member
 
Registered: Sep 2003
Distribution: RH9
Posts: 37

Original Poster
Rep: Reputation: 15
My rc.local file isn't running at boot automatically. If I run it manually it works and mozilla comes up. If I don't run it manually then nothing happens. The only thing that is in the rc.local file is:

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

touch /var/lock/subsys/local
su -c startx tracking

If I run /etc/rc.d/rc.local I get an error saying permission denied and promted for a password. After I enter the password for the user "track" then the mozilla browser comes up?

Any ideas? Thanks for the help!
 
Old 05-06-2004, 04:55 PM   #6
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Quote:
Originally posted by anthjaz

su -c startx tracking
The bold bit above is meant to be
the username ... I thought you said
it's track, not tracking?


[edit]
Is your system currently starting in init 3?

If it is, what happens if you login as root,
and do
su -c startx track
?
[/edit]

Cheers,
Tink

Last edited by Tinkster; 05-06-2004 at 04:57 PM.
 
Old 05-06-2004, 05:28 PM   #7
anthjaz
Member
 
Registered: Sep 2003
Distribution: RH9
Posts: 37

Original Poster
Rep: Reputation: 15
No, I boot to init 5 then go into 3. Not sure how to set it to auto go into 3.

When I try to run rc.local 3 from root I also get permission denied.

If I run:

su -c startx tracking

as "root" I get permission denied
but as user "tracking" I get prompted for a password?

I just don't think the rc.local file is running at startup?
Also, why am I getting prompted for password. Is there a way I can automate that as well?

Sorry, I changed user to tracking.

-Thanks
 
Old 05-06-2004, 05:35 PM   #8
anthjaz
Member
 
Registered: Sep 2003
Distribution: RH9
Posts: 37

Original Poster
Rep: Reputation: 15
Sorry, now root will run:

su -c startx tracking

successfully with no password prompt and go directly into mozilla, but user "tracking" gets prompted for password. But I still have to run the command manually.
 
Old 05-06-2004, 05:46 PM   #9
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Sorry m8, but I'm at loss here ... that root/tracking
should be denied permission to run startx
can only mean that this is a DeadRat (Fedora)
specific feature ...

What does
ls -l `which startx`
give you?


Cheers,
Tink
 
Old 05-06-2004, 05:57 PM   #10
anthjaz
Member
 
Registered: Sep 2003
Distribution: RH9
Posts: 37

Original Poster
Rep: Reputation: 15
It gives me:

/usr/X11R6/bin/startx

Maybe I will try RH9 instead.

-thanks
 
Old 05-06-2004, 08:02 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
That would be the output of
which startx
not of
ls -l `which startx`


It should look similar to this:

-rwxr-xr-x 1 root root 3220 2004-04-04 12:18 /usr/X11R6/bin/startx



Cheers,
Tink
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
autorun apokryphos Linux - General 5 10-11-2004 10:43 AM
Boot hangs after "md: ...autorun Done" The_fuzzy_cow Linux - Hardware 2 07-12-2004 08:50 AM
CD with Autorun Insomnia Linux - General 2 05-26-2004 07:19 AM
boot/startup/autorun commands awejevlen Linux - Newbie 6 05-04-2004 06:52 AM
cd autorun Daem0hn Linux - General 1 07-22-2003 06:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:49 AM.

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