My linux experience

Some linux tips just not to forget.

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

Fixing laradock error

Recently when trying to build a laradock docker container (workspace one) I got an error:

E: Failed to fetch  http://security.ubuntu.com/ubuntu/pool/main/d/dbus/dbus_1.12.2-1ubuntu1.1_amd64.deb   404  Not Found [IP: 91.189.88.152 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?   

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

/images/stories/2020/confuse-the-hell-out-of-the-spiders_thumb.png

I use CentOS Web Panel (CWP) and want to redirect my secondary parked domain to my main domain both http and https using nginx. Needs some tricks.

So I have my main domain gruz.ml and a secondary one gruz.ml. I want when I visit https://gruz.ml/whatever-path , https://gruz.ml/whatever-path I'm redirected to https://gruz.ml/whatever-path

The most obvoious way is to create a domain in CWP and link it to an existing CWP user public_html folder. And this works, but demands some additional steps. Otherwise there you don't redirect to the main domain, but have your web-site accessible under 2 different domains.

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

b_300_0_16777215_00_http___ximage.ml_x_spidersem.jpg_qn.jpeg

CentOS Web Panel has an option of using nginx as web-server, but out of the box Search Engine Friendly links don't work for Joomla.

So here are the steps:

  1. Select nginx as the web-server
  2. Create a custom template from terminal or via CWP GUI
  3. Apply the template to the needed domains

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

spider web with water beads network dewdrop1We develop a web-site using docker. Well, using docker-compose. So we have it working at our localhosts per team member, but we need run the docker at a real server under a real domain.

My server uses CentOS and CWP(CentOS Web Panel, Pro version). Usually a create a user, domain/subdomain/database. Then upload my web-site files, edit database credentials in the web-site config etc.

Docker wokrs in other way. So to run my docker-based project at my CWP-powered server I did the following.

The idea is easy. Run docker (I did via terminal) and in CWP assign proxy to my domain and point it to the docker web-server port.

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active

Problem: Need to quickly translate phrase avoiding opening google translate, copy-pasting etc.

I need often to translate a phrase from one language to another. Currently I often need to translate English to German. KDE Klipper is a perfect tool to do it from keyboard quickly, without opening google translate in browser. There is still some delay while requesting a remote server, but it's much quicker the opening a browser tab and doing a number of other copy-paste-click-task-switch tasks.

Translation from to Klipper demo

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

spider skull on backI switch my keyboard layout in my OpenSuse linux via Caps Lock. It's much more convenient then any other key combination. JIC, to make Caps Lock work as Caps Lock I use Shift+Caps Lock.

Suddenly in KDE apps (e.g. system settings or plasma desktop widgets, but not in Firefox or VS code) pressing Caps Lock started to work as Undo (like if I was pressing ctrl+z).

Solution was to edit ~/.config/kdeglobals .

On some reason the undo shortcut looked like

[Shortcuts]
Undo=Ctrl+Z;\s

I removed \s to make it look like

[Shortcuts]
Undo=Ctrl+Z;

Saved and reloaded KDE. It works!

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

Disable XDebug for Code Sniffer but enable for CLII scripts I use VS Code for php development. I use XDebug, but out of the box it catches phpcs calls on linting documents, making impossible to use xdebug due to numerios interruptions.

The solution was to disable XDebug globally and enable per virtual host.

Globally it can be disabled in php.ini (or another ini file for php, in my case of OpenSuse I use custom file /etc/php7/conf.d/xdebug.ini) and then enable it in .htaccess for needed hosts or for all of them.

So in my php .ini file I have directives

xdebug.remote_autostart = 1
xdebug.remote_enable = off

And in my .htaccess file I have directive

php_flag xdebug.remote_enable on

This worked till I needed to debug a php command line script with XDebug in my VS Code. The solution was to run php with a proper key like

php -d xdebug.remote_enable=1 script.php

And finally, not to forget a key, I created a shortcut script ~/bin/pd containing code

#!/bin/bash
set -o xtrace
php -d xdebug.remote_enable=1 $@

So to run a CLI script and let XDebug listen to I run command pd script.php

P.S. set -o xtrace line is not needed in general. I use it to debug bash scripts.

Star InactiveStar InactiveStar InactiveStar InactiveStar Inactive

Image-missing.svgMy Klipper clipboard manager refused to open on keyboard shortcut (I use Ctrl+`) in LXQT. The problem was, that my LXQT local is in Ukrainian, but shortcut is set in English.

The strange behavior was also because in global shortcut manager, when setting a keyboard shortcut was not possibel. The old ones were working.

After several hour of googling and experiments I have found out the global shortcuts must be selected when my LXQT local and current keyboard input language are the same.

So since my local is Ukrainian, I had to switch to Ukrainian input language and then assign shortcuts.

The shortcuts fire needed actions work with any active input language.

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active
Image-missing.svg
Effective UID is not root (euid=1000 egid=100 uid=1000 gid=100) (rc=-10)
Please try reinstalling VirtualBox.
where: SUPR3HardenedMain what: 2 VERR_PERMISSION_DENIED (-10) - Permission denied.

After each OpenSuse update (I have Leap 42.2 by now) I get the same error with VirtualBox.

Just a note for mysefl to fix it

sudo chmod 4711 /usr/lib/virtualbox/VirtualBox

I'm really tired to do it manually myself, but see no other way out by now.

User Rating: 5 / 5

Star ActiveStar ActiveStar ActiveStar ActiveStar Active

Hyptiotes cavatus nonvenomous Clear Creek Hocking Co. OH December 12 2015Native slack .rpm package refuses to install at OpenSuSE. It requers appindicator, which in fact is installed. Slack doesn't see it, so installation fails.

The workaround is to extract the slack rpm file somewhere and to run it for your user only, not system-wide.

So, download slack rpm somewhere. I used my local temp directory, which has nothing with any system /tmp. Just a folder where I place some temporary file.

In my case it was /home/user/Desktop/temp/slack-2.6.2-0.1.fc21.x86_64.rpm

I went to /home/user/Desktop/temp/ and run command rpm2cpio < ./slack-2.6.2-0.1.fc21.x86_64.rpm | cpio -idmv

This created a usr folder with all needed slack files. Next I went to /home/user/Desktop/temp/usr/bin and just run slack executable from it.

FaLang translation system by Faboba
ОУН-УПА: легенда спротиву Українська Дивізія «Галичина» Зиновій Книш: спогади й матеріали до діяння УВО і ОУН Реаніматор електронних текстів Забуттю не підлягає 1917-1991

See a typo?

Select the text block and press

CTRL+Enter

Comments

  • NotificationAry - get emails on Joomla content is submitted, added or changed

    Berndi Berndi 30.06.2019 11:45
    The fields %TO_NAME% and %TO_USERNAME% are empty

    Read more...

     
  • NotificationAry - get emails on Joomla content is submitted, added or changed

    Berndi Berndi 30.06.2019 11:43
    My fault, I made it

    Read more...

     
  • NotificationAry - get emails on Joomla content is submitted, added or changed

    Berndi Berndi 30.06.2019 10:46
    I did. Now I'm asking me how to put the surename into the email... :-|

    Read more...

     
  • NavigationAry - navigate between Joomla menu items like between articles using "prev - next"

    Berndi Berndi 29.06.2019 15:59
    I also miss content in %TO_NAME%

    Read more...

     
  • NotificationAry - get emails on Joomla content is submitted, added or changed

    Berndi Berndi 29.06.2019 15:15
    Hi gruz, I have the problem, that when I use the %AUTHOR% tag, the plugin dosen't send the author ...

    Read more...