vineri, 29 decembrie 2017

Mint 18.2 / KDE Connect - firewall and writing permission

     In order for KDE Connect to work, the appropriate ports in Mint firewall must be opened. The simplest way to do it is trough command line like this:
     sudo ufw allow 1714:1764/udp
     sudo ufw allow 1714:1764/tcp
     sudo ufw reload
  

     Another problem with KDE Connect was an error about writing to file  /home/neklar/.local/share/user-places.xbel
Solution:
1. open Dolphin as root (sudo dolphin) and go to specified folder
2. right-click on files, Properties
3. in Permission section give to "Others" permission to read and write
4. click OK


sâmbătă, 21 octombrie 2017

From OpenSuSE 32 bits to Mint 64 bits: The Problems of Idealism

From 32 bits to 64 bits: the theory
After 8 (eight) years I decided that it is time to change my good old laptop. Not because it was not working anymore, but because it was just too old. So, I bought a new i5 with 4 GB RAM, 1 TB HDD and nVidia GeForce 940MX video card. 
Everybody is saying: 32 bits is dead, has no future, so switch to 64 bits as soon as possible. I keep hearing this for some years... So if I have a new system, let's install a 64 bits OS. And since OpenSuSE no longer came in 32 bits version and because I'm using it since 2011, the new SuSE Leap was the obvious choice...

From SuSE to Mint
I really don't know what's the problem with SuSE Leap. I'd prefer a longer release cycle in order to have a more trustworthy system. I knew that there will be some issues, but I never expected not to be able to install the nVidia drivers so that the system can work acceptable.
I started to install SuSE Leap... everything was fine. The video card started with the "nouveu" drivers, as expected... So I installed the proprietary nVidia ones. But the video card just didn't work. I tried everything I knew... I made another clean installation.. then another and then another. I read everything I could find on forums, blogs or articles. After 3 days and some 10 clean installations, I decided to try another distribution, because I was beginning to suspect that my new laptop might have an issue...
So, I downloaded Mint 64 (for a moment I even considered Windows), I installed it, and the first thing it asked me (after installation) was that if I want to use the proprietary nVidia drivers. I said yes, it installed something, asked for reboot, and... everything was just working! 3 days of failures were solved in less than one hour.
The reason I chose SuSE back in 2011 was that I liked that distribution: it was secure, reliable, faster than the popular Ubuntu (at least on m computer), "made in Europe" and I really loved YaST (I still do, it's superior to anything Mint had to show so far - my opinion, of course). By using it daily, it was my way of supporting it. But... I didn't have more days to spare, so "good bye SuSE". After all, Linux is, by definition, the freedom of choice. I just don't like the fact that I HAD TO change in stead of WANT TO. But that's the problem with idealism...

From 32 bits to 64 bits: the reality
Well, my idealism was about to be forced again. For years I was using Mozilla Firefox, for the same reason: I could choose. So, I chose to support a certain organisation (Mozilla) because Google does not need more support (it has plenty). Everything appeared to be fine, until I tried to play AngryBirds from Facebook. It wasn't working. I started to google for that error, only to find out that it was something about the 64 bits version. So, 32 bits is dead, 64 bits is the future, but the first is working and the other one is not?! Ok, I don' really need AngryBirds. Then I tried to access my Netflix account (I am also a StarTrek fan) and it wasn't working either. That moment I decided to give Chrome a try, to see if it's a Firefox problem, a 64 bit problem or a Linux problem. Like in SuSE case, everithing just vorked in Chrome (AngryBirds, Netflix, even HBO-Go, although I was told that HBO-Go does not work on Linux). Maybe those issues can be fixed; maybe there is a workaround; with no more time to spare, I uninstalled Firefox and made Chrome my default browser.
Another problem is with the 32 bits applications. They have to work. like I said, 32 bit is dead, but for some strange reason, everybody is still using it and most applications are still created for 32 bits OS. I don't know how many packages I had to install in order to get things work... maybe I will write another blog about this, if I can remember everything.
Then came my real problem and test: how many issues will I have with Lazarus on a 64 bits OS? Will I be able to compile my projects? In short? yes, but in another 3 days of try, error and search.

Ready to work. Really?
I installed Lazarus for Debian with very little problems, except for the software management of Mint (did I say that I miss YaST?). No problem, I'm starting to know how to use "apt-get install". I knew that there will be issues with the "integer" type, but again I had problems finding the documentation for 64 bits... everybody is writhing about the dead 32 bits version, with little reference to what might happen if you try to compile for 64 bits. My people has a saying with the following approximate translation: "about the dead ones we will say only good things".
So, I have to compile in Lazarus for 32 bit systems, both Linux and Windows. It took me about 3 days to figure it out and that's another story...

luni, 10 iulie 2017

OpenSuSE 13.2 file limit / Too many files opened error

After having some trouble with "too many files opened" error, I made some research and I found out that Linux has by default some limits concerning maximum number of files that a user can open. Fortunately, we can change that.

First let's see how many files can we open. So, in a terminal type
     ulimit -n
It will return the number of files. Default is 1024.

To change that limit, do the following:

1) Open Dolphin as root

2) Go to  /etc/security/ and open file limits.conf

3) At the end of the file add the following:

*               soft    nofile            4096
*               hard    nofile            10240

4) Save and restart.

5) Open a terminal and type ulimit -n again. It should return 4096.

Observations:
- This will increase the number of files for all users. If you want to modify those values for only one user, it is possible, but I didn't try. Basically, you should replace the * character at the beginning of the line with the username (?)
- Do not omit the * character at the beginning of the line. it means "all users". A line must have 4 parameters, * being the first.
- The values I used are those recommended on different forums. I can't offer an explanation for them.

joi, 16 februarie 2017

Lazarus / FPC / OpenSuSE 13.2 - Problems with "Backspace" and "Delete"

     I noticed recently that when I try to delete a character in a TEdit box, the "Backspace" and "Delete" keys are not acting the right way. More specifically, after deleting the required character, the cursor was jumping to the right. Only on Linux, no problems on Windows
     After a lot of search and with support from Lazarus/FPC community, here is the solution:

1) Open Dolphin as root

2) Edit the file /usr/lib/lazarus/lcl/interfaces/gtk2/gtk2callback.inc and modify the line 604 like this:
     // if (gtk_major_version = 2) and (gtk_minor_version < 17) then

3) Edit the file /usr/lib/lazarus/lcl/interfaces/gtk2/gtk2widgetset.inc and modify the line 465 like this:
     // if (gtk_major_version = 2) and (gtk_minor_version < 17) then

     Basically, you have to "comment" those lines so that they are not executed anymore

4) Rebuild Lazarus (open Lazarus, go to "Tools" and select "Build Lazarus")

Done!

     Here is the original bug report on Lazarus official page:

vineri, 6 ianuarie 2017

OpenSuSE 13.2 / TeamViewer "not ready", "connection error"

After some years of using teamViewer with no problems, yesterday, out of the blue, it started to give a "connection error". Reboot didn't work, but the solution is, actualy, a restart of TeamViewer. So, just open a terminal and type:
    sudo teamviewer daemon stop
    sudo teamviewer daemon start