Huge Discounts on Mobiles, Books, Cameras, Computers etc: @Flipkart

Monday, February 16, 2015

Open Command Window Here

When you are doing some hardcore development you may have to run many things in different console (CMD/Command Prompt/DOS) windows. Usually the fastest way is to go to Run, type cmd + Enter and cd to the desired location. There is an even better option. You can open CMD and cd to a folder just by right clicking on the folder and selecting a menu item. The trick is to use Shift + Right Click. This will give you additional options, and one of them is "Open command window here" (Windows 7).

Another very useful tip is to add your most frequently opened folders to favorites so that you see them in the left top of explorer and can open with a single click.

Friday, February 06, 2015

i3 NUC with Xubuntu intermittently freezing while running torrents

My NUC was flying and it was a great relief coming from a Raspberry Pi, which sweats if you do multitasking. I thought of setting up a torrent client on it. Suddenly it started freezing while I was watching a movie in Kodi (latest XBMC). It has never happened before. I checked CPU and RAM, both seem perfectly fine. I knew it was something to do with the torrent client.

Initially I thought perhaps multiple file access to the external HDD is the culprit and may have to eventually get an mSATA drive. USB devices are not very good with simultaneous access. Then I googled a bit to confirm my theory. But I was surprised to find out that the real culprit was the 1024 file descriptor limit in linux.

So I went to the /etc/security/limit.conf and added the following:
userId soft nofile 4096

And that fixed it. Now the torrents are downloading fine (earlier the torrent client used to freeze also). I can smoothly do other things like watching movies too.

Converting a USB printer to a network printer

I recently bought a NUC and has been doing cool stuff with it. I have a Brother HL 1110 mono laser printer which supports only USB. So here is how I made it a network printer.

The NUC has Xubuntu 14.10 (based on Ubuntu). So I setup Samba and enabled file and printer sharing. I use GADMIN-SAMBA for easy configuration via UI.

Here is my Samba configuration:

     netbios name = nuc
     server string = Samba file and print server
     workgroup = WORKGROUP
     security = user
     hosts allow = 127. 192.168.
     dns proxy = no
     map to guest = bad user

     path = /mnt/NAS_HDD1/NAS/
     comment = No comment
     read only = no
     browsable = yes
     writable = yes
     guest ok = yes

     path = /var/spool/samba
     printable = yes
     printing = CUPS|LPRNG|...

     path = /srv/samba/Printer_drivers
     comment = Printer Drivers
     writeable = yes

From the remote windows machine I add a new printer, select 'Network' type and give the path as \\hostname\printername  eg: \\\HL1110.

Even if the printer was configured fine, printouts were coming as blank initially.

Go to the Linux driver page of HL1110, and install all three (Driver Install Tool, LPR Printer Driver, CUPS Wrapper printer driver).

Make sure that you run sudo, else the driver won't be installed correctly.
sudo bash linux-brprinter-installer-2.0.0-1 HL-1110

If you want to print from a mobile device or even remotely, add this printer to your Google account via Chrome: