Showing posts with label Firefox. Show all posts
Showing posts with label Firefox. Show all posts

Wednesday, December 1, 2021

Vimium, the hacker's browser

Vimium is an essential tool for those looking to increase their productivity regardless if you're on Windows, Mac or Linux. Read to understand.
Photo by James Pond on Unsplash

If you read this blog before, you probably know my perfect setup: Fedora Linux, the i3 window manager (or Sway), the terminalRangerVim and lot, lots of automation. I got to this setup after meticulously searching for tools that could improve my workflow so I could be more productive, doing less. However, during that journey I realized that the browsing experience  - which takes a lot of our productive time - wasn't as optimal as it could be, so I started looking for ways to optimize it as well.

Turns out that Vimium is the key ingredient on that setup. On this post, let's learn what Vimium is, what it offers, how to use it, and how you too can be more productive, regardless of what your perfect setup might be.

About Vimium

So what's Vimium? Vimium's is a browser extension that provides keyboard shortcuts for navigating and controlling your browser inspired by the Vim text editor.

But why use Vimium?

So why should you care for yet another browser extension? Because Vimium:
  • will increase your productivity: by allowing you navigate the web without using the mouse.
  • makes you work faster: when you get used with Vimium you'll be able to accomplish work faster.
  • is highly customizable: allowing you to set your own keyboard shortcuts
  • is simple to use: once you understand how it works, it'll be very intuitive
  • has Vim-like keybindings: this is what makes Vimium 
  • helps reducing your fatigue: during the day, we do thousands of movements from the keyboard to the mouse. Keeping your hands centered on the keyboard will save you a lot of energy.
  • is an active open-source project: mature and healthy open-source projects are important as they guarantee you'll receive updates, fixes and improvements. You can find it's source code here.

Supported browsers

Currently Vimium runs on most browsers including Google Chrome, Firefox, Edge and Brave.

Why based on Vim?

Contrary to what you may have heard, Vim is a fantastic text editor. Vim emphasizes good typing practices by leveraging the keys located around the home row. The home row (F and J) is the most efficient place to place of your fingers causing less muscular stress and reduced arm movement. Vimium brings these concepts to the browser, transforming the traditional point-click browsing experience into productivity through the use of the keyboard.

Installing Vimium

Installing Vimium is very simple. Just open the app store for your browser and click Add extension (or equivalent) button on the extension page. Google Chrome users check this page, Firefox users can find Vimium here.
Installing Vimium on your browser should be as simple as navigating to the links above, clicking the Add extension button and confirming. No restart is necessary.

Using Vimium

With Vimium installed, let's start with the basics. The most essential shortcuts are:
  • f: pressing f will make Vimium highlight all hyperlinks. Entering the key opens the link on the same tab
  • F: same as f but opens on another tab
  • x: close the current tab
  • j: scroll down
  • k: scroll up
  • d: scroll down half a page
  • u: scroll up half a page
  • gg: scroll to top of the page
  • G: scroll to bottom of the page
  • H: go to the previous page
  • L: go the the next page 
  • b: open a bookmark
  • /: search
Vimium does not run on all pages. If the V icon on your bar is grey, it's turned off.  Vim also does not run by default on Private Mode but you can configure it to, on the extension settings page.

Managing Tabs

Vimium can also manage your tabs. The most used commands are:
  • x: close the current tab
  • F + link: opens link in another tab
  • J: previous tab
  • K: next tab
  • g<num>: goes to tab <num>
  • t: create new tab
  • yt: duplicate current tab
  • X: undo close tab

Getting Help

With Vimium installed, press ? to view the default shortcuts. You should see a screen like this:

A simple example

So let's do a simple example if possible, by just using the keyboard. With Vimium installed, open its GitHub page and press f. You should see:
As you can realize, all the yellow boxes contain letters inside. Typing them will tell the browser to click those links. For example, if I pressed S, I'd be taken to the link that here points to on the same tab. Need to continue working? Just open a new tab and go from there. Change tabs with J or K (uppercase), close with x, rinse and repeat.
I used F instead of f, typing S next would open here in another tab.

Advanced Features

As previously said, Vimium is also highly configurable. Because it's out of the scope of this post, will simply point you to the official configuration. There's a lot more there and once you get used with the tool you'll probably want to explore and customize it to your needs.

Conclusion

On this post we explained why using Vimium may yield good results by increasing your productivity and reducing your fatigue. I hope you are excited to try it out. If you want to learn other productivity hacks, check the Ranger file manager and the Vim text editor. Together with Vimium, these tools will make your workflow way more productive.

See Also

Monday, July 1, 2019

How to create a Ubuntu Desktop on Azure

We have multiple Linux offerings on Azure for the server but none for the desktop. How can we build one hassle-free?

Photo by XPS on Unsplash

Azure offers a variety of Linux servers including RHEL, CentOS, Debian and Ubuntu. But no desktop. As developers, it would be nice to have access to a development VM on the cloud with a GUI and software like Visual Studio Code and Chrome.

On this post, let's see how to install the necessary software to transform an Ubuntu server into a functional Ubuntu desktop including the necessary procedures to RDP into it from Windows, Mac and Linux.

What we will do

On this tutorial we will install the following tools:
If you need Visual Studio Code, please follow this tutorial.

Creating the Instance

The base image for our desktop will be Ubuntu Server 18.04 LTS. As this is a server image, it doesn't contain a GUI. We will install it ourselves as long as a browser and a tool to connect remotely via RDP. By default we can connect to it via SSH using our WSL or Putty. In Azure, click "Create a Resource" then select Ubuntu Server 18.04 LTS.

When this post was created 18.04 was the last LTS but now we have 20.04. Feel free to use it if you prefer. The steps are exactly the same!

Configuring the VM

Now let's configure the VM. Here we will set the username, password, VM name, resource group, region, etc that are adequate to you. For example, my configuration is show below:

Setting up Disks

The next step is disk setup. I selected Premium SSD with 10GB as seen below:

Setting up the Network

For the network interface, I created a new VNet/Subnet and requested a new IP. Note that the IP will only be available to us after creation. You also need to open inbound ports for SSH (22) and RDP (3389) as we'll need them later to access our instance remotely later: 

Review and Create

Review and if everything's correct, click on Create to proceed:
After a couple of minutes the instance should be created and running.

Connecting to our Instance

Once our instance is deployed, let's connect to it. Depending on how you configured during creation, it can be accessed via username/password or via SSH. You should use Azure's overview window to get important information as IP address and username.

To access it, click the Connect tab from where you should see:

Because I configured ssh and uploaded my ssh key, I simply have to open my WSL and enter the following command:
# connect to my remote server using ssh
ssh bruno@<my-ip>
This is the output of my first connection to that VM:
If you chose to provide an username/password during creation, you're still good to connect via SSH. The only difference is that you'll have to provide your password upon connection.

Diagnosing Connection Issues

If for some reason you get:

ssh: connect to host 13.66.228.253 port 22: Resource temporarily unavailable
it's because the port 22 (SSH) is not open for connection externally. And that's a good thing! It pretty much tells us that our connection is being blocked by a firewall. By default in Azure, VMs are wrapped into a Network Service Group (NSG) which is an extra layer of protection to our cloud artifacts. It basically provides full control over traffic that ingresses or egresses a virtual machine in a VNet.

In order to expose that port, click on the Networking tab to change the inbound rules:
To add a new one, we click the Add inbound port rule button and enter the rule as below:

Security Considerations

Please note that it's recommended that you only expose ports that are essentially necessary to to security threats. In our example, we should only expose ports 22 (SSH) and 3389 (RDP). It's also recommended to configure your NSG to restrict access to your IP only.

Once that's done, try to connect again with:

# connect to my remote server using SSH
ssh bruno@<my-ip>

Installing the Required Tools

With the VM up and running and with SSH access to it, it's time to install the required tools to make our server more user friendly. Remember, we'll have to install a desktop manager, some CLI tools and Firefox.

Updating the system

The first thing to do should be updating the system and the list of packages available to your Ubuntu instance with:
# Updating the package Sources
sudo apt update && sudo apt upgrade -y

Installing the CLI tools

The next step is to install useful CLI tools to work (some of them are already pre-installed with the Azure/Ubuntu image):
# install basic terminal tools
sudo apt install tmux git ranger vim

Installing LXDE

Now, let's install our desktop (LXDE). The good news is that Canonical, the good folks behind Ubuntu, already provide a metapackage called lubuntu-desktop that contains not only LXDE but Firefox and other very useful GNOME tools. We install it using the following command:
sudo apt install lubuntu-desktop -y
Please note that this installation take a while as ~2GB of files have to be downloaded and installed on your server.

Setting up Xrdp

The last and final step is to install Xrdp. As previously mentioned, this tool is required to connect to our instance using RDP. This installation downloads ~8Mb and runs very quickly after the above commands. Type the following on the shell:
# install xrdp
sudo apt install xrdp -y
Next step is to start the xrdp service so we can connect to it via RDP.
# start the xrdp service
sudo systemctl start xrdp

Connecting via RDP

All should be good to go now so let's try to connect to our machine. Simply enter the IP address on the RDP information and hit connect. On mine, I got the prompt:
Note that if when creating your VM on Azure you selected SSH, you have to setup a new password for your user. This is done with:
# setting up a new password for our user
sudo passwd bruno

LXDE 

If you enter your password correctly, you should login to your LXDE session. This is my awesome LXDE session running on Azure. By clicking on the blue icon above you'll have access to all the software included with the metapackage:

Persisting Changes

What happens after a reboot? Will the VM still run Xrdp? No. Unless we make the service permanent. If that's what you want, do that by running the below command on the terminal:
# permanently enable the Xrdp service during boot
sudo systemctl enable xrdp

Final Thoughts

The cloud is an awesome environment to test new things out. On this example I used Azure but you could reproduce pretty much everything here on your cloud provider of choice. It's also important to remember that two of the most fundamental aspects of a Linux system are customization and extensibility. So, installing/changing a GUI, trying out different software, adding/removing repos, etc should be simple on the cloud as is on a local VM. And that shouldn't prevent us from being creative and using our imagination.

I encourage you to play with Azure or your preferred cloud provider and experiment not only with a Ubuntu Linux VM but other operating systems. It's all a few clicks away and a fantastic learning experience!

References

See Also

Tuesday, November 14, 2017

Why use Firefox

Understand why Firefox is still the best browser for those looking to keep their privacy online.
If you have been following this blog, you may know that I've been discussing the importance of security and privacy. If not, please read how we are being tracked without consent everywhere: by search engines, browsers, mobile apps, social networks, TVs, games, devices, etc. Turns out we're living in difficult times for those seeking privacy

My Favorite Firefox Features

Apart from its privacy-first commitment, let me list my favorites of  Firefox.

Performance

This version of Firefox is 2x-faster than a year ago, significantly faster than Chrome. Do not believe? Check the video below for a quick comparison between the performances of Firefox and Chrome.

Lightweight

Firefox made significant improvements to its new engine and now uses 30% less memory than Chrome:
Source: https://www.mozilla.org/en-US/firefox/quantum/

Development Tools

Every developer deserves an awesome development environment. Firefox Quantum ships with a completely revamped DevTools with multiple improvements included. Check more on this blog post to find out more.
Source

Privacy Considerations

As previously said, Firefox is the only browser committed to privacy. Even Brave who marketed themselves as the best privacy-oriented browser were caught replacing ads with their own and probably also tracking you.

Beautiful UI

And, my last personal favorite: the new Photon UI. Simply gorgeous:
Source: https://hacks.mozilla.org/2017/09/firefox-quantum-developer-edition-fastest-firefox-ever/

Mobile

I've used many browsers on different mobile devices and honestly, never have been completely satisfied. Lately, I've been using Firefox Focus and if you want speed, privacy in a lightweight browser, you got it there:
Source: https://www.mozilla.org/en-US/firefox/focus/

Contributions to the Open Standard

Apart from Firefox, Mozilla has been doing very important advances in open science in:
  • Gaming: WebAssembly & WebGL;
  • MDN: extensive documentation on web technologies including HTML, CSS, and APIs for both Web sites and progressive web apps.
  • WebVR: an incubator for virtual reality on the web;
  • Servo: an amazing parallel browser engine 
  • Rust: an amazing open-source programming language that focuses on speed, memory safety and parallelism.
  • Open Codecs: if you use Linux, you know what I mean...
  • Speech and Machine Learning

Conclusion

If you agree with me and thing that it's time for a more open web, more privacy and security, join me and millions of other users and start using Firefox again! So what are you waiting for? Go get your Firefox right now!

See Also

Monday, October 30, 2017

It's time to Firefox again

Understand why now is the best time to start using Firefox again

On a previous post, I listed ways we are being tracked without consent by search engines, browsers, mobile apps, social networks, TVs, games, devices, etc. Hopefully by now, you understand why we all should be concerned with security, ethics and privacy.

But before we discuss privacy and why we should reconsider Firefox, I thought it would be interesting to do a quick recap on web browsers, this omnipresent tool in our lives.

Market Share

Today, Firefox has about 13% market share. A huge decrease if we consider that it originates from Netscape, which had close to 80% of the market two decades ago.

Source: https://www.statista.com/statistics/268254/market-share-of-internet-browsers-worldwide-since-2009/

To understand how that happen, let's take a quick look at the browser market history

The First Browser War

Back in 1995, Netscape sailed in calm waters until a Internet Explorer 1.0 was released by Microsoft. That was the beginning of what's called the first browser wars.

According to Wikipedia:
  • By mid-1995, Netscape Navigator was the most widely used web browser and Microsoft had licensed Mosaic to create Internet Explorer 1.0 which it had released as part of the Microsoft Windows 95 Plus! Pack in August.
  • Internet Explorer 2.0 was released as a free download three months later. Unlike Netscape Navigator it was available to all Windows users for free, even commercial companies.
  • Internet Explorer 4 changed the tides of the browser wars. It was integrated into Microsoft Windows, which gave it a large installation base.

Quickly, the Windows-IE integration brought excellent results to Redmond. Now, Microsoft had two advantages in the browser market:
  • Resources - Microsoft had way more financial resources than the relatively small company that essentially had a single product (Netscape Navigator)
  • IE was bundled with Windows - since Windows had over 90% share of the desktop operating system market, IE quickly gained adoption.

Fast dominance, Slow innovation

But the market share dominance certainly was not good for consumers. A period of slow innovation started:
Microsoft was able to dominate the market share easily as customers had it as the default browser. This also brought an end to the rapid innovation in web browsers; until 2006 there was only one new version of Internet Explorer since version 6.0 had been released in 2001.

The market remained stalled for a few years until a new contender entered the market: Google Chrome.

The Second Browser War

The Chrome browser was released on December 11, 2008, using the same WebKit rendering engine as Safari and a faster JavaScript engine called V8. Google replicated Microsoft's aggressive strategy and embedded Chrome in Android. Quickly we saw Chrome surpassing Firefox and IE to reach the top spot:

Chrome Advances

Let's be honest: Chrome indeed brought us many advances. To name some: simple bookmarks and settings synchronization, web standards support, malware blocking, plugins, incognito mode, speed, stability, desktop apps, its web store, extensions, themes, automatic web page translation, release channels, frequent release cycles, etc. That's a lot!

But remember, they weren't the first to create most of these features. Firefox (and Opera) had most of those features way before them:
  • themes;
  • a web store;
  • extension support;
  • plugin support;
  • incognito mode;
  • web standards support;
  • developer tools;
  • do not track;
  • automatic updates;

The Strategy

The history repeated itself: a company with OS dominance embed  their browser and foster it as the best for you on all its channels. Example, if you go to Google.com today using Firefox you will see:
 

Source: google.com (using Firefox)

Because Chrome is embedded in Android (the most popular mobile OS), has tight integration into other Google services and to ads like the above, people keep ditching alternatives and just using Chrome.

The problem

As always, problems begin when you dominate the market share. Impartial practices, disrespect to open standards, privacy concerns and all sorts of other issues happen. Common complaints in the past are now back with Chrome:

The solution

The solution is a more open Web, not a web governed by one or two companies but internet for people, not for profit. It has to include open standards, open formats, strong security and privacy that protect the users.

It's internet for the people, not for profit

Source: https://www.mozilla.org/en-US/

Unfortunately, the web today has problems. Security, ethics and privacy are not being respected and we should work together to improve it. And it will start with us, the users. It should start with our search engines and with our browser.

Firefox

That's why my browser of choice is Firefox. Because I want my privacy respected, because I want a more open web, because I support open-source software, because it has excellent development support and it's super fast!

Enhanced Tracking Protection

To get better, Mozilla has been working on the Enhance Tracking Protection feature. Starting on Firefox 63, users will be able to block all third-party cookies so they are not tracked while browsing the web.


Fast, Lightweight and Private

Bonus: Firefox Focus

I've used many browsers on different mobile devices and honestly, never have been completely satisfied. Lately, I've been using Firefox Focus and if you want speed, privacy in a lightweight browser, you got it there:
Source: https://www.mozilla.org/en-US/firefox/focus/

Conclusion

We are being tracked without consent by search engines, browsers, mobile apps, social networks, TVs, games, devices, etc. Hopefully by now, you understand why we all should be concerned with security, ethics and privacy.

There are alternative search engines and browsers that respect your privacy. Why not try and spread the word?

References

See Also

About the Author

Bruno Hildenbrand