Results 1 to 5 of 5
I want to change the File>Quit to shut down the computer instead of quit from fire fox
where the code I need to change and how?
Thanks...
- 04-30-2008 #1Just Joined!
- Join Date
- Mar 2008
- Posts
- 23
configre firefox
I want to change the File>Quit to shut down the computer instead of quit from fire fox
where the code I need to change and how?
Thanks
- 04-30-2008 #2
it isn't possible to make firefox shut down your computer as it is just a web browser, what is the point of this functionality?
- 04-30-2008 #3Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
This is one of the most satanic things I've ever heard. :P Why don't you just bind a keystroke in your wm or something similar? Or to a button in your taskbar or something.
You can still use xbindkeys if you are running without a window manager.
If you still want to do this. I suppose it could be done by modifying the sources for firefox, it shouldn't be too difficult. If it's embedded into the C source then I suppose that a system() call should work, as long as the user running firefox has permissions to run halt or shutdown -h.
EDIT: Try to describe *why* do you want to do this. Maybe there's a better solution. If what you want is to start without a window manager, run only firefox, and shut down the machine when closing it, you can just do it with a bit of tweaking in your .xinitrc, and it would be much easier and less time consuming than compiling and recompiling firefox with each new security release.
You can use something in the lines of this in your .xinitrc:
This way X with start with only firefox, and, when closing firefox, X will also be closed and the script will continue running the shutdown command.Code:firefox& pid=$! wait $pid shutdown -h # or even "sudo halt" or something, you get the idea
- 05-01-2008 #4Just Joined!
- Join Date
- Mar 2008
- Posts
- 23
configration firefox
I was configured gdm to start with failesafe terminal by default and just firefox appear no other thing and I want to shutdown from firefox when quit from it.
I'm running under ubuntu , I configured /etc/X11/xinit/xinitrc file by the code posted by you:
firefox&
pid=$!
wait $pid
shutdown -h# or even "sudo halt" or something, you get the idea
and it doesn't work !
any idea?
Thanks.
- 05-01-2008 #5Linux Guru
- Join Date
- Nov 2007
- Location
- Córdoba (Spain)
- Posts
- 1,513
So, when you change the default xinitrc by this, do you get any errors in the X logs?
In any case, I am not sure how gdm do the things. ButI don't think it uses xinitrc by default, maybe you should be looking into /etc/X11/Sessions/
Note also that there's the possibility that the config files into the user $HOME are overriding the global ones, that might be only parsed if there's no per-user config. It's possible and some distros do it.
But I am no specialist in all this k/gdm stuff, I just use startx.
Note also that, in the script I posted, the shutdown part will only work if you have the rights to use that command as the current user.


Reply With Quote

