1

Where I work, we have 2 public Ubuntu computers. I want to set up a custom message to be prompted whenever the user opens Firefox.

1
  • 2
    Use can set Firefox's homepage to a local page created by you to say whatever you want. This page can be made to look like a disclaimer page with a continue/accept/etc. link that continues on to wherever you want.
    – James
    Nov 17, 2012 at 16:17

1 Answer 1

0

James is correct, however if you wanted an actual pop-up box:

First, make a new file somewhere called runffox.sh, make sure to create it as your user. e.g. /home/username/runffox.sh

Inside it put

zenity --warning --text="MESSAGE"
firefox

Where MESSAGE is the text you want to show them.

Then in terminal

sudo chmod 755 /home/username/runffox.sh

This allows all to execute the file, but only user to edit it. If you want only root to be able to edit the file change 755 to 555

Now in terminal type

sudo gedit /usr/share/applications/firefox.desktop

Change

Exec=firefox %u

to

Exec=/home/username/runffox.sh %u

Now, if you launch firefox from the sidebar or desktop etc, it will show the message, then open firefox after you close the message.

Also, for more options with zenity to edit the popup message,

man zenity

p.s. I'm not sure if a two part command can be put after Exec=, if anyone with more experience could verify, might be able to skip creating the .sh file.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .