Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Tuesday, February 19, 2019

free VPN Service

vpnbook 2019 https://www.vpnbook.com/
  Username: vpnbook
  Password: rktbz9c


vpnbook (http://www.vpnbook.com/)
  Username: vpnbook
  Password: adv7ebeh
  .ovpn files  http://www.vpnbook.com/free-openvpn-account/VPNBook.com-OpenVPN-Euro1.zip

getusvpn (http://www.getusvpn.com/)

Notes:
After download OpenVPN Cliente on W7, run link (desktop) as Administrator.


References:

[1]  top 5 http://www.zeropaid.com/news/94826/top-5-free-vpn-services/
[2] http://www.tuvpn.com/es/tutoriales/openvpn-en-windows7#step-0
[3] Setting openvpn - ES https://hide.me/es/vpnsetup/ubuntu/openvpn/

Sunday, February 17, 2019

Linux Fedora: Información de Hardware

En Windows, basta con instalar Everst, pero en Linux debemos seguir los siguientes pasos:

Paso 1: #yum install lshw lshw-gui

Paso 1: #yum install lshw lshw-gtk


Paso 2: #lshw


Otra forma es compilando desde el código fuente, asi :

Paso 1:#wget http://ezix.org/software/files/lshw-B.02.12.01.tar.gz
Paso 2:#tar -xvfz lshw-release.tar.gz
Paso 3:#cd lshw-B.02.12.01/src
Paso 4:#make
Paso 5:#lshw

make gui , para instalar interfaz gráfica


CONSTRUIR RPM package:

#rpmbuild -ta lshw-release.tar.gz
#rpmbuild -ta --with gui lshw-release.tar.gz

Wednesday, February 13, 2019

Ubuntu Services


sudo service --status-all


https://askubuntu.com/questions/912216/16-04-command-to-list-all-services-started-on-boot/912218


Linux small distro


Damn Small Project (bad)
Lubuntu 
Linux Lite (based on Ubuntu/Testing)
Tiny Core (Testing), works for Raspberry Pi
  Download:
  Installation GUI:
 
 $tce-load -wi Xvesa.tcz Xlibs.tcz Xprogs.tcz aterm.tcz flwm_topside.tcz wbar.tcz
 $tce-load -wi Xorg-7.7 #if Xvesa not found 


References:
[1] List of popular distros https://itsfoss.com/lightweight-linux-beginners/
[2] Comparison https://en.wikipedia.org/wiki/Light-weight_Linux_distribution
[3] Tiny Core installation https://iotbytes.wordpress.com/install-microcore-tiny-linux-on-local-disk/
[4] Tiny Core Packages http://distro.ibiblio.org/tinycorelinux/7.x/x86/tcz/
[5] Tiny Core Addin desktop http://wiki.tinycorelinux.net/wiki:adding_a_desktop_to_microcore
[6] WBar http://lxlinux.com/wbar.html


Monday, February 11, 2019

Ubuntu 16 - Setting PDF Printer


List of printers installed
$ls /etc/cups/ppd

Manually
Device URI:cups-pdf:/

By Command Line (Partial tested)
lpadmin -h localhost -p cups-pdf -v cups-pdf:/ -P /usr/share/cups/model/CUPS-PDF.ppd -E



Setting file (output/destination)
/etc/cups/cups-pdf.conf

Status Idle - File "/usr/lib/cups/backend/cups-pdf" has insecure permissions

$chmod 700 /usr/lib/cups/backend/cups-pdf

Null Printer
Device URI: file:/dev/null


References:
[1] Complete info https://en.opensuse.org/SDB:Printing_to_PDF

[2] openSUSE compile cups-pdf and ppd file https://pawn.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/documentation.shtml
[3] CUPS PDF-WRITER Backend on Suse https://www.novell.com/coolsolutions/feature/17636.html

[4] Fake printer https://superuser.com/questions/304670/how-to-add-a-fake-dummy-null-printer-in-cups
[5] Install cups-pdf http://www.debianadmin.com/howto-install-and-customize-cups-pdf-in-debian.html

Tuesday, February 05, 2019

Fedora 29 Network Settings

References:
[1] https://alchemist.digital/articles/configure-a-static-ip-address-on-fedora-24-25/

Fedora 29 firewalld settings


$sudo service firewalld start 
  
$sudo firewall-cmd --list-all

$sudo firewall-cmd --get-zones

$sudo sudo firewall-cmd --zone=home --list-all

$sudo firewall-cmd --get-default-zone

$sudo firewall-cmd --get-active-zones
 


$sudo firewall-cmd --add-port=8081/tcp --permanent 
$sudo firewall-cmd --add-port=8081/udp --permanent 

$sudo firewall-cmd --reload  #important in Fedora 23 (VPS)
 
 
 
References:
[1] firewall-cmd https://docs.fedoraproject.org/en-US/Fedora/19/html/Security_Guide/sec-Open_Ports_in_the_firewall-CLI.html
[2] other firewall-cmd https://www.hiroom2.com/2017/07/12/fedora-26-firewalld-en/
[3] zones https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-using-firewalld-on-centos-7

Monday, February 04, 2019

Fedora - mySQL restoring root


ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)


#service mysqld stop // id doesn't stop run #mysqladmin -u root -p shutdown

#mysqld_safe --skip-grant-tables &
#mysql -u root 
> use mysql;
> update user set password=PASSWORD("mynewpassword") where User='root';
> flush privileges;
> quit
#service mysqld stop 
#service mysqld start &
 
if mysqld_safe not exist (updated 2019)
# systemctl stop mysqld
# systemctl set-environment MYSQLD_OPTS="--skip-grant-tables"
# systemctl start mysqld
$ mysql -u root

get temporaly password (updated 2019)
$sudo grep 'temporary password' /var/log/mysqld.log
A temporary password is generated for root@localhost: cvcvcv 

$mysql -u root -p 

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'MyNewPass4!'; 


https://dev.mysql.com/doc/refman/8.0/en/linux-installation-yum-repo.html
reference:
http://www.rackspace.com/knowledge_center/article/mysql-resetting-a-lost-mysql-root-password

Monday, January 14, 2019

Ubuntu Memory type ddr2 ddr3



$ sudo dmidecode --type 17

$ sudo lshw -short -C memory
 
From [1]
 
DDR1: 2.5 V, 133–200 MHz
DDR2: 200–400 MHz
DDR3: 1.5 V, 400–800 MHz (up to 1400 MHz for super-high-end)
DDR4: 1.2 V, 2133–4266 MHz
 
For example: if shows up in lshw -short -C memory as simply 16GiB DIMM Synchronous 2133 MHz (0.5 ns). The MHz rating indicates that it's almost certainly DDR4.

References:
[1] memory types http://en.wikipedia.org/wiki/Synchronous_dynamic_random-access_memory#Generations_of_SDRAM
[2]

Tuesday, January 08, 2019

Ubuntu upgrade from i386 to x86_64

https://askubuntu.com/questions/5018/is-it-possible-to-upgrade-from-a-32bit-to-a-64bit-installation

Friday, November 30, 2018

Ubuntu 16 OpenCV 2.4

Problems during compilation:

relocation R_X86_64_32 against `ff_a64_muxer' can not be used when making a shared object

Solution:
recompile ffmpeg-3.4.5 with(2018-11-29):
./configure --enable-nonfree --enable-pic --enable-shared

Download ffmpeg and build 3.4.5, 3.2.12 or 4.0 and try to compile opencv doesn't help, then

Final solution: disable ffmpeg
$cmake  -D WITH_CUDA=OFF -D WITH_FFMPEG=0 ..
$make

That compile opencv 2.4.x and 3.4.x



References:
[1] Error sys/videoio.h not found problem http://yutopapa.hatenadiary.com/entry/2017/06/08/173149

Monday, September 24, 2018

opengl compile error

Compiling Collisions, quadtrees, uniform grid.

https://github.com/MarcusMathiassen/P2D

$g++ Circle.cpp getTime64.cpp Process.cpp Utility.cpp Color.cpp      hwinfo.cpp Inputs.cpp Quadtree.cpp  Vec2.cpp Config.cpp main.cpp Rect.cpp FixedGrid.cpp Node.cpp Render.cpp -I ../include/  -lGL -lglut -lGLU -lGLEW -lpthread -lX11 -lglfw  -o q5


error while loading shared libraries: libGLEW.so.2.1: cannot open shared object file: No such file or directory

$sudo apt-get install libglew-dev
$locate libGLEW.so.2.1
...
/usr/lib64/libGLEW.so.2.1.0
/usr/local/lib/libGLEW.so.2.1
/usr/local/lib/libGLEW.so.2.1.0
...
...

sudo vi /etc/ld.so.conf.d/glew.conf
/usr/local/lib

$sudo ldconfig

Resources:
[1] https://sourceforge.net/projects/glew/files/glew/snapshots/

Thursday, August 30, 2018

Linux: mount folder to different folders

Code:
mount -o bind /media/disk1/pictures /home/user1/pictures
mount -o bind /media/disk1/pictures /home/user2/pictures
for add a fstab entry to auto-mount at startup.


Code:
/media/disk1/pictures /home/add1cker/pictures none defaults,bind 0 0

Tuesday, August 21, 2018

Raspberry pi 3


1) user and passwords:
Distribution   | Username   | Password
---------------|------------|-------------
Debian Squeeze | pi         | raspberry
Arch           | root       | root
QtonPi         | root       | rootme
Raspbian       | pi         | raspberry
OpenElec       | root       | openelec
Pidora         | root       | raspberrypi
RISC OS        | n/a        | n/a
raspbmc        | pi         | raspberry
 
2) add users

$sudo adduser username
$usermod -aG sudo username
 
3) Ports
 
$lsof -nP -i | grep LISTEN
$netstat -tlpn | grep LISTEN
 
4) vncserver (reinstall, by default sometime doesn't works)
$sudo apt-get install tightvncserver 

5) Firewalls

iptables -I INPUT -p tcp --dport 5900 -j ACCEPT
iptables -I INPUT -p tcp --dport 5901 -j ACCEPT

Resources:
[1] https://www.digitalocean.com/community/tutorials/how-to-create-a-sudo-user-on-ubuntu-quickstart
[2] direct way https://www.shellhacks.com/how-to-grant-root-access-user-root-privileges-linux/
[3] vncserver https://quaintproject.wordpress.com/2013/03/24/establish-a-vnc-connection-to-your-raspberry-pi-from-a-linux-pc/
 
 
 

Sunday, May 06, 2018

Ubuntu 16 Setting Screen Samsung SyncMaster T240M



$cvt 1600 1000 #get right values for this resolution

$gtf 1600 1000 60 #alternative


# 1600x1000 59.87 Hz (CVT 1.60MA) hsync: 62.15 kHz; pclk: 132.25 MHz
Modeline "1600x1000_60.00" 132.25 1600 1696 1864 2128 1000 1003 1009 1038 -hsync +vsync
 

$ sudo xrandr --newmode "1600x1000" 132.25 1600 1696 1864 2128 1000 1003 1009 1038 -hsync +vsync  #define

$ sudo xrandr --addmode DVI-I-1 "1600x1000" #register on system


$ xrandr
Screen 0: minimum 320 x 200, current 1600 x 900, maximum 16384 x 16384
DVI-I-1 connected primary 1600x900+0+0 (normal left inverted right x axis y axis) 518mm x 324mm
1920x1200 59.95 +
1600x1200 60.00
1280x1024 75.02 60.02
1280x960 60.00
1152x864 75.00
1024x768 75.08 70.07 60.00
832x624 74.55
800x600 72.19 75.00 60.32 56.25
640x480 75.00 72.81 66.67 60.00
720x400 70.08
1600x900 59.95*
1600x1000 59.87
DVI-I-2 disconnected (normal left inverted right x axis y axis)
HDMI-1 disconnected (normal left inverted right x axis y axis)
1600x900_60.00 (0x58e) 118.250MHz -HSync +VSync
h: width 1600 start 1696 end 1856 total 2112 skew 0 clock 55.99KHz
v: height 900 start 903 end 908 total 934 clock 59.95Hz


* Set permanent settings using ~/.xprofile (for example)
$vi ~/.xprofile
#
xrandr --newmode "1600x1000" 132.25 1600 1696 1864 2128 1000 1003 1009 1038 -hsync +vsync 
xrandr --addmode DVI-I-1 "1600x1000"



* Problem: After nvidia drivers installation this doesn't works (crap)



$xrandr --fb 1600x1000 #show
xrandr: specified screen 1900x1000 not large enough for output DVI-I-3 (1920x1200+0+0)
xrandr: Configure crtc 0 failed
X Error of failed request:  BadValue (integer parameter out of range for operation)

#or
X Error of failed request:  BadMatch (invalid parameter attributes)

$xrandr --output DVI-I-3 --scale 1x0.85  #this solve  after nvidia drivers installation



References:

http://ubuntuhandbook.org/index.php/2017/04/custom-screen-resolution-ubuntu-desktop/



Friday, May 04, 2018

ARM Virtual Machine resources



[1] https://www.red-lang.org/2012/03/setting-up-arm-virtual-machine.html

Nvidia and Opengl doesn't works


libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast


Prepare removing
  • sudo apt-get purge nvidia* #This will remove your current nVidia drivers
  • sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
  • sudo dpkg-reconfigure xserver-xorg #This should fix Xorg
  • sudo update-alternatives --remove gl_conf /usr/lib/nvidia-current/ld.so.conf
After this reïnstall nVidia software
  • sudo apt-add-repository ppa:xorg-edgers/ppa #provides the necessary repository
  • sudo apt-get update
  • sudo apt-get install bumblebee-nvidia nvidia-319 nvidia-settings-319

Running apps

Runtastic (I uninstalled because force to update your device - Internet connection problems) Runkeeper  (Wrong GPS tracking) Strava   (Curr...