Using xpidl command to create .h - mozilla

I have built Firefox from the source code, and I am trying to create a component. I try running xpidl on my .idl file from terminal
$ xpidl -m header -w -v- I $XPIDL_INC \ > -o nsIPageSummary nsIPageSummary.idl
but I get -bash: xpidl: command not found
I've tried changing the path PATH=$PATH:/usr/src/mozilla/xpcom/typelib/xpidl, but to no avail. I am probably just completely misunderstanding how to use the xpidl command. But is all you need the Fire fox source code it having been built? And is there a certain directory that you need to be in to use the command?

Which version of Firefox do you use?
Starting in Gecko 9.0 (Firefox 9.0 / Thunderbird 9.0 / SeaMonkey 2.6), xpidl has been replaced with pyxpidl in the Gecko SDK. pyxpidl has been used for some time now, but now this older tool has been fully retired.
https://developer.mozilla.org/en-US/docs/XPIDL/xpidl
https://developer.mozilla.org/en-US/docs/XPIDL/pyxpidl

Related

How do you get a launcher for firefox?

I hope that I'm tagging/asking on the correct page. I'm Using Linux Mint 6.0, but it could be OS independent.
So the used command for installing Firefox was
nix-env -iA nixpkgs.firefox-esr
When I type which firefox, I get:
/home/foo/.nix-profile/bin/firefox
So Linux Mint comes with Chrome preinstalled, which has a launcher, e.g. also in the start menu. How do I get that for firefox as well? I didn't find a tool to create such a launcher in Mint and I actually think, that nix should do that for me.
EDIT: I also found this page which seemed helpful and advertised e.g. the KDE Kickoff, but I wasn't able to get that one to run.
I can only speak for Ubuntu launchers, but other distros will have launcher files that will have a similar setup
TLDR, add ~/.nix-profile/share to XDG_DATA_DIRS env variable on login. Add the following to ~/.profile after nix loading commands
export XDG_DATA_DIRS=$HOME/.nix-profile/share:$XDG_DATA_DIRS
Explanation:
Installed packages via nix will have an immutable path in nix/store. ~/.nix-profile/bin/firefox is the derivation your current nix environment is linked to (if you update the firefox package, it'll point to the new one)
This means you can create a launcher file for that executable. Lets see if the firefox-esr derivation comes with a desktop launcher or not:
$ nix-build '<nixpkgs>' -A firefox-esr
This will build the package and give you a derivation path. For my current channel it is /nix/store/3iipcmiykgr4p34fg3rkicdz1bw584gm-firefox-102.2.0esr
If I check inside it, there is a .desktop file which defines Ubuntu launchers:
$ ls /nix/store/3iipcmiykgr4p34fg3rkicdz1bw584gm-firefox-102.2.0esr/share/applications
firefox.desktop
These files will also be available under ~/.nix-profile/share/applications so you can simply add that to XDG_DATA_DIRS env variable before boot
If an application did not have one, you can manually make one and add it under ~/.local/share/applications, then set the executable path to the nix one
So SuperSandro2000 explained in the comments, that firefox from nix ships with a .desktop file already. This can be easily added to the start menu and lies in
/nix/store/...-firefox-XXX.X/share/applications/firefox.desktop
If there is no such file included, the most direct way could be (imho) to just create a simple bash script:
#!/bin/bash
./home/foo/.nix-profile/bin/firefox & #Run Firefox
echo Firefox was started with PID $!
In order to make it runnable, enter chmod +x your_skript_name.sh. Afterwards, ./firefox 2> /dev/null & can be used instead to run it silently in the background.
You can also consider the developer/command line options for firefox (Archive) or this blog article here.
Maybe /usr/bin/menulibre is also the right application, it allows you to create .desktop files. This app can also be found by right-clicking on the start "menu".

Get Firefox version as root

I have an installation script that I'd like to run on macOS/Linux.
Mid-installation, I need to detect the currently installed Firefox version to decide whether or not to use a deprecated feature (i.e. AutoConfig) versus a modern feature (i.e. policies.json).
For Windows, I have logic to parse the Firefox version from the registry. This works fine.
On macOS/Linux I want to parse the output of firefox --version however when firefox sees the script running as root it complains:
Running Firefox as root in a regular user's session is not supported. ($HOME is /Users/foo which is owned by foo.)
I can use sudo -u $USER firefox --version but this seems like it will have scalability issues with systems that don't have sudo enabled. Is there another way to get the version without launching the process as a regular user? Is there an undocumented override flag? I've tried --headless to no avail.
It appears the following is a viable workaround for running firefox --version as root.
HOME=/tmp XAUTHORITY=/tmp firefox --version
As far as I know, /tmp should always be owned by root, but if there are exceptions, please propose a better path so that this solution can be improved.

linux when setting my latex PATH the PATH only maintains its value for the duration of the terminal window if i exit i have to reset everytime

ALSO POSTED HERE i was not aware for tex.stackexchange before i made this post, so sorry for the double/cross post here is the link to the other tex.stackexchange post
https://tex.stackexchange.com/questions/153949/linuxnew-to-latex-path-to-latex-is-resetting-every-time-exit-the-terminal
I am trying to learn latex and i am running linux mint 15 x64. I have installed "texlive" and followed this installation guide:
http://www.tug.org/texlive/quickinstall.html
The problem i am having is, as the title suggests when i set my PATH variable to the latex directory, it works fine for one terminal window only, if i exit that terminal window the PATH no longer points to the latex install, thus i have to reset it every time which is rather annoying.
I am using the following command:
PATH=/usr/local/texlive/2013/bin/x86_64-linux/:$PATH
then when i do:
echo $PATH i get this result:
/usr/local/texlive/2013/bin/x86_64-linux/:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
and i can do this:
latex --version
pdfTeX 3.1415926-2.5-1.40.14 (TeX Live 2013)
kpathsea version 6.1.1
Copyright 2013 Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
There is NO warranty. Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Peter Breitenlohner (eTeX)/Han The Thanh (pdfTeX).
Compiled with libpng 1.5.16; using libpng 1.5.16
Compiled with zlib 1.2.7; using zlib 1.2.7
Compiled with xpdf version 3.03
which is as expected, but when i close the terminal window, and re open it i get the following:
echo $PATH
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx <--- missing the latex path
and when i check the version:
latex --version:
The program 'latex' is currently not installed. You can install it by typing:
sudo apt-get install texlive-latex-base
i have also tried doing the same as the super-user, i get the same end product.
Any have a solution to this problem?
Thanks,
Chris.
Set the path in the .bashrc file or .bash_profile
Adding
export PATH=/usr/local/texlive/2013/bin/x86_64-linux/:$PATH
I'm pretty sure that putting
PATH=/usr/local/texlive/2013/bin/x86_64-linux/:$PATH
in your .bashrc will accomplish what you want

Remove warning about ansicon from "rake cucumber"

When you run any rake task with cucumber installed on a machine that doesn't have ANSICON installed, you get the following message:
*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows
When running locally I like using ANSICON, but when used within the build server I don't care about that - and I don't want to see that warning there. Is there a way to get rid of it?
You can actually remove the warning itself. I do not like installing a bunch of garbage just for the sake of having a green word. So, to remove the warning:
1. Locate the Cucumber installation in gems directory (it's in the Ruby installation directory). For me it was: lib\ruby\gems\1.9.1\gems\cucumber-1.2.0
2. In the cucumber-1.2.0\lib\cucumber\formatter directory of the Cucumber installation find the file ansicolor.rb
3. Locate the line:
STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
and add # in front of it to comment it out:
# STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
The line number was 14 for my version of Cucumber.
4. Save the file and you're done
Download and unzip the file from http://adoxa.altervista.org/ansicon/
open cmd and navigate to the unzipped folder
Navigate to x64 (if you have a 64 bit machine) otherwise navigate to x86
Type ansicon.exe -h and you will get help of this command
Execute 'ansicon.exe -i' to install and add ansicon to your Windows
Run your cucumber 0.10.0 test and you should
get the coloured output result on Windows
Can you add an exception to you spec_helper.rb? Or perhaps try adding a tag which you filter on when using rake?

Installing flash 9 debugger in linux

I've been trying for some time to use the ExternalInterface.call method in flash, to no avail (see here: actionscript + javascript here: Using ExternalInterface in Flash and here: Flash trace output in firefox, linux) and now I'm trying to trace ExternalInterface.available. So far my best option seems to be FlashTracer for firefox, except that I have to have flash player 9 installed. I've removed my old flash player and downloaded the appropriate files (http://download.macromedia.com/pub/flashplayer/updaters/9/flash_player_9_linux_dev.tar.gz). According to the readme included these are the steps for installation:
Installing the debugger plugin tar.gz using Install script:
o the debugger plugin is located at:
./plugin/debugger/install_flash_player_9_linux.tar.gz
o Unpack the tar.gz file
o In terminal, navigate to the unpacked directory and enter:
+ $ ./flashplayer-installer
+ Click Enter key and follow prompts
except there's no file called flashplayer in the debugger directory. Anyone else ran into this? How can I install flash player 9 debugger on my Ubuntu system?
If you're using something like Ubuntu, the Flash plugin is probably a system wide thing. Under Ubuntu 8.10 for example, I have it at:
/usr/lib/flashplugin-installer
additionally you'll find at:
/etc/alternatives/
links to it, so you can change which .so is used depending on the user.
The easiest thing you could probably do if the ./flashplayer-installer file doesn't exist (though it does in mine) is to copy the debug flashplayer library to this directory. e.g:
root#me:/usr/lib/flashplugin-installer# mv libflashplayer.so libflashplayer.non-debug.so
root#me:/usr/lib/flashplugin-installer# cp ~jamie/Adobe_Flex_Builder_Linux/Player/linux/install_flash_player_9_linux/libflashplayer.so libflashplayer.debug.so
root#me:/usr/lib/flashplugin-installer# ln -s libflashplayer.debug.so libflashplayer.so
I haven't seen the issues you have, and perhaps your requirements restrict you to an older version, but I've had great success with flashplayer 10's debugger. You might try this one and see if it works.
Edit: Ahh, I just noticed one very pertinent statement you made: you require flashplayer 9. Sorry =(
Edit 2: I just had the same thing happen to me on Linux. When I extracted the tar.gz from Adobe, the installation script wasn't present. This said, I was able to get the debugger version of 9 installed anyway.
When you extracted, did you see a libflashplayer.so file? I didn't have an installation script, but I did get this file. If so, all you need to do is this:
Close all instances of Firefox
Backup your current libflashplayer.so module: ~/.mozilla/plugins/libflashplayer.so.org (this way, if something goes wrong, you can always put it back)
Copy the version you extracted from the Flash player download to the same plugins directory: cp /path/to/vers/9/libflashplayer.so ~/.mozilla/plugins/
Restart Firefox, open a Flash app, and right-click to check for the version
These steps worked perfectly for me, and I was able to run Flex Builder's debugger in Linux. Hope it works for you!
One way you can do it is downloading the flex 3 SDK for linux. When you download it you'll get a couple of tar's. You can find this in ~/flex_sdk_3/runtimes/10 if you want to install the flashplayer 10 and ~/flex_sdk_3/runtimes/lnx/ if you want the flashplayer 9. Uncompress those files (flashplayer.tar.gz and libflashplayer.so.tar.gz with tar -xvf). Now cp libflashplayer.so the file to /usr/lib/mozilla/plugins/ and if you want create symbolic links (ln -s flashplayer /usr/local/bin to have the player on your path
A tip for anyone who searches for this like I did... find out where libflashplayer.so currently is on your system:
sudo locate libflashplayer.so
Mine was in /usr/lib/flashplugin-installer/
Once I replaced that file with the debug version of the file, Firefox reported that I had the debug version of the player.
I also had the same issue with flash player debugger. I followed the instructions given by bedwyr. It worked for me. To make it work, you create a directory named 'plugins' into ~/.mozilla if plugins directory is not found.
mkdir ~/.mozilla/plugins
Then I copied libflashplayer.so to plugins directory. Now flash player debugger worked for my Flex Builder's application.

Resources