Posts Tagged ‘fedora’

Embed Word Documents in Mozilla Firefox

July 17th, 2008 No comments

The procedure to enable inline viewing of Word documents in Mozilla Firefox is the following:

1. Enable Mozilla plugin by checking Tools->Options->Internet->Mozilla Plugin in OpenOffice Writer.
2. Check whether you’ve got the OpenOffice-Mozilla Plugin at /usr/lib/openoffice.org2.0/program/
3. Create a symbollic link at /usr/lib/mozilla/plugins/ to the above to enable mozilla-openoffice plugin in firefox. You
need to restart firefox after this step.
4. Edit ~/.mozilla/firefox/pluginreg.dat for the following changes:
4.1 Search for the following text Plug-in handles all its documents:$<br/> Plug-in:$

4.2 Note the italicized count.
4.3 To the end of the list add the following text

31:application/msword:Opendocument Text:doc:$
32:application/ Spreadsheet:xls:$
33:application/ Presentation:ppt:$

4.4 The index of the left of the above text should be relative.
4.5 The count should be updated as count = count + 3 ( as you are adding 3 more entries )
5. Restart firefox
6. Try opening a document in firefox; It will take few extra seconds to
start but eventually it will open the document inside firefox brower

A typical openoffice section would look like the following:

1160152037000:1:5:$ Plug-in handles all its documents:$ Plug-in:$
0:application/vnd.stardivision.calc:StarCalc 3.0 – 5.0:sdc:$
1:application/vnd.stardivision.chart:StarChart 3.0 – 5.0:sds:$
2:application/vnd.stardivision.draw:StarDraw 3.0 – 5.0:sda:$
3:application/vnd.stardivision.impress:StarImpress 3.0 – 5.0:sdd:$
4:application/vnd.stardivision.impress-packed:StarImpress-packed 3.0 – 5.0:sdp:$
5:application/vnd.stardivision.math:StarMath 3.0 – 5.0:smf:$
6:application/vnd.stardivision.writer:StarWriter Template 3.0 – 5.0:vor:$
7:application/vnd.stardivision.writer-global:StarWriter Global 3.0 – 5.0:sgl:$
8:application/vnd.staroffice.writer:StarWriter 3.0 – 5.0:sdw:$
9:application/vnd.sun.xml.calc:StarOffice 6.0/7 Spreadsheet:sxc:$
10:application/vnd.sun.xml.calc.template:StarOffice 6.0/7 Spreadsheet Template:stc:$
11:application/vnd.sun.xml.draw:StarOffice 6.0/7 Drawing:sxd:$
12:application/vnd.sun.xml.draw.template:StarOffice 6.0/7 Drawing Template:std:$
13:application/vnd.sun.xml.impress:StarOffice 6.0/7 Presentation:sxi:$
14:application/vnd.sun.xml.impress.template:StarOffice 6.0/7 Presentation Template:sti:$
15:application/vnd.sun.xml.math:StarOffice 6.0/7 Formula:sxm:$
16:application/vnd.sun.xml.writer:StarOffice 6.0/7 Text Document:sxw:$
17:application/ 6.0/7 Master Document:sxg:$
18:application/vnd.sun.xml.writer.template:StarOffice 6.0/7 Text Document Template:stw:$
19:application/vnd.oasis.opendocument.text:OpenDocument Text:odt:$
20:application/vnd.oasis.opendocument.text-template:OpenDocument Text Template:ott:$
21:application/vnd.oasis.opendocument.text-master:OpenDocument Master Document:odm:$
22:application/vnd.oasis.opendocument.text-web:HTML Document Template:oth:$
23:application/vnd.oasis.opendocument.spreadsheet:OpenDocument Spreadsheet:ods:$
24:application/vnd.oasis.opendocument.spreadsheet-template:OpenDocument Spreadsheet Template:ots:$
25:application/ Drawing:odg:$
26:application/ Drawing Template:otg:$
27:application/vnd.oasis.opendocument.presentation:OpenDocument Presentation:odp:$
28:application/vnd.oasis.opendocument.presentation-template:OpenDocument Presentation Template:otp:$
29:application/vnd.oasis.opendocument.formula:OpenDocument Formula:odf:$
30:application/vnd.sun.xml.base:OpenDocument Database:odb:$
31:application/msword:Opendocument Text:doc:$
32:application/ Spreadsheet:xls:$
33:application/ Presentation:ppt:$

When I was writing this, the following are the version numbers:

1. 2.0.4-5.3
2. Mozilla Firefox

Developing GUI Applications in C++ with wxWidgets

July 17th, 2008 No comments

Who said C++ cannot be used for Rapid
Application Development (RAD) ? There are many GUI frameworks for C++,
which are even portable across Unix, Windows and others. One such
framework is wxWidgets.

wxWidgets lets developers create applications for Win32, Mac OS X, GTK+, X11, Motif, WinCE, and more using one codebase. It can be used from languages such as C++, Python, Perl, and C#/.NET. Unlike other cross-platform toolkits, wxWidgets applications look and feel native. This is because wxWidgets uses the platform’s own native controls rather than emulating them. It’s also extensive, free, open-source, and mature.

is not just a GUI framework. It provides native support for threads,
sockets, database connectivity, synchronization and what else. Qt also
provides such support, but I like wxWidgets for its simplicity is
programming use.

There is a RAD development tool called wx-devcpp
hosted at sourceforge, which helps faster creation of Frames, Controls,
Dialogs and more. wx-devcpp has support for Visual Studio 2005
compilation as well along with MinGW compilation in Windows. I use
wx-devcpp for forms creations and import the generated source to VS6.0
in Windows and KDevelop in my Fedora 7. The surprise is, the code
compiles with very minimal changes from VS6.0 to KDevelop environment.
I have used wxWidgets with STLport 5.1 for my development purposes.

Greeter Application appears to be crashing. Attempting to use a different one.

July 17th, 2008 No comments

Before the login screen appears in Fedora, you may get a popup saying
“Greeter Application appears to be crashing. Attempting to use a
different one”. You may think, this could be due to video driver fault.
In most of the cases, it is because your root directory “/” is 100%
full. When you free you space in the “/” drive, the problem goes away.

Configuring Wireless LAN of Dell XPS 1530 in Fedora 8

July 17th, 2008 No comments

Dell XPS 1530 comes with an Intel Pro Wireless 3945ABG Hardware.

In fedora 8, by default the device is detected and an appropriate driver (iwl3945) is loaded as well. If the wireless network is not secured, the interface works without any modification.

I had configured by ADSL router to have WPA-PSK encryption based security. To make my laptop work with this secured network, the default network configuration dialog does not suffice. But still, we need to setup something in that dialog as well.

  1. Open system-config-network dialog, choose to edit the wlan0 interface.
  2. Select the “Wireless Settings” tab.
  3. Set Mode as “Managed”
  4. Set Network name (SSID) as “XYZ”, where “XYZ” is the SSID you had
    configured in the router. You may also leave it in “Auto” as well.
  5. Leave the other inputs as it is.

From the command line, run “iwconfig” to see the status of your interface. You may see something like the following:

wlan0 IEEE 802.11g ESSID:”NETGEAR”
Mode:Managed Frequency:2.462 GHz Access Point: Not-Associated
Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Encryption key:off
Link Quality=0 Signal level=0 Noise level=0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

Note, I have configured my SSID to be “NETGEAR”.

Since we have not enabled the security “thing”, we are not able to reach the Wireless Access Point. To enable that we need to have the “wpa_supplicant” tool. Using wpa_supplicant, we can bridge the connectivity and security.

First create the wpa configuration file using “wpa_passphrase” command.

Ex: wpa_passphrase NETGEAR alphabeta

This command would generate a file like the following:


Dump this output to /etc/wpa.conf

Now, you have to run wpa_supplicant as:

bash# /usr/sbin/wpa_supplicant -Dwext -iwlan0 -c/etc/wpa.conf &  

I have used the “wireless generic extension (wext)” for the driver configuration. You may get some log message like the following:

Trying to associate with 00:1b:2f:a3:54:f8 (SSID=’NETGEAR’ freq=2462 MHz)
Associated with 00:1b:2f:a3:54:f8
WPA: Key negotiation completed with 00:1b:2f:a3:54:f8 [PTK=TKIP GTK=TKIP]
CTRL-EVENT-CONNECTED – Connection to 00:1b:2f:a3:54:f8 completed (auth) [id=0 id_str=]

At this point you are probably connected to the Wireless Access Point. Try running “iwconfig” command. The correct output should be like:

wlan0 IEEE 802.11g ESSID:”NETGEAR”
Mode:Managed Frequency:2.462 GHz Access Point: 00:1B:2F:A3:54:F8
Bit Rate=54 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Encryption key:5A83-9BBE-BA9F-5C2B-46D1-0FEC-CE66-475F-A44A-DD05-4B16-63F3-3474-0C46-464A-6CF0 [3]
Link Quality=97/100 Signal level=-29 dBm Noise level=-64 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

try running “/sbin/ifconfig” to see whether you have the device up with an IP address. If IP address is not assigned, run

/sbin/service network restart
/sbin/dhclient wlan0
/sbin/ifup wlan0

You may probably see a “wmaster0” interface as well, which may be ignored.

Most likely you are done by now.
Happy wireless networking.