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

joi, 29 septembrie 2016

OpenSuSE 13.2 - connect to Windows Remote Desktop

     In order to remotely connect to a Windows Server 2012, I have tested 2 programs: KRDC and Remmina. Both works quite fine, with a plus for Remmina, which allows printer sharing. Let's take a look at them.

KRDC
     KRDC is made by KDE and I found it installed by default. At least, I don't remember installing it by myself. It does not require anything special, it just works, even on a slower connection. It is easy to configure. It has a "Media sharing" option which I couldn't figure out what it does. It does not has a "Printer sharing" option and I couldn't find a "File sharing" option. Maybe the "Media sharing" option can be used, but I don't know how.
     In short, for a simple remote control it's just what you need, especially on a KDE desktop.

Remmina Remote Desktop
     Remmina is more sophisticated. It can be easily installed through Yast: just open and search for Remmina. Pay attention, you must also install remmina-plugin-rdp in order to connect to a Windows Remote Desktop.
     Once installed, it is about just as easy to configure and use as KRDC. Subjectively speaking, I think it requires a fastest connection connection. However, it has "File sharing" and "Printer sharing". In a very strange way, printer sharing will work only if you enable the "Sound" option as "Local". Concerning printer, in my case it didn't print the whole page no matter what setting I tried: the first 3 lines were just missing. I don't know it it was a driver-problem on Linux side or a Remmina-problem.
     "File sharing" is working fine. Just select a folder in configuration options and it will appear as a virtual drive on Windows side. No problems.

My conclusion:
     Remmina is more complete. However, if you need to rely on it for printing, make sure you test it.

[UPDATE]
     For some strange reason, this morning Remmina refused to connect to server, saying "Unable to connect" The solution was to delete the file /home/neklar/.freerdp/known_hosts

duminică, 25 septembrie 2016

OpenSuSE 13.2 / ACER laptop - system goes to sleep

     I have a ACER laptop for quite some time (2009). Most of the time I use it as a desktop computer: the lid is closed and the image goes to a  external monitor. Of course, I disabled the lid-event in order to prevent the system to go to sleep. I never had any problems with that.
     However, this morning, after applying some updates, the system started to behave differently: it was going to sleep every 20 seconds or so, without any obvious reason. I checked all the settings and everything appeared to be normal. If I opened the lid, it was not going to sleep anymore, but when I closed it back, the same problem returned. Ok, I can stay with the lid open, but I don't like it that way.
     So, I have some possibilities:
          1) the system is too old and it's showing its age
          2) there is a new setting after the update and I cannot found it
          3) there is a bug in the update (either a driver or a setting)
     I don't have an answer, but after google-ing a while I have a solution (or, at least, a workaround): I forced the system to ignore the lid.

1) Open Dolphin a SuperUser (you need root access)
2) Edit the file /etc/systemd/logind.conf
3) Add (or modify if it already exists) the following line: HandleLidSwitch=ignore (also make shure it does not have the # character in front of it; this character marks a line as comment and it will be ignored)
4) Save and reboot

luni, 29 februarie 2016

DropBox / OpenSuSE 13.2 / SysTry icon=?

For some strange reason, DropBox icon does not appear in SysTry on OpenSuSE 13.2. I couldn't find a solution or a workaround, so... I designed my own application.
Here it is:
https://www.dropbox.com/sh/if0g7xwgcksdow5/AACREupcxQh_1pYy7JYHwIRDa?dl=0

In Lazarus/FPC, of course.
OK, it's not a complete app: it just reads the status of the Dropbox an changes the color of the SysTry icon, but that's good enough for me

duminică, 22 noiembrie 2015

Games on OpenSuSE

Here are some games and some issues I came across

Jedi Academy
There is a port for Linux of Jedi Academy. However, I have the old Windows versions and it runs excellent in Wine, once you can make it work. So, here are the steps:
1) Make sure that your CD-Rom is configured correctly in Wine. Open WineCfg
2) Install the game (should not be any problems)If the game stacks when you should change the CDs, do the following:
   a) Create an ISO image for each CD an put it somewhere where you can find it (I created a directory in Documents
   b) Create 2 directories (ISO1 andI SO2) and then 2 virtual devices (one for each image) like this:

sudo mount -o loop /home/neklar/Documents/JediAcademy/jediAcdCD1.iso /home/neklar/Documents/Jocuri/JediAcademy/ISO1

sudo mount -o loop /home/neklar/Documents/JediAcademy/jediAcdCD2.iso /home/neklar/Documents/JediAcademy/ISO2

  c) Open WineCfg again and mount those 2 devices. go to advanced properties and specify that they are CD-ROMs
   d) Install the game
3) The Game's executables are jamp.exe (multiplayer) and jasp.exe (single player). You must locate them, because they have to be modified. Typically, they should be in Wine directory, like mine: /home/neklar/.wine/drive_c/Program Files/LucasArts/Star Wars Jedi Knight Jedi Academy/GameData/
4) A good editor to do the trick is Okteta. If you don't have it, install it (package okteta)
5) With Okteta, open the file jamp.exe. Locate the expression GL_EXTENSIONS %s , replace 's' with 'p' (should look like this: GL_EXTENSIONS %p ) then save. Do the same for jasp.exe. Start the game from one of those files (single player or multiplayer) and have fun!
For me, it works on maximum resolution and with all details, both single and multiplayer
Pay attention: There is a noCD pach (or crack ?!) for it, but it will not work with that.