26 August 2011

visit a primo list of linux links at linux poison http://goo.gl/9Jrc0 @linux_poison

An excellent list from linuxpoison:

List of best Linux blogs - V2
Posted by Nikesh Jauhari

LinuxHelp Good site with great stuff, frequently updated.
HowToGeek Great How to site, not only for Linux but its Linux section is great!.
LinuxScrew good site which is coming real popular these days, with great articles.
Fsckin Frequently updated Linux site, great tutorials, and good posts about games for Linux.
Ubuntu Geek All about Ubuntu, from a real Geek
BashCuresCancer Site devoted to command Line, unfortunately not too frequently updated
http://www.linux-gamers.net/ For Linux games, how tos, forums, etc. about Video
Ars Technica Open Ended section: http://arstechnica.com/journals/linux.ars
DesktopLinux: http://www.desktoplinux.com/
Phoronix: http://www.phoronix.com/ (lots of good Linux stories)
http://www.ubuntux.org Ubuntux
http://www.markshuttleworth.com mark shuttleworth's blog
http://ubuntuliving.blogspot.com ubuntu living
http://planet.gnome.org planet gnome [same as planet kde]
http://planetkde.org planet kde

....more links and excellent posts at linuxpoison.

23 August 2011

add a script to the default applications list in gnome

My previous post explains how to use a script to open vim in the terminal. I used a work-around method to set the script as the default editor for plain text files. With a bit of fiddling I added the script to the list of preferred applications:

Firstly create a new .desktop file for our script in our ~/.local/share/applications directory:
cd ~/.local/share/applications
vim /vim-gnome.desktop
Insert the following contents. Remember to replace '/PATH/TO/vim-gnome with the path to where you have the script saved. Also if you have a custom icon replace '/PATH/TO/vim.svg' with the path to your icon.

[Desktop Entry]
Comment=Edit text files
Comment[af]=Redigeer tekslêers
Comment[am]=የጽሑፍ ፋይሎች ያስተካክሉ
Comment[ar]=حرّر ملفات نصية
Comment[az]=Mətn fayllarını redaktə edin
Comment[be]=Рэдагаваньне тэкставых файлаў
Comment[bg]=Редактиране на текстови файлове
Comment[bn]=টেক্স্ট ফাইল এডিট করুন
Comment[bs]=Izmijeni tekstualne datoteke
Comment[ca]=Edita fitxers de text
Comment[cs]=Úprava textových souborů
Comment[cy]=Golygu ffeiliau testun
Comment[da]=Redigér tekstfiler
Comment[de]=Textdateien bearbeiten
Comment[el]=Επεξεργασία αρχείων κειμένου
Comment[en_CA]=Edit text files
Comment[en_GB]=Edit text files
Comment[es]=Edita archivos de texto
Comment[et]=Redigeeri tekstifaile
Comment[eu]=Editatu testu-fitxategiak
Comment[fa]=ویرایش پرونده‌های متنی
Comment[fi]=Muokkaa tekstitiedostoja
Comment[fr]=Édite des fichiers texte
Comment[ga]=Eagar comhad Téacs
Comment[gu]=લખાણ ફાઇલોમાં ફેરફાર કરો
Comment[he]=ערוך קבצי טקסט
Comment[hi]=पाठ फ़ाइलें संपादित करें
Comment[hr]=Uređivanje tekstualne datoteke
Comment[hu]=Szövegfájlok szerkesztése
Comment[id]=Edit file teks
Comment[it]=Modifica file di testo
Comment[kn]=ಪಠ್ಯ ಕಡತಗಳನ್ನು ಸಂಪಾದಿಸು
Comment[ko]=텍스트 파일을 편집합니다
Comment[lt]=Redaguoti tekstines bylas
Comment[lv]=Rediģēt teksta failus
Comment[mk]=Уреди текстуални фајлови
Comment[ml]=വാചക രചനകള് തിരുത്തുക
Comment[mn]=Текст файл боловсруулах
Comment[mr]=गद्य फाइल संपादित करा
Comment[ms]=Edit fail teks
Comment[nb]=Rediger tekstfiler
Comment[ne]=पाठ फाइललाई संशोधन गर्नुहोस्
Comment[nl]=Tekstbestanden bewerken
Comment[nn]=Rediger tekstfiler
Comment[no]=Rediger tekstfiler
Comment[or]=ପାଠ୍ଯ ଫାଇଲଗୁଡ଼ିକୁ ସମ୍ପାଦନ କରନ୍ତୁ
Comment[pa]=ਪਾਠ ਫਾਇਲਾਂ ਸੰਪਾਦਨ
Comment[pl]=Edytor plików tekstowych
Comment[pt]=Editar ficheiros de texto
Comment[pt_BR]=Edite arquivos de texto
Comment[ro]=Editare fişiere text
Comment[ru]=Редактор текстовых файлов
Comment[sk]=Úprava textových súborov
Comment[sl]=Urejanje datotek z besedili
Comment[sq]=Përpuno files teksti
Comment[sr@Latn]=Izmeni tekstualne datoteke
Comment[sr]=Измени текстуалне датотеке
Comment[sv]=Redigera textfiler
Comment[ta]=உரை கோப்புகளை தொகுக்கவும்
Comment[tk]=Metin faýllary editle
Comment[tr]=Metin dosyalarını düzenle
Comment[uk]=Редактор текстових файлів
Comment[vi]=Soạn thảo tập tin văn bản
Comment[wa]=Asspougnî des fitchîs tecses
Exec=/PATH/TO/vim-gnome -f %F
Name=Vim Text Editor
 Save the file.

~/.local/share/applications/vim-gnome.desktop is then referenced in ~/.local/share/applications/defaults.list, with:
cd ~/.local/share/applications
echo "text/plain=vim-gnome.desktop" >> defaults.list
That's it. You might need to restart nautilus or log out of gnome to see the change, I don't remember.

If you have made the changes correctly you should now see a new 'Vim Text Editor' entry in your Accessories menu, in your file properties dialog under the 'Open with' tab and in your context menu in Nautilus:

script to use terminal vim as default gnome editor http://goo.gl/OxAtC

Set terminal vim as the default editor instead of using one of the gui vims.

1. Create script:
vim vim-gnome
2. Script contents:
gnome-terminal -t "" -e "vim $ARGS"
3. Write buffer to file and close:
4. Make script executable:
chmod +x vim-gnome
5. Copy script to scripts directory (if you use one) eg.:
cp vim-gnome /home/lxtips/Dropbox/bin/
6. Set it as the default editor (in Ubuntu) right click the file in nautilus (ie. .bashrc) and select Properties > Open With.

7. Click Add > 'Use a custom command' and add the path to the script for example:
Repeat steps 6 and 7 for any other file types that still revert to the previous default editor.

8. Use an alternate gnome-terminal custom color scheme like the one below to match your favorite vim color scheme. If anyone knows how I might get gnome-terminal to replicate bolded text This is my attempt at Desert:

Script contents from vim.wikia.com 

22 August 2011

try a music visualizer for ubuntu with sudo apt-get install projectm-pulseaudio

projectm homepage

install in natty narwhal ubuntu 11.04 with:
sudo apt-get install projectm-pulseaudio
run with
shortcut keys:

m - brings up a menu
f - toggles fullscreen on/off
l - "locks" to a particular preset
y - toggles shuffle mode
n - next preset
p - previous preset
r - selects random preset

F1 - Help menu
F2 - Toggles song title on/off (doesn't work in libvisual or pulseaudio as far as I can tell)
F3 - Toggle preset name on/off
F4 - Toggel rendering info on/off
F5 - Shows fps

21 August 2011

disable gnome-terminal close window warning dialog in gconf

gnome-terminal warns me if I try to close it while it is running something or logged in as root. A useful measure but also a bit annoying depending on your terminal habits. To disable the warning:

  1. Alt+F2 for the run dialog. Type 'gconf-editor' and hit enter.
  2. Navigate to apps > gnome-terminal > global.
  3. Uncheck 'confirm-window-close'.
  4. Close gconf-editor.

add a subscription in google reader with a

google reader shortcut keys from google.com/support/reader

j/kitem down/upselects the next/previous item in the list
space/shift-spacepage down/upmoves the page down/up
n/pscan down/upin list view, selects the next item without opening it
shift-n/pnavigation down/upselects the next/previous subscription or folder in the navigation
shift-xnavigation expand/collapseexpands or collapses a folder selected in the navigation
oopen/close itemin list view, expands or collapses the selected item
enteropen/close itemin list view, expands or collapses the selected item
shift-onavigation open subscriptionopens the subscription or folder currently selected in the navigation
-zoom outdecreases the font size of the current item
=zoom inincreases the font size of the current item
Acting on Items
stoggle starstars or un-stars the selected item
ltoggle likelikes or un-likes the selected item
shift-stoggle shareshares or un-shares the selected item
shift-dshare with noteshares the selected item with a note
vview originalopens the original source for this article in a new window
ttag an itemopens the tagging field for the selected item
mmark as read/unreadswitches the read status of the selected item
shift-amark all as readmarks all items in the current view as read
eemail itemopens the email form to send an item to a friend
g then hgo to homegoes to the Google Reader homepage
g then ago to all itemsgoes to the "All items" view
g then sgo to starred itemsgoes to the "Starred items" view
g then shift-sgo to shared itemsgoes to the "Your shared items" view
g then ugo to subscriptionallows you to navigate to a subscription by entering the subscription name
g then tgo to tagallows you to navigate to a tag by entering the tag name
g then fgo to friendallows you to navigate to a friend's shared items by entering the friend's name
g then shift-fgo to all friends' shared itemsshows all of your friends' shared items
g then shift-tgo to trendsgoes to the "Trends" view
g then dgo to feed discoveryshows the recommendations page, or the browse page if there are no recommendations
rrefreshrefreshes the unread counts in the navigation
ftoggle full screen modedisplays reading list in full screen mode
utoggle subscription list displayhides or shows the list of subscriptions
1expanded viewdisplays the subscription as expanded items
2list viewdisplays the subscription as a list of headlines
/searchmoves your cursor to the search box
aadd a subscriptionopens the "Add a subscription" box in the sidebar
?keyboard shortcuts helpdisplays a quick guide to all of Reader's shortcuts

cd to last directory with cd - http://goo.gl/1mckk

$ cd Downloads/~/Downloads

$ cd -/home/lxtips
from superuser.com