Tuesday, July 5, 2022

gEdit via rdesktop

 gedit via rdesktop unable to change the preference, this is valid if installed in wsl2 on Windows 11 (that support WSLg).

In such cases we can change the gEdit settings via terminal using gsettings command. Following command will output all the available keys in all schemas.


for example,

gsettings list-recursively | grep 'org.gnome.gedit.preferences.editor'

  • schema:  org.gnome.gedit.preferences.editor
  • key      :  insert-spaces
  • value   :  true

It is useful to quickly set up gedit on newly installed machine by keeping settings in a bash shell scrip and execute it. Here is my custom gedit settings.

Sunday, February 7, 2021

VPN: OpenConnect

For connecting to vpn using openconnect command, we need to install three packages:

  • openvpn
  • easy-rsa
  • openconnect

 

In RedHat or CentOS based Linux system:

  • $ sudo yum install epel-release                            
  • $ sudo yum install -y openvpn easy-rsa
  • $ sudo yum install -y openconnect

 

In Debian based Linux system:

  • $ sudo apt install -y openvpn easy-rsa
  • $ sudo apt install -y openconnect

 

Before connecting to vpn, create tunneling device using openvpn command and make it active. If 'ip' command is not available (on older system) use "sudo ifconfig tun1 up" in step 2

  • $ sudo openvpn --mktun --dev tun1
  • $ sudo ip link set tun1 up
  • $ sudo openconnect <IP-Address> --interface=tun1

Once done, remove the tun1 using following commands:

  • $ sudo ip link set tun1 down
  • $ sudo openvpn --rmtun --dev tun1


Friday, March 8, 2019

ASUS e203MAH


Entering Bootloader of ASUS E203 MAH laptop:
  1. Power on the Asus S200e laptop
  2. Press and hold F2 key when powering on the Asus S200e laptop to enter the bios.
  3. Switch to the “Boot” tab and set “Launch CSM” to Enabled.
  4. Switch to the “Security” tab and set “Secure Boot Control” to Disabled.
  5. Press F10 to save and exit.
  6. Press and hold ESC key to launch the boot menu while the Asus S200e laptop is powering up.
source: https://www.rgb.ie/2015/03/26/how-to-boot-from-usb-drive-on-a-asus-s200e-laptop/
 

Friday, January 18, 2019

Python3 on CentOS 7

  • yum -y install https://centos7.iuscommunity.org/ius-release.rpm
  • yum -y install python36u
  • yum -y install python36u-pip
  • yum -y install python36u-devel

 

Create python3 virtual environment:

  • python3.6 -m venv myWorkEnvironment
  • source myWorkEnvironment/bin/activate
 

Note: python3 is now available by default distros repository and no need to install iuscommunity. Its available directly "sudo yum install -y python3"

Thursday, May 24, 2018

Raspberry Pi 3 - Led status


cat /sys/class/leds/led0/trigger
none rc-feedback kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock timer oneshot heartbeat backlight gpio cpu cpu0 cpu1 cpu2 cpu3 default-on input panic mmc1 [mmc0] rfkill-any rfkill0 rfkill1

echo none > /sys/class/leds/led0/trigger
will turn off the led completely (if it becomes annoying)

echo heartbeat > /sys/class/leds/led0/trigger
will cause the led to flash with the linux heartbeat pattern

echo timer > /sys/class/leds/led0/trigger
will cause the led to flash once a second

Friday, October 13, 2017

BerryBoot


Default cmdline.txt

elevator=deadline quiet bootmenutimeout=10


Parameter setting for config.txt

hdmi_force_hotplug=1
hdmi_drive=2
hdmi_group=2
hdmi_mode=81

.

Friday, July 7, 2017

RPI 3 - check temperature


On the raspberry pi 3 for checking temperature of CPU core there are two ways.
First method if you are running official raspbian, second method for any other Linux distro like Kali

Method I:
$ vcgencmd measure_temp
output:
temp=45.1'C

Method II:
$ cat /sys/class/thermal/thermal_zone0/temp
output:
45084

Both are reading 45 degree Celsius


=> turn HDMI off to reduce current requirement

to turn off:
/opt/vc/bin/tvservice -o

to turn on
/opt/vc/bin/tvservice -p