I switched over to Arch and spent a long time trying to get my mouse working properly. Here is a quick and easy guide to getting Logitech MX Revolution mouse working.
Install the needed software
# pacman -S xbindkeys xvkbd xautomation
- xbindkeys is a program that allows you to launch shell commands with your keyboard or your mouse under X Window. It links commands to keys or mouse buttons, using a configuration file.
- xvkbd is a virtual (graphical) keyboard program for X Window System which provides facility to enter characters onto other clients (softwares) by clicking on a keyboard displayed on the screen.
- xautomation Control X from the command line for scripts, and do "visual scraping" to find things on the screen. The control interface allows mouse movement, clicking, button up/down, key up/down, etc,
Edit you xorg.conf file
# /etc/X11/xorg.conf
Insert this text in the mouse section
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
#Option "XAxisMapping" "6 7" #uncomment if you want horizontal scrolling with mouse wheel
Option "Buttons" "17"
EndSection
Create your xbindkeys configuration file
# touch ~/.xbindkeysrc
Edit your xbindkeys configuration file
# ~/.xbindkeysrc
Here is my file:
# forward
"/usr/bin/xvkbd -text "\[Alt_L]\[Left]""
m:0x0 + b:8
# back
"/usr/bin/xvkbd -text "\[Alt_L]\[Right]""
m:0x0 + b:9
# next tab
"/usr/bin/xvkbd -text "\[Control_L]\[Page_Up]""
m:0x0 + b:13
# previous tab
"/usr/bin/xvkbd -text "\[Control_L]\[Page_Down]""
m:0x0 + b:15
# undo closed tab
"/usr/bin/xvkbd -text "\[Control_L]\[Shift]\[t]""
m:0x0 + b:16
# mouse wheel left middle click
"xte 'mouseclick 2'"
b:6
# mouse wheel right middle click
"xte 'mouseclick 2'"
b:7
- I used xvkbd to emulate key combinations on my controller
and xte to emulate middle click
- use these examples to configure your own system
I didn't enjoy the search button so I turned it into a middle click button also
Add the foll0wing to
# /etc/sysctl.conf
# Enable mouse button emulation
dev.mac_hid.mouse_button_emulation = 1
# Set 2nd button to 217 - the middle button of MX Revolution mouse.
dev.mac_hid.mouse_button2_keycode = 217
Here is a reference for all the MX Revolution
# b:1 - left mouse button
# b:2 - left and right mouse button together
# b:3 - right mouse button
# b:4 - mouse wheel up
# b:5 - mouse wheel down
# b:6 - mouse wheel left
# b:7 - mouse wheel right
# b:8 - back button
# b:9 - forward button
# b:10 - -none-
# b:11 - -none-
# b:12 - -none-
# b:13 - media wheel up
# b:14 - -none-
# b:15 - media wheel down
# b:16 - -none-
# b:17 - media wheel press
Monday, July 1, 2013
Tuesday, January 29, 2013
Stop Chrome From Opening Up Web Links
I hate that once you install chrome on Ubuntu/Mint it takes over your system.
To resetthe default x-www-browser
run-
sudo update-alternatives --config x-www-browser
select the browser you'd like to open you x-www-browser links
To resetthe default x-www-browser
run-
sudo update-alternatives --config x-www-browser
select the browser you'd like to open you x-www-browser links
Monday, January 21, 2013
Fix Plex Permissions
Plex Meida Server wasn't able to "see" or add the contents of my Video folder.
I had to change the permissions:
sudo chmod 755 /home/USERNAME/FOLDER PATH
replace the USERNAME or FOLDERPATH sections as necessary
As soon as I did that my media added itself.
I had to change the permissions:
sudo chmod 755 /home/USERNAME/FOLDER PATH
replace the USERNAME or FOLDERPATH sections as necessary
As soon as I did that my media added itself.
Saturday, August 18, 2012
Remove old Kernels
In a terminal paste:
dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge
Monday, September 12, 2011
Setup HP LaserJet P1006 in Debian + Gnome
In the Gnome graphical printer interface
sudo apt-get install System-config-printer
Install the HP LaserJet drivers -
sudo apt-get install hplip
Configure the HP LaserJet printer -
sudo hp-setup -i
This will also work for many other HP printers.
sudo apt-get install System-config-printer
Install the HP LaserJet drivers -
sudo apt-get install hplip
Configure the HP LaserJet printer -
sudo hp-setup -i
Sunday, September 11, 2011
Apt-Pinning
Apt-Pinning allows you to install packages from testing/unstable/experimental on your Debian install without running into dependency and upgrade problems. It works by telling apt to give priority to one repository, in my case testing, and only install upgrades from it, while ignoring unstable and experimental unless I specifically request a package to be installed from them.
The Apt-Preferences Manual
You can find your apt-preference under /etc/apt/preferences
Debian installs do not come with a apt-preferences file.
To make apt-preference file:
My Apt Pining File -
To Install packages from other repositories:
sudo apt-get installPACKAGE NAME/unstable
- tries to install package trying to use the default (in my case testing) dependencies
sudo apt-get -t unstable install PACKAGE NAME
- installs the package using dependencies from unstable
*Replace unstable with experimental to install packages from Debian's experimental repository
The Apt-Preferences Manual
You can find your apt-preference under /etc/apt/preferences
Debian installs do not come with a apt-preferences file.
To make apt-preference file:
sudo touch /etc/apt/preferences
My Apt Pining File -
Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 900
Package: *
Pin: release o=Debian,a=unstable
Pin-Priority: 300
Package: *
Pin: release o=Debian,a=experimental
Pin-Priority: 100
Package: *
Pin: release o=Debian
Pin-Priority: -1
To Install packages from other repositories:
sudo apt-get install
- tries to install package trying to use the default (in my case testing) dependencies
sudo apt-get -t unstable install PACKAGE NAME
- installs the package using dependencies from unstable
*Replace unstable with experimental to install packages from Debian's experimental repository
Wednesday, June 15, 2011
Edit Webpages in Firefox
In the URL box enter: javascript:document.body.contentEditable='true'; document.designMode='on'; void 0
Friday, January 7, 2011
Configure the Synaptic Touchpad - Enable Multitouch Emulation
Source: The Debian Wiki Synaptics Touchpad Article
Written for Debian Squeeze, for the Dell Mini 9/10v & Vostro A90. The touchpad used in these models do not support multitouch gestures but it can be emulated.
Create an xorg
in a terminal:
Download my touchpad configuration file
- it contains all the options available for the synaptic touchpad driver.
- horizontal & vertical scroll, double tap and two finger middle click are enabled.
Copy the contents in my content configuration file into 50-synaptics.conf.
In a terminal:
- you can edit these values to further configure the touchpad driver to your liking.
Reboot your PC or restart x to apply these changes.
In a terminal:
sudo reboot
To learn what all the options do:
in a terminal:
I don't use two finger Mac-like scrolling but to enable it add these options to your 50-synaptic.conf file:
Written for Debian Squeeze, for the Dell Mini 9/10v & Vostro A90. The touchpad used in these models do not support multitouch gestures but it can be emulated.
Create an xorg
in a terminal:
sudo Xorg :1 -configure
Download my touchpad configuration file
- it contains all the options available for the synaptic touchpad driver.
- horizontal & vertical scroll, double tap and two finger middle click are enabled.
Copy the contents in my content configuration file into 50-synaptics.conf.
In a terminal:
sudo mousepad /usr/share/X11/xorg.conf.d/50-synaptics.conf
- if you do not use xfce replace mousepad with your desktop environment's text editor- you can edit these values to further configure the touchpad driver to your liking.
Reboot your PC or restart x to apply these changes.
In a terminal:
sudo reboot
To learn what all the options do:
in a terminal:
man 4 synaptics
I don't use two finger Mac-like scrolling but to enable it add these options to your 50-synaptic.conf file:
option "VertTwoFingerScroll" "1" # multitouch
option "HorizTwoFingerScroll" "1" # multitouch
Monday, December 20, 2010
Use Laptop Mode to Save Power Based on Battery/AC Status
Laptop mode is a Linux kernel feature that allows your laptop to save considerable power, by allowing the hard drive to spin down for longer periods of time. This package contains the userland scripts that are needed to enable laptop mode.
It includes support for automatically enabling laptop mode when the computer is working on batteries. It also supports various other power management features, such as starting and stopping daemons depending on power mode, automatically hibernating if battery levels are too low, and adjusting terminal blanking and X11 screen blanking
laptop-mode-tools uses the Linux kernel's Laptop Mode feature and thus is also used on Desktops and Servers to conserve power
To install laptop-mode-tools, in a terminal type:
sudo apt-get install laptop-mode-tools
To read the laptop-mode-tools user manual, in a terminal type:
To edit laptop-mode-tools settings, in a terminal type:
It includes support for automatically enabling laptop mode when the computer is working on batteries. It also supports various other power management features, such as starting and stopping daemons depending on power mode, automatically hibernating if battery levels are too low, and adjusting terminal blanking and X11 screen blanking
laptop-mode-tools uses the Linux kernel's Laptop Mode feature and thus is also used on Desktops and Servers to conserve power
To install laptop-mode-tools, in a terminal type:
sudo apt-get install laptop-mode-tools
To read the laptop-mode-tools user manual, in a terminal type:
man laptop-mode.conf
To edit laptop-mode-tools settings, in a terminal type:
sudo mousepad /etc/laptop-mode/laptop-mode.conf
- if you aren't using mouspad as your text editor replace mousepad with the correct program
Disable Google Instant & Preview
First install the Iceweasel/Firefox addon Adlock Plus.
- Go to Adblock preferences, you can find it under Tools>Adblock Plus Preferences.
- Add a new filter, you can find it under Filters>Add filter.
- Add this filter:
- Go to Adblock preferences, you can find it under Tools>Adblock Plus Preferences.
- Add a new filter, you can find it under Filters>Add filter.
- Add this filter:
- http://www.google.com/extern_js/
Sunday, December 12, 2010
Merge PDFs Files
Install pdftk. pdftk is a command line tool used to merge pdfs files.
In a terminal type:
Now you can merge pdf files by putting them in the same directory and in a terminal typing:
More options can be found on the pdftk website. pdftk can split files, encrypt, decrypt, password protect, rotate an image, etc.
In a terminal type:
sudo apt-get install pdftk
Now you can merge pdf files by putting them in the same directory and in a terminal typing:
pdftk 1.pdf 2.pdf 3.pdf cat output merged.pdf
- substituting the number for the names of the pdfs files.More options can be found on the pdftk website. pdftk can split files, encrypt, decrypt, password protect, rotate an image, etc.
Sunday, September 19, 2010
How to Properly Delete a Drive
Shred is a Unix command that can be used to securely delete files and devices so that they can be recovered only with great difficulty with specialized hardware, if at all1. It is a part of GNU Core Utilities.
Erasing a file usually only erases the file system entry and keeps the content of the file intact. This frequently allows the file to be recovered using commonly available software. Even if the file is overwritten, residual magnetic fields may allow data recovery using specialist hardware equipment.
To prevent this, shred overwrites the file multiple times using patterns chosen to maximize destruction of the residual data. The articles data erasure and data remanence have additional information.
Source: Wikipedia
To use shred in a terminal type:
sudo shred -vfz -n 3 /path to drive
This command is dangerous as it makes your files unrecoverable. Make sure you know what you are doing.
The -vfz part:
v, --verbose show progress
f, --forces change permissions to allow writing if necessary
z, adds a final overwrite with zeros to hide shredding
The -n 3 part:
Overwrite the disk 3 times, the default is 3
You can change the number depending on how thorough you want to delete your data. The more overwrites the longer the process. If you're really paranoid 10 will shred it for sure plus a couple more times.
The /path to drive is the most important. Make sure you have the correct path to your drive.
To list all drives currently connected to your PC in a terminal type:
sudo fdisk -l
Erasing a file usually only erases the file system entry and keeps the content of the file intact. This frequently allows the file to be recovered using commonly available software. Even if the file is overwritten, residual magnetic fields may allow data recovery using specialist hardware equipment.
To prevent this, shred overwrites the file multiple times using patterns chosen to maximize destruction of the residual data. The articles data erasure and data remanence have additional information.
Source: Wikipedia
To use shred in a terminal type:
sudo shred -vfz -n 3 /path to drive
This command is dangerous as it makes your files unrecoverable. Make sure you know what you are doing.
The -vfz part:
v, --verbose show progress
f, --forces change permissions to allow writing if necessary
z, adds a final overwrite with zeros to hide shredding
The -n 3 part:
Overwrite the disk 3 times, the default is 3
You can change the number depending on how thorough you want to delete your data. The more overwrites the longer the process. If you're really paranoid 10 will shred it for sure plus a couple more times.
The /path to drive is the most important. Make sure you have the correct path to your drive.
To list all drives currently connected to your PC in a terminal type:
sudo fdisk -l
Saturday, September 4, 2010
Thunar Dropbox
Thunar Dropbox is a plugin that adds context-menu items from dropbox into the Thunar file manager.
You can find a installation .deb on maato's softwarebakery site.
http://www.softwarebakery.com/maato/thunar-dropbox.html
For help installing Dropbox in xfce read my guide.
You can find a installation .deb on maato's softwarebakery site.
http://www.softwarebakery.com/maato/thunar-dropbox.html
For help installing Dropbox in xfce read my guide.
Friday, September 3, 2010
Add A User To A Group
In a terminal with root/super user privileges:
adduser username group
For example I wanted to add myself to the groups lp sys & lpadmin to remove a old HP print driver I had installed.
adduser username group
For example I wanted to add myself to the groups lp sys & lpadmin to remove a old HP print driver I had installed.
red@red-desktop:~$ sudo adduser red lp
Adding user `red' to group `lp' ...
Adding user red to group lp
Done.
red@red-desktop:~$ sudo adduser red sys
Adding user `red' to group `sys' ...
Adding user red to group sys
Done.
red@red-desktop:~$ sudo adduser red lpadmin
Adding user `red' to group `lpadmin' ...
Adding user red to group lpadmin
Done.
Thursday, August 26, 2010
Disbale Zoom in Iceweasel/Firefox
To access Iceweasel/Firefox's configuration settings, type about:config into the Awesome Bar (URL).
In about:config change:
The Original Values are:
In about:config change:
zoom.maxPercent : 100zoom.minPercent : 100toolkit.zoomManager.zoomValues : 1
The Original Values are:
In case you want to turn zoom back on.zoom.maxPercent : 300zoom.minPercent : 30toolkit.zoomManager.zoomValues : .3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.7,2,2.4,3
Tuesday, August 24, 2010
Fix Glipper Startup Bug
Glipper is clipboardmanager for GNOME. I use it extensively when writing. The only problem is that there is a bug that crashes Glipper when loading the GNOME desktop.
Glipper starts before a service it needs, resulting in this error message:
The panel encountered a problem while loading OAFIID:Glipper....
By adding a delay to Glipper at startup we can allow all need components to load before Glipper.
in a terminal type:
add these two lines at the top of the file to delay glipper from loading:
Your file should look very similar to this:
Glipper starts before a service it needs, resulting in this error message:
The panel encountered a problem while loading OAFIID:Glipper....
By adding a delay to Glipper at startup we can allow all need components to load before Glipper.
in a terminal type:
sudo gedit /usr/lib/ glipper/ glipper
add these two lines at the top of the file to delay glipper from loading:
import time- if your computer is older you might have to increase the (8) to a larger number.
time.sleep(8)
Your file should look very similar to this:
#!/usr/bin/env python
# Glipper - Clipboardmanager for GNOME
# Copyright (C) 2007 Glipper Team
# bla bla bla
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
#
import timetime.sleep(8)import gobject
gobject.threads_ init()
import gtk, gnomeapplet, gnome
import getopt, sys
from os.path import *
Monday, August 23, 2010
Install Skype in 64-Bit Debian Squeeze
In a terminal type:
then:
There is a know issue with Pulse Audio libraries crashing Skype in Debian Squeeze, use this work around:
In a terminal type:
install ia32-libs ia32-libs-gtk libqt4-core libqt4-gui
wget -O skype-install.deb http://www.skype.com/go/getskype-linux-beta-ubuntu-64
- This will install the 32-bit compatibility dependencies, download the Skype clientthen:
sudo dpkg -i skype-install.deb
- this will install SkypeThere is a know issue with Pulse Audio libraries crashing Skype in Debian Squeeze, use this work around:
In a terminal type:
sudo chmod a-r /usr/lib32/libpulse{-simple.so.0.0.2,.so.0.8.0,common-0.9.15.so}
Sunday, August 22, 2010
Generate an xorg.conf file
In order to generate xorg.conf you need to switch to a virtual console using the key combination CTRL + ALT + F1
Now execute the following commands:
sudo service gdm stop
- This command will stop the X.
sudo Xorg -configure
- this will generate the xorg.conf file in your home folder (the the proper location)
sudo mv ~/xorg.conf.new /etc/X11/xorg.conf
- move and rename the newly created xorg file to the correct location
sudo reboot
- to reboot the machine, and allow the changes to take effect.
Now execute the following commands:
sudo service gdm stop
- This command will stop the X.
sudo Xorg -configure
- this will generate the xorg.conf file in your home folder (the the proper location)
sudo mv ~/xorg.conf.new /etc/X11/xorg.conf
- move and rename the newly created xorg file to the correct location
sudo reboot
- to reboot the machine, and allow the changes to take effect.
Install Adobe Flash 32-bit in Debian 64-bit
Flash is a bit of a pain to get setup in Debian Squeeze 64-bit. Follow these commands and you'll be youtubing and huluing in no time.
In a terminal type:
sudo apt-get -y purge flashplugin-nonfree > /dev/null;
sudo apt-get -y install fakeroot binutils nspluginwrapper ia32-libs;
sudo wget http://people.debian.org/~bartm/flashplugin-nonfree/ia32-libs-workaround-499043-squeeze.sh; sh ia32-libs-workaround-499043-squeeze.sh;
sudo rm ia32-libs-workaround-499043-squeeze.sh;
sudo dpkg -i ia32-libs-workaround-499043_0.0.1+squeeze1_amd64.deb;
sudo rm "./ia32-libs-workaround-499043_0.0.1+squeeze1_amd64.deb";
sudo wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.deb;
sudo mkdir "/usr/lib/adobe-flashplugin" 2> /dev/null;
sudo rm -rf "/usr/lib/flashplugin-nonfree" 2> /dev/null;
sudo rm "/usr/lib/adobe-flashplugin/libflashplayer.so" 2> /dev/null;
sudo rm "/usr/lib/adobe-flashplugin/flashplayer.xpt" 2> /dev/null;
sudo dpkg -i --force-architecture "./install_flash_player_10_linux.deb" > /dev/null;
sudo rm "./install_flash_player_10_linux.deb";
sudo chown root:root "/usr/lib/adobe-flashplugin/libflashplayer.so";
sudo chmod 644 "/usr/lib/adobe-flashplugin/libflashplayer.so"
sudo nspluginwrapper --native --install /usr/lib/adobe-flashplugin/libflashplayer.so 2> /dev/null
In a terminal type:
sudo apt-get -y purge flashplugin-nonfree > /dev/null;
sudo apt-get -y install fakeroot binutils nspluginwrapper ia32-libs;
sudo wget http://people.debian.org/~bartm/flashplugin-nonfree/ia32-libs-workaround-499043-squeeze.sh; sh ia32-libs-workaround-499043-squeeze.sh;
sudo rm ia32-libs-workaround-499043-squeeze.sh;
sudo dpkg -i ia32-libs-workaround-499043_0.0.1+squeeze1_amd64.deb;
sudo rm "./ia32-libs-workaround-499043_0.0.1+squeeze1_amd64.deb";
sudo wget http://fpdownload.macromedia.com/get/flashplayer/current/install_flash_player_10_linux.deb;
sudo mkdir "/usr/lib/adobe-flashplugin" 2> /dev/null;
sudo rm -rf "/usr/lib/flashplugin-nonfree" 2> /dev/null;
sudo rm "/usr/lib/adobe-flashplugin/libflashplayer.so" 2> /dev/null;
sudo rm "/usr/lib/adobe-flashplugin/flashplayer.xpt" 2> /dev/null;
sudo dpkg -i --force-architecture "./install_flash_player_10_linux.deb" > /dev/null;
sudo rm "./install_flash_player_10_linux.deb";
sudo chown root:root "/usr/lib/adobe-flashplugin/libflashplayer.so";
sudo chmod 644 "/usr/lib/adobe-flashplugin/libflashplayer.so"
sudo nspluginwrapper --native --install /usr/lib/adobe-flashplugin/libflashplayer.so 2> /dev/null
Saturday, June 26, 2010
Hide The Star & Go Awesome Bar Buttons In Firefox
In you userChrome.css file copy found in ~/.mozilla/firefox/default/chrome:
save and restart Firefox
#urlbar-icons > #star-button
{
display: none !important;
}
#urlbar-icons > #go-button
{
display: none !important;
save and restart Firefox
Subscribe to:
Posts (Atom)
