tag:blogger.com,1999:blog-310140452023-11-15T16:46:59.323+01:00Kovicakovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.comBlogger194125tag:blogger.com,1999:blog-31014045.post-40020351641530374262022-02-11T09:13:00.001+01:002022-02-11T09:13:16.540+01:00Java: No PC/SC library found on this system on Linux<p> If you get "No PC/SC library found on this system" when trying to work with a SmartCard via javax.smartcardio API, then you need to install package libpcsclite1 (or whatever package contains libpcsclite.so.1 library) then you need to do one of the following:</p><p>- sudo ln -s /usr/lib/x86_64-linux-gnu/libpcsclite.so.1 /usr/local/lib64/libpcsclite.so</p><p>- sudo ln -s /usr/lib/x86_64-linux-gnu/libpcsclite.so.1 /usr/lib64/libpcsclite.so</p><p>libpcsclite.so.1 is located in /usr/lib/x86_64-linux-gnu on my system.</p><p>If you are using 32-bit system then you do one of the following:</p><p>- sudo ln -s LOCATION_OF_libpcsclite.so.1 /usr/local/lib/libpcsclite.so</p><p>- sudo ln -s LOCATION_OF_libpcsclite.so.1 /usr/lib/libpcsclite.so</p><p>If you are on SunOS then one of the following:</p><p>- sudo ln -s LOCATION_OF_libpcsclite.so.1 /usr/local/lib/64/libpcsclite.so</p><p>- sudo ln -s LOCATION_OF_libpcsclite.so.1 /usr/lib/64/libpcsclite.so</p><p>Maybe libpcsclite.so.1 has a different name on SunOS. I don't have access to one, so I'm not sure.</p>kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-15781838349931010642020-05-30T16:04:00.003+02:002020-05-30T16:05:49.070+02:00System tray not visible in i3If you are running i3 on Ubuntu GNOME and icons in system tray are not visible then uninstall indicator-application package. This was suggested to me: <a href="https://github.com/regolith-linux/regolith-desktop/issues/181#issuecomment-569958512" target="_blank">https://github.com/regolith-linux/regolith-desktop/issues/181#issuecomment-569958512</a>kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-21700628498701438422017-09-11T12:43:00.002+02:002017-09-11T12:43:32.665+02:00Sort on open/save dialog in Google Chrome on UbuntuIf you want the sort to work so that the directories are displayed first you have to do the following:<br />
- sudo apt install dconf-editor<br />
- dconf-editor<br />
- go to org - gtk - settings and set sort-directories-first to true<br />
<br />
You can also set sort-column and sort-order there.kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-32286412536635997572017-03-21T13:59:00.001+01:002017-03-21T13:59:50.592+01:00XFCE4 reset panelsxfce4-panel --quit ; pkill xfconfd ; rm -rf ~/.config/xfce4/panel ~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-panel.xml ; xfce4-panel;kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-68530942348340776332017-02-13T10:54:00.000+01:002017-02-13T10:54:20.746+01:00DB2 Terminate LOADWhat tables are in Load Pending State:<br>
<code>SELECT TABSCHEMA, TABNAME, LOAD_STATUS FROM SYSIBMADM.ADMINTABINFO WHERE LOAD_STATUS = 'PENDING'</code>
<br>
How to get TABSCHEMA.TABNAME table out of Load Pending State:<br>
<code>db2 "LOAD FROM /dev/null OF DEL TERMINATE INTO TABSCHEMA.TABNAME NONRECOVERABLE"</code><br>
<code>db2 "SET INTEGRITY FOR TABSCHEMA.TABNAME IMMEDIATE CHECKED"</code>kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-35221829141996744592017-02-09T17:23:00.000+01:002017-02-09T17:23:34.564+01:00DB2 LOAD from CURSORYou can do a LOAD from CURSOR in command line. Example is taken from <a href="https://www.ibm.com/developerworks/data/library/techarticle/dm-0901fechner/">Fast and easy data movement using DB2's LOAD FROM CURSOR feature</a>:<br>
<br>
<code>db2 "DECLARE C1 CURSOR FOR SELECT * FROM FECHNER.SALES"<br>
db2 "LOAD FROM C1 OF CURSOR MESSAGES C:\load_sales_tmp.msg INSERT INTO FECHNER.SALES_TMP NONRECOVERABLE"</code>kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-19117309147055313312017-02-06T10:36:00.000+01:002017-02-06T10:36:54.359+01:00How to tell Maven to disregard SSL errors (and trusting all certs)?Answer at <a href="http://stackoverflow.com/a/21266642/51162">StackOverflow</a> and copied here if it gets removed:<br>
You can disable SSL certificate checking by adding one or more of these command line parameters:<br> <br>
<code>-Dmaven.wagon.http.ssl.insecure=true</code> - enable use of relaxed SSL check for user generated certificates.<br>
<code>-Dmaven.wagon.http.ssl.allowall=true</code> - enable match of the server's X.509 certificate with hostname. If disabled, a browser like check will be used.<br>
<code>-Dmaven.wagon.http.ssl.ignore.validity.dates=true</code> - ignore issues with certificate dates.<br>
<br>
Official documentation: http://maven.apache.org/wagon/wagon-providers/wagon-http/<br>
<br>
Here's the oneliner for an easy copy-and-paste:<br>
<code>-Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true -Dmaven.wagon.http.ssl.ignore.validity.dates=true</code>kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-55298494402587063812016-08-31T14:49:00.000+02:002016-08-31T14:50:35.674+02:00SaveAsCapableIn NetBeans Platform you can implement your own <a href="http://bits.netbeans.org/dev/javadoc/org-openide-loaders/org/openide/loaders/SaveAsCapable.html#method_summary" target="_blank">SaveAs</a> action like this:
<br />
- put this into MyTopComponent.java:
<br />
<pre>public class MyTopComponent .... {
private final InstanceContent myContent = new InstanceContent();
private final Lookup myLookup = new AbstractLookup(myContent);
private FileObject fo;
MyTopComponent() {
...
editorContent.add(new SQLEditorSaveAs());
associateLookup(editorLookup);
}
public void setFo(FileObject fo) {
this.fo = fo;
// load the file and display it in TextArea
// this is optional, but putting file's DataObject into this TopComponent's lookup
// will make FileChooser for the SaveAS action start in the folder where fo is located
DataObject myDataObject = DataObject.find(this.fo);
myContent.add(myDataObject);
}
private class MySaveAs implements SaveAsCapable {
@Override
public void saveAs(FileObject folder, String name) throws IOException {
// save to file, database, ...
}
}
}
</pre>
kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-42975969949782942452015-07-25T13:54:00.000+02:002015-07-25T13:54:41.153+02:00Bring database out of BACKUP PENDING state ASAPIf you manage to put your database into BACKUP PENDING state and want to bring it out of it ASAP you can do a backup to a NULL device:<br />
<blockquote class="tr_bq">
db2 backup db MYDB to /dev/null</blockquote>
The backup will still read the data that should go into the backup image, but it will discard it by writing it into NULL device. In this way you can cut the unwanted downtime by about 50%-60%.kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-84430679794149221292015-05-07T09:29:00.001+02:002015-05-07T09:29:21.971+02:00BOINC "Show graphics"I'm using Xubuntu 14.04.2 and BOINC 7.2.42. I'm running SETI@Home and World Community Grid. When I click "Show graphics" on a SETI@Home task nothing happens.<br />
If you run BOINC Manager from command line you get:<br />
<blockquote class="tr_bq">
libssl.so.10: cannot open shared object file: No such file or directory</blockquote>
<br />
ldd on SETI@Home executable shows:<br />
<blockquote class="tr_bq">
libssl.so.10 => not found<br /> libcrypto.so.10 => not found</blockquote>
<br />
Now you do this:<br />
<blockquote class="tr_bq">
sudo apt-get install freeglut3 libssl1.0.0<br />
cd /lib/x86_64-linux-gnu<br />
ln -s libssl.so.1.0.0 libssl.so.10<br />
ln -s libcrypto.so.1.0.0 libcrypto.so.10 </blockquote>
I'm using 64-bit Xubuntu and for 32-bit you should look for these libs yourself. kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-15462920161180145782015-03-23T16:05:00.001+01:002015-03-23T16:05:08.644+01:00DB2 and "Error applying transforms. Verify that the specified transform paths are valid"You can get "Error applying transforms. Verify that the specified transform paths are valid" when you want to install or uninstall DB2.<br />
These are possible fixes:<br />
<br />
<ol>
<li>run setup.exe from installation image with /I en parameter: setup.exe /i en</li>
<li>use a tool to fix your registry. I've used <a href="http://www.regsofts.com/free_registry_repair/registry_repair.htm" target="_blank">Free Windows Registry Repair</a>.</li>
</ol>
kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-16639127333771846852014-06-01T19:42:00.001+02:002014-06-01T19:42:24.245+02:00Touchscreen with multiple monitorsI'm using Xubuntu 12.04.4 and have two monitors (one touch and one regular).<br />
I'm using <a href="http://christian.amsuess.com/tools/arandr/" target="_blank">arandr</a> to set the extended desktop (regular monitor is right of touch monitor).<br />
This also messes up touch input, since the system thinks the whole extended desktop is touch.<br />
<br />
Recent X.org servers have a property for setting how input device events are translated to screen coordinates. The property is called "Coordinate Transformation Matrix". More on setting it can be found <a href="https://wiki.ubuntu.com/X/InputCoordinateTransformation" target="_blank">here</a>.<br />
<br />
In my case both montiors have resolution of 1366x768 so the transformation matrix looks like: 0.5 0 0 0 1 0 0 0 1 (touch has to work only on half of the extended desktop). You can set the matrix like this:<br />
<br />
xinput set-prop TOUCH_DEVICE_ID "Coordinate Transformation Matrix" 0.5 0 0 0 1 0 0 0 1<br />
<br />
You can get TOUCH_DEVICE_ID from "xinput --list".kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-6772773612083241072014-05-11T14:56:00.002+02:002014-05-13T11:53:08.183+02:00D3GO in VirtualBoxD3GO service from Telemach uses ViewRight plugin for displaying TV picture on your computer. This plugin is not supported on Linux.<br />
<div>
Well, I've tried installing <a href="http://www.webupd8.org/2013/08/pipelight-use-silverlight-in-your-linux.html" target="_blank">Pipelight</a> and using viewright-caiway plugin, but the plugin was constantly crashing.</div>
<div>
I installed VirtualBox with Windows XP guest. I've also installed VirtualBox Guest addition in Windows safe mode. While installing Guest additions select 3D support.</div>
<div>
When everything is installed go to settings for Windows XP virtual machine and select 2D acceleration, 3D acceleration support and set video RAM to 64 MB.</div>
<div>
Now boot Windows XP virtual machine and D3GO should work after you install ViewRight.<br />
<br />
EDIT: If you have choppy sound, try setting ALSA Audio Driver in VirtualBox Settings.</div>
kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-87959661926947455932014-03-24T13:10:00.001+01:002014-03-24T13:10:43.247+01:00How to remotly restart/shutdown Linux boxUsual commands are:<br />
<blockquote class="tr_bq">
sudo reboot<br />sudo shutdown -h now</blockquote>
But if those two don't work, you can use this as root:<br />
- force reboot:<br />
<blockquote class="tr_bq">
echo 1 > /proc/sys/kernel/sysrq<br />echo b > /proc/sysrq-trigger</blockquote>
- force shutdown:<br />
<blockquote class="tr_bq">
echo 1 > /proc/sys/kernel/sysrq<br />echo o > /proc/sysrq-trigger</blockquote>
WARNING: This does not sync any disks, ....<br />
You could also try<br />
<blockquote class="tr_bq">
echo s > /proc/sysrq-trigger </blockquote>
to sync disks before reboot/shutdown.<br />
For all values of /proc/sysrq-trigger go to <a href="https://www.kernel.org/doc/Documentation/sysrq.txt" target="_blank">kernel documentation</a>kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-6032310945389456132014-01-22T18:07:00.002+01:002014-01-22T18:07:22.086+01:00Monitor DB2 rollback progressIf you have a large transaction that is in rollback status and you want to know how much of the work is rollbacked then you can use this:<br />
- get AGENT ID for the connection that is in rollback status (<b>db2 list applications show detail</b>)<br />
- run <b>db2 get snapshot for application agentid YOUR_AGENT_ID | grep Work</b>kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-80965264527289249282014-01-14T12:04:00.003+01:002014-01-14T12:04:59.924+01:00Running NetBeans from Unity launcher gives you two icons for NetBeansWhen you add NetBeans desktop file to Unity launcher and run it, you could get two icons for NetBeans.<br />
Steps to solve this:<br />
- remove NetBeans from launcher<br />
- add <b>StartupWMClass=NetBeans IDE 7.4</b> to desktop file<br />
- add NetBeand back to launcher<br />
<br />
This is how my netbeans.desktop files looks like:<br />
[Desktop Entry]<br />Encoding=UTF-8<br />Name=NetBeans IDE 7.4<br />
Comment=The Smarter Way to Code<br />Exec=/bin/sh "PATH_TO_NETBEANS_EXEC"<br />Icon=PATH_TO_NETBEANS_ICON<br />Categories=Application;Development;Java;IDE<br />Version=1.0<br />Type=Application<br />Terminal=0<br />Name[sl]=NetBeans IDE 7.4<br />StartupWMClass=NetBeans IDE 7.4<br />OnlyShowIn=Unity;<br />X-UnityGenerated=truekovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-85653774964551025722014-01-09T23:48:00.002+01:002014-01-09T23:48:14.617+01:00Improving security in Firefox<div style="text-align: left;">
Today I found a nice <a href="http://www.howsmyssl.com/" target="_blank">website </a>that tells you how secure your TLS/SSL client is. </div>
<div style="text-align: left;">
I'm using Firefox 26.0 and the website said that my TLS client is "Bad".</div>
<div style="text-align: left;">
Btw., Google Chrome 31.0.1650.63 is rated as "Probably OK" from the start.</div>
<div style="text-align: left;">
Hmm, Firefox can't be so much worse than Chrome, right?</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
So, couple of minutes later that I found another <a href="http://blog.dbrgn.ch/2014/1/8/improving_firefox_ssl_tls_security/" target="_blank">website</a> that helped me bring Firefox to the same level with couple of steps:</div>
<div style="text-align: left;">
- go to <b>about:config</b></div>
<div style="text-align: left;">
- set <b>security.tls.version.min</b> to <b>1</b> (TLS 1.0)</div>
<div style="text-align: left;">
- set <b>security.tls.version.min</b> to <b>3</b> (TLS 1.2)<b></b></div>
<div style="text-align: left;">
- set <b>security.ssl3.rsa_fips_des_ede3_sha</b> to <b>false</b> to disable SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA chiper, which is known to be insecure<b><br /></b></div>
kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-6453154854287881742013-12-12T12:00:00.001+01:002013-12-12T12:00:26.361+01:00VirtualBox error: UUID does not match the value ....When you try and start a VirtualVM VM and get this error:<br />
UUID {SOME_UUID} of the medium 'PATH_TO_VDI' does not match the value {SOME_UUID} stored in the media registry ('PATH/VirtualBox.xml')<br />
<br />
then you could solve it with this steps:<br />
- open File - Virtual Media Manager<br />
- do Release on the problematic VDI<br />
- do Remove on the problematic VDI. Don't delete the physical file<br />
- on specific VM attach the VDI backkovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-90407211190802683322013-11-27T20:24:00.001+01:002013-11-27T20:24:24.177+01:00Faster fetch from DB2 cursorIf you are using cursors in DB2 procedures, for example, and you don't use them to update the data, you can significantly improve fetch performance using FOR READ ONLY:<br />
<br />
DECLARE XSQL VARCHAR(10240);<br />
DECLARE XSQLSTATE_1 STATEMENT;<br />
DECLARE XRESULT_SET_1 CURSOR WITH RETURN TO CLIENT FOR XSQLSTATE_1;<br />
<br />
SET XSQL = 'SELECT * FROM SYSIBM.SYSDUMMY1 FOR READ ONLY WITH UR';<br />
PREPARE XSQLSTATE_1 FROM XSQL;<br />
OPEN XRESULT_SET_1;<br />
<br />
XRESULT_SET_1 is returned back to the client, so it can iterate over the data.kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-3210649591847659842013-11-27T20:17:00.001+01:002013-11-27T20:17:15.413+01:00No menus in Java applications under UbuntuIf you run a Java application under Ubuntu and you don't see any menus (when you klick on a menu, you don't see menu items) run the application like this (example for running jmc):<br />
UBUNTU_MENUPROXY= jmc<br />
<br />
This will disable menu proxy for this application. More on disabling menu proxy <a href="http://askubuntu.com/questions/10481/how-do-i-disable-the-global-application-menu/133005#133005" target="_blank">here</a>.kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-74808440887337017742013-11-24T13:28:00.001+01:002013-11-24T13:28:13.225+01:00Disc burning software under UbuntuTake my advice and only use k3b. It does install a lot of stuff from KDE, but it is worth it.<br />
I've used brasero, cdw, bashburn, ... but k3b is the only one that works as you'd expect.kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-72397901958219568442013-11-24T13:26:00.000+01:002013-11-24T13:26:00.602+01:00Not able to change desktop wallpaper on Ubuntusudo apt-get install dconf-tools<br />
dconf-editor<br />
go to org -> gnome -> settings-daemon -> plugins -> background and activate "active" :)<br />
<br />
Now you will be able to change desktop backgroupkovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-58666700750067394562013-10-17T11:10:00.002+02:002013-10-17T11:10:34.242+02:00Make java plugin run in Chrome under LinuxIf you go to <a href="http://www.java.com/verify/">http://www.java.com/verify/</a> and Chrome want's you to install Java plugin follow this steps:<br />
<br />
mkdir /opt/google/chrome/plugins<br />
cd /opt/google/chrome/plugins<br />
ln -s /usr/local/jre1.7.0_45/lib/i386/libnpjp2.so .kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-37508004173578798572013-09-10T02:21:00.001+02:002013-09-10T02:22:21.342+02:00Getting SQL917 on DB2 while executing DDL statementsI'm using DB2 9.7.5 Express-C on Windows and Linux. Usually I get this if I'm running a lot of DDL statements in a transaction.<br />
The only solution until now that I found is to restart the database and reissue DDL statements.<br />
<br />
If anyone knows more about this please comment.kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0tag:blogger.com,1999:blog-31014045.post-44416048957618525262013-09-10T02:17:00.002+02:002013-09-10T02:17:24.559+02:00Grouping icons on Unity launcherDuring past months that I've been using Ubuntu and Unity the Launcher got crowded with vaious icons of program I installed and program I put on the launcher.<br />
Things gor messa, so I needed a solution. It came to me in a form of "Drawers". More on the can be found <a href="http://www.webupd8.org/2012/08/add-stacks-to-unity-launcher-with.html" target="_blank">here</a> and <a href="https://launchpad.net/drawers" target="_blank">here</a>.kovicahttp://www.blogger.com/profile/09206628254727363357noreply@blogger.com0