Posts

Showing posts from 2020

How to install snort3 from github

First, you must clone the repository: git clone https://github.com/snort3/snort3.git cd snort3 Now, install snort2 dependencies and some dependencies that snort2 does not use: sudo apt build-dep snort sudo apt install libhwloc-dev libluajit-5.1-dev libunwind-dev  Now, procced to compile the project: ./configure_cmake.sh cd build make Probably you will see the following issue: daq_dlt.h: No such file or directory This happend, because you need a newer labdaq version (the version installed as dependence from snort is older). git clone https://github.com/snort3/libdaq.git cd libdaq ./bootstrap ./configure make sudo make install Now, come back to snort3 folder and try to compile it again. Probably you will see this issue: undefined reference to daq_version_string' This appears because two versions of daq are installed (repository and github version).  To solve it, like is reported here  just remove the older version: apt remove libdaq-dev Now execute the following: /usr/local...

Enable google drive syncronized folder in ubuntu iwth Ocamlfuse

 The best option is to install ocamlfuse. To do it just follow this steps: $ sudo add-apt-repository ppa:alessandro-strada/ppa $ sudo apt-get update $ sudo apt-get install google-drive-ocamlfuse # google-drive-ocamlfuse mkdir ~/google-drive $ google-drive-ocamlfuse ~/google-drive df -h More information in this link

How to solve 401 unauthorized access to pgadmin4

If you try to access to pgadmin through your not default browser, probably you will see this message: Unauthorized The server could not verify that you are authorized to access the URL requested. You either supplied the wrong credentials (e.g. a bad password), or your browser doesn't understand how to supply the credentials required. To fix it, you need to load the key locate in ~/.pgAdmin4.startup.log Just execute the following command to get the full url: cat ~/.pgAdmin4.startup.log | grep "Server URL" | awk '{print $6}' You will see something like this url: http://127.0.0.1:35349/?key=f6e77a99-65f3-467d-8760-e289effa15ef Enjoy it!

How to draw on linux desktop

It's very easy and usefull when you are sharing your desktop. Just download Draw On You Screen, a gnome extension, and follow the readme steps https://extensions.gnome.org/extension/1683/draw-on-you-screen/ I tested it in Ubuntu 18.04 and it works fine

How to update a forked repo with git

Access to your fork folder cd whatever Add the reference to the original remote repo, called upstream: git remote add upstream https://github.com/whoever/whatever.git Get all branch from a remote repo: git fetch upstream Go to the brach we want to update such as master: git checkout master Re-write our master branch with the new commits from the original master branch: git rebase upstream/master Finally, to update our remote fork, follow this sentence: git push -f origin master

QT and HiDpi configuration to change icon fonts size in applications

Image
If you are using an application with QT interface, probably you will see icons or fonts very large like zoom or vidcutter. To solve it, just add the following QT values in /etc/environment export QT_AUTO_SCREEN_SCALE_FACTOR=0 export QT_SCALE_FACTOR=1 To choose the better values you can test them executing the following command: env QT_SCALE_FACTOR=0.5 QT_AUTO_SCREEN_SCALE_FACTOR=0 app , where app is the application with visualization issues such as vidcutter UPDATE: This steps also works for Zoom, tested on Ubuntu 19.04 Enjoy it!

How to solve convert-im6.q16 issues

If you try to convert multiple jpg to a single pdf probably you will see this message: $ convert `ls -1v` file.pdf convert-im6.q16: Corrupt JPEG data: 94 extraneous bytes before marker 0xd9 `0.jpeg' @ warning/jpeg.c/JPEGWarningHandler/352. convert-im6.q16: not authorized `pictures.pdf' @ error/constitute.c/WriteImage/1056. To solve the first issue just convert the files to png and after to jpg again, like this example: mogrify -format png *.jpg rm *.jpg mogrify -format jpg *.png rm *.png To solve the second, just execute the following command: sudo sed -i 's/rights="none" pattern="PDF"/rights="read|write" pattern="PDF"/g' /etc/ImageMagick-6/policy.xml Enjoy it!

QGIS: How to solver issues to import view layers from sql

If you want to add to QGIS sql sentences, an easy way is to create views. You only need to convert your sql sentence like: select geom from links to create or replace view v_links as select geom from links But, you probably see the following error: Layer is not valid: The layer dbname='' host=0.0.0.0 port=5432 user='' password='' sslmode=disable key='""' type=Point table="public"."v_links" (point) sql= is not a valid layer and can not be added to the map. Reason:  This issue is because an index doesn't exist for data To solve it, just create an index as follows: create or replace view v_links as select row_number() OVER (order by geom), geom from links Enjoy it!

Package pdftex.def Error: File converted-to.pdf not found: using draft setting. \includegraphics

If you have this issue with LaTeX, just execute the following command to solve it: sudo apt install texlive-font-utils Now, you could compile your tex file to see your images Enojoy it!

ImportError: cannot import name 'main'

This is a common issue with pip3 when you try to install some package: sudo pip3 install something Traceback (most recent call last):   File "/usr/bin/pip3", line 9, in <module>     from pip import main ImportError: cannot import name 'main' To fix it just execute the following sentence: sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall Enjoy it!