lynx-browser

[LINUXLOG 002]: The First Crash

I thought only windows would crash so easily, but today when I started my laptop, it never gave me the desktop… some errors about can’t load cinnamon this and that and virtualbox kernel service. but unlike windows which when crash don’t give any avenue for repair, I was able to login from the other terminals.

Ctrl+Alt+F[1-7]

I used the text-based browser, Lynx to check what the problem was, did some purging of all virtualbox related stuff and reinstalled cinnamon and then voila, I was able to login again.  But I will need to run Windows and Visual Studio and some other software as from tomorrow classes are starting and I need the Microsoft goodness too, even when I don’t want it.

I am logging in all the major steps and as soon as I learn how to GIT from the command line, it will be all up in a repo on, soon.

permission-denied

[LINUXLOG 001]: Initial Hurdles of Linux

So far so good, LMD (Linux Mint Debian) is turning out to be clean and simple, or maybe it is cause am not doing much work as I was on Windows8, but waiting for the regular classes to start, then will need the Windows software I have been using.

Got a MATLAB related task to do, skipping it cause of no MATLAB, but will install octave and use it instead for future work, or MATLAB if I ever get around to install Windows as dual boot or virtual.

I had to use Arduino, AVRDUDE but both gave permission errors, so for the time being, used sudo but should fix it for proper use. As I had to copy some Arduino library files, I needed to find out where Arduino was installed and still I am not clear on how Linux stores files, so used commands locate and whereis, both are search related commands, whereis is I think specifically for searching where a command binary actually is and locate is for commands/folders and files everything (I think). Also, at first I just tried locate Arduino and it gave such a long list that the terminal window didn’t show it all, so used | less to paginate the output (not sure what less is actually, man defines it as opposite of more .. :) very helpful).

  • whereis some_file_name
  • locate avrdude
  • add | less at end of whereis command if result is too long, whereis some_file_name | less

 

Also need to install F.Lux on Linux (I just can’t look at the white screen now after so many years of using F.Lux on windows, can’t install. Installed RedShift (similar) - have to configure.

Update: Arduino is working now, maybe just needed restarting… though GUI glitches still there (selected items in sub-menus have invisible text) – AVRDUDE to test later.

gparted-snapshot

[LinuxLog 000]: Linux on Laptop as Primary OS

Finally decided to ditch my dying(dead) Win8 and install something else, wanted to install Windows7 but not having a 64-bit copy and wanting to try out Linux as a primary OS, decided to install Linux Mint Debian, not much of a selection as this was the ISO which I had on my system already.

My system specs  are: Dell Inspiron 1564, core i3 with a 250GB HDD and 6GB RAM – yes it is an OLD system

I still intend to install Win7 and dual boot it, but telling myself still that I will keep Mint as the Primary/default OS for boot (normal usage), so partitioned the HDD accordingly with gparted using the LinuxMint Live USB before starting the installation.

gparted-snapshot

the 200GB partition is for Windows and any other data, am hoping I will NOT need to resize anything – still weighting options to run windows virtually or dual boot it.

The only and only and the problem I didn’t think of was that my WiFi driver does not come pre-installed (proprietary stuff) so had to install it without having Internet access on the laptop, used cell phone to search for a solution, download files and copy commands…

Keeping a record of all am doing, will make a GitRepo for keeping the log.

Leaky Code…

I had heard lots and lots about leaky code so far, but never actually learned about it or read about it until tonight… so here it is below: a sample of LEAKY CODE (source: Wikipedia)

#include <stdlib.h>
 
void function_which_allocates(void) {
    /* allocate an array of 45 floats */
    float * a = malloc(sizeof(float) * 45);
 
    /* additional code making use of 'a' */
 
    /* return to main, having forgotten to free the memory we malloc'd */
}
 
int main(void) {
    function_which_allocates();
 
    /* the pointer 'a' no longer exists, and therefore cannot be freed,
     but the memory is still allocated. a leak has occurred. */
}

via Wikipedia Memory Leak Article

LED Eid Mubarak - from Ejaad

EiD: Hugs, Eidi and GUNS

First and foremost; EID MUBARAK TO ALL… I have been awfully lazy this Eid and didn’t even send Eid Greetings SMS to anyone except a select few.

LED Eid Mubarak - from Ejaad
LED Eid Mubarak – from Ejaad – http://facebook.com/EjaadTech

If someone looked down on Karachi, PK via satellite on Eid days, he would see

  1. Large gatherings of Muslims
  2. Hugging each other like its the last time they’ll meet
  3. Pakistani Flags and badges and stuff [14th August is also almost here]
  4. Children armed with guns…. YES, GUNS..!!!

Every Eid for the past some years I have been seeing GUNS, lots and lots of guns, Eid day reminds me of the scene in Matrix where Neo asks for Guns and gets em.

I mean why Guns, why not any other toy, why not board games, why not card games, why not sports gear, why not wheel-walay-jootay, why did it had to be guns…. and once the little ones have guns, they start having street wars form into gangs and its not only the little ones I see kids of almost 15 years old wandering around showing off their bad-ass BIGGER guns leading those gangs.

This has got to change. It is already done this year but next year and on next coming Eid (Bakra-Eid) I plan on at least trying in my own family to NOT let the kids buy guns. I will RE-post this before the next Eid too so to remind others and let’s stop this. I can force it upon a few but unless we show these little kids that there are other great things, other toys and play things which open the imagination for the better, which encourage healthy and safe outdoor  activities which encourage sharing rather than killing this trend isn’t going anywhere.

Let’s not even start on the hazards of these Guns and how one wrong aim can put out the light in one’s eye.

I hope that most of you will agree with me and some will share this thought this time and the next time on Eid.

[I should better familiarize myself with the latest toys too, so next time, I can give my kid-bro and little cousins a better choice, hopefully before next Eid, I will post here a list too.]

MS Electronics (Analog IC Design) + Graduate Teaching Fellow at PAF KIET + Co-Founder and Design Engineer at EjaadTech + all round Computer/Electronics Geek