LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 08-18-2011, 03:46 PM   #1
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Rep: Reputation: 3
Starting Firefox at Boot Time Without Asking for Profile.


Hello,

The Firefox version is 3.5.4 (don't want to upgrade bc of other things going on on the server). And it is running OpenSUSE 11.2.

So I have a small PC running here that acts as a simple server that displays a flash video as something like a non-interactive kiosk. I made a little shell script in /etc/init.d that simply should execute Firefox after boot-up. But on every boot when Firefox loads after boot is complete it asks to select a Profile and click "Start Firefox". I really don't want it to have to do this every time the machine is rebooted.

So to try and fix this I changed the script to just do this:
Code:
#!/bin/bash

firefox -P 'Default User'
So it should start Firefox with the given profile, but it still asks to select one after it starts. I also checked the option "Don't ask on startup" in the Profile Manager window, and yet it still does.

I believe it only asks when it starts at boot and not when I open it myself.
Could anyone point me in the right direction?


Thanks in Advance,
Matt
 
Old 08-18-2011, 05:20 PM   #2
ShadowCat8
Member
 
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261

Rep: Reputation: 52
Greetings,

Well, instead of trying to force a specific profile, how about trying to avoid profiles altogether?

Try these out and let us know how it goes:
Code:
#!/bin/bash

firefox -browser
or maybe even
Code:
#!/bin/bash

firefox -private
HTH. Let us know.
 
Old 08-18-2011, 05:24 PM   #3
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
Hey ShadowCat, thanks for the reply. As soon as I get back to my computer tomorrow I'll give it a go and post back.

Thanks again,
Matt
 
Old 08-18-2011, 05:53 PM   #4
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Or just don't use Firefox at all. If the video is always the same and on the same location you can play it easily with VLC or MPlayer.
 
Old 08-19-2011, 08:14 AM   #5
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
Hey TobiSGD, thanks for the reply.

Well the flash "movie" creates a socket connection to a server here to display certain data from that server.
Can it still do that through one of the video players?


Thanks,
Matt
 
Old 08-19-2011, 08:23 AM   #6
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
Hey ShadowCat,

So I tried both of your suggestions but it still did the same thing.

How come it only brings up the "Profile Manager" when it executes the script in /etc/init.d ? Is there anyway to disable the Profile Manager?


Thanks,
Matt
 
Old 08-19-2011, 10:02 AM   #7
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
Hey Guys,

So now I'm trying to just create a sym-link in /etc/init.d to firefox which is installed at /home/mmartin/Apps/firefox.... BTW, is that location ok to put the firefox directory in? Or is there a rule of thumb for installing Apps to a certain directory?

So with the link I put in init.d it is NOT executing it at boot. I tried the link because it would not execute my little shell script anymore that would just execute firefox with this one-liner in that file: /home/mmartin/Apps/firefox/firefox... Is there something I am not doing right?


Also, if a open a terminal and cd to /etc/init.d and run ./firefox I get the following error (firefox starts in spite of this error anyway):
Code:
Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
Failed to contact configuration server; some possible causes are that you need to enable TCP/IP networking for ORBit, or you have stale NFS locks due to a system crash. See http://projects.gnome.org/gconf/ for information. (Details -  1: Failed to get connection to session: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.)
Anyone know what that means?



Thanks,
Matt
 
Old 08-19-2011, 01:33 PM   #8
ShadowCat8
Member
 
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261

Rep: Reputation: 52
Quote:
Originally Posted by mrm5102
Hey ShadowCat,

So I tried both of your suggestions but it still did the same thing.

How come it only brings up the "Profile Manager" when it executes the script in /etc/init.d ? Is there anyway to disable the Profile Manager?
Hmmmm.... The "firefox -browser" command should have specifically bypassed the Profile Manager. I take it you have already checked the "Don't Ask At Startup" option in the Profile Manager itself. (You may just want to double-check that.)

Now, a question occurs to me: Do you actually have multiple profiles for Firefox on that box? And, if you do, what is the purpose of multiple profiles if the box is supposed to be for a kiosk implementation?

Quote:
Originally Posted by mrm5102
So now I'm trying to just create a sym-link in /etc/init.d to firefox which is installed at /home/mmartin/Apps/firefox.... BTW, is that location ok to put the firefox directory in? Or is there a rule of thumb for installing Apps to a certain directory?
Generally, installed apps for common use on a box should go under /usr. Executables go under /usr/bin (or /usr/sbin if they are "system" binaries e.g. clamd, alsaconf or apachectl), libraries get installed to /usr/lib, etc. The only apps that should get installed to a user's home directory are apps that only that user will run and no one else on the system.

Quote:
Originally Posted by mrm5102
So with the link I put in init.d it is NOT executing it at boot. I tried the link because it would not execute my little shell script anymore that would just execute firefox with this one-liner in that file: /home/mmartin/Apps/firefox/firefox... Is there something I am not doing right?
Now, this depends on a couple things:
  1. What distribution of linux are you running?
  2. What style of rc is that distribution using? (e.g. Does it have /etc/rc.[0-6] directories? Or, is it using some other means to break out the different runlevels?)
  3. Does it have an "rc.local" file somewhere under /etc to launch programs from on startup?

HTH. Let us know.

Last edited by ShadowCat8; 08-19-2011 at 01:43 PM. Reason: Re-formatting and added info about rc levels
 
Old 08-19-2011, 03:03 PM   #9
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
Hey ShadowCat, thanks for the reply and the detailed explanations. Much appreciated.

Quote:
Hmmmm.... The "firefox -browser" command should have specifically bypassed the Profile Manager. I take it you have already checked the "Don't Ask At Startup" option in the Profile Manager itself. (You may just want to double-check that.)

Now, a question occurs to me: Do you actually have multiple profiles for Firefox on that box? And, if you do, what is the purpose of multiple profiles if the box is supposed to be for a kiosk implementation?
That's correct I did make sure that, that option was checked. I even tried unchecking it, then closing FF then opening it and re-checking it. But still same result.

Now about the profiles. No it only has one profile called "Default User" which is there by default. I tried to delete that profile just to see if I just got rid of it if it would stop asking, but it wouldn't let me because it said something like, "you need at least one profile..." or something like that.



Quote:
Generally, installed apps for common use on a box should go under /usr. Executables go under /usr/bin (or /usr/sbin if they are "system" binaries e.g. clamd, alsaconf or apachectl), libraries get installed to /usr/lib, etc. The only apps that should get installed to a user's home directory are apps that only that user will run and no one else on the system.
So for example if I download Firefox manually (did that bc I needed an older version (3.5.10), which didn't have a "One Touch Install" type of thing that would have done everything for me). Ok so if i did that I would decompress this (firefox-3.5.10.tar.bz2) then tar this (firefox-3.5.10.tar). Then I am left with a folder with these contents:
Code:
total 18000
-rw-r--r-- 1 mmartin users     2129 May  4  2010 application.ini
-rw-r--r-- 1 mmartin users     2530 May  4  2010 blocklist.xml
-rw-r--r-- 1 mmartin users      232 May  4  2010 browserconfig.properties
drwxr-xr-x 3 mmartin users     4096 May  4  2010 chrome
drwxr-xr-x 2 mmartin users     4096 May  4  2010 components
-rwxr-xr-x 1 mmartin users    45912 May  4  2010 crashreporter
-rw-r--r-- 1 mmartin users     3801 May  4  2010 crashreporter.ini
-rw-r--r-- 1 mmartin users      583 May  4  2010 crashreporter-override.ini
drwxr-xr-x 5 mmartin users     4096 May  4  2010 defaults
drwxr-xr-x 2 mmartin users     4096 May  4  2010 dictionaries
drwxr-xr-x 3 mmartin users     4096 May  4  2010 extensions
-rwxr-xr-x 1 mmartin users     3884 May  4  2010 firefox
-rwxr-xr-x 1 mmartin users    44636 May  4  2010 firefox-bin
drwxr-xr-x 2 mmartin users     4096 May  4  2010 greprefs
drwxr-xr-x 2 mmartin users     4096 May  4  2010 icons
-rw-r--r-- 1 mmartin users      478 May  4  2010 libfreebl3.chk
-rwxr-xr-x 1 mmartin users   321140 May  4  2010 libfreebl3.so
-rwxr-xr-x 1 mmartin users   840296 May  4  2010 libmozjs.so
-rwxr-xr-x 1 mmartin users   200736 May  4  2010 libnspr4.so
-rwxr-xr-x 1 mmartin users   870072 May  4  2010 libnss3.so
-rwxr-xr-x 1 mmartin users   378620 May  4  2010 libnssckbi.so
-rw-r--r-- 1 mmartin users      478 May  4  2010 libnssdbm3.chk
-rwxr-xr-x 1 mmartin users   122908 May  4  2010 libnssdbm3.so
-rwxr-xr-x 1 mmartin users    81768 May  4  2010 libnssutil3.so
-rwxr-xr-x 1 mmartin users    13180 May  4  2010 libplc4.so
-rwxr-xr-x 1 mmartin users     8748 May  4  2010 libplds4.so
-rwxr-xr-x 1 mmartin users   125644 May  4  2010 libsmime3.so
-rw-r--r-- 1 mmartin users      478 May  4  2010 libsoftokn3.chk
-rwxr-xr-x 1 mmartin users   194128 May  4  2010 libsoftokn3.so
-rwxr-xr-x 1 mmartin users   447000 May  4  2010 libsqlite3.so
-rwxr-xr-x 1 mmartin users   168492 May  4  2010 libssl3.so
-rwxr-xr-x 1 mmartin users    12160 May  4  2010 libxpcom.so
-rwxr-xr-x 1 mmartin users 14222448 May  4  2010 libxul.so
drwxr-xr-x 2 mmartin users     4096 May  4  2010 modules
-rwxr-xr-x 1 mmartin users    10996 May  4  2010 mozilla-xremote-client
-rw-r--r-- 1 mmartin users      112 May  4  2010 old-homepage-default.properties
-rw-r--r-- 1 mmartin users      137 May  4  2010 platform.ini
drwxr-xr-x 2 mmartin users     4096 May  4  2010 plugins
-rw-r--r-- 1 mmartin users      177 May  4  2010 README.txt
-rw-r--r-- 1 mmartin users    15861 May  4  2010 removed-files
drwxr-xr-x 6 mmartin users     4096 May  4  2010 res
-rwxr-xr-x 1 mmartin users    10450 May  4  2010 run-mozilla.sh
drwxr-xr-x 2 mmartin users     4096 May  4  2010 searchplugins
-rw-r--r-- 1 mmartin users      825 May  4  2010 Throbber-small.gif
-rw-r--r-- 1 mmartin users        6 May  4  2010 update.locale
-rwxr-xr-x 1 mmartin users    70472 May  4  2010 updater
-rw-r--r-- 1 mmartin users      143 May  4  2010 updater.ini

So would I move the executables to /usr/bin and move the files with the lib* prefix to /usr/lib ? Or would I just leave the whole directory in one location?


Quote:
Now, this depends on a couple things:

1. What distribution of linux are you running?
2. What style of rc is that distribution using? (e.g. Does it have /etc/rc.[0-6] directories? Or, is it using some other means to break out the different runlevels?)
3. Does it have an "rc.local" file somewhere under /etc to launch programs from on startup?
  1. OpenSUSE 11.2
  2. I have rc0.d to rc6.d and also rcS.d.
  3. Nope there is no rc.local



Thanks again for your help,
Matt
 
Old 08-19-2011, 04:22 PM   #10
ShadowCat8
Member
 
Registered: Nov 2004
Location: San Bernardino, CA
Distribution: Gentoo, Arch, (RedHat4.x-9.x, FedoraCore 1.x-4.x, Debian Potato-Sarge, LFS 6.0, etc.)
Posts: 261

Rep: Reputation: 52
Quote:
Originally Posted by mrm5102
So would I move the executables to /usr/bin and move the files with the lib* prefix to /usr/lib ? Or would I just leave the whole directory in one location?
Well, no... Not really. When you are doing a full install from a source package, that's where the files should get installed. (FYI, installation from source is where either you or something within the linux box is running "make && make install" on the source code for the program. In Gentoo, for instance, the command is 'emerge', but the system for installing is called portage. In Ubuntu, the command is "apt-get" and the system is called dpkg.) But, when you have a full binary package, you can't break them apart easily since they are usually set to look within their own directories for the files they need.

And, for cases of complete packages like that, the best place to put the entire package is under /opt with the read and execute permissions set for all (given that the program should be available for anyone logging onto the system.) You may even find that a couple other complete packages are already there. To give you an idea of what tends to get installed to /opt, here is a listing of what I have on my system here at the office:
Code:
 ~ $ ls /opt
android-sdk-linux_x86         lost+found        sun-jre-bin-1.6.0.26
bin                           pub               tomcat5
cisco-vpnclient               sun-jdk-1.5.0.22  vmware
datavision-1.2.0              sun-jdk-1.6.0.11
emul-linux-x86-java-1.6.0.26  sun-jdk-1.6.0.26
Now, having checked some of the posts at the OpenSuse Forums, I came to realize that even the knowledgeable folks running current SuSE versions recommend away from messing with the runlevel control files unless you *REALLY* know what you are doing. I haven't played around with any SuSE distro since before Novell bought them, so I am not familiar with the exact rc system they are using currently.

Now for the Good News:
They did have a great suggestion for getting Firefox (or any other app you may want to run) to start and be there for the user once they have control: Make the Desktop environment launch it!

Within the link I gave above, there was a post from ijbreakey that described how to set it up if you are using KDE, but if you are using GNOME, then you would go to the menu pulldown: System > Preferences > Startup Applications and set Firefox to run in there. After all, you aren't going to run Firefox if you have no GUI already running, right? And, I'd be curious to see whether the bloody Profile Manager comes up if you run it from there. I'd also recommend trying all three ways of launching Firefox (Your way with the "-P 'Default User'" as well as "-browser" and "-private") within the Startup Applications system to see the behavior on each, and which might work best for you.

HTH. Let us know.
 
Old 08-19-2011, 07:37 PM   #11
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,324
Blog Entries: 28

Rep: Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142Reputation: 6142
This is just a shot in the dark, but have you looked at the kiosk mode for this usage? See items 15 and 16 at this link:

http://en.opensuse.org/openSUSE:SUSE...General_howtos
 
Old 08-22-2011, 08:33 AM   #12
mrm5102
Member
 
Registered: Apr 2011
Location: Philadelphia
Posts: 165

Original Poster
Rep: Reputation: 3
Hey ShadowCat, thanks for the info of installing apps.
Quote:
Within the link I gave above, there was a post from ijbreakey that described how to set it up if you are using KDE, but if you are using GNOME, then you would go to the menu pulldown: System > Preferences > Startup Applications and set Firefox to run in there. After all, you aren't going to run Firefox if you have no GUI already running, right? And, I'd be curious to see whether the bloody Profile Manager comes up if you run it from there. I'd also recommend trying all three ways of launching Firefox (Your way with the "-P 'Default User'" as well as "-browser" and "-private") within the Startup Applications system to see the behavior on each, and which might work best for you.
Yup absolutely right... before I left work on Friday that did hit me. I remember on my machine in which I use OpenSUSE 11.4, I had setup my Lotus Notes to start automatically when I log in. Sooo much easier that way --- Computer > Control Center > Personal > Startup Applications. Having that definatly makes life a whole heck of alot easier! I guess it had just been almost a year since I had set that up and must have completely forgotten about it.

Thanks again for all your help! And thanks for the info on installing applications...


Quote:
This is just a shot in the dark, but have you looked at the kiosk mode for this usage? See items 15 and 16 at this link:

http://en.opensuse.org/openSUSE:SUSE...General_howtos
Frankbell, Thanks for the reply. No I haven't seen that before I will check it out. Thanks...




Well I guess you can call this one closed. Thanks to everyone who posted


Thanks again,
Matt
 
  


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
starting Jboss at boot time? your_shadow03 Linux - Server 1 01-03-2011 01:35 PM
wireless not starting about 75 % of time at boot Elixer Linux - Wireless Networking 8 07-20-2010 10:02 PM
[SOLVED] starting wvdial at boot time jsbjsb001 Linux - Networking 4 08-16-2009 05:57 AM
How to starting OpenVPN at boot time? Vitalka Linux - General 2 11-08-2007 09:54 AM
why smbfs not starting up at boot time? gkogut Linux - Networking 2 11-10-2003 05:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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