Flux RSS des billets

DotMG's joblog

Work hard at whatever you do! (Ecc. 9. 10a)
La catégorie linux a 6 Billets
Publié le 17 Fév 2015, 1:21 pm dans iseries, linux

About 1 month ago, my ISP replaced my internet box with a newer version, because of instabilities of my old box. I was very pleased to see I was able to put it anywhere at home and get connected, where the older one could only be put in a window at my attic. I could also bring it at church and get connection there, so I can now imagine some internet activities for the little children there. More: the speed was much better.

But there was a drawback. While the speed seemed better, my telnet sessions get disconnected every five minutes of being idle. That issue did not occur with my old box, and I could leave my telnet session open and idle for hours, without any drop. It was a pain to have to reconnect and enter my passwords each time, and mostly when an interactive task stopped because of idle timeout.

These telnet sessions are connections to an AS400 machine, and I used to use the xtn5250 software. xtn5250 is an opensource and "nearly full options telnet 5250 terminal emulator". I was looking at the net to find a possible solution to these session drops, and these searches lead me to fixing it myself.

It's worth noting that in the past, I have contributed an enhancement suggestion for this software, because I had to work with an AS400 where the port 23 was mapped to another port for the outside world, because of ipv4 limitations, and xtn5250 (as the proprietary Client Access on Windows) could only connect to port 23. So, I tried a solution adding setKeepAlive(true) to the socket and it worked. No more session drops.

I am not a Java programmer, but with some research, I was able to fix an issue, and forked the original project. That's the beauty of opensource.

Publié le 29 Mar 2013, 10:43 am dans linux

To be able to connect to a remote machine without the need to enter password, you use authentication by keyring, by copying your public key into the remote machine's list of authorized keys. ssh-copy-id is an interesting little utility that does just that.

ssh-copy-id root@my.new.server

This will ask once for the root password of my.new.server and install the public key of the user running this command into the remote machine's authorized keys. It's also possible to install another identity (for example, installing normal user public_key while logged-in as root on your local computer), by using the -i identity_file parameter.

Next time you login into the remote server, you won't be asked for a password

If you happen to encounter this error message: ssh-copy-id: ERROR: No identities found, it means that the current user doesn't have yet a public key. The solution is simple and one word: ssh-keygen

Publié le 22 Fév 2013, 2:08 pm dans linux, php

I wanted to upgrade this server's PHP to 5.4. According to what I read from Blite official website, running Blite on 5.4 would reduce again my memory usage from 810kB to less than 350kB. But the stable version when I try to upgrade via apt-get install php5 is PHP 5.3.21.

So I tried adding dotdeb repository to my sources.list, then made an apt-get update and apt-get install php5. But the last command, apt-get install php5 removed the package roundcube-sqlite, which was my choice of SQL backend for webmail on this server. At first, I didn't notice the warning about "The following package will be removed", and I made roundcube unusable on the server. PHP 5.4 was successfully installed though. Anything I tried to install roundcube-sqlite failed.

During this time, I could test the performance of Blite, but, unfortunately, I didn't see any change in memory peak usage, I didn't even get the memory usage going below 800kB. In my point of view, there was absolutely no change, no benefit.

I then removed dotdeb from my sources.list, removed php5, and make an apt-get update; apt-get install roundcube to reinstall roundcube, along with PHP 5.3. This made my server go back to its previous state.

This experience made me think that to successfully use latest versions of softwares, the best way to do is compile from source. Having broken dependencies on my packages will be the worst thing I don't need for my servers.

Publié le 20 Fév 2013, 1:24 pm dans linux, windows

My wife's notebook runs on Windows Seven, and didn't have the opportunity (nor the authorization from her) to install Linux on it, and anyway, she would only boot Windows most of the time. GIS softwares she's working on have no reliable alternatives on Linux.

Many times, we have to transfer files between our computers. I also feel the need to take control of her computer sometimes. Transferring files from Linux to Windows, or taking control of the linux machine from within Windows is easy, as I have installed Putty on her notebook. I just use psftp or scp.

Taking control of her computer using VNC is not always an ideal solution, as this is intrusive and we have input conflict. And transferring files from Windows to Linux is not always simple. So I installed an SSH Server on her computer. I chose Bitvise mainly because it doesn't need Cygwin or a heavyweight collection of libraries. Just less than 8MB and it's OK. After installing Bitvise, I can run terminal commands unobstrusively from my computer, and I can also copy files using standard scp.

Funny thing: I tend to enter Linux commands like ls, grep, ... Maybe I really needed the other SSH Server involving all the Cygwin bundle...

Publié le 12 Fév 2013, 3:09 am dans linux

Due to issues on keyboard, I recently fresh-installed LinuxMint 14 to my Lenovo 3000 N100. My former system was LinuxMint 11. Unfortunately, one annoying bug eclipses all the good aspects of this new system. My touchpad stops working many times, and when this bug happens, I can't use my mouse anymore to click anywhere. The pointer still moves but the clicks get lost. I have to go into console mode (Ctrl+Alt+F1) and kill the main application who lastly got the mouse focus.

Sometimes, it gets me back into graphic mode and the mouse is working again. But randomly, that doesn't fix the problem, and either X gets restarted automatically or I need to restart mdm manually.

The issue seems to be some kernel bug with since kernel 3.0, so I bet installing a new desktop manager or another linux flavor would just be a waste of time. Before I'll explore that way, I will list here my attempts to solve and see how long these workarounds last.

The first workaround I found, that I don't understand at all, is about some modprobe commands.

sudo modprobe -r psmouse
sudo modprobe psmouse proto=imps
Pages: 1 2