Monday, March 19, 2018

Wayland server and its complexity against the legendary X.Org

Hello All,

This post explains some of the differences between the old and stable Xorg - the open source implementation of the X Window System and Wayland.

Also I write this post to explain some of the problems that I faced before getting back into Xorg from Plasma to Wayland.

I have been using GNU/Linux and Linux variants from the year 2004. I am one person who believed in the theory that UI is not the first important thing, than the functionality in itself.

I started my Linux journey with a RHEL 7.1 with I think 4 floppy disks to load and unload the OS and not even persistent to some extent.

Then it was Fedora Core 1 - also called FC1.

Now I am in constant use with Debian * distros. I dont feel like using RPM based distributions, I think just out of usage practice. I also am a big fan of Arch Linux and I use the rolling version of it.

Ok now, coming to the main point, was reading a post from omgubuntu.co.uk and got interested in a post of installing an icon theme called papirus icon theme. And at the same time I read another post from the same site about the latest 3 years dev release of Amarok 2.9.0

Dont know what messed up my Display, I was using Plasma Desktop in 17.10. I had to accept 2 ppa repos to install papirus and amarok (though without success).

All of a sudden, I could observe zombies all over the session and I had no other chance but restart my system. Thats the moment and my sddm and plasma was destroyed. I could not recover and ended up with a lots of unmet dependencies issues.

With great struggle, I could connect to internet through CLI (Ctrl + Alt + F1) and with this below command:

sudo /etc/init.d/networking start

Ok now with internet connected, I had no other option to purge the installed deb files, but I had to finally uninstall sddm and used gdm to login into any other DM.

I also made sure that I removed those 2 third party repos from the sources.list.d folder. I gave an update as well.

Wayland is the latest display compositor written by Intel people and is believed to replace the Xorg as a whole in the pretty future.

I had to read a while before using Wayland... The architecture setup between wayland and xorg though looks similar; its not. You can compare architecture differences at wayland.freedesktop.org site.

Now finally with all these struggle, I could somehow connect to the Unity DM with wayland. Now the new problem started, I got inverted display every 2 or 3 minutes.

I could not figure out the exact problem with this peculiar issue. But I googled to see that its more related with HP laptops and kinda related to Wayland.

Finally to remove the unmet dependencies, I had to use dpkg command with a P option. I finally reinstalled Plasma but in vain of display again.

Now finally I had to settle to the legendary Xorg with this time Unity.

All in peace...

Let me know if anyone is more specifically interested to know how I could figure out and get  back to Xorg with Unity. I can explain them the steps in detail and is beyond the scope of this blog post.

Tc,
Ananth G S





Friday, November 3, 2017

SSH - X11 forwarding

Dear All,

This post explains how to setup ssh X11 forwarding. Please note that this post assumes that you have 2 machines running both with some linux installed.

The scenario:

I have 2 laptops - one connected via LAN and the other one via wifi but on the same network.

I have both laptops installed with Deb* based distro.

Need for ssh x11 forwarding:

1. Many a times when you have multiple systems connected via the same network, you may have to exchange files between them. Also there are scenarios where we have one laptop connected to speakers and the songs in some other laptop.

2. There are needs where in we may have to connect remotely to one of these machine to access some files, open them to edit and rest. We shall take up this scenario in one of the other posts pretty soon. 

Pre-requisites:

Here there are 2 entities: (which we shall call them as)

1. Server laptop
2. Client laptop.

On both laptops, openssh client and server needs to be installed. Also make sure that xauth package is installed on the server laptop.

The commands to install these (for a fresh install)

sudo apt-get install openssh-client openssh-server xuath(xauth on the server laptop)

X11 forwarding configuration concepts:

On the server laptop:

1. Set a proper display with the command
export DISPLAY=:0

2. In the file /etc/ssh/ssh_config make sure this below entry is present or else un-comment the lines and change a no to yes as below:

    ForwardAgent yes
    ForwardX11 yes
    ForwardX11Trusted yes

3. In the file /etc/ssh/sshd_config (be careful with the file names) make sure this below entry is present  or else un-comment the lines and change a no to yes except for the last line as below:

AllowAgentForwarding yes
AllowTcpForwarding yes
X11Forwarding yes
X11DisplayOffset 10

4. Note down the IP address of this laptop with the command
ifconfig
For this post discussion we shall assume the IP as 192.168.1.8

5. Finally do not forget this step.. After setting the values do restart the ssh service with the below command:
sudo /etc/init.d/ssh restart

On the client laptop:

1. Connect to the server through a terminal/konsole and with the below command(note usage of putty ssh client is a different process altogether)

ssh user@192.168.1.2 -X (note to replace user with your name on the server laptop)
Give proper authentication credentials to login.

2. Once connected, issue the command,
export $DISPLAY

You should see some laptop / machine name with a display offset. (This is usually the hostname in most cases. )

3. If the output in step 2 is nil, then get back to the server and make sure all steps are properly implemented.

4. Finally verify (if not step 3), that X applications can be loaded easily with the commands:
xeyes or xlogo

5. If you get the output of xeyes or xlogo in step 4, you can also try editing an existing file or by creating a new file by the gedit or any other editor.

gedit a.txt

Finally mission accomplished.. Successful ssh x11 forwarding...

Thats it for now... Hope you had a good learning experience through this post.

Hope to write many more posts...

Tc,
Ananth G S







Thursday, October 26, 2017

Home Media Server with Kodi - a DIY

Dear All,

This post explains how to setup a "Home Media" server with Kodi and other tools.

Pre-requisites:

1. A good movie collection
2. A Linux installed OS

Installations:

1. XBMC / Kodi server (latest being called Krypton)
2. youtube-dl for downloading movies/video collection from youtube
3. ffmpeg and avconv for conversion processes.
4. openssh client and server tools for accessing the movie collection outside the network.

Installation of above in Ubuntu / Debian systems with working Internet connection is:

0. sudo apt-get update
1. sudo apt-get install kodi kodi-standalone
2. sudo apt-get install youtube-dl
3. sudo apt-get install ffmpeg avconv
4. sudo apt-get install openssh-client openssh-server

5. For any of the above commands failing to execute, issue sudo apt-get -f install

iOS and Android App

There is an Android and ios app with the name Kodi. Installation is through the play store or the app store.

Configuration settings and execution/launch of a movie in Kodi

Launch Kodi by the run prompt (Alt+F2) enter kodi

In the beginning screen you should see the Files Section. Browse to your movie collection and add the source.

Play any movie to see that the source is taken into consideration.

Note the file format of the movie has to be one of the many supported file formats of Kodi.
If for any failure of a movie file format,

You can redownload the movie with the command

1. youtube-dl --recode-video avi --prefer-ffmpeg URL

OR

2. youtube-dl --recode-video avi --prefer-avconv URL

Replace the URL with the link of the movie. Also make sure that both ffmepg and avconv are installed.

Now play the re-formatted file in Kodi to check for the proper format.

Enabling web server of Kodi and Zeroconf settings

Kodi has too many options and tweaks to help users. One such thing is enabling the webserver concept and allowing other apps to access kodi.

To enable both, hit Kodi Settings/Services/Control - enable Allow remote control via HTTP and give proper values and note the port number.

Also in Settings/Services/General/Zeroconf enable the first line.

Enabling the UPnP / DLNA support in Kodi

Kodi helps us to stream movies and music to the TV with a network connected in the Hall / living room. For this, Settings/Services/UPnP - enable the first 2 lines.

Accessing movie collection of Kodi - across the network

Though there are multiple ways of accessing the movie collection of Kodi across network, one thing that I could make it work easily is via ssh.

This below link is the best guide.
http://www.arbi.se/using-connectbot-for-ssh-with-pubkey-authentication/

After following the above link, make sure you port forward 22 port and also give appropriate values to the connect via SSH in Kodi in your android or ios device.

Note: Kodi by default connects to a Event Server with port 9777. Also Port forward 9090 and 9777 is important.

Kodi also by default connects to a wifi. If your laptop has both wifi and a RJ45 port, make sure wifi is disabled.

Kodi also makes use of ipv6 in original. Disable it. (Google out to know how to disable ipv6 in *Deb systems.)

Hope this blog post helped some of you stream your movie collection across multiple devices.

I shall continue this post with yet another tweaks related to Kodi pretty soon.

Thanks for reading,
Ananth G S










Thursday, October 19, 2017

AVD launch in Android Studio 2.3 and Ubuntu 17.04

Hello All,

For people who use Android Studio for Android programming and in the Ubuntu / Debian Environment, there was a recent problem loading a AVD in the latest 2.3 version.

This blog post helps you solve this peculiar problem.

The details:

1. You write some android code, and want to test with a AVD. You install the specific target machine, but after gradle build, the launch of AVD totally stops.

There is a timeout of about 300 seconds and the AVD fails to load.

One alternate method is to use your existing Android based smart phone and connect it with a USB cord.

The second approach is given below:

Issue this below command in bold and then restart Android Studio. The problem should be solved.

ln -sf /usr/lib/libstdc++.so.6  /your_sdk/emulator/lib64/libstdc++/libstdc++.so.6


Make sure to replace your_sdk above with your respective $ANDROID_SDK path.

Hope this helps you..

Tc,
Ananth G S

Tuesday, August 29, 2017

Firefox Flem - solving the problem of Bookmarks remotely..

Hello... Most of us have the practice of bookmarking webpages... This post does not explain how to import or export bookmarks..

Read full to know more..

Recently I faced a problem where in - I had to fetch my bookmarks from  Google Chrome located at a remote machine. Unfortunately I had not taken a backup of my bookmarks.. Also I had only CLI ssh access to the machine..

What most of us do is that - we use browsers like Firefox and Chrome and we login to the browsers via an account(Chrome a/c for example) and that saves us from exports / import.

I dont have this practice.. So fetching my urls were much more difficult..

I googled to find out where the location of my bookmarks in Chrome stored in my /home location.

After finding it out... Which is: inside the respective home folder

.config/google-chrome/Default/Bookmarks [observe the . at the beginning]

I was kind of happy to find my Bookmarks.

2. The next problem was - the moment I gave cat Bookmarks

The file was in completely JSON format. I had around 97 URLs bookmarked.

3. How to fetch only the URLs from this file of JSON format was the next hurdle..

Shell commands to the rescue...

I issued the command:

cat Bookmarks | grep http

This output had enough amount of invalid characters as well... But it also fetched me https urls.. So the problem of http and https was solved..

Then the next command...

cat Bookmarks | grep http | wc -l [gave an output as 97 ]

4. Removing the invalid characters and only fetching the exact URL paths...

I now issued the command:

cat Bookmarks | grep http | cut -d : -f 2,3

This gave me all the list of URLs as 97 URLs.

5. Ok what next? How do I put them across to a text file?

It was pretty simple... cat Bookmarks | grep http | cut -d : -f 2,3 > urls.txt

... Concept of redirection..

6. Now how on earth would I put the urls.txt back to my existing browser in the local machine?

I cannot copy 97 URLs one after the other and save it yet again...?

7. Firefox Flem to the rescue..

This addon of Firefox can import a list of URLs or even a text file into its browser at one shot... !

Try Flem...

Let me know for any queries..

Tc,
Ananth G S
















Saturday, July 8, 2017

Canon LBP2900 driver installation - Arch Linux

Hi All,

This post explains how to setup CanonLBP2900 printer drivers in Arch Linux.

Installation of drivers:

1. You need the yaourt package manager (to install software for AUR)

2. Issue the command yaourt capt-src
    This command installs the 2.7 version of CAPT drivers.

Configuration of the CUPS driver:

1. As we know CAPT has to sit on the CUPS driver. So make sure that CUPS is installed and configured properly.

To be on the safer side, you can issue the command:

sudo pacman -S cups

Then enable the cups driver by the command:

systemctl enable org.cups.cupsd.service

Then start the service:

systemctl start org.cups.cupsd.service

Check the status by:

systemctl status org.cups.cupsd.service (you should get active status with pid values)

Configuration of the CAPT driver:

2. Make sure that the user is added to both the groups - lp and sys

gpasswd -a ananth sys lp

3. Next make sure that the ppd is registered to the path

sudo /usr/sbin/lpadmin -p LBP2900 -m CNCUPSLBP2900CAPTK.ppd -v ccp://localhost:59687 -E

4. Check for the path where the printer has its device, register capt to cups through the usblp device 

sudo /usr/sbin/ccpdadmin -p LBP2900 -o /dev/usb/lp1

5. Start and enable the ccp daemon:

sudo systemctl enable ccpd.service

sudo systemctl start ccpd.service

sudo systemctl status ccpd.service (to check its running/active status)

6. Check if its all working fine with

captstatusui -P LBP2900 

Precaution commands:

Many a times, the printer might not work due to various reasons. 

Steps / Commands to be followed then:

1. Reinstall CUPS
2. Reinstall CAPT
3. ls -l /var/ccp
4. sudo mkdir /var/ccpd
5. sudo mkfifo /var/ccpd/fifo0
6. sudo chown -R lp:lp /var/ccpd
7. sudo chown -R user_name:lp /var/ccpd (replace username with $LOGNAME)

8. ldd /usr/bin/captfilter (produces this below output)
        linux-gate.so.1 (0xf76f7000)
libpopt.so.0 => /usr/lib32/libpopt.so.0 (0xf76b0000)
libc.so.6 => /usr/lib32/libc.so.6 (0xf74ef000)
/lib/ld-linux.so.2 (0xf76f9000)

9. ldd /usr/bin/capt* | sort | uniq | grep "not found" (should give you no output )

Last enable both cups and capt for startup by the command

sudo systemctl enable org.cups.cupsd.service
sudo systemctl enable ccpd.service

Hope this helps...

Tc,
Ananth G S









Sunday, June 18, 2017

Dual monitor display with Nouveau and xrandr

Hello fellas.... Its been a while blogging... I would not repeat this statement yet again... !

This post explains how to setup a dual monitor display with Nouveau open source drivers and using the tool xrandr.

Hardware:

1. Nvidia GT 730 with 3 outputs - HDMI, VGA and DVI.

Platform of setup:

1. 2 Dell monitors of 20" display (using only 1 as of now)
2. 1 TV (Vu 32 inches)

OS: Linux Sarah.

Tools and Drivers:

Nouveau open source graphics driver and xrandr

The problem statement:

If you already read my setup, my TV supports a stupid resolution of only 1360x768 where as my Dell monitor supports upto 1600x900 both in 60Hz. A xrandr query shows a much bigger resolution.

Each time I installed a OS and installed Nvidia proprietary drivers, I had enough difficulties to setup for a dual display - cos - when mirrored displays were used - both TV and Monitor would end up only with 1024x768 resolution.

Why not Nvidia? 

1. The typical wrong misconception, that a VGA cable cannot be used to upgrade a resolution.

2. Being proprietary, it did not support xrandr properly (got Bad Mismatch errors)

The ultimate solution:

1. Uninstall all installed Nvidia drivers

2. Install Nouveau drivers.

Implementation of the solution:

1. sudo apt-get remove nvidia*
2. sudo apt-get purge nvidia*
3. sudo apt-get purge bumble*
4. sudo apt-get purge bbswitch
5. sudo apt-get --reinstall install xserver-xorg-video-nouveau
6. sudo apt-get --reinstall install  nouveau-firmware
7. sudo dpkg-reconfigure xserver-xorg
8. sudo dpkg-reconfigure xserver-xorg-video-nouveau
9. Remove all blacklisted nouveau names in /etc/modprobe.d/ folder
10. Reboot - sudo reboot now

Make sure that both the monitors are connected through your graphics card outputs.

Once booted back - nouveau should automatically pickup the displays.

But the screen resolution problem is not yet solved: 1 screen shows 1600x900 and the other 1360x768

Solution: Use xrandr tool

Commands:

1. gtf 1600 900 60 -x
2. xrandr --newmode "1600x900_60.00"  119.00  1600 1696 1864 2128  900 901 904 932  -HSync +Vsync
3. xrandr --addmode VGA-1 1600x900_60.00
4. xrandr --output VGA-1 --mode 1600x900_60.00

Finally I can even get a high resolution of 1920x1200 !

If need be, you can convert the above 4 lines to a shell script and execute the script at each startup.

Tc..
Ananth G S







Friday, December 23, 2016

How to install Oracle 8 on Debian 8.6 via a PPA in just 5 steps

Hello All.. 

This post explains how to install Oracle 8 on Debian based systems and specifically on Debian 8.6... 

Oracle 8 is needed for many applications and though OpenJDK(openjdk.java.net) is the default in LINUX, it makes sense to install both many a times...

While configuring Android Studio 2.2.3, I had to mandatorily configure Oracle 8 with the below following steps (as the root user):

1. echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list

2. echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list

3.  apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886

4. apt-get update

5. apt-get install oracle-java8-installer

Thats it...

And to make Oracle 8 as the default, 

Execute this below command:

1. apt install oracle-java8-set-default

Hope this helps...
Ananth S Gouri





Wednesday, December 14, 2016

Canon LBP2900B and HP Deskjet 3540 - Installation with Debian 8.6

Hello... Its been a while since blogging....

This post is more for people like me who forget the core concept of a SDLC called Documentation... I hate it basically and never document anything...

Today after installing Debian 8.6 onto my new HDD - I had to spend more time to configure my printers Canon LBP2900B and HP Deskjet 3540... Thats when I thought - I shall document - so as to spend little time the next instance / time.

So here I go with first Canon LBP2900B

This is my desktop configuration - Its a i7 4th gen, 16GB RAM, 3.5 TB HDD, 2GB GeForce Graphics Card..The OS currently and I work most of the times is a 64bit Debian - Note not Ubuntu...

1. Download the latest (2.6) printer 64 bit drivers from the link given below:
Canon APT Drivers - 2.60

2. After download, unzip the folder with the below command inside the terminal
tar xvf filename.tgz (replace accordingly)

3. Go into the 64-bit drivers folder/Debian and issue the below 2 commands:

-> sudo dpkg -i cndrvcups-common.deb
-> sudo dpkg -i cndrvcups-capt.deb

(Follow the same order)

4. Now make sure your printer is switched off... Its extremely important....

5. Now issue the below commands in sequence:

-> sudo /etc/init.d/cups restart
-> sudo lpadmin -p LBP2900 -m CNCUPSLBP2900CAPTK.ppd -v ccp://localhost:59687 -E
-> sudo ccpdadmin -p LBP2900 -o /dev/usb/lp1

6. In step 5 - last command - note check if your printer is placed at lp1 or else note down the change in place holder and reissue the last command. Typically in most cases it would be lp1

7. Now that the drivers are installed - its time that we check for its working... Switch on the printer and issue the below commands in sequence:

-> sudo /etc/init.d/ccpd start
-> sudo /etc/init.d/ccpd status

Step 7, last command should give you 2 pid values... If not continue from step 8...

8. Check for the command: ls -l /var/ccpd

9. If command in step 8 is a null or no such file - then follow the next steps in sequence:
sudo mkdir /var/ccpd
sudo mkfifo /var/ccpd/fifo0
sudo chown -R lp:lp /var/ccpd

10. Issue the command captstatusui -p LBP2900

11. If the window in step 10 tells "Ready to Print" - you are all set to go..If not continue from step 12..

12. Issue the command ldd /usr/bin/captfilter

13. If the command output of step 12 is null values, then you need to do the following:

sudo dpkg --add-architecture i386
sudo apt-get update (Do not forget this command)

14. After step 13, issue the command: sudo apt-get install libc6:i386 libpopt0:i386

15. Also check for other missing filters with the command:

ldd /usr/bin/capt* | sort | uniq | grep "not found"

16. If for null values in step 15, now issue -
sudo apt-get install zlib1g:i386 libxml2:i386 libstdc++6:i386


Thats it... Now that after step 16, you should get a working state of the printer... Re-issue the commands of step 7 with a slight modification:

sudo /etc/init.d/ccpd restart
sudo /etc/init.d/ccpd status

Now you should get 2 pid values... Cross verify the same with
captstatusui -P LBP2900

Note: At any stage while checking for the number of pids - if it is more than 2/3 pid values - then kill the ccpd process with the below command:

sudo pkill -9 ccpd

Thats it for now... I shall write wrt HP Deskjet printer in my next post...

Thanks and hope this helped...

Let me know...

Tc....
Ananth S Gouri





Friday, October 23, 2015

gbrainy

Hello All...

gbrainy is a software on OSS to keep our brains up and running...

Install the software via synaptic package manager or via command line..

It has 4 categories or different levels of games- Logical, Mental calculations, memory trainers and verbal challenges ...

Check out the snapshot for more clarity..


Play it and keep your brains working..
Ananth S Gouri

passwd - 2

Dear All,

Continuing from the last post of "mkpasswd"

U folks need to use 'passwd' to change the password.

I can simplify things this way:

Say if your username on a UNIX machine is "telsaT"

and you have this password "test123"

mkpasswd helps you to generate random passwords... Useful many a times when we want to change our passwords on servers frequently...

As the root user - you can issue the command mkpasswd

Then give it as an input to passwd - again a command for which you need root privileges...

Similar to the command mkpasswd - some linux distributions offer a command called makepasswd

The command usage of makepasswd is:

makepasswd - which generates a random password

You can generate a random password of given length - with this below command:

makepasswd --chars 20

You can also generate a series of random passwords with the command:

makepasswd --chars 20 --count 5

Hope this post is interesting to some of you...

Thanks & Regards,
Ananth S Gouri




Thursday, October 22, 2015

Lex and Yacc

Hey All,

This post explains how to install lex and yacc onto your Linux distros and how to run small programs.

For Debian based systems - there is a package called Flex. Install it. This is the alternative for lex. Here you go - the definition from Synaptic itself:

A Flex generates as output a C source file, lex.yy.c, which defines a routine yylex().  This file is compiled and linked with the -lfl library to produce an executable. When the executable is run, it analyzes its input for occurrences of the regular expressions. Whenever it finds one, it executes the corresponding C code.

Similarly to work yacc - there is tool called Bison. Install it using synaptic.

Or you can install it via cmd line issuing the command:

sudo apt-get install flex bison

After installation, you can execute the attached program [see dropbox link - https://www.dropbox.com/s/ynbcghps02vhmo4/a.l?dl=0] for counting the number of consonants and vowels in a given input.

Run the lexical analyzer to create tokens from the program - a.l

Issue the below commands:

[1]flex a.l

This would create a file called lex.yy.c - A C file. Compile this C file to get your executable

[2]cc lex.yy.c -o al -ll

Finally run the executable:

[3] ./al

You should not be able to type input to the program

Type "Linux" [without quotes] and press enter.

Type Ctrl + D to see the output as shown in the below diagram.



The next post will help you to figure out how to run a yacc program.

Till then, keep reading.

Tc,
Ananth S Gouri


Ubuntu 15.10 aka Wily Wirewolf - released

Dear All,

The Canonical Ubuntu 15.10 is released. Code named wily wirewolf - the amd64 version of the OS is around 1.2 gb in size.

http://releases.ubuntu.com/15.10/?utm_source=omgubuntu

You can download the various versions of the OS from the above link.

Also this below link provides the new features of this release:

http://www.omgubuntu.co.uk/2015/10/ubuntu-15-10-download-review-new-features

Check it out and let me know if any one wants the DVD to shipped inside Karnataka. I can help you out for free.

PM your addresses !

Tc,
Ananth S Gouri

Wednesday, October 21, 2015

Manipulating a problematic Canon CAPT driver in *nix systems

Hey Fellas,

Its been a while since I am blogging. Sorry for that. Currently I am using Debian 8.1. This is FYI !

This post is for people who have a Canon LBP**** series working printer in UNIX based systems.

If you have earlier read posts like this :
https://help.ubuntu.com/community/CanonCaptDrv190

and found difficulty in manipulating ccpd - the daemon service - this post is specifically for you folks...

Canon CAPT ccpd - can print iff there are equal to or more than 2 pids...

This could be verified with the command -

sudo /etc/init.d/ccpd status 

which should show minimum of 2 pid values.

If in cases where there are less than 2 pid values, that is when the trouble starts.

You as a root user can stop the service by issuing the below command:

sudo /etc/init.d/ccpd stop

But some times this would not stop the service.

Issue this below command [1] to completely kill the service and then restart the service with the next command [2]

1. sudo pkill -9 ccpd
2. sudo /etc/init.d/ccpd restart or sudo /etc/init.d/ccpd start


After issuing the above commands - verify the status by this command related GUI

captstatusui -p LBP2900 [if your printer is LBP2900 & for other names change accordingly]

Hope this small post helps you to some extent...

If you are all facing issues with installing ccpd for your respective *nix lemme know...

Tc,
Ananth D Geek !


Tuesday, December 2, 2014

Installing rtl8723be driver for a working wifi

Hey All,

If you own one of those latest Laptops and especially from Lenovo, there are chances that you have Realtek Network controller....

To check the driver your laptop needs:

Issue the command: lspci and grep for Network
lspci | grep Network

If the above command output is:

02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device b723

Then follow the below procedure of installation:

1. First download the file given in the below link:
https://www.dropbox.com/s/24ed9mhpjrmjo6k/rtl8723be.zip?dl=0

2. Extract the zip file

3. cd rtl8723be

4. Inside the folder issue these commands:

-> make
-> sudo make install
-> sudo modprobe rtl8723be

5. Your wifi access points should be now visible for login/auto internet.

Thanks and hope this helps you - pitch in your comments.

Thanks,
Ananth S Gouri

Monday, December 1, 2014

Creating a screencast in Linux

Hey All....

This post explains how to create video tutorials or a screencast in Debian based distributions.

You have too many softwares on the OSS world. But this procedure seems to be the apt way of creation.

You require these to be installed before quickly going through this post:

1. audacity
2. avidemux
3. kazam

Install 1, 2 and 3 using synaptic package manager or with the commands

1. sudo apt-get install audacity
2. sudo apt-get install avidemux
3. sudo apt-get install kazam

Steps to follow:

1. Start kazam from the run mode: 

Disable both Sound from microphone and Sound from speakers
Next capture the full screen, or the window or the area you want to cover.

Save the file in your videos - rename the file from the default kazam system.date timing nomenclature.

2. Simultaneously start audacity and speak along while the video recording / screen recording is taking place. Save your file as mp3.

[Connect your mic and make sure your mic settings are selected in the dropdown of the audacity. ]

How to create a clear Audio file?

You need a good mic first. No matter the quality - there seems to be many a times noises like hiss, buzz or background noises.

To remove these noise:

Copy the original mp3 - duplicate it to not to lose the original file.

Copy the noise part of your audio and select Effect -> Noise Removal tool: from the top pane of audacity and click the button - Get Noise Profile

Then again Ctrl + A to the whole audio clip and again select Effect -> Noise Removal -> and click ok.

Save the new file next to your video file.

3. Last part is to blend both into 1 single piece.

This is where avidemux comes into picture.

1. Open the video first as input
2. Next open the audio in mp3 format as output
3. Save the project as either avi / mpeg format

That's it ! Go test your video !

Let me know your thoughts about screencast creation!

Tc,
Ananth S Gouri


Installing Knoppix on a VM

Hey All..

Download Knoppix by Klaus Knopper at knoppix.net for a price or for free at knoppix.org

Knoppix is a Live CD with loads of software in it.

Burn the iso image downloaded to a DVD/CD appropriately.

Install Virtualbox / VMWare player for your Linux / Windows distributions.

Virtualbox can be found for your OS at virtualbox.org

Now... What is it there to install an OS onto a VM(virtual machine)? What is the specialty of it or the big deal in it?

Installing OSes on a VM will allow you to discover more types of distributions.

We learn a lot of things in the process of installation.

Now coming back... Why knoppix?

1. For me its one of the fav distributions of all times.
2. Its huge - consists of so many softwares in it..
3. Its interesting.

Select type of OS as Linux 2.6

Use the DVD burnt earlier or the iso image would do (run as live cd option)

Create a VDI file of around 32 GB min.

Now run the Live CD and allow the OS to load.

Once the OS is fully loaded...

Dont use the Knoppix flash installer tool present on the Desktop but use the menu -> traverse to Knoppix and Install Knoppix to HD software.

Create the file system using gparted tool, format the VDI to reiserfs filesystem.

Allow for the installation to complete..

Hope this was interesting. !

let me know if you face any challenges in between - I shall demonstrate this with snapshots!

Thanks, Tc,
Ananth The Geek!

You want to write a diary on Linux???

Hey All.... Its been a while since I am blogging...

But here you go... crisp and clear post...

If you want to keep a dairy - but as a software on Linux...

Here it is..

1. Lifeograph
2. rednotebook

The best 2 softwares I found interesting enough to keep you writing for a while. !

Installation is via synaptic for Debian based distributions.

Ubuntu has a ppa for both.

Let me know if you find difficulties in installing them, I shall let you know the procedure next time.


Ciao,
Ananth The Geek

Tuesday, December 18, 2012

How to - execute shell scripts on your Android phone

Hi All,

This post explains how to run simple shell scripts on your android phone...

Assume we have a script that generates odd numbers b/w 1 to 10

Here is the script:

i=1
echo $i

while [ $i -lt 9 ]
do
       i=`echo $(($i+2))`
       echo $i
done

Type this content onto a shell (a text file with a .sh extension) using an App called TextEdit written by Paul Mach.

Save the file (test.sh) in your external sd card root folder.

Then you need a shell to run this script.

Download an app called Terminal Emulator from the Google Play store.

So we are set to run our script...

Steps:

1. Open the emulator
2. Give the below commands:

     cd sdcard
     cd external_sd
   
     sh test.sh

3. If there are any errors, you can fix them using the TextEdit once more. Save it and re-run!!

Note:

1. This procedure will work for both rooted and not-rooted phones.
2. The script uses echo command instead of expr command.
3. Since the phone I used to run this script is not rooted - I had to save my files to the card.

Hope you enjoyed scripting on your Android,
Ananth G S


Friday, December 14, 2012

Start-up sound of Nimblex on Debian 5 using Sun Virtualbox

Hi All,

Was playing around my Lenny trying to tweak some of the things that I used to do in the past.....

I installed Nimblex on my old laptop which was on Debian 5. Of course I did not want to touch the god (Debian) - so only used Virtualbox (older version and not the new one from Oracle)

I fell in love with the start up sound of Nimblex. So I wanted to get the same sound to my Debian 6 on my other laptop.

So heres what I did....

1. First enable sound (Direct OSS or Direct ALSA) on Virtualbox
2. i.e take sound from host OS.
3. Open the terminal and run the command to copy the sound startup file.

Alt F2 (Run prompt)

Type gnome-terminal

Then as su-

cp /usr/share/sounds/startup/startup.ogg . 

I copied the startup file to the current directory (~ of Debian 5)

Then

cp startup.ogg /share/ (I had shared a folder in Virtualbox)

Press Left Control key to go back to the host OS (Debian 5 from Nimblex)

cp /share/startup.ogg/ /media/sdb1/ (Copy the shared file to my pen drive)

Now finally on my other laptop (running Debian 6)

Issue the command -

cp /media/sdb1/startup.ogg /usr/share/sounds/

Last enable login sounds in Debian 6.

Hope you too can manipulate your startup-sound files in your distros from these simple commands...

Tc ,
Ananth S Gouri