Pages

Wednesday, March 29, 2017

Fixing .cbr displaying in Calibre


I recently had a problem viewing .cbr files even though I had Calibre 2.5.0 6 bit installed on my system. I discovered that each time I was trying to open the .cbr it kept adding the file to calibre, even when I clicked view from inside Calibre.

Fixing .cbr displaying in Calibre

I fixed this by changing the file association for the .cbr to use ebook-viewer.exe which is located in the x:/Program Files/Calibre2 folder on my Windows 8.1 PC.
To change which program is used to open .cbr files, find the file you want to view, right-click the file, click “Open with” and then “Choose default program…”, now choose “More options”, scroll down to the bottom of the window and click “Look for another app on this PC”, now browse to x:\Program Files\Calibre2 and choose the ebook-viewer.exe and click open.
Now you should be able to open .cbr files with Calibre.

For Apple Mac

  1. Right click an .cbr file
  2. Choose “Get info” in the menu that appears
  3. In the window that appears scroll down to the section “Open with:” and pick ebook-viewer from the list of apps available.
  4. Make sure to click on the button “Change all” just below the drop-down after you have picked the app. This ensures that osx will use this app to open .cpr files in the future.
    Close the info menu and you should be set.
    (OSX Yosemite; Calibre 2.7.3)

Sunday, March 19, 2017

How to delete hiberfil.sys in Windows 7 free to up hard drive space

The best way to delete hiberfil.sys or disable hibernate:
  • Go to Start menu, type “cmd” open up command prompt
  • Type “powercfg.exe -h off” [make sure you are an Administrator]
  • ENTER
  • Type “exit”
  • ENTER

Friday, March 17, 2017

Debian sudo doesn't work - How to make Sudo work

Debian, by default, creates a root user, and does not configure sudo. During the installation, you will have been asked to enter a root password. You need to use that to enable yourself to become root through sudo. First, run:
su -
This will ask for your root password. Enter that. Next, add yourself to the sudo group:
usermod -aG sudo your_username
Alternatively (Debian-specific), you can also use adduser to add yourself to a group:
adduser your_username sudo
Now log out of the root shell. You will be able to use sudo from now on.
If you don't know your root password, talk to the person who installed your machine and ask them to give you sudo rights. If that was you and you've forgotten it, you can create a new one:
  • Reboot your machine.
  • At the grub boot menu, highlight the "Debian GNU/Linux" option, then hit the e button on your keyboard. This will give you a sort of editor window where you can modify the boot commands.
  • In the editor, search for the line that starts with linux. At the end of that line, add init=/bin/bashDo not change anything else. If you've made a mistake, hit the Esc button to go back to the menu and start over.
  • If you now hit ctrl + x, the system will boot to a bash prompt. The normal boot sequence will be completely bypassed, which means (amongst other things) that only the root filesystem will be mounted, and it will be mounted read-only.
  • Run mount -o remount,rw / to remount the filesystem in read-write mode.
  • Run passwd. The system will ask for a new password (twice, to confirm you didn't enter any typoes).
  • Run mount -o remount,ro / to put the filesystem back in the (safe) read-only mode
  • Run exec /sbin/init. The system will now boot as normal.
Note: doing this on a system that isn't yours will earn you the (rightly earned) wrath of the system's owner. Don't do it without their permission :-)

Monday, March 13, 2017

How to Copy Folders in Google Drive

Wouldn’t it be nice if there were an xcopy (Windows) or rsync (Mac, Unix) like command for Google Drive that would recursively copy everything inside a folder, easily It should not only copy all the files and subdirectories but also retain the directory tree structure and maintain the shared file permissions.
Well, we are not sure if Google will ever provide an option to duplicate folders in Google Drive but there’s an open source web app by Eric YD that does exactly what you are looking for. Here’s how to get started:
  • Go to labnol.org/xcopy and click the Authorize button.
  • Allow the app to access your Google Drive files. The app would perform the copy operation directly inside your Google account without involving a third-party server.
  • Once authorized, select the source folder using the Google File picker and specify the destination folder name.
  • Click the Copy Folder button to begin the cloning process.
That’s it. The script will run in the background and copy files, one-by-one, into the target folder.  It will log everything in a Google Spreadsheet so you know what’s happening behind the scene.
While optional, the app can also retain permissions and in the case the copied files will be editable/viewable by the same people as the original files. The copying process would however take longer if you choose to copy the sharing permissions.

Copy Folders to another Google Drive Account

Say you have a folder in one Google account (A) that you would like to copy to another Google account (B). While the app doesn’t support copying across accounts, there’s a simple workaround:
  1. Use labnol.org/xcopy to copy the folder in its original account (A).
  2. Log into account B, create a blank folder and share it with account A.
  3. Log into account A and move the copied folder into the shared folder.
  4. Go back to account B and remove the sharing permissions for the folder.
The Alternative – If you are not comfortable giving access to your Google Drive to another app, you can manually copy folders using the Google Drive desktop client for Windows and Mac. Go to Windows Explorer (or Finder), select the source folder and press Ctrl+C followed by Ctrl+V to duplicate the folder.
This would however not retain the original file permissions. The other downside is that Google Drive will have to reupload all the copied files whereas in the previous case, the copying happened on Google servers directly.