December 21, 2013
Bashoneliners
We aim to collect practical, well-explained bash one-liners, and promote best practices in shell scripting.
http://www.bashoneliners.com/
Purging i386 Packages From AMD64
After trying out the free demo of X-Plane and removing it from my 64bit installation, I wanted to purge all the i386 packages I no longer needed ( 224 packages ).
After some Google search I found this one-liner :
sudo apt-get purge `dpkg --get-selections | grep i386 | awk '{print $1}'`
To simulate the above command you can add the -s option and see exactly what gets removed before actually running it....
sudo apt-get -s purge `dpkg --get-selections | grep i386 | awk '{print $1}'`
After this operation, 492 MB disk space will be freed.
Do you want to continue [Y/n]? y
.......
.......
Removing libao4:i386 ...
Purging configuration files for libao4:i386 ...
Removing lib32asound2 ...
Purging configuration files for lib32asound2 ...
Removing nvidia-304 ...
......
I only had to reinstall nvidia-304 afterwards...
Links : http://askubuntu.com/questions/113301/how-to-remove-all-i386-packages-from-ubuntu-64bit
https://kura.io/2010/07/02/using-dpkg-selections-to-backup-and-install-packages/
http://linuxprograms.wordpress.com/tag/dpkg-get-selections/
http://www.cyberciti.biz/faq/bash-scripting-using-awk/
After some Google search I found this one-liner :
sudo apt-get purge `dpkg --get-selections | grep i386 | awk '{print $1}'`
To simulate the above command you can add the -s option and see exactly what gets removed before actually running it....
sudo apt-get -s purge `dpkg --get-selections | grep i386 | awk '{print $1}'`
After this operation, 492 MB disk space will be freed.
Do you want to continue [Y/n]? y
.......
.......
Removing libao4:i386 ...
Purging configuration files for libao4:i386 ...
Removing lib32asound2 ...
Purging configuration files for lib32asound2 ...
Removing nvidia-304 ...
......
I only had to reinstall nvidia-304 afterwards...
Links : http://askubuntu.com/questions/113301/how-to-remove-all-i386-packages-from-ubuntu-64bit
https://kura.io/2010/07/02/using-dpkg-selections-to-backup-and-install-packages/
http://linuxprograms.wordpress.com/tag/dpkg-get-selections/
http://www.cyberciti.biz/faq/bash-scripting-using-awk/
December 13, 2013
Manage Trash With Trashindicator
Download trashindicator_1.00-1_all.deb from http://code.google.com/p/trashindicator/downloads/list
Open terminal and navigate to Downloads :
cd Downloads
Installation :
sudo dpkg -i trashindicator_1.00-1_all.deb
Trashindicator will be added to the Startup Applications in System Settings.
Restart wingpanel :
killall wingpanel or log out and log in again.
December 9, 2013
Show Username On Wingpanel
In terminal :
gsettings set com.canonical.indicator.session show-real-name-on-panel true
then :
killall wingpanel
Done...
Remove username :
gsettings set com.canonical.indicator.session show-real-name-on-panel false
then :
killall wingpanel
December 8, 2013
Hiding Applications Slingshot-Launcher
Open Terminal and navigate to /usr/share/applications :
cd /usr/share/applications
E.g. I wanted to remove the icon Archive Manager from slingshot :
sudo nano file-roller.desktop
Add a line NoDisplay=true
Hit Ctrl+O , Enter and then Ctrl+X
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys
cd /usr/share/applications
E.g. I wanted to remove the icon Archive Manager from slingshot :
sudo nano file-roller.desktop
Add a line NoDisplay=true
Hit Ctrl+O , Enter and then Ctrl+X
http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html#recognized-keys
December 7, 2013
Use Pepperflash In Chromium
Go to the Google Chrome Webpage and download the web browser for your processor architecture.
Unpack the deb package:
Navigate to /opt/google/chrome/PepperFlash/ and extract libpepflashplayer.so :
Then :
cd Downloads
sudo mv libpepflashplayer.so /usr/lib/chromium-browser/plugins
Edit the file /etc/chromium-browser/default :
sudo nano /etc/chromium-browser/default and make the following change :
# Options to pass to chromium-browser
CHROMIUM_FLAGS=" --ppapi-flash-path=/usr/lib/chromium-browser/plugins/libpepflashplayer.so"
Restart chromium....
Check the setting at chrome://plugins in the address bar ( press +Details ) :
Unpack the deb package:
Navigate to /opt/google/chrome/PepperFlash/ and extract libpepflashplayer.so :
Then :
cd Downloads
sudo mv libpepflashplayer.so /usr/lib/chromium-browser/plugins
Edit the file /etc/chromium-browser/default :
sudo nano /etc/chromium-browser/default and make the following change :
# Options to pass to chromium-browser
CHROMIUM_FLAGS=" --ppapi-flash-path=/usr/lib/chromium-browser/plugins/libpepflashplayer.so"
Restart chromium....
Check the setting at chrome://plugins in the address bar ( press +Details ) :
November 30, 2013
White Sands Wallpaper Pack
Images taken in southern New Mexico in a national park called White Sands.
Wallpaper pack can be downloaded from this site.
PLEASE mind the terms of use and do not re-host these images anywhere else on the web......
the images are for your own personal use only as desktop wallpaper imagery and other uses of these images without written permission is not tolerated.
November 29, 2013
Customize Firefox Scrolling
You can use extensions like Yet Another Smooth Scrolling or Smoothwheel, but there is another way without installing any add on.
Just go to the about:config page in Firefox : type about:config in the Location Bar (address bar) and press Enter to display the list of preferences.
Uncheck Show this warning next time
You can search in the Search bar at the top of the page to filter the preferences that you want to inspect. The search bar is case-insensitive, unlike the actual configuration variables.
Examples to filter results : mousewheel and smoothscroll .
If you want to try out the settings I use, do the following :
Quit Firefox, navigate to ~/.mozilla/firefox/xxxxxxxx.default and create a file user.js with the following content :
// === Mouse Wheel Scrolling ===================================================
user_pref("general.smoothScroll", true); // boolean enable/disable smooth scrolling
user_pref("general.smoothScroll.mouseWheel", true); // boolean enable/disable smooth scrolling with mouse wheel
user_pref("general.smoothScroll.mouseWheel.durationMaxMS", 600); // integer smooth out the start/end of scrolling operations in ms
user_pref("general.smoothScroll.mouseWheel.durationMinMS", 400); // integer smooth out the start/end of scrolling operations in ms
user_pref("mousewheel.acceleration.factor", 10); // integer sets acceleration factor if mousewheel.acceleration.start > -1
user_pref("mousewheel.acceleration.start", 0); // integer when to apply mousewheel.acceleration.factor (after how many scroll clicks of mouse wheel)
user_pref("mousewheel.default.delta_multiplier_y", 85); // integer vertical step size
http://kb.mozillazine.org/About:config_entries
Update : there is another setting in about:config you can play with :
mousewheel.min_line_scroll_amount default setting = 5
Just go to the about:config page in Firefox : type about:config in the Location Bar (address bar) and press Enter to display the list of preferences.
You can search in the Search bar at the top of the page to filter the preferences that you want to inspect. The search bar is case-insensitive, unlike the actual configuration variables.
Examples to filter results : mousewheel and smoothscroll .
If you want to try out the settings I use, do the following :
Quit Firefox, navigate to ~/.mozilla/firefox/xxxxxxxx.default and create a file user.js with the following content :
// === Mouse Wheel Scrolling ===================================================
user_pref("general.smoothScroll", true); // boolean enable/disable smooth scrolling
user_pref("general.smoothScroll.mouseWheel", true); // boolean enable/disable smooth scrolling with mouse wheel
user_pref("general.smoothScroll.mouseWheel.durationMaxMS", 600); // integer smooth out the start/end of scrolling operations in ms
user_pref("general.smoothScroll.mouseWheel.durationMinMS", 400); // integer smooth out the start/end of scrolling operations in ms
user_pref("mousewheel.acceleration.factor", 10); // integer sets acceleration factor if mousewheel.acceleration.start > -1
user_pref("mousewheel.acceleration.start", 0); // integer when to apply mousewheel.acceleration.factor (after how many scroll clicks of mouse wheel)
user_pref("mousewheel.default.delta_multiplier_y", 85); // integer vertical step size
http://kb.mozillazine.org/About:config_entries
Update : there is another setting in about:config you can play with :
mousewheel.min_line_scroll_amount default setting = 5
November 24, 2013
MPlayer-gui
MPlayer is a free and open source media player, available for all major operating systems. It will play all types of free media formats as well as most non-free media formats.
MPlayer2 is a fork of the original MPlayer project, it contains few enhancements.
A GUI is available. To install :
sudo apt-get install mplayer2 mplayer-gui mplayer-skins
Package mplayer-skins contains three different skins, more skins can be downloaded from here.
I downloaded a skin from Deviantart, called simpliX.
Extract the downloaded file ( 7z format ) with Archive Manager. Move the folder simpliX to /usr/share/mplayer/skins :
sudo mv simpliX /usr/share/mplayer/skins
You can also create folder skins in ~/.mplayer and move the folder simpliX over there. ( link ).
Start MPlayer-gui and select your skin and set preferences ( right-click player or screen ) :
MPlayer2 is played from the commandline : http://www.mplayer2.org/docs/mplayer/ .
Example ( playing music from Sky.fm, Smoothjazz ) :
mplayer http://pub8.sky.fm:80/sky_smoothjazz_aacplus
User settings are in ~/.mplayer/config which from the first start contains only one line :
# Write your default config options here!
For settings and options look here :
http://ubuntuforums.org/showthread.php?t=77329
http://everydaylht.com/howtos/multimedia/mplayer/
https://wiki.archlinux.org/index.php/MPlayer#Configuration
Askubuntu/mplayer
Having a Nvidia GT 330 card my config looks like the one from here.
Cool things you can do with mplayer : http://www.linuxandlife.com/2012/07/4-cool-tricks-to-do-with-mplayer.html
http://everydaylht.com/howtos/eyecandy/ascii-movies/
Movie : http://www.sintel.org/download
MPlayer2 is a fork of the original MPlayer project, it contains few enhancements.
A GUI is available. To install :
sudo apt-get install mplayer2 mplayer-gui mplayer-skins
Package mplayer-skins contains three different skins, more skins can be downloaded from here.
I downloaded a skin from Deviantart, called simpliX.
Extract the downloaded file ( 7z format ) with Archive Manager. Move the folder simpliX to /usr/share/mplayer/skins :
sudo mv simpliX /usr/share/mplayer/skins
You can also create folder skins in ~/.mplayer and move the folder simpliX over there. ( link ).
Start MPlayer-gui and select your skin and set preferences ( right-click player or screen ) :
MPlayer2 is played from the commandline : http://www.mplayer2.org/docs/mplayer/ .
Example ( playing music from Sky.fm, Smoothjazz ) :
mplayer http://pub8.sky.fm:80/sky_smoothjazz_aacplus
User settings are in ~/.mplayer/config which from the first start contains only one line :
# Write your default config options here!
For settings and options look here :
http://ubuntuforums.org/showthread.php?t=77329
http://everydaylht.com/howtos/multimedia/mplayer/
https://wiki.archlinux.org/index.php/MPlayer#Configuration
Askubuntu/mplayer
Having a Nvidia GT 330 card my config looks like the one from here.
Cool things you can do with mplayer : http://www.linuxandlife.com/2012/07/4-cool-tricks-to-do-with-mplayer.html
http://everydaylht.com/howtos/eyecandy/ascii-movies/
Movie : http://www.sintel.org/download
November 17, 2013
Make Firefox Look Like Chrome
Install firefox :
sudo apt-get install firefox
Start firefox and install the Movable Firefox Button.
You have to restart firefox to make the Addon active.
Right click between the address bar and search bar and uncheck Menu Bar.
Repeat the same but then choose Customize... Grab the Firefox Menu button and move it to the far right side.
Grab the ( with Customize... ) Home, Reload and Stop buttons and move them to the left right next to the address bar. Remove the search bar...( drop it in the Customize Toolbar window ).
Install Fxchrome theme and you're done....
sudo apt-get install firefox
Start firefox and install the Movable Firefox Button.
You have to restart firefox to make the Addon active.
Right click between the address bar and search bar and uncheck Menu Bar.
Repeat the same but then choose Customize... Grab the Firefox Menu button and move it to the far right side.
Install Fxchrome theme and you're done....
Pinboard An Online Bookmarking Tool
As said on it's website :
Pinboard is a bookmarking website for introverted people in a hurry.
The focus of the site is less on socializing, and more on speed and utility. Pinboard tries to offer useful features without getting in your way.
My highest priority is keeping your data safe over the long term.
Unlike some social bookmarking sites, Pinboard will cost you a one-time fee of around ten dollars.
The site follows a rather unconventional pricing strategy -- as more people sign up, the price increases.
The signup fee helps keep the site from growing too fast, and keeps Pinboard spam-free.
Thanks to the site’s clean design and focus on speed, saving bookmarks and browsing them is always super-fast.
There’s also an optional archiving service that, for $25/year, guarantees that articles you bookmark will still work even if the original link changes or gets deleted
Read the Getting Started page if you get interested.
Pinboard extensions for your browser : https://pinboard.in/extensions/
Alternative online bookmarking : http://1r7.net/
November 16, 2013
ExplainShell : Linux Shell Commands Explained
ExplainShell contains 29761 parsed manpages from sections 1 and 8 found in Ubuntu's manpage repository.
November 15, 2013
Blocking Unwanted Ads In Youtube
This can be done without installing any software and will work with any browser.
We just need to edit the file /etc/hosts and add a few lines :
sudo nano /etc/hosts
127.0.0.1 s0.2mdn.net
127.0.0.1 googleads.g.doubleclick.net
The hosts file is just a text file, used to map hostnames to IP adresses.
Anytime an entry listed in your hosts file is requested on the page you are viewing, your computer thinks 127.0.0.1 is the location of the file....( your computer will automatically check the hosts file first before DNS for entries to the web page you just requested ).
127.0.0.1 is the standard IP address used for a loopback network connection. This means that if you try to connect to 127.0.0.1, you are immediately looped back to your own machine. 127.0.0.1 is also referred to as localhost.
Link : http://www.lolloland.com/2012/12/12/technote-how-to-remove-video-ads-youtube/
We just need to edit the file /etc/hosts and add a few lines :
sudo nano /etc/hosts
127.0.0.1 s0.2mdn.net
127.0.0.1 googleads.g.doubleclick.net
The hosts file is just a text file, used to map hostnames to IP adresses.
Anytime an entry listed in your hosts file is requested on the page you are viewing, your computer thinks 127.0.0.1 is the location of the file....( your computer will automatically check the hosts file first before DNS for entries to the web page you just requested ).
127.0.0.1 is the standard IP address used for a loopback network connection. This means that if you try to connect to 127.0.0.1, you are immediately looped back to your own machine. 127.0.0.1 is also referred to as localhost.
Link : http://www.lolloland.com/2012/12/12/technote-how-to-remove-video-ads-youtube/
November 7, 2013
Add My Weather Indicator To Wingpanel
My-Weather-Indicator is a ( Wing )panel-based weather applet that can show weather conditions, a forecast, a forecast map and check sunrise and sunset information, moon phase and more in the latest release. You can set two locations.
To install :
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install my-weather-indicator
After installation it will appear in the Slingshot-launcher.
To have it started after login :
My-weather-indicator > Preferences > General options > check Autostart
Troubleshoot : http://askubuntu.com/questions/304667/cant-launch-my-weather-indicator
To install :
sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install my-weather-indicator
After installation it will appear in the Slingshot-launcher.
To have it started after login :
My-weather-indicator > Preferences > General options > check Autostart
Troubleshoot : http://askubuntu.com/questions/304667/cant-launch-my-weather-indicator
November 4, 2013
Bootinfoscript
Bootinfoscript is a bash script which searches all hard
drives attached to the computer for information related to booting and
displays it in a convenient format. Its primary use is for
troubleshooting booting problems.
Go to http://bootinfoscript.sourceforge.net/ and download bootinfoscript-061.tar.gz.
Extract and run :
tar xf bootinfoscript-061.tar.gz
sudo ./bootinfoscript
Boot Info Script 0.61 [1 April 2012]
"gawk" could not be found, using "busybox awk" instead.
This may lead to unreliable results.
Identifying MBRs...
Computing Partition Table of /dev/sda...
Searching sda1 for information...
Searching sda2 for information...
Searching sda3 for information...
Searching sda4 for information...
Finished. The results are in the file "RESULTS.txt"
located in "/home/eric/Downloads/bootinfo/".
Go to http://bootinfoscript.sourceforge.net/ and download bootinfoscript-061.tar.gz.
Extract and run :
tar xf bootinfoscript-061.tar.gz
sudo ./bootinfoscript
Boot Info Script 0.61 [1 April 2012]
"gawk" could not be found, using "busybox awk" instead.
This may lead to unreliable results.
Identifying MBRs...
Computing Partition Table of /dev/sda...
Searching sda1 for information...
Searching sda2 for information...
Searching sda3 for information...
Searching sda4 for information...
Finished. The results are in the file "RESULTS.txt"
located in "/home/eric/Downloads/bootinfo/".
Adding A Swapfile
During installation I did not create a swap partition.As an alternative to creating an entire partition, a swap file offers the ability to vary its size on-the-fly, and is more easily removed altogether.
To create a swap file two different commands can be used : dd or fallocate.
With dd ( swap file 2 GB in /media/Data, you can choose another location. I choose /media/Data, because my root file system is small and /media/Data is mounted at boottime ) :
sudo dd if=/dev/zero of=/media/Data/swap bs=1M count=2048
With fallocate :
sudo fallocate -l 2048M /media/Data/swap
fallocate: /media/Data/swap: fallocate failed: Text file busy........
Another try :
cd /media/Data
sudo fallocate -l 2048M swap
Done !
ls -l swap
-rw-r--r-- 1 root root 536870912 Nov 4 12:07 swap
Set the right permissions (a world-readable swap file is a huge local vulnerability)
sudo chmod 600 swap
ls -l swap
-rw------- 1 root root 536870912 Nov 4 12:07 swap
Better !
After creating the correctly-sized file, format it to swap:
sudo mkswap swap
Activate the swapfile:
sudo swapon swap
You can verify this yourself with the swapon command :
swapon -s
Filename Type Size Used Priority
/media/Data/swap file 2097148 0 -1
Edit /etc/fstab and add an entry for the swap file:
sudo nano /etc/fstab
/media/Data/swap none swap sw 0 0
Your location would be different....After the next reboot the swap will be used automatically.
To remove a swap file, the current swap file must be turned off.
sudo swapoff -a
sudo rm -f swap
The Linux kernel assigns priorities to all swap containers. The system will use swap areas of higher priority before using swap areas of lower priority. Priorities can be assigned in fstab via the pri parameter or with sudo swapon -p <value>.
I'm using just one swap area, so priority is of no concern...
The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap area.
cat /proc/sys/vm/swappiness will show a number between 0 and 100. Default is 60.
Setting this parameter to a low value will reduce swapping from RAM, and is known to improve responsiveness on many systems.
To change the system swappiness value, open /etc/sysctl.conf as root :
sudo nano /etc/syscl.conf
and add these lines :
vm.swappiness=0
vm.vfs_cache_pressure=50
Reboot for the change to take effect. You can also clear your swap by running swapoff -a and then swapon -a as root instead of rebooting to achieve the same effect.
vm.vfs_cache_pressure controls inode/dentry (i.e. filesystem) cache vs. other caches, i.e. we want to keep filesystem meta-data in RAM if possible ( link ).
Links :
https://wiki.archlinux.org/index.php/swap#Swap_file_creation
http://askubuntu.com/questions/103915/how-do-i-configure-swappiness
http://askubuntu.com/questions/157793/why-is-swap-being-used-even-though-i-have-plenty-of-free-ram
https://help.ubuntu.com/community/SwapFaq
http://unix.stackexchange.com/questions/4402/what-is-a-superblock-inode-dentry-and-a-file
There is also a package dphys-swapfile that will autogenerate a swap file. After the package has been installed whenever you boot you'll have /var/swap created.
Using a memory stick/memory card as swap memory on Linux
To create a swap file two different commands can be used : dd or fallocate.
With dd ( swap file 2 GB in /media/Data, you can choose another location. I choose /media/Data, because my root file system is small and /media/Data is mounted at boottime ) :
sudo dd if=/dev/zero of=/media/Data/swap bs=1M count=2048
With fallocate :
sudo fallocate -l 2048M /media/Data/swap
fallocate: /media/Data/swap: fallocate failed: Text file busy........
Another try :
cd /media/Data
sudo fallocate -l 2048M swap
Done !
ls -l swap
-rw-r--r-- 1 root root 536870912 Nov 4 12:07 swap
Set the right permissions (a world-readable swap file is a huge local vulnerability)
sudo chmod 600 swap
ls -l swap
-rw------- 1 root root 536870912 Nov 4 12:07 swap
Better !
After creating the correctly-sized file, format it to swap:
sudo mkswap swap
Activate the swapfile:
sudo swapon swap
You can verify this yourself with the swapon command :
swapon -s
Filename Type Size Used Priority
/media/Data/swap file 2097148 0 -1
Edit /etc/fstab and add an entry for the swap file:
sudo nano /etc/fstab
/media/Data/swap none swap sw 0 0
Your location would be different....After the next reboot the swap will be used automatically.
To remove a swap file, the current swap file must be turned off.
sudo swapoff -a
sudo rm -f swap
The Linux kernel assigns priorities to all swap containers. The system will use swap areas of higher priority before using swap areas of lower priority. Priorities can be assigned in fstab via the pri parameter or with sudo swapon -p <value>.
I'm using just one swap area, so priority is of no concern...
The swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap area.
cat /proc/sys/vm/swappiness will show a number between 0 and 100. Default is 60.
Setting this parameter to a low value will reduce swapping from RAM, and is known to improve responsiveness on many systems.
To change the system swappiness value, open /etc/sysctl.conf as root :
sudo nano /etc/syscl.conf
and add these lines :
vm.swappiness=0
vm.vfs_cache_pressure=50
Reboot for the change to take effect. You can also clear your swap by running swapoff -a and then swapon -a as root instead of rebooting to achieve the same effect.
vm.vfs_cache_pressure controls inode/dentry (i.e. filesystem) cache vs. other caches, i.e. we want to keep filesystem meta-data in RAM if possible ( link ).
Links :
https://wiki.archlinux.org/index.php/swap#Swap_file_creation
http://askubuntu.com/questions/103915/how-do-i-configure-swappiness
http://askubuntu.com/questions/157793/why-is-swap-being-used-even-though-i-have-plenty-of-free-ram
https://help.ubuntu.com/community/SwapFaq
http://unix.stackexchange.com/questions/4402/what-is-a-superblock-inode-dentry-and-a-file
There is also a package dphys-swapfile that will autogenerate a swap file. After the package has been installed whenever you boot you'll have /var/swap created.
Using a memory stick/memory card as swap memory on Linux
November 3, 2013
System Restore With Timeshift
TimeShift for Linux is a application that provides functionality similar to the System Restore feature in Windows and the Time Machine tool in Mac OS. TimeShift protects your system by taking incremental snapshots of the file system at regular intervals. These snapshots can be restored later to bring your system to the exact state it was in at the time when the snapshot was taken.
TimeShift is designed to protect only system files and user settings ( hidden files in your Home directory ). User files such as documents, pictures and music are excluded. Read more in the Timeshift FAQ...
Snapshots can be restored either from the running system or from a live CD. Restoring backups from the running system requires a reboot to complete the restore process.
I have used it a few times and it worked really well ( only taking snapshots ondemand ).
Installation :
sudo apt-add-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install timeshift
Links :
https://help.ubuntu.com/community/BackupYourSystem
Howto Enable Login Sound
You will need a sound file in the .ogg or .wav format. Rename the file into desktop-login.ogg( wav ) and place it in the
/usr/share/sounds folder. Rightclick and choose New Window As Administrator in order to be able to place the file there :
In System Settings ( Applications > System Settings ) go to Startup Applications > Add.
Name : Login sound
Command : /usr/bin/canberra-gtk-play --id="desktop-login"
Then Add....
Download sounds from here.
More sounds : http://www.zedge.net/ringtones/0-7-1-startup%20sound/ ( download with Save Link As... ).
Knoppix sounds.
Free online audio convertor : http://audio.online-convert.com/
/usr/share/sounds folder. Rightclick and choose New Window As Administrator in order to be able to place the file there :
In System Settings ( Applications > System Settings ) go to Startup Applications > Add.
Name : Login sound
Command : /usr/bin/canberra-gtk-play --id="desktop-login"
Then Add....
Download sounds from here.
More sounds : http://www.zedge.net/ringtones/0-7-1-startup%20sound/ ( download with Save Link As... ).
Knoppix sounds.
Free online audio convertor : http://audio.online-convert.com/
October 27, 2013
VPNBook : Free VPN
VPNBook is a 100% Free VPN service without any need for registration or sign-up.
Here is how I did my setup : open a terminal :
Applications > Terminal and copy and paste the following line :
sudo apt-get install network-manager-openvpn-gnome
( will pull in packages network-manager-openvpn and openvpn, the other needed packages are already installed in a default installation ).
Wingpanel > Network-manager-applet > Edit Connections....
Network Connections > VPN > Add , Choose a VPN Connection Type > PPTP > Create...
Go to VPNBook and look for the PPTP settings. I choose Server #3 : uk180.vpnbook.com (UK VPN - optimized for fast web surfing; no p2p downloading).
Connection name : VPNBook-PPTP-UK ( you can set any name )
VPN tab :
Gateway : uk180.vpnbook.com
User name : vpnbook
Password : qe6resTe ( password changes every one to two weeks ! , https://twitter.com/vpnbook )
Check : Show password
Check Available for all users.
Go to Advanced and check Use Point-to-Point encryption ( MPPE ) > press OK button.
Now can choose your VPN connection in the network-manager-applet...
To setup OpenVPN : Go to VPNBook and download one of the OpenVPN Certificate Bundles ( e.g Server #3 ).
Create a new folder in your Home directory and name it e.g. openvpn-config.
Move the downloaded ( Applications > Files > Downloads ) OpenVPN Certificate Bundle ( VPNBook.com-OpenVPN-UK1.zip ) into the openvpn-config folder and right click and choose Open With Archive Manager.
Hit the button Extract files from the archive
Choose one of the .ovpn files e.g. vpnbook-uk1-tcp80.ovpn.
We need to create three files in the openvpn-config folder with the names : ca.crt, client.crt and client.key :
For the next copy/paste actions to work with Scratch ( default text editor ) we need to change it's Autosave feature :
Applications > Scratch > Menu ( gear icon ) > Preferences : uncheck Save files when changed .
This is a known bug : pasted text in Scratch will get lost with Autosave feature enabled...
Open the file vpnbook-uk1-tcp80.ovpn and copy the lines between the <ca> tags and paste into the file ca.crt, save ( second button from the left ) and close.
Copy and paste the lines between the <cert> tags into the file client.crt, save and close.
Copy and the paste the lines between the <key> tags into the file client.key, save and close.
Wingpanel > Network-manager-applet > Edit Connections...
In the window Network Connections > VPN > Import and navigate to the file vpnbook-uk1-tcp80.ovpn.
Window opens ( Editing vpnbook-uk1-tcp80 ) :
Connection name : choose whatever you like ( I choose VPNBook-OpenVPN-UK ).
Uncheck Connect automatically
VPN tab :
Authentication > Type : choose Password with Certificates ( TLS )
User name : vpnbook
Password : qe6resTe ( password changes every one to two weeks ! )
User Certificate : navigate to client.crt
CA Certificate : choose ca.crt
Private Key : choose client.key
Finally : Save
Now can choose your VPN connection in the network-manager-applet...
Here is how I did my setup : open a terminal :
Applications > Terminal and copy and paste the following line :
sudo apt-get install network-manager-openvpn-gnome
( will pull in packages network-manager-openvpn and openvpn, the other needed packages are already installed in a default installation ).
Wingpanel > Network-manager-applet > Edit Connections....
Network Connections > VPN > Add , Choose a VPN Connection Type > PPTP > Create...
Go to VPNBook and look for the PPTP settings. I choose Server #3 : uk180.vpnbook.com (UK VPN - optimized for fast web surfing; no p2p downloading).
Connection name : VPNBook-PPTP-UK ( you can set any name )
VPN tab :
Gateway : uk180.vpnbook.com
User name : vpnbook
Password : qe6resTe ( password changes every one to two weeks ! , https://twitter.com/vpnbook )
Check : Show password
Check Available for all users.
Go to Advanced and check Use Point-to-Point encryption ( MPPE ) > press OK button.
Now can choose your VPN connection in the network-manager-applet...
To setup OpenVPN : Go to VPNBook and download one of the OpenVPN Certificate Bundles ( e.g Server #3 ).
Create a new folder in your Home directory and name it e.g. openvpn-config.
Move the downloaded ( Applications > Files > Downloads ) OpenVPN Certificate Bundle ( VPNBook.com-OpenVPN-UK1.zip ) into the openvpn-config folder and right click and choose Open With Archive Manager.
Hit the button Extract files from the archive
Choose one of the .ovpn files e.g. vpnbook-uk1-tcp80.ovpn.
We need to create three files in the openvpn-config folder with the names : ca.crt, client.crt and client.key :
For the next copy/paste actions to work with Scratch ( default text editor ) we need to change it's Autosave feature :
Applications > Scratch > Menu ( gear icon ) > Preferences : uncheck Save files when changed .
This is a known bug : pasted text in Scratch will get lost with Autosave feature enabled...
Open the file vpnbook-uk1-tcp80.ovpn and copy the lines between the <ca> tags and paste into the file ca.crt, save ( second button from the left ) and close.
Copy and paste the lines between the <cert> tags into the file client.crt, save and close.
Copy and the paste the lines between the <key> tags into the file client.key, save and close.
Wingpanel > Network-manager-applet > Edit Connections...
In the window Network Connections > VPN > Import and navigate to the file vpnbook-uk1-tcp80.ovpn.
Window opens ( Editing vpnbook-uk1-tcp80 ) :
Connection name : choose whatever you like ( I choose VPNBook-OpenVPN-UK ).
Uncheck Connect automatically
VPN tab :
Authentication > Type : choose Password with Certificates ( TLS )
User name : vpnbook
Password : qe6resTe ( password changes every one to two weeks ! )
User Certificate : navigate to client.crt
CA Certificate : choose ca.crt
Private Key : choose client.key
Finally : Save
Now can choose your VPN connection in the network-manager-applet...
October 26, 2013
Viewnior, A Simple Pictureviewer
Viewnior is an image viewer program. Created to be simple, fast and elegant.
The download page shows that there is no package for Ubuntu....and so we need to compile to make a deb-package.
Download the source from here : http://cloud.github.com/downloads/xsisqox/Viewnior/viewnior-1.3.tar.gz
Go to Downloads in a terminal :
cd Downloads
First install the necessary tools :
sudo apt-get install build-essential intltool dh-make
Development libraries :
sudo apt-get install libgdk-pixbuf2.0-dev libgtk2.0-dev
Extract :
tar xf viewnior-1.3.tar.gz
mv viewnior-1.3.tar.gz viewnior-1.3/
cd viewnior-1.3
dh_make --createorig
It will ask :
Type of package: single binary, indep binary, multiple binary, library, kernel module, kernel patch?
[s/i/m/l/k/n]
Just type s. Then it will show you some package information that you can edit. Just hit Enter.
Next message :
Done. Please edit the files in the debian/ subdirectory now. viewnior
uses a configure script, so you probably don't have to edit the Makefiles.
dpkg-buildpackage
At the end ( won't take much time ) :
dpkg-deb: building package `viewnior' in `../viewnior_1.3-1_amd64.deb'.
dpkg-genchanges >../viewnior_1.3-1_amd64.changes
dpkg-genchanges: including full source code in upload
dpkg-source --after-build viewnior-1.3
dpkg-buildpackage: full upload (original source is included)
cd ..
ls
viewnior_1.3-1_amd64.changes viewnior_1.3-1.debian.tar.gz viewnior_1.3.orig.tar.gz
viewnior-1.3 viewnior_1.3-1_amd64.deb viewnior_1.3-1.dsc
There it is : viewnior_1.3-1_amd64.deb......
Installation is done with gdebi, a simple tool to install deb files ( sudo apt-get install gdebi ).
Links :
http://forums.debian.net/viewtopic.php?t=38976
http://git.debian.org/?p=collab-maint/packaging-tutorial.git;a=blob_plain;f=packaging-tutorial.pdf;hb=refs/heads/pdf
October 25, 2013
Elementary OS Luna Review
......I have to tell you after test-driving it for the last four days I have come to the conclusion that I have really been doing myself a disservice and so are you if you don't download this distro and give it a try.....
......this is a lightning-fast, responsive desktop that is just ready to go out of the box....
October 24, 2013
Mozilla’s UX-Nightly Build Of Firefox
The UX Nightly branch is the branch where developers can test out new
features and experience them for a while before knowing if it’s
something they want to ship.
Go to this page : http://people.mozilla.org/~jwein/ux-nightly/ ( or this one ) and download the appropriate build ( 32 or 64-bit, you can find out which one you need by going to Applications > System Settings > About ).
In my case it says : Version: 0.2 "Luna" ( 64-bit ).
Navigate to Downloads and open firefox-27.0a1.en-US.linux-x86_64.tar.bz2 with
Archive Manager ( just click on it ).
You will have a folder named firefox.
Assuming that you have installed and used firefox from the repositories before, I will rename the folder firefox firefox-ux and move the folder to my home directory :
mv firefox/ ../firefox-ux
cd ../firefox-ux
./firefox -P
In the window that will open create a profile : call it ux and start UX with this profile:
If all goes well....
Create a desktop file in ~/.local/share/applications with the following lines :
[Desktop Entry]
Version=1.0
Name=Firefox Ux
Exec=/home/username/firefox-ux/firefox -P "ux" --no-remote %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/username/firefox-ux/browser/chrome/icons/default/default48.png
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Replace username with your username.....
The -no-remote switch will make it possible to run firefox with different profiles simultaneously ( see : http://kb.mozillazine.org/Command_line_arguments ).
Log out and in to see Firefox UX occur in Slingshot.
Go to this page : http://people.mozilla.org/~jwein/ux-nightly/ ( or this one ) and download the appropriate build ( 32 or 64-bit, you can find out which one you need by going to Applications > System Settings > About ).
In my case it says : Version: 0.2 "Luna" ( 64-bit ).
Navigate to Downloads and open firefox-27.0a1.en-US.linux-x86_64.tar.bz2 with
Archive Manager ( just click on it ).
You will have a folder named firefox.
Assuming that you have installed and used firefox from the repositories before, I will rename the folder firefox firefox-ux and move the folder to my home directory :
mv firefox/ ../firefox-ux
cd ../firefox-ux
./firefox -P
In the window that will open create a profile : call it ux and start UX with this profile:
If all goes well....
Create a desktop file in ~/.local/share/applications with the following lines :
[Desktop Entry]
Version=1.0
Name=Firefox Ux
Exec=/home/username/firefox-ux/firefox -P "ux" --no-remote %u
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=/home/username/firefox-ux/browser/chrome/icons/default/default48.png
Categories=GNOME;GTK;Network;WebBrowser;
MimeType=text/html;text/xml;application/xhtml+xml;application/xml;application/rss+xml;application/rdf+xml;image/gif;image/jpeg;image/png;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ftp;x-scheme-handler/chrome;video/webm;application/x-xpinstall;
StartupNotify=true
Replace username with your username.....
The -no-remote switch will make it possible to run firefox with different profiles simultaneously ( see : http://kb.mozillazine.org/Command_line_arguments ).
Log out and in to see Firefox UX occur in Slingshot.
October 23, 2013
Mount Data Partition At Boot Time
I've created a large Data partition using Gparted. ( filesystem : ext4, label Data ).
Create mountpoint :
sudo mkdir /media/Data
Change ownership to user :
sudo chown $USER:$USER /media/Data
Data partition will be shown in left pane in Files, and manually mounted by clicking on Data.
In Terminal the command mount will show ( among other lines ) :
/dev/sda3 on /media/Data type ext4 (rw,nosuid,nodev,uhelper=udisks)
Adding this line to the file /etc/fstab will mount the partition at boottime :
sudo nano /etc/fstab
Add the line :
/dev/sda3 /media/Data ext4 rw,nosuid,nodev,uhelper=udisks 0 0
Get it mounted without reboot :
sudo mount -a
https://help.ubuntu.com/community/Fstab
Create mountpoint :
sudo mkdir /media/Data
Change ownership to user :
sudo chown $USER:$USER /media/Data
Data partition will be shown in left pane in Files, and manually mounted by clicking on Data.
In Terminal the command mount will show ( among other lines ) :
/dev/sda3 on /media/Data type ext4 (rw,nosuid,nodev,uhelper=udisks)
Adding this line to the file /etc/fstab will mount the partition at boottime :
sudo nano /etc/fstab
Add the line :
/dev/sda3 /media/Data ext4 rw,nosuid,nodev,uhelper=udisks 0 0
Get it mounted without reboot :
sudo mount -a
https://help.ubuntu.com/community/Fstab
October 21, 2013
Music Player Foobnix
Foobnix is a music player for both local and online music. With the online music search feature you can download and save music from VK, the second biggest social network service in Europe after Facebook.
To install :
sudo add-apt-repository ppa:foobnix-team/foobnix-player
sudo apt-get update
sudo apt-get install foobnix
If it doesn't play music :
sudo apt-get install gstreamer0.10-plugins-ugly
Add your Music folder
Customizing radio channels or adding your own ( press My channels ) :
Pressing VK opens up next login window. You need to login to enable search and download of music.
Update Feb 10 2014 : from their site :
We are actively working on a new version of the player 3.0 rewriting it on GTK 3
sudo apt-get remove foobnix
sudo add-apt-repository ppa:popsul1993/ppa
sudo apt-get update
sudo apt-get install foobnix
To install :
sudo add-apt-repository ppa:foobnix-team/foobnix-player
sudo apt-get update
sudo apt-get install foobnix
If it doesn't play music :
sudo apt-get install gstreamer0.10-plugins-ugly
Add your Music folder
Customizing radio channels or adding your own ( press My channels ) :
Pressing VK opens up next login window. You need to login to enable search and download of music.
Update Feb 10 2014 : from their site :
We are actively working on a new version of the player 3.0 rewriting it on GTK 3
sudo apt-get remove foobnix
sudo add-apt-repository ppa:popsul1993/ppa
sudo apt-get update
sudo apt-get install foobnix
OpenDNS And Google Public DNS
OpenDNS and Google Public DNS are free, global Domain Name System (DNS)
resolution services, that you can use as an alternative to your current DNS provider.
Edit Connections....
In my case : Wired > Edit > IP4 Settings
At Method open the dropdown menu and select Automatic (DHCP) addresses only.
In the DNS servers field, enter the following IP addresses, separated by a comma.
For OpenDNS : 208.67.222.222, 208.67.220.220
For Google Public DNS : 8.8.8.8, 8.8.4.4
Restart Networkmanager ( might not be needed ) :
sudo service network-manager restart
Restart your browser...
To check run the next command in a Terminal :
nm-tool | tail -n 8
OpenDNS checker : http://welcome.opendns.com/
Edit Connections....
In my case : Wired > Edit > IP4 Settings
At Method open the dropdown menu and select Automatic (DHCP) addresses only.
In the DNS servers field, enter the following IP addresses, separated by a comma.
For OpenDNS : 208.67.222.222, 208.67.220.220
For Google Public DNS : 8.8.8.8, 8.8.4.4
Restart Networkmanager ( might not be needed ) :
sudo service network-manager restart
Restart your browser...
To check run the next command in a Terminal :
nm-tool | tail -n 8
OpenDNS checker : http://welcome.opendns.com/
Adding Slingshot And Show Desktop To Plank
Slingshot is normally started by clicking Applications in the top panel, but you can add a starter in Plank as well :
sudo nano /usr/share/applications/slingshot.desktop
paste the following lines :
[Desktop Entry]
Version=1.0
Type=Application
Name=Slingshot
Comment=
Exec=slingshot-launcher
Icon=plank
Path=
Terminal=false
StartupNotify=false
Save and close.
See : https://answers.launchpad.net/slingshot/+question/224173
Alternative icon for the launcher : http://jivebs.deviantart.com/art/Custom-Slingshot-launcher-Icons-392727962
In Files navigate to /usr/share/applications and drag the Slingshot icon to Plank and release when seeing a + sign....
For adding Show Desktop open System Settings > Tweaks > Plank > Show Desktop Icon.
sudo nano /usr/share/applications/slingshot.desktop
paste the following lines :
[Desktop Entry]
Version=1.0
Type=Application
Name=Slingshot
Comment=
Exec=slingshot-launcher
Icon=plank
Path=
Terminal=false
StartupNotify=false
Save and close.
See : https://answers.launchpad.net/slingshot/+question/224173
Alternative icon for the launcher : http://jivebs.deviantart.com/art/Custom-Slingshot-launcher-Icons-392727962
In Files navigate to /usr/share/applications and drag the Slingshot icon to Plank and release when seeing a + sign....
For adding Show Desktop open System Settings > Tweaks > Plank > Show Desktop Icon.
October 19, 2013
Pantheon Session With Compiz
You can create a different session running Pantheon desktop with compiz as window-manager.
First we need to install compiz :
sudo apt-get install compiz compizconfig-settings-manager compiz-plugins-extra
Navigate to /usr/share/xsessions and create a file pantheon-compiz.desktop :
sudo nano pantheon-compiz.desktop
Paste into the file the following lines :
[Desktop Entry]
Name=Pantheon compiz
Comment=This session provides elementary-compiz experience
Exec=gnome-session --session=pantheon-compiz
TryExec=wingpanel
Icon=
Type=Application
Use Ctrl+O to File Name to Write, just hit Enter and then Ctrl+X to Exit.
Then navigate to /usr/share/gnome-session/sessions and create a file pantheon-compiz.session :
sudo nano pantheon-compiz.session
[GNOME Session]
Name=Pantheon Compiz
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;
DefaultProvider-windowmanager=compiz
FallbackSession=ubuntu
DesktopName=Pantheon
Again use Ctrl+O to File Name to Write, just hit Enter and then Ctrl+X to Exit.
Log out...
Link : http://ubuntuforums.org/showthread.php?t=2124220
If your button-layout got messed up, start dconf-editor ( package dconf-tools ) and check the settings at :
org > gnome > desktop >wm > preferences > button-layout.
To be able to make a screenshot of the login screen :
sudo apt-get install xserver-xephyr
UPDATE : WARNING : next tool could destroy all your dconf settings ! Do not use....
Run the next command during a normal session :
lightdm --test-mode
enlarge the window and make a screenshot.....to quit type Ctrl+C in the terminal.
Update :
I found out that Plank did not work nicely with compiz. Minimizing windows will not always move the windows out of sight in the direction of the panel ( as wanted ), but also to the upper left corner.
I replaced Plank with Docky :
sudo apt-get install docky
System Settings > Tweaks > Cerbere > select Plank and remove (-), then add (+) Docky.
Re-login....
Window decoration theme : https://launchpad.net/~shimmerproject/+archive/ppa/+index?field.series_filter=lucid ( greybird-git )
Some of my settings in ccsm ( compizconfig-settings-manager ) are :
Window Management > Place Windows > Placement Mode > Centered
Window Management > Scale > Bindings > Initiate Window Picker For All Windows > TopLeft
Extras > Screenshot > Initiate > Super Button1
Utility > Enable Scale Addons
Utility > Workarounds > check Keep previews of minimized windows
Effects > check Animations Add-On
Desktop > Expo > Expo edge > BottomRight
General > General Options > Key bindings > Show Desktop > BottomLeft
Desktop > check Show desktop
Accessibility >Opacity, Brightness and Saturation > Opacity > Increase Opacity ( mouse ) > Alt Button4
Accessibility >Opacity, Brightness and Saturation > Opacity > Decrease Opacity ( mouse ) > Alt Button5
Accessibility >Opacity, Brightness and Saturation > Brightness > Increase Brightness ( mouse ) > Super Button4
Accessibility >Opacity, Brightness and Saturation > Brightness > Decrease Brightness ( mouse ) > Super Button5
If you like to use Emerald Window Decorator just follow this guide.
First we need to install compiz :
sudo apt-get install compiz compizconfig-settings-manager compiz-plugins-extra
Navigate to /usr/share/xsessions and create a file pantheon-compiz.desktop :
sudo nano pantheon-compiz.desktop
Paste into the file the following lines :
[Desktop Entry]
Name=Pantheon compiz
Comment=This session provides elementary-compiz experience
Exec=gnome-session --session=pantheon-compiz
TryExec=wingpanel
Icon=
Type=Application
Use Ctrl+O to File Name to Write, just hit Enter and then Ctrl+X to Exit.
Then navigate to /usr/share/gnome-session/sessions and create a file pantheon-compiz.session :
sudo nano pantheon-compiz.session
[GNOME Session]
Name=Pantheon Compiz
RequiredComponents=gnome-settings-daemon;
RequiredProviders=windowmanager;
DefaultProvider-windowmanager=compiz
FallbackSession=ubuntu
DesktopName=Pantheon
Again use Ctrl+O to File Name to Write, just hit Enter and then Ctrl+X to Exit.
Log out...
Link : http://ubuntuforums.org/showthread.php?t=2124220
If your button-layout got messed up, start dconf-editor ( package dconf-tools ) and check the settings at :
org > gnome > desktop >wm > preferences > button-layout.
To be able to make a screenshot of the login screen :
sudo apt-get install xserver-xephyr
UPDATE : WARNING : next tool could destroy all your dconf settings ! Do not use....
Run the next command during a normal session :
lightdm --test-mode
enlarge the window and make a screenshot.....to quit type Ctrl+C in the terminal.
Update :
I found out that Plank did not work nicely with compiz. Minimizing windows will not always move the windows out of sight in the direction of the panel ( as wanted ), but also to the upper left corner.
I replaced Plank with Docky :
sudo apt-get install docky
System Settings > Tweaks > Cerbere > select Plank and remove (-), then add (+) Docky.
Re-login....
Window decoration theme : https://launchpad.net/~shimmerproject/+archive/ppa/+index?field.series_filter=lucid ( greybird-git )
Some of my settings in ccsm ( compizconfig-settings-manager ) are :
Window Management > Place Windows > Placement Mode > Centered
Window Management > Scale > Bindings > Initiate Window Picker For All Windows > TopLeft
Extras > Screenshot > Initiate > Super Button1
Utility > Enable Scale Addons
Utility > Workarounds > check Keep previews of minimized windows
Effects > check Animations Add-On
Desktop > Expo > Expo edge > BottomRight
General > General Options > Key bindings > Show Desktop > BottomLeft
Desktop > check Show desktop
Accessibility >Opacity, Brightness and Saturation > Opacity > Increase Opacity ( mouse ) > Alt Button4
Accessibility >Opacity, Brightness and Saturation > Opacity > Decrease Opacity ( mouse ) > Alt Button5
Accessibility >Opacity, Brightness and Saturation > Brightness > Increase Brightness ( mouse ) > Super Button4
Accessibility >Opacity, Brightness and Saturation > Brightness > Decrease Brightness ( mouse ) > Super Button5
If you like to use Emerald Window Decorator just follow this guide.
Subscribe to:
Posts (Atom)