[SOLVED] Starting Firefox at Boot Time Without Asking for Profile.
Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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?
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.)
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:
What distribution of linux are you running?
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?)
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
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?
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.
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:
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.