Fight for the Internet 1!

Friday, October 12, 2018

Vivaldi Extensions Shortcuts

I switched to the Vivaldi Browser about a year since Firefox 57 came out. I'm really liking it and it's got lots of great built-in features. For those who don't know, Vivaldi is an open-source-like web browser, giving you tons of features without worrying about Google watching your browser usage nor Firefox's dubious non-software related political efforts. (There is no mobile version yet, but it's coming.)

Here is something new I just discovered: The ability to configure Extension Keyboard Hotkey / Shortcuts within Vivaldi natively.

  1. Within the Vivaldi browser, go to: vivaldi://extensions 
  2. You will see your list of extensions. (Vivaldi themselves do not have any extensions and instead use extensions from the Chrome Web Store, which you can choose wisely yourself.)

    Click on the three-menu bars with the Extensions text on the upper left.
  3. Now you see the section for Keyboard shortcuts!
  4. Now you can configure individual shortcuts. I found this incredibly useful and love that it is built right in.
Hope that helps anyone, because I didn't know it until now!


Friday, August 19, 2016

Fix Misaligned ePub Cover

Recently I had some ePub files that had misaligned tiny cover images. I wanted to correct this. Here's a really simple fix for many cases.

I use Calibre as my eBook reader, and it has an option to "Edit book", which will take you to the digital book file editor.

https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhaa_X5ByG53I-sFNmtx8NP3pfPgj9_ZmIbe9XgOPw1UatfcqveSoWGie4uOIlHkzSHPr3vDua_aJ5TOwi8cksYbTGio1LXp0tIRpGIh34fcYHIBIPeS2W4A9FIlRj1HKLbiHHmo0LC9Vi/s1600/edit_book_opening_window.png

Notice the panel on the left upper area, labeled File Browser. Usually the first file in this list is the Cover html page file. Also in the middle of the left column, an area labeled Images.

Automatically Recreating the Cover
If you have a copy of the book cover (which is trivially easy thanks to Google), I suggest you just delete the first titlepage.html cover file (or whatever it is called), and the related image file under the image section.

Then go to Menu: Tools --> Add cover.

Then import the cover image, and check the option to preserve the aspect ratio.


Manually Editing the Image Alignment
Double click to open it. You may see something similar to this:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta content="ABBYY FineReader 11" name="generator" />
  <link href="Court_of_all_Shamens_files/Court_of_all_Shamens.css" rel="stylesheet" type="text/css" />

  <title></title>
</head>

<body>
  <p><img alt="9785567648623" src="../Images/9785567648623.jpg" /><br />
</body>
</html>

The problem here is the image is just dropped into the document without any helpful formatting to make it full-sized. With a few tweaks in the code, you can make it much more aesthetically pleasing.

In the <head> section, add the <style> section:

<head>
...
    <style type="text/css">
@page {padding: 0pt; margin:0pt}
                        body { text-align: center; padding:0pt; margin: 0pt; }
    </style>
...
</head>


In the <body> section, just drop in this code snippet, but replace the src="" contents with the image file in your file. Example:

<body>
  <div>
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" version="1.1" viewBox="0 0 316 532" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
    <image height="532" width="316" xlink:href="../Images/9785567648623.jpg"></image>
    </svg>
  </div>
</body>

This should center and enlarge your cover image properly.

Wednesday, May 11, 2016

Firefox not recognizing googletalk plugins

I'm not sure if I can make this a full tutorial but this information is still useful for people.

Basically I'm running an instance of Firefox from a downloaded tar.gz file from the Mozilla website.

For some reason it wouldn't recognize the install system libraries for the  Googletalk plugin. So simply put, I did install the downloaded RPM from Google (or the DEB file if you are using Debian). And then I copies all the library *.so files to a folder in my home folder. Specifically this folder:

~/.mozilla/plugins

Just sharing in it helps anyone.

Thursday, May 5, 2016

Calibre Author and Title Sorting

So I quite like the eBook management program called Calibre. But it has a few bad defaults. It outputs titles in a weird name format saving to disk (and sometimes author names). And it sorts authors by default with last name first (even storing them as such). This is wrong.

To fix the author sorting (and author name output when saving to disk):

1) Start calibre
1) Go to Preferences -> Advanced -> Tweaks.
2) Use the search option to find: "Author sort name algorithm"
3) There will be a few panels, including an area with text you can input or edit. In this area, find the line which starts with: author_sort_copy_method. If it doesn't exist, then skip to step 5 and just add it.
4) Here you can change the author sorting algorithm. Above this text input area is a brief description of the accepted options. But changes are you want to use the word copy.
5) Set the line: author_sort_copy_method = 'copy'
6) Click the button to "Apply changes to this tweak"
7) Restart calibre. It will probably ask you to anyway.

Now the work begins. I hope you don't have a lot of authors.

8) Back in the main view of the program, there is a column with your authors listed by name. Right-click on an author. Choose 'Manage Authors'.
9) There will be a column simply named "Authors".
10) Go through the entire list and change every author to be in order you want. (You can do it bit by bit or all at once. It doesn't matter to press OK occasionally and repeat these steps.) To make an entry editable, double click it. You press enter when you are finished editing.
11) As you change the values in the "Authors" column, the value names in the column labeled "Author sort" will change.

Correct any of the author_sort values that are wrong in your mind. Calibre will sort by the value in that box, so it must make sense to you.

12) When you are done press OK. Calibre will resort all of your changes. This might take a while.

The authors displayed in the tag view and in the library pane should all change.

13) Repeat 8-12 until all authors are changed and all author_sort values are correct.
13) Lastly, select all your books in your library.
14) Press 'e' to open the bulk metadata edit dialog.
15) Check the box 'automatically set author sort'. DO NOT check/change any other box.
16) Press OK. Wait until done.


I'm just passing these instructions along for my own notes and reference. Credit for these originally goes to Chaley: http://www.mobileread.com/forums/showpost.php?p=1104427&postcount=3

Saturday, August 22, 2015

SSHD and Selinux

In Summary: Turn off SELinux. ALWAYS.

Sorry for the huge text, I just spent an hour in Fedora trying to get my firewall to allow SSHD to operate. No matter what I did, it would not work. Finally I disabled the firewall completely for debugging purposes, but it still wouldn't work! The error messages were no help!

Then, after raging at the machine for an hour, it dawned on me. This was a fresh install of Fedora. I hadn't disabled SELinux.

I can't believe how many times SELinux has bitten me in the ass. It never seems to work for anything good, but always hinder people. I consider myself a very advanced Linux User and I find it overly cumbersome. There needs to be a less.... ogre-like system put in place by default, like Ubuntu's Apper. That never got in my way BUT EVERY FLIPPING TIME SELinux has got in my way.

On systems with SELinux disabled, the SELINUX=disabled option is configured in /etc/selinux/config:
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#       enforcing - SELinux security policy is enforced.
#       permissive - SELinux prints warnings instead of enforcing.
#       disabled - No SELinux policy is loaded.
SELINUX=disabled

Go do this now. You will thank yourself. I've never heard of SELinux benefitting the average user. Ever. Ever ever ever. I'm sure someone in a corporate environment has had luck though, but they have someone on retainer there to babysit this monstrousity. And I pity that person.

Saturday, July 4, 2015

Gnome developers once again demonstrate the bad community approach

This may be old news to some but I was just bitten by it when upgrading to Fedora 22. Some of my favorite applications (Firefox among them) upgraded to GTK3.

Now GTK3 isn't supposed to be terrible. In fact I have come to seriously appreciate some of the keyboard accelerators in GTK2 File-saving and File-opening dialog windows.

But apparently effeciency, ease of use, understandability of design, and generally being good are something that the Gnome developers hate. Simply put:

GTK 3.10 Drops Menu Icons and Mnemonics

This is the new GTK3 default, unannounced as far as I can tell, and not publicly discussed. Thank you Gnome Developers. I wasn't aware Gnome is how you spell Microsoft.

Okay, I'm being a bit harsh but the Gnome project has a nasty habit of taking very very little public input and being a difficult community to penetrate. I've tried to join Gnome three projects in the past, bringing some patches and code features I'd made, but it was like talking to a black-hole.

This is one of the reasons I love KDE. They have a thriving vibrant community (and sure they make their mistakes but they keep fixing things, not breaking them and sipping their soy-bean lattes and pretend they are flawless).

I digress.

The Bad News Gets Worse

For now you can restore the missing menu icons. (But knowing Gnome I wouldn't hold out on that one lasting forever.) However...

No Mnemonics Either – At All
In addition, as you can see in the above shot, mnemonics have been removed entirely. These are where eg “Copy” in the menu has an underlined ‘C’, allowing you to press Alt+C to activate it. SpaceFM allows you to customize these too. Mnemonics have also been removed from dialog labels, meaning, for example, you can no longer press Alt+N in SpaceFM’s rename dialog to put the cursor in the Name box, and you can’t click an OK button by pressing Alt+O.
Unlike the missing menu icons, it appears that mnemonics have been permanently disabled. Per the GTK 3.10 docs: “gtk-enable-mnemonics has been deprecated since version 3.10 and should not be used in newly-written code. This setting is ignored.”

The Irony is Terrible

I guess it’s telling that the GIMP project, the original developer of GTK (GIMP Toolkit), is sticking to GTK2, and they’ve been told not to expect to be able to use GTK3 for such a robust app.

Monday, June 29, 2015

Firefox add on could not be installed because it appears to be corrupt

Just a quick reference for those out there that encounter this problem. Today I was having problems with Firefox failing to save any pictures to my harddrive. The moment I clicked "Save as..." the screen would blink and there would be a "Failed' item under my downloads list.

I tried Refreshing Firefox and also creating a couple of new Firefox profiles. But when I tried to Refresh or create a new profile, I encountered this error message:

"This add on could not be installed because it appears to be corrupt."

I have never seen this error before. Soon all the add-ons from Mozilla I tried to install were seemingly corrupt. More and more digging finally lead me to an unlikely problem:

On my Linux machine, the /tmpfs drive (located in /run/user/1000) had completely filled up. This has also likely been the source of problems with Ktorrent not functioning properly.

So to those who encounter this problem: Clear your tmpfs! I rebooted and it solved the problem temporarily.