Monday, June 16, 2014
My favorite Ubuntu tips
Over the years I have compiled a list of things that I have found handy for my hardware and software needs in Ubuntu.
1) Oracle Java 7 installation:
There are a few java applications in this world that simply will not work with iced tea plugin and openjdk. (Minecraft comes to mind)
So thanks to the webupd8 team, I run this script and install Oracle Java 7.
sudo add-apt-repository ppa:webupd8team/java && sudo apt-get update && sudo apt-get install oracle-java7-installer && sudo apt-get install oracle-java7-set-default
2) Synaptics touchpad kill code:
For some reason I needed this code to keep my touchpad dead (I always get strange issues when typing if it's running).
This issue was resolved for me thanks to Xubuntu 14.04, but if I still feel like running something like openbox, it's still needed.
xinput set-prop 12 "Device Enabled" 0
The 12 is in response to the device number for my synaptics touchpad.
you need to run the command: xinput list to find what device number your pad is.
Here's where I found this useful tip:
3) Slow Google Chrome, especially Google Plus:
Google Plus can just drag, not certain why. Although I have seen an improvement as of late.
Thanks to Stormy Henerson, this is how to rememedy that:
Type chrome://flags in Chrome's address bar (without putting "http://" first). Under the heading GPU compositing on all pages change the value in the drop-down box from Default to Disabled. Restart Chrome.
And whalla, Google Plus on Google Chrome speeds up considerably.
Here's the original article:
4) Disable Pidgin Notifications in Ubuntu:
Man pidgin can be annoying. Once upon a time I had pidgin set up as chat for facebook.
While it's interesting to see how many times your friends leave and then 5 minutes later come right back to the page, that interest soon changes to annoyance, as pidgin feels it needs your rapped attention about every status change under the sun.
To change your popup settings, open Pidgin and navigate to the tools -> plugins menu, or push the shortcut key Ctrl+U.
Scroll down to libnotify popups and click configure plugin.
Uncheck any items you don’t want to be notified about and close the settings. Now only the notifications you want will pop up.
Thanks to howtogeek for this one.
5) Audio that skips/jumps every so often:
This is a pulseaudio issue. While it's better for some reason in Xubuntu 14.04, it's still there.
1. Remove PulseAudio
This will uninstall PulseAudio, delete the configuration files and uninstall it's dependencies; gstreamer-10-pulseaudio, libpulse-browse0, libpeexdsp1, pulseaudio-esound-compat, pulseaudio-module-udev, pulseaudio-module-x11, pulseaudio-utils, rtkit and gnome-desktop (don't worry, it is dummy package):
sudo apt-get purge pulseaudio
2. Install alsa-mixer (volume) applet
PulseAudio removes volume applet, so you need new volume applet. For getting it to work, you need to intall the following packages: python, python-notify, python-gtk2, python-alsaaudio and xfce4-mixer or gnome-alsamixer (i prefer xfce4-mixer).
sudo apt-get install python python-notify python-gtk2 python-alsaaudio python-eggtrayicon xfce4-mixer
Extract all files for example into /usr/local/bin directory:
sudo tar -C /usr/local/bin/ -xzvf alsa_mixer_applet_1.1.tar.gz
Make all files executable (if they're not):
sudo chmod +x alsa*
sudo chmod +x volbar.py
If you want to use your keyboard's volume hotkeys, you have to set them in System > Preferences > Keyboard Shortcuts. Click Add.
Name: ALSA Volume mute
Name: ALSA Volume down
Name: ALSA Volume up
Then click on Disabled in the second column and map your hotkeys for these actions.
Finally the programs volbar.py and alsavol.py have to be set to start automatically. This can be set under System > Preferences > Startup Applications. Click Add:
Note: If you have installed gnome-alsamixer instead of xfce4-mixer, you need to edit volbar.py
sudo gedit /usr/local/bin/volbar.py
Find the line 97 and replace xfce4-mixer to gnome-alsamixer:
Now restart your computer and test, if everything is working.
This is the file you will need: http://howto.blbosti.com/files/alsa/alsa_mixer_applet_1.1.tar.gz
Thanks to the howto at http://howto.blbosti.com/2010/04/ubuntu-make-alsa-default-instead-of-pulseaudio/
6) DVD & Blue Ray playback in Ubuntu:
I have had a few DVD's that simply will not playback. The solution is rather simple.
To Enable Playback:
in the teminal type (or paste)
sudo apt-get install libdvdread4
Then install libdvdcss:
in the teminal type (or paste)
"According to the Ubuntu Wiki, Kaffeine, MPlayer, xine, Totem-xine, VLC, and Ogle will play DVDs with libdvdread and libdvdcss installed.
I use both Totem and VLC to play DVDs. It's useful to have both installed, because sometimes one will have a playback quirk that the other will not."
I have had no problem using Parole to play my DVD's after this. (Parole is the current default video player for Xubuntu 14.04.)
This tip thanks to the AskUbuntu community
7) Mega update & upgrade script:
This is no major brain storm, but I was getting sick of typing in the commands to do a full 100% upgrade, so I worked out this little script:
sudo apt-get update && sudo apt-get upgrade && sudo apt-get dist-upgrade
I personally save it as a file called upgrade. then i use the command chmod a+x upgrade in the folder my saved text document "upgrade" is in.
So now when I want to get any and all upgrades for my system, i simply open terminal, and type ./upgrade. Enter passwords where it asks and type y for yes when it asks, and whalla, quick through upgrades.
8) IRSSI quick login script:
If you want quick access to irc chat servers like freenode.org (for example), then my little script will get you logged in with your password in no time. (if you have a username and password, not everyone does, and it's not neccessary)
irssi -c irc.freenode.org -n (username here) -w (password here)
so mine looks like:
irssi -c irc.freenode.org -n hylian -w ******** (I'm not going to show you my password.) :D
I save this in a text file called freenode, and then in the terminal i use the command chmod a+x freenode (in the directory i saved the file in)
Then when i want to quickly access freenode.org, all I need is to start terminal and run ./freenode (or whatever else you saved it as).
9) Make the laptop screen go to full brightness upon startup:
This is no longer an issue for me as of Xubuntu 14.04, but I keep it handy for when I feel like trying another distro.
Open a terminal window, and execute this command to edit /etc/rc.local:
sudo nano /etc/rc.local
Add this before the last line “exit 0″:
echo 10 > /sys/class/backlight/acpi_video0/brightness
The number 10 is for my laptop, some laptops only go up to 4, 6, etc.
To find out what your max brightness is for your laptop, use this command:
make sure to save the edited rc.local file.
This tip thanks to http://www.namhuy.net/528/adjust-brightness-in-xubuntu.html
10) forcibly install ia32-libs on Ubuntu 14.04:
Before you do this, I have found my machine slows down and acts buggy after doing this. If you absolutely need to run something that requires ia32-libs, then this will work, but you were warned here by me.
sudo apt-get install libc6:i386
echo "deb http://archive.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list
apt-get install ia32-libs
sudo apt-get install gcc-multilib
This works, I've done it. that old ia32-libs required package works again.
This tip was found on http://stackoverflow.com/questions/23182765/how-to-install-ia32-libs-in-ubuntu-14-04-lts
11) My "starter" pack for fresh installs of Ubuntu:
If you install Ubuntu as much or as often as I do, then remembering what apps you want installed is a pain, and that pain becomes far worse in my opinion if you have to use Ubuntu Software Center.
So this is just a simple script I keep on my storage hard drive to speed up the process.
sudo apt-get install mc moc irssi links htop ubuntu-restricted-extras wine mplayer cheese synaptic unetbootin ubuntu-restricted-addons audacity lame stellarium gimp gftp cowsay openbox obmenu k3b calibre fglrx libreoffice lib32z1 lib32ncurses5 lib32bz2-1.0 dosbox gdebi celestia-gnome celestia-common-nonfree pcmanfm wicd-cli gpart gparted
Let me break down my madness for you.
mc moc irssi links htop & wicd-cli are my "the GUI is dead, Jim" kit. Even though this hasn't happened since 2008, I still install them.
If you find yourself in the cli without a gui, with my kit you can easily change wifi connections (wicd-cli), search google or duckduckgo.com for solutions to your nightmare (links), plead for help from the fine folks at freenode.org (irssi), quickly do file chores on the hard drive (mc), kill troublesome processes (htop), and soothe your now very freyed nerves with music (moc, started with command mocp).
ubuntu-restricted-extras & ubuntu-restricted-addons gives you most of the used codecs for audio and video, and also installs flash plugin for you. very useful.
wine because I have a few widows apps I use everyday, and there is no such app for Linux. (Namely the Watchtower Library).
libreoffice because I use the spreadsheet and wordprocessor alot, and I want all that the office suite affords.
k3b because in my opinion it is the best Linux dvd/cd burning software in existence, bar none. Mostly because it checks to mak sure my ISO files aren't utter crap before I burn them, making my frisbee pile null and void.
lib32z1 lib32ncurses5 lib32bz2-1.0 is installed because ia32-libs no longer exists in the repos, and these particular packages regain some of what was lost by dumping ia32-libs.
mplayer because on rare occasions I like to listen to shoutcast streams in the cli.
unetbootin for putting ubuntu on usb keys.
openbox and obmenu are for in case xfce takes a dump or somehow totally dissappears, which also has not happened since 2008.
audacity and lame make a great team for cutting your own mp3's, or cutting mp3's you already have. very usefull audio tools.
celestia-gnome celestia-common-nonfree & stellarium because I fancy myself a bit of an astronomer. (very amateur).
synaptic because if i am going to use the gui to install a package, i would use just about anything else besides the bloated, slow Ubuntu Software Center. (Although I use apt-get 99% of the time.)
fglrx because my video hardware is 99% AMD, and fglrx is the driver of choice for said hardware.
cheese for webcam selfies
gimp for photo editing
gftp for ftp file transfer
cowsay for making goofy cli cow pictures
calibre for reading epub/ebooks from my interesting collection
dosbox for playing commander keen 4, the best platformer ever made for dos.
gdebi is so very useful. Gdebi is the easiest way to install .deb package files. I use it in the terminal, just sudo gdebi (name of .deb file here)
gpart gparted for hard drive work, partitioning, etc...
Well that's the end of my list, I hope you find it useful!
Posted by Dennis Gutowski