Thursday, September 14, 2017

Linux mint buzzing sound when using headphones

I had annoying buzzing sound coming in from speakers whenever I used to insert headphones. After few trial and errors I found following solution :

  • Open terminal and type
Alsamixer 
  • After that select the sound card (usually PCH)
  • Go to far right until optiona
Auto-mute mode 
  • press up arrow to make it disabled.  

Sunday, March 26, 2017

sqllite commandline history via up/down keys

I found very annoying problem with sqlite CLI. When you press up/down arrow keys, it prints ASCI characters of the keys rather that showing historical commands. When I googled, I realised that we can either link readline library when compiling sqlite or do:
sudo apt-get install rlwraprlwrap sqlite3 database.db
worked like a charm for me.

Saturday, March 18, 2017

increasing brightness on LXDE display on lubunut

LXDE seems to have 2 brightness controls. Both of them are found in locations: /sys/class/backlight/

For me it was :

harsshal@dell:~$ ll /sys/class/backlight/ 
lrwxrwxrwx  1 root root 0 Mar 18 12:58 acpi_video0 -> ../../devices/pci0000:00/0000:00:02.0/backlight/acpi_video0/lrwxrwxrwx  1 root root 0 Mar 18 12:58 intel_backlight -> ../../devices/pci0000:00/0000:00:02.0/drm/card0/card0-LVDS-1/intel_backlight/


Both locations have max_brightness file :

harsshal@dell:~$ ll /sys/class/backlight/*/max_brightness -r--r--r-- 1 root root 4096 Mar 18 12:58 /sys/class/backlight/acpi_video0/max_brightness-r--r--r-- 1 root root 4096 Mar 18 12:58 /sys/class/backlight/intel_backlight/max_brightness

harsshal@dell:~$ cat /sys/class/backlight/*/max_brightness 7255000
So typically intel_backlight will be controlled by all your default brightness controller, but acpi_video0 will need manual changes when you need to change it:
harsshal@dell:~$ echo 7 | sudo tee /sys/class/backlight/acpi_video0/brightness 7
Other methods of increasing brightness :

harsshal@dell:~$ xbacklight -set 60
Or

harsshal@dell:~$ xrandr -q | grep -w connectedLVDS-1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 290mm x 180mmharsshal@dell:~$ xrandr --output LVDS-1 --brightness 1

Wednesday, March 1, 2017

startup scripts in windows to keep screen active

I wrote a script to keep my comupter not get locked. script goes as follows:
set WshShell = WScript.CreateObject("WScript.Shell")

x = 1

do while x = 1 'Loop forever and ever and ever and ever

WshShell.SendKeys "%^" 'SEND CTL + ALT

WScript.Sleep 290000 '<5 MINS

loop

I placed this script at location C:\Users\username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
and no more locking up the screen....

Tuesday, February 28, 2017

Adding right click options

I add my custom scripts to perform certain actions via right-click. To achieve that, we need to do following :
vim ~/.gnome2/nautilus-scripts/terminal
For nemo, we need to have scripts at following locations:

/usr/share/nemo/actions/ for system-wide actions
$HOME/.local/share/nemo/actions/ for user actions

Type the command you want to have after right click. In this example, I do :
gnome-terminal
And make that script executable:
chmod a+x ~/.gnome2/nautilus-scripts/terminal

Friday, January 6, 2017

Citrix receiver on linux version LUbuntu

Started my new year by installing Lubuntu on my old dell laptop. Usually I install via USB, so prepared USB again via
usb-creator-gtk
on my previous installation of linux mint.
Installation always used to hang on certain point on installer and could not figure out why. After googling, came to know that it needs network during installation but does not give any error. So connected LAN cable and got it installed.

First task was to make sure that no issues when connecting to office network. I installed receiver from

https://www.citrix.com/downloads/citrix-receiver.html

After installation, logged in and got an verisign ssl error. So did
sudo cp /usr/share/ca-certificates/mozilla/* /opt/Citrix/ICAClient/keystore/cacerts
One issue is chrome does not open citrix application right away. I need to open it via command line by executable located at
/opt/Citrix/ICAClient/wfica