Perşembe, Mart 26, 2026

Vi clipboard copy with OSC52

 What a mess I was in lately when I try to repair broken copy/paste feature on vi sessions between my computers. I used to have "+y key combination working for some machines I have, until I realised it was not working anymore. 

I tried AI guidance with some progress, but it has taken a lot of time of mine. Different AIs proposed different solutions (only partial indeed) till I reached the latest stable and widespread one.

The solution depends and is easily affected by the programs, their versions  and their living environments. Since I have mainly minimal servers with poorer versions of software, it was a bit tricky to find a unique solution applicable to each scenario. But I believe at last I found a simple and working one.

The trick is to use the following on .vimrc for my remote hosts

call plug#begin('~/.vim/plugged')
Plug 'ojroques/vim-oscyank'
call plug#end()

let mapleader = " "

if $SSH_TTY != ''
   let g:oscyank_term = 'default'
   let g:oscyank_max_length = 0
   let g:oscyank_silent = 1
endif
    nmap <leader>y <Plug>OSCYankOperator
    nmap <leader>yy <leader>y_
    vmap <leader>y <Plug>OSCYankVisual

This needs oscyank plugin  installed on both peers. Don't forget to push those last nmap lines outside of the if statement, a machine of didn't provided $SSH_TTY that made the code obsolete and took some of my time to recognise the error.

This config lets you use Space y to yank into clipboard..  

Çarşamba, Ağustos 06, 2025

Julia error 'OPENSSL_3.3.0' not found

 On my Fedora 42 desktop I was getting errors like 

julia> import Pluto
ERROR: InitError: could not load library "/home/user/.julia/artifacts/1c2814ca8577e0356a6ecf8447364c19e97b86a8/lib/libssl.so"
/lib64/libcrypto.so.3: version `OPENSSL_3.3.0' not found (required by /home/user/.julia/artifacts/1c2814ca8577e0356a6ecf8447364c19e97b86a8/lib/libssl.so)
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/JLLWrappers/m2Pjh/src/products/library_generators.jl:63 [inlined]
 [2] __init__()
   @ OpenSSL_jll ~/.julia/packages/OpenSSL_jll/2yAM9/src/wrappers/x86_64-linux-gnu.jl:16
during initialization of module OpenSSL_jll

when I try to start Pluto from within julia. This error is somewhat related to version of the openssl libraries installed on my computer. I say so, because on my laptop I have a similar installation, but no such errors (may be due to some libraries lacking on my laptop). 

Anyway, after some search (not search anymore of course, chatting), I installed OpenSSL 3.5 library locally on my desktop and succeeded to link it my julia install. I tried OpenSSL versions 3.3 and 3.4 without success. Lastly version 3.5 did link to julia with some preloading/pointing like 

alias julia_local='env LD_PRELOAD=$HOME/.openssl-3.3/lib64/libcrypto.so:$HOME/.openssl-3.3/lib64/libssl.so LD_LIBRARY_PATH=$HOME/.openssl-3.3/lib64:$LD_LIBRARY_PATH julia'

 I didn't make a system-wide install of OpenSSL 3.5 not to poison the system, and couldn't upgrade to that version using dnf neither. 

This was a good hack. Happy now.
 


 

Çarşamba, Mayıs 28, 2025

Vi with Latex

 So much time, since my last post. Recently I was trying to find a way to compile tex files from inside vi. I have tried vim-latex plugin (which seems old) with no success. Later, I found vim-tex plugin which works. I made some modifications to .vimrc file by the help of ChatGPT and succeeded to compile Tex. And some more search enabled me compile and open as pdf my tex file with the help of zathura viewer. I had evince on my computer installed, but I wasn't able to make it open my tex files after compiling. Anyways, now it seems I can say goodbye to TexMaker and open to a new world.

Cuma, Temmuz 05, 2024

Hanging around with i3wm

My late favorite windows manager is i3wm and I have been using it since a year I believe. I am getting used to  controlling and managing it. 

It's a nice lightweight, minimal window manager not so easy to manage. It has a very few desktop applications and very basic ones. Since I don't want to install a more complicated manager like KDE or alike, I needed to rely on those desktop applications such as feh for  image viewing, ranger for filesystem manipulations, pavucontrol for sound management and xrandr for display management. I have almost installed a satisfactory amount of such applications to perform minimal desktop needs and gained a lot of experience with i3wm conf file, binding keys to specific needs like using two monitors in different scenarios. 

The last modification I made was writing 3 different xrandr commands to comply with 3 different tasks, turning on and off the second HDMI monitor, and mirroring a Display port more resolution monitor to the second lower resolution HDMI monitor.  I have binded 3 keys specific for these actions. I actually intended to bind just one key to those actions, but so far I couldn't succeed in, maybe later I can find a solution.

The challenge was not overcome, since there remained a problem with sound when monitors cycles through each modality. Here pavucontrol enters into situation, and I need to find correct syntax to be called after monitor cycles.

I also managed to increase workspaces from 10 to 20 and find key bindings for that. Now I can control 20 workspaces 10 in the main display I requently used and the remaining 10 is in the optional HDMI display.

It was very painful.

Çarşamba, Ocak 11, 2023

Fedora 36 latex beamer error

 Today I tried to compile a .tex document with a futile attempt.I received an error stating that beamer.clt file not found. I checked its installation, reinstalled, found its location on the disk with no help. Fedora seemed to have a bunch of texlive packages installed.

When I tried to remove beamer.cls from my computer, it performed a huge deletion of files including those I have never thought to be touched (R installation and texmaker). I believe this was dute texmaker's installation. Even RStudio seemed to disappear. Anyway, I reinstalled all but the problem continued (as I suspected beforehand).

After some hours of searching for a solution, luckily I found this little code to bring back beamer into the sce

tlmgr install beamer

I also reinstalled babel using this command. Now it works as expected.

Perşembe, Ekim 20, 2022

Hayat dersi

 55 Yaşını geçen bir adamın Doğum Gününde Yazdığı, Herkesin Okuması Gereken Hayat Dersi;

. Deneyim, her türlü maddiyattan daha değerlidir.

. Hayatınızda yapacağınız en önemli kariyer seçimi, eş seçiminizdir.

. Parayla ilgili üç yetenek vardır: Onu kazanmak, elde tutmak ve büyütmek. Bunların üçü de birbirinden çok farklı yeteneklerdir.

. Bu konudaki tüm bilimsel çalışmaları bir kenara bırakarak söyleyebilirim ki, sekiz saatlik bir uyku çok önemlidir.

. Yiyip içtiklerinize dikkat edin ve her geçen yıl porsiyonlarınızı biraz daha küçültün. Yaş ilerledikçe ne kadar spor yaparsanız yapın bir faydası olmuyor.

. İnsanların sizin hakkınızda ne düşündüğünü önemsememek için çaba sarf edin. Bu, benim için hâlâ çok zor ama öğreniyorum.

. Öfke aslında gerçek bir his değildir; onu yaratan korkudur. Öfkelenmeden önce sizi korkutan şeyin ne olduğunu düşünün.

. Her beş senede bir hayatınızda radikal değişiklikler yapın. Aksi halde hayat oldukça sıkıcı olabiliyor.

. Her gün yaratıcılığınıza belirli bir zaman ayırın. Yaratıcılık bir kas gibidir ve onu geliştirmeniz gerekir. İlhâm ise içi boş bir kelimeden ibarettir.

. Minnettarlık ve şikayet etmek/suçlamak gibi durumlar bir insanda aynı anda bulunamaz. Hangisini yansıtmak istediğinizi seçin.

. Okumak, bir hayata sığdıramayacağınız kadar deneyimi öğrenmenizi mümkün kılar. Bol bol okuyun.

. Hayatta en çok yapmak istediğiniz 25 şeyi listeleyin ve sizin için en önemli olan 5 tanesini bunlardan ayırın. Daha sonra kalan 20'yi çöpe atın ve unutun; çünkü onlar sizde yalnızca kafa karışıklığı yaratır.

. Başarının %99'u çalışmak, %1'i ise yetenektir. Yetenek ateşleyici güç ise, çalışmak benzindir.

. Sık sık komedi izleyin; hatta imkânınız varsa her gün izleyin. Çünkü gülmenin hastalıkları iyileştiren bir gücü vardır.

. İskenderiye kentine kendi isminin verilmiş olmasının Büyük İskender için bugün hiçbir önemi yoktur.

. Yazarken, sanki canı çok sıkılmış bir insanla konuşuyormuşsunuz gibi düşünün ve her cümlenizle onun dikkatini üzerinizde toplamaya çalışın.

. Akışına bırakmayı bilin. Tüm problemlerinizi bugün çözmeye çalışmayın.

. Ne kadar az şeye sahip olursanız, o kadar az şey size sahip olur.
 
. Sizden nefret ettiğini bildiğiniz insanlarla karşılaştığınızda onlara bakın, ellerini sıkın ve içten bir tebessümle karşılık verin.

. Kabalık etmek insana hiçbir zaman hiçbir şey kazandırmaz. Karşınızdakileri anlamaya çalışın ve istedikleri her ne olursa olsun bunu başarabileceklerini söyleyin.
Sevgiyle kalın..
 
Alıntıdır.

Salı, Aralık 19, 2017

Fedora 27 Generic release interference with Virtualbox

Recently I upgraded to Fedora 27. Everything was smooth except that Oracle Virtualbox stopped working after some time.
I first thought that this is a problem with Virtualbox and thought of even upgrading to new version and do everything from scratch.
But it wasn't and I was lucky not doing it. I realised that it was Fedora generic-release to be blamed. A simple search has led me to this reddit page and it was easy to switch back to fedora-release. Virtualbox started working as it did before.

Çarşamba, Ocak 11, 2017

Dnf fastestmirror

I was trying to upgrade Fedora 24 to 25. The mirror dnf using was poor. I interrupted the download process many times with the hope that it will connect at a much more speed. But at last I decided to change the mirror that dnf uses.
While searching for the correct code to do this, I noticed that there is a plugin that forces dnf use the fastest mirror (fastestmirror). It was already installed in my box but dnf was not instructed to use it. Hence a simple line
fastestmirror=true

in dnf.conf solved my issue.

Perşembe, Haziran 23, 2016

You dig

You see, in this world there's two kinds of people, my friend: Those with loaded guns and those who dig. You dig

Perşembe, Kasım 05, 2015

Beautiful Soup get contents of a tag

I was embodying multiple body tags into a huge body tag to make a web page printable more efficiently. I used bash and python BeautifulSoup to get the web pages and parse them. Actually all of the job could have been done with python BeautifulSoup as the name suggests, but because I used some sed stuff previously, I did not attempt to change them into python equivalents (this requires usage of some libraries like urllib2 which I did not use since much time).
By using such a code
str(soup.find('body'))
BeautifulSoup returns all the contents of body including and tags. Because I aggregate these tags into a new one, multiple tags appear in the new html document. This might cause some CSS problems in the presentation of the document, I propose. Thats why I needed to eliminate those superfluous tags. 
This page from stackoverlow has helped me.
 The required code was like that
 
body=body+''.join(map(str,soup.find('body').contents))

I really like  BeautifulSoup as I like sed.