Thursday 20 April 2017

Fixing the Non-Working Thinkpad T510i Mic Mute Button on Ubuntu MATE 17.04

So, apparently, the mic mute button stopped working in Ubuntu. I remember it working in Ubuntu 16.04 but not 17.04. Anyways, I fixed it with this simple instruction from a user on AskUbuntu.

https://askubuntu.com/questions/125367/enabling-mic-mute-button-and-light-on-lenovo-thinkpads

This is what I did to fix the mic mute button on the Thinkpad T510i. The LED on it works now too. If you have a different Thinkpad, I suggest following the full tutorial on the AskUbuntu link above.

Anyways, this is what I did:

Created the file /etc/acpi/events/lenovo-mutemic

with the contents:

event=button/f20 F20 00000080 00000000 K
action=/etc/acpi/lenovo-mutemic.sh

Created the file /etc/acpi/lenovo-mutemic.sh

with the contents:

#!/bin/bash
INPUT_DEVICE="'Capture'"
YOUR_USERNAME="username"
if amixer sget $INPUT_DEVICE,0 | grep '\[on\]' ; then
    amixer sset $INPUT_DEVICE,0 toggle
    #echo "0 blink" > /proc/acpi/ibm/led
    su $YOUR_USERNAME -c 'DISPLAY=":0.0" notify-send -t 50 \
            -i microphone-sensitivity-muted-symbolic "Mic MUTED"'
else
    amixer sset $INPUT_DEVICE,0 toggle                       
    su $YOUR_USERNAME -c 'DISPLAY=":0.0" notify-send -t 50 \
            -i microphone-sensitivity-high-symbolic "Mic ON"'
    echo "0 on" > /proc/acpi/ibm/led 
fi

Important: Replace username with your Linux username.

Find your Linux username by typing "whoami" in the terminal.

Finally, I did this:

sudo chmod +x /etc/acpi/lenovo-mutemic.sh
sudo service acpid restart

Thank you random user on AskUbuntu!

How To Fix Graphical Glitches in Serious Sam Classic TFE & TSE under Wine

I wanted to play Serious Sam Classic: The First Encounter on my Thinkpad running Linux. (Ubuntu 17.04)

Unfortunately, the native Linux version doesn't run for me, for some reason. Maybe it's to due to the Intel graphics drivers. I also tried compiling the open source release of the Serious Engine but that failed to compile.

So, I decided to run it in Wine. Which "worked", but had severe graphical glitches making the game unplayable.

Apparently this is due to a "non-existant Z-buffer". To fix this, in Serious Sam The First Encounter or The Second Encounter, open the in-game console, either F1 or ~ . Then, type these 2 lines and press enter after each one:

/gap_iDepthBits=24
/ApplyVideoMode()

That should fix the issue.

Source: https://appdb.winehq.org/objectManager.php?sClass=version&iId=2288

Tuesday 31 January 2017

[Quick Linux Tip] Stuttering/Lagging in Games or Emulators on the Cinnamon desktop? If you have a System Monitor Applet, Remove it. [Updated]

What the title said.

[Updated, see below.]

I noticed for about a year that my emulators (Gens, Kega Fusion, Fceux, Nestopia) etc would stutter while playing and that was incredibly annoying. It made me want to use my Android device (Moto G 2014) for emulation more than my laptop because of how smooth it was.

Then, I remembered listening to a certain Linux podcast where the host had the same issue, I believe he was using the Gnome desktop, but it applies to Cinnamon as well as they are based on the same technology. The solution is to remove the System Monitor applet if you have one. Of course, if you don't have a System Monitor applet, this won't help. My only other solution for you then, is to play your emulators in fullscreen mode. That's not ideal, though.

I like being able to monitor CPU and network usage, because "OCD", but performance is more important to me. Besides, who wants to play Sonic the Hedgehog with microstutter? Gotta go fast!

Update: I found a System Monitor applet which does not cause any (noticeable) stutter. Here's the link to it:

https://cinnamon-spices.linuxmint.com/applets/view/88

Also, here's the link to the applet that does cause stutter:

https://cinnamon-spices.linuxmint.com/applets/view/79

Saturday 7 January 2017

Modified Reddit Enhancement Suite for Pale Moon web browser

Reddit Enhancement Suite is one of the first addons I install when setting up any browser. It is one of those addons you don't know you need until you start using it.



My favorite feature in RES is the "never ending Reddit" feature. I can infinitely scroll Reddit without having to deal with pages. Does Reddit even have pages anymore? I don't know, because I always use RES.

Unfortunately, it is not available officially for Pale Moon. That said, Pale Moon forum member "JustOff" has hacked together a fixed version of Reddit Enhancement Suite which you can find here:

https://github.com/JustOff/pm27-sdk-addons

To install it, click the "Download" button corresponding to the addon you want (Reddit Enhancement Suite in this case) in the "Fix for PM27" column.

I tested this version, and it works as expected.

Thank you JustOff!

How to install and use mpv to watch streaming video in Ubuntu 16.04 or Linux Mint 18.x



mpv is an open source cross platform media player for Linux, Mac OS X, Windows, and BSD. It is excellent for watching streaming video when coupled with another piece of software youtube-dl. mpv is a nice alternative to watching videos in the browser, as you don't have to use flash or a buggy ad-ridden website.

This tutorial will show you how to install and use an up to date version of mpv and youtube-dl on Ubuntu 16.04 and Linux Mint 18.x (18, 18.1, and whatever point release comes after that)

Installing mpv

 

mpv is already in the Ubuntu 16.04 repository, but I will show you how to install an updated version.

Please follow my instructions carefully, also, if you have added any other updated media library PPAs, please purge them with ppa-purge before adding these ones. This tutorial is meant for people who have the default media libraries that came with Ubuntu 16.04 or Linux Mint 18.

If you have messed with your system, purge any other media lib PPAs with:

$ sudo ppa-purge -d xenial ppa:some/ppa

The dollar sign is not part of the command, it's only to represent that this is a terminal command. Change some/ppa to the ppa you want to purge.

Ok, now to get on with the tutorial.

Step 1. Type this in the terminal (or copy and paste)

$ sudo add-apt-repository ppa:mc3man/mpv-tests -y && sudo add-apt-repository ppa:mc3man/xerus-media -y && sudo apt update && sudo apt install mpv && sudo apt dist-upgrade

Make sure to look at the programs and libraries that will be updated, and press 'y' once you're confident.

Once you're all updated and mpv is installed, install youtube-dl.

$ sudo apt install python-pip

$ sudo pip install youtube-dl

To upgrade youtube-dl if it ever gets outdated, do this:

$ sudo pip install youtube-dl --upgrade

Now we'll continue to the next part.

Using mpv & youtube-dl

 

To use mpv, simply paste a video URL such as a youtube video, or any other supported site after the 'mpv' command.

So, for example:

$ mpv https://www.youtube.com/watch?v=dQw4w9WgXcQ

That will play a popular YouTube video in an mpv video.

To use  youtube-dl (to download a video)

$ youtube-dl https://www.youtube.com/watch?v=dQw4w9WgXcQ

To find a list of options youtube-dl has, type:

$ youtube-dl --help

mpv supports all the video sites youtube-dl does.

The list of supported sites can be found at: https://rg3.github.io/youtube-dl/supportedsites.html

mpv has a barebones user interface, it has keyboard shortcuts you can use to play and pause the video (spacebar), and to fast forward and rewind you can use the arrow keys. For more shortcuts, look up the documentation on mpv with:

$ man mpv (to view the manual)

To install a fully featured GUI for mpv (like VLC has), type this:

$ sudo apt install baka-mplayer

(assuming you added those two PPAs)

It will show up in the menus as "Baka-MPlayer"

I hope you found this tutorial useful.

Pale Moon and why it may be a Firefox fan's only hope



Yesterday I blogged about Seamonkey, a community-run project affiliated with Mozilla. While I like Seamonkey, after googling about the upcoming deprecation of XUL based addons in Firefox (which is a bad decision because it basically makes Firefox a Chrome clone), I noticed that people were saying that Seamonkey will probably follow suit, as they are a much smaller team, and will likely follow whatever bad decision Mozilla ends up making.

In the past few years, Mozilla has been removing useful features from Firefox and announcing that it will remove even more, alienating its core userbase in the process. These days, they (Mozilla) are basically acting like children, putting their fingers in their ears shouting "Na na na na I can't hear you!" at any criticism they get.

I know in the past blog post I said I stopped using Pale Moon for "various reasons", well... I don't remember what those reasons were. Maybe it was because I thought Firefox wasn't going to go down this route.

Thankfully, Pale Moon isn't going to be deprecating the XUL based addons. (As far as I know from what I've read) It also is compatible with way more addons than Seamonkey is. It is a fork of an old version of Firefox, but modified and updated, and they forked Gecko and called it Goanna.

One downside is, that it is a much smaller team then Firefox. That could be said about any fork, though.

To install Pale Moon in Linux, you can use the Pale Moon installer. That is what I am currently using. However, you can also install it with the third party yet fully endorsed repository for Debian and Ubuntu (and Linux Mint + any other Ubuntu derivative) here: LINK

For more information about Pale Moon, visit it's official website at:
https://www.palemoon.org/

Friday 6 January 2017

Seamonkey - An Alternative to Firefox - Plus, my recommended themes and addons

Firefox on Linux is good these days, but it can be a bit bloated. I was using Firefox as my main web browser for a while now, but I wanted something more 'lightweight' with relatively the same amount of features. I previously blogged about Pale Moon, but I don't use that as my main browser anymore for various reasons.

I found Seamonkey, which is a community-run continuation of the "Mozilla Application Suite" based on the same source code, but updated with newer Mozilla code bases. (Thanks Wikipedia! :P)



Seamonkey includes a lot of the same features as Firefox, it supports some of the same addons, but looks like it's from 2005. The way it looks isn't really a problem for me, as I prefer function over form. I did tweak the look with some addons though, which I'll show later.

The reason I use Seamonkey is it is faster and less bloated than Firefox while having a lot of the same (if not more) features.

You can install Seamonkey in Ubuntu or Linux Mint by downloading it from the website, but in my opinion it is better to install it via adding the ubuntuzilla repository, which you can do with the following commands on the ubuntuzilla web page on sourceforge:

https://sourceforge.net/p/ubuntuzilla/wiki/Main_Page/

Also I recommend launching it with firejail to improve security.

$ sudo add-apt-repository ppa:deki/firejail -y && sudo apt update && sudo apt install firejail -y

Then launch seamonkey with firejail.

$ firejail seamonkey

(without the dollar sign, that's just meant to show these are terminal commands)

Also, use menulibre to change the seamonkey launcher so it launches with firejail.

Now, the addons I recommend:

First off, one of my favorite addons is Greasemonkey. The official version of it doesn't support Seamonkey, so you'll have to get a ported version from here: https://sourceforge.net/projects/gmport/. Just grab that xpi and you'll be able to use all your favorite userscripts.

Now here's some other addons, also, if you have a problem with a grey download button saying the addon is not compatible, sometimes it's as easy as clicking that button and clicking "install anyway", and chances are it will still work.

In alphabetical order:

Chatzilla - IRC client
Compact Menu 2
Copy Plain Text 2
DownThemAll!
Flagfox
Flashgot
Foxyproxy Standard
Greasemonkey (duh)
HTTPS Everywhere
Lastpass
Noscript
Open With (to open videos / links with MPV, VLC, or another web browser etc)
Private Tab
Sea Fox (Make Seamonkey look like Firefox 3.0)
Slim Add-ons Manager
Stylish (for user styles)
Tabs Open Relative
uBlock Origin
User Agent Switcher

The theme I use is "GNOMErunner".

If you have any suggestions on addons to get, let me know, as I only just started using Seamonkey.
______________________________________________________

This is what Seamonkey looks like with my setup: