Aug 22, 2013

How to search for files containing a desired text by the help of nautilus browser in Fedora 19 / Linux

Gnome3 has the Filebrowser nautilus as default.

The filebrowsers appearance has one window. With the help of <Ctrl>-<t> you can open another tab.

On the top is a search button, which searches for files, but sometimes I have a lot of files and just want to look into the ones, which contain a special text.

The way till  now was to use jedit, which can search for a text in files, but
nautilus also supports this featuer.

open the menu with the tooth-wheel and select search files

In the dialog you can select the directory in which you like to search and for what additional properties:

After selecting the type of available Options, press the "+" Add button and insert your text.

Here are the additional filter options:

After adding the "Contains the text" and adding your search text, press the "Find" button on the right bottom of the dialog and the result shows your files.

This is a hidden gem, I just detected by accident.

Aug 20, 2013

journalctl in Linux shows the logs, but in the terminal the log-data seems to be not visible or truncated

On my Fedora 19 box, logs are written by journald. The logs can
be retrieved by journalctl.

But on a "standard" terminal the necessary data is not visible at all.

The secret feature, I found after searching on the net is, to use the cursor right keys , which scroll the display:

and like in my case you see the necessary data which hints for the problem.

Aug 6, 2013

digital Photoframe Agfa AF 5075 EU didn't display pictures anymore

Since a long time we have a digiatl Photoframe AF 5075.

But since some longer time it didn't display always the photos put onto an SD card.

Now I have the solution. The photos are to large, taken by the camera.

The solution was to convert the photos to a lower size by a tool from the ImageMagick toolkit.

cd photos
mkdir resize
cd resize
for d in `ls ../*`; convert $d -resize 50% `basename $d`

and the resized photos are displayed again.


Aug 5, 2013

How to connect to the JBoss 7.1 internal Message Broker HornetQ ( JMS-Implemention ) with HermesJMS

HermesJMS is a GUI-Client for JMS. The acutal Version 1.14 can connect but
closes the connection after every sent message.  To let the connection open or reconnect, This is solved in Bug 184, which contains the link to Version 1.15, which reopens the JMS connection afer sending.

JBoss only has JMS active, if started with the standalone-full.xml configuration.

<JBOSS_HOME>/bin/ -c standalone-full.xml

There you configure your queue, have to add an user in the application realm with the group guest and configure security domain other:

                <security-domain name="other" cache-type="default">
                        <login-module code="Remoting" flag="optional">                                                         
                            <module-option name="password-stacking" value="useFirstPass"/>
                        <login-module code="RealmUsersRoles" flag="required">
                            <module-option name="usersProperties" value="${jboss.server.config.dir}/"/>
                            <module-option name="rolesProperties" value="${jboss.server.config.dir}/"/>
                            <module-option name="realm" value="ApplicationRealm"/>
                            <module-option name="password-stacking" value="useFirstPass"/>
                            <module-option name="unauthenticatedIdentity" value="guest"/>

This is only for testing on my side, so for security reasons, this might be wrong.

First you have to create a session and a Classpath-Group with the JBoss-Client-jar:

Choose the tab below to configure the JBoss-Classpath-Group:

Select the jboss-client.jar and change back to the session-tab.
Here name the session and set the Connection-Factory and the loader. 
The properties can be found in the image. the initialContextFactory is:

In the Destinations add a queue you have configured in the standalone-full.xml configuration.

For the queue I had also to set the username/password from JBoss, because otherwise I didn't get a connection to the queue. 

When you have the queue, select it from the session and double-click it, to get it. After this, select the queue with a right-click and select New Message as shown below.

 After getting the dialog, you can set the properties for the message and depending on the select type of message, the payload tab contains the input form for the data.

With Version 1.15 the dialog keeps open and the message can be resent multipel times, without error. Version 1.14 closes the connection after the first sending and issues an error afterwards.

How to connect to a WebSphere MQ Server with HermesJMS

I had the problem to get a GUI for connecting to the WebSphere MQ Server,
for sending JMS Messages, which should be processed by a developed MDB.

After the Queue is created in the MQ-Server, HermeJMS must be confgured.

HermesJMS is a GUI, which allows to connect the JMS-Brokers,investigate the Queues/Topics and also to manage/send/delete messages in the Queues.

For MQ-Connections, you have to installed or provide the jar's from the

 First you create a new session:

In the new session click on the tab below to create a new Classpath-Group
for the MQ-Server. In the mask you see the jar's, from the MQ-Client-Installation.

In the Session-Properties, you name the session. Here MQSeries and select
in the plugin section the predefined "IBM WeSphereMQ".

The Connection Factory is "", because I'm connecting to a queue and the Loader is the ClasspathGroup you defined before.

The properties you can add by a right click into the properties window and
set the parameters for the MQ-Server, like host, port of the MQServer and the queue-Manager for this connection.
The transportType 1 is for a TCP/IP connection, I got from different Sources on the web. 

 Here are the queues already discovered. You can select from the session the Discover context-menu entry and get all the queues.

After a double click on the queue a connection is build and you can select the queue and with a right-Click select to create a new message

And the message window allows you to select the data and the type of the
JMS-Message, you like to send. Depending on the type, the PayLoad shows
different options to create the message. 

Update: With Version 1.14 of HermesJMS, the connection is always closed after the first sending of a message. Version 1.15 solved this problem, so
that you can send the message more often and the connection is not closed.

Aug 3, 2013

Fedora 19 update brings Linux Kernel 3.10.4, but NVidia 319.32 does not compile.

The last Fedora 19 updats brought kernel 3.10.4 into the system.

The current nvidia driver for me is 319.32, but this driver is not compilable.

But there is a patch available:

My investigation started at the blog Adventures With Linux
and brought me to the download link for the Patch for NVidia 319.32.  

After downloading the patch and going into

<nvidia-path>/kernel and issuing patch -p1 < ../../<patchfile>

patches the NVidia source.

After booting the new kernel and issuing nvidia-installer compiles the
driver and a reboot shows the Gnome Desktop.

Aug 1, 2013

JBoss has not enough space for HTTP-Header -> ArrayIndexOutOfBoundsException with 8192

During testing of a REST-Servcie, I got an ArrayIndexOutOfBoundsException with the Value 8192.

The service packaged a lot of Links into HTTP.

Older Versions of JBoss had a parameter in the connection configuration named maxHttpHeaderSize, but
in V7.x this is not available and you get a parser error on startup.

But setting the system property
to a value of your choice solves the problem if it is enough.

On my system I added it to JAVA_OPTS in standalone.conf 

JAVA_OPTS="$JAVA_OPTS -Dorg.apache.coyote.http11.Http11Protocol.MAX_HEADER_SIZE=24000"