STumbling In Linux Land, STupid and Unlucky Pablo? The tribulations and happy discoveries of a Linux former Newbie, now bit more experienced user
Monday, December 27, 2010
cunstomization Arch openbox details
Appearance: Active Window title Sans (LDHandyHand) 13 inactive Sans (LdHand) 12; menu header Sans 12(NeutraText Demi)
Menu Item Droid Sans (NeutraText Demi) 12 On Screen Display Droid 12 (Street freehand) -- inbrackets alternative more Roaring Twenties like setup
lxappearance (menu Preferences, User Interface Settings):
Widget: MadPablo font Avenir LT STD 55 Roman (Neutra Text Demi 14)
Icon theme: Simple
Mouse Cursor : DMZ
use customized color scheme sometimes selected sometimes not
Thursday, December 23, 2010
create a javascript image slide show
Create you own online slideshow:
http://www.webpageaddons.com/webmastertool/java-script-slide-show.htm
Howto use ImageMagick -basics
Some nice IM commands here: http://www.linux.com/archive/feature/113978
Very elaborate documentation: http://www.imagemagick.org/Usage/
Monday, December 13, 2010
How to create a custom colour scheme on each webpage you want
Firefox with the GreaseMonkey add-on installed.
So first get GreaseMonkey and install: https://addons.mozilla.org/en-US/firefox/addon/748/
After restarting Firefox go to http://userscripts.org./ or better go directly to
the High_Contrast script http://userscripts.org./scripts/show/2563
Now go to the folder in which your Greasemonkey scripts are stored.
In windows this will be something like:
Documents and Settings\user\application data\mozilla\firefox\profiles\+7565fgdgd.default\gm_scripts
In my Arch install it is in /home/paul/.mozilla/firefox/qqnkoj88.default/gm_scripts
Create a new folder, with a name fitting to your custom colour scheme. I choose yellow_red, well because these are the colours I want to use, bright yellow letters on a red background.
Copy the high_contrast.user.js in the high_contrast folder to your new folder yellow_red.
Now edit the js file with a simple text editor. In Windows you may have to change the file extension from .js to .txt to be able to do that. If you don't see the file extensions in Windows Explorer, you will have to change your folder options and unmark hide file extensions.
Now we gonna change this section
Pref("aggressive", false) ? global_css : alternative_css
// true means we go right ahead and apply our stylesheet.
// false means it's just an alternative you can select under "View: Page Style"
)([
'body, * {',
' background-color: ' + Pref('black_colorval', '#000') +' !important;',
' background-image: none !important;',
' color: ' + Pref('white_colorval', '#fff') +' !important;',
'}',
'a:link { color: ' + Pref('link_colorval', '#a0a0ff') +
' !important; text-decoration: underline !important; }',
'a:visited { color: ' + Pref('vlink_colorval', 'purple') +
' !important; }',
'a:active { color: ' + Pref('alink_colorval', 'red') +
' !important; }'
].join("\n"), Pref('stylesheet_name', "White-On-Black"));
}
to
What I have done is replaced black by red and white by yellow and also I also adapted the colour codes, where necessary, to what I wanted.Pref("aggressive", false) ? global_css : alternative_css
// true means we go right ahead and apply our stylesheet.
// false means it's just an alternative you can select under "View: Page Style"
)([
'body, * {',
' background-color: ' + Pref('red_colorval', '#FF0000') +' !important;',
' background-image: none !important;',
' color: ' + Pref('yellow_colorval', '#FFFF00') +' !important;',
'}',
'a:link { color: ' + Pref('link_colorval', '#a0a0ff') +
' !important; text-decoration: underline !important; }',
'a:visited { color: ' + Pref('vlink_colorval', 'purple') +
' !important; }',
'a:active { color: ' + Pref('alink_colorval', 'green') +
' !important; }'
].join("\n"), Pref('stylesheet_name', "Yellow-On-Red"));
}
Where do you find these hexadecimal codes for colour?
For instance here: http://www.december.com/html/spec/color.html
Now we want the right name in the script.
Change in line 84
link.setAttribute("title", title || "WhiteOnBlack");
to
link.setAttribute("title", title || "YellowOnRed");
After you have changed the colours to your liking, change the name of the script itself to yellow_red.user.js
Now we have to take care greasemonkey can find the new script :
In gm_scripts you will find config.xml.
Again open this with a text editor and then first copy and than change a script section in this file; it starts with opening bracket script and finishes with forward slash script closing bracket.
Change the text between the brackets < >:
Script filename="high_contrast.user.js" name="High_Contrast" namespace="http://interglacial.com/" description="makes the background black and the text white, either in an alternate stylesheet you can select as needed, or immediately" enabled="true" basedir="high_contrast"
to
Script filename="yellow_red.user.js" name="Yellow_Red" namespace="http://interglacial.com/" description="makes the background red and the text yellow, either in an alternate stylesheet you can select as needed, or immediately" enabled="true" basedir="yellow_red"
Save and close.
Now activate the new script by restarting firefox and going to View, Pagestyle, select yellow_red.
New Colour scheme on every page or optional?
Default the high contrast script is set as a page option; that is each time you want a page to look like this you have to acitvate it in described manner.
You can change that and make it the default look for each webpage in your browser.
Open the config page in Firefox by puttingin the address bar: about:config
and filter on interglacial. Change in the first line with the tag agressive the boolean false to true by double clicking on it. There you can also modify the link or visited link colours.
Error Dbus in Arch
File "/usr/share/wicd/gtk/wicd-client.py", line 63, in
from wicd import dbusmanager
File "/usr/lib/python2.7/site-packages/wicd/dbusmanager.py", line 93, in
DBUS_MANAGER = DBusManager()
File "/usr/lib/python2.7/site-packages/wicd/dbusmanager.py", line 57, in __init__
self._bus = dbus.SystemBus()
File "/usr/lib/python2.7/site-packages/dbus/_dbus.py", line 202, in __new__
private=private)
File "/usr/lib/python2.7/site-packages/dbus/_dbus.py", line 108, in __new__
bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
File "/usr/lib/python2.7/site-packages/dbus/bus.py", line 125, in __new__
bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.FileNotFound: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Solution:
Edit as root /etc/rc.conf
especially the last daemon line
Make sure you DON'T have dbus in your daemons line if you have hal in it (this was my fault). I stopped dbus by putting an exclamation mark before it: !dbus
hal will start dbus as well. Also, make sure the wicd daemon is after the hal daemon.
see also: https://bbs.archlinux.org/viewtopic.php?id=50674
and https://wiki.archlinux.org/index.php/Wicd
Friday, December 3, 2010
Change default text editor to nano
If you want to change that to nano, you will probably do that because the default actions are shown at the bottom of the nano page, so it is easier to use when you don't know the vim shortcuts.
The ^ sign stand for the CTRL key, btw; the M(eta) stands for the Alt key.
To change the default text editor you go to your .bashrc file in /home/user.
Make it visible with ctrl+h.
Then setting something like
export EDITOR=nano
in your .bashrc, or the file for the shell your using, might solve your problem.
/////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\sorurce of concise nano howto :
http://www.gentoo.org/doc/en/nano-basics-guide.xml
Opening and creating files is simple in nano, simply type:
Code Listing 1.1: Creating or opening a file |
# nano filename |
Nano is a modeless editor so you can start typing immediately to insert text. If you are editing a configuration file like /etc/fstab use the -w switch, for example:
Code Listing 1.2: Disable the word wrapping |
# nano -w /etc/fstab |
Warning: It is very, very important that you use the -w switch when opening a config file. Failure to do so may keep your system from booting or cause other bad things. |
If you want to save the changes you've made, press Ctrl+O. To exit nano, type Ctrl+X. If you ask nano to exit from a modified file, it will ask you if you want to save it. Just press N in case you don't, or Y in case you do. It will then ask you for a filename. Just type it in and press Enter.
If you accidentally confirmed that you want to save the file but you actually don't, you can always cancel by pressing Ctrl+C when you're prompted for a filename.
To cut a single line, you use Ctrl+K (hold down Ctrl and then press K). The line disappears. To paste it, you simply move the cursor to where you want to paste it and punch Ctrl+U. The line reappears. To move multiple lines, simply cut them with several Ctrl+Ks in a row, then paste them with a single Ctrl+U. The whole paragraph appears wherever you want it.
If you need a little more fine-grained control, then you have to mark the text. Move the cursor to the beginning of the text you want to cut. Hit Ctrl+6 (or Alt+A). Now move your cursor to the end of the text you want to cut: the marked text gets highlighted. If you need to cancel your text marking, simply hit Ctrl+6 again. Press Ctrl+K to cut the marked text. Use Ctrl+U to paste it.
Searching for a string is easy as long as you think "WhereIs" instead of "Search". Simply hit Ctrl+W, type in your search string, and press Enter. To search for the same string again, hit Alt+W.
Note: In nano's help texts the Ctrl-key is represented by a caret (^), so Ctrl+W is shown as ^W, and so on. The Alt-key is represented by an M (from "Meta"), so Alt+W is shown as M-W.
Thursday, December 2, 2010
Man2html convert a man page to an html page
Find it in your repo or download and install from source.
Ma a page from man xdiskusage:
man xdiskusage | man2html -compress > xdiskusage.htm
The compress option converts more empty lines to one.
See documentation
Monday, November 29, 2010
Nvidia-beta update problem -Arch
So I switched back to the ordinary nvida driver.
First moved to tty2; start another terminal session at the login by doing Ctrl+Alt+F2.
Then sudo pacman -S nvidia nvida-utils. Remove nvidia+beta etc.? yes.
Reboot after install.
Update problem because of bad package
Friday, November 26, 2010
problem to install a basket note pads tutorial getting things done -Solved
One of the various ways to use BasKet Note Pads is to implement the "Getting Things Done" method in order to be more organized.
You can get more information by reading the article on Wikipedia or this book summary.
This basket archive you can download will help you getting started quickly with the method. The basket group is ready-to-use, specially made to adapt the Getting Things Done method to BasKet Note Pads, and all baskets have a short introduction text informing you about their goal. Click the left image to get a bigger screen capture of the first basket. To start using Getting Things Done, just save the archive and open it with BasKet Note Pads.
Tip: The top-level basket "GTD" is to be used as an inbox for this method. You can assign a global keyboard-shortcut to it by displaying the basket properties window. Then, whenever you get an idea, you can press this global shortcut, press the Insert. key to add a new entry, type your idea, and close with BasKet Note Pads to return to what you were doing right before. Easy and very fast.
Soltion install problem:
Getting Things Done
Auf der Projekt-Webseite finden Sie im Downloadbereich [2] ein Basket-Archiv namens GTD.baskets, das die Zeit- und Selbstmanagementmethode "Getting Things Done" (GTD) umsetzt. Die vordefinierten Körbe enthalten Anleitungen zum Einsatz dieser Methode.
Um GTD zu installieren, laden Sie zunächst das Paket GTD.baskets herunter. Bei unserem Test verwendete das Archiv merkwürdige Verzeichnisnamen zur Ablage der enthaltenen Icons -- Sie sollten darum zunächst in einem Terminalfenster mit den folgenden Befehlen eine Reihe von Unterverzeichnissen erstellen:
export ICO=~/.kde/share/apps/basket/basket-icons; mkdir $ICO; cd $ICO
for d in xygen-icons n-icons cons icons; do mkdir -p $d/16x16/actions; doneCreate folder xygen-icons n-icons, cons and icons and make in these folders subdirectories 16x16 and in that subdirectory actions
Rufen Sie dann in Basket den Menüpunkt Korb / Importieren / Korbarchiv auf und wählen Sie die Datei aus.
Wenn Sie GTD verwenden (Abbildung 10), werden Sie hauptsächlich Einträge von einem Korb in den anderen schieben -- denken Sie dabei daran, dass Drag & Drop zwischen Körben in der aktuellen Basket-Version nicht stabil arbeitet: Cut & Paste ist die sicherere Variante.
Thursday, November 25, 2010
Writetype chokes in wrong text file
Solved by saving it in gedit as Character encoding current locale UTF-8, line ending linux/unix
Set locale in Arch
irst you have to enable the locales you want being supported by your system. To enable or disable them, the file /etc/locale.gen is used. It contains every locale you can enable, and you have just to uncomment lines you want to do so.
As we want to setup an English UTF-8 conform system, we want to enable en_US.UTF-8. But for compatibility to programs that don't support UTF-8 yet, it's recommended to support any other locale, prefixed with en_US as well. Having this in mind, we enable this set of locales:
en_US.UTF-8 UTF-8
en_US ISO-8859-1
After you've enabled the necessary locales, you have to run locale-gen as root to update them:
# sudo locale-gen
Generating locales...
en_US.UTF-8... done
en_US.ISO-8859-1... done
Generation complete.
Setting system wide locale
To define which locale should be used by the system, you can easily add your locale to your /etc/rc.conf file. As we've just added ISO-8859 support just for (backward-)compatibility, we add en_US.UTF-8 here:
LOCALE="en_US.UTF-8"The system wide locale will be updated after rebooting your computer.
Setting per user locale
As we discussed earlier, some users might want to define a different locale than the system-wide locale. In this case, you can export LANG in your ~/.bashrc. For example you can use the en_AU.UTF-8 locale.
export LANG=en_AU.UTF-8
Your locales will be updated as soon as you re-source your ~/.bashrc. This happens on login or alternatively you can type:
$ source ~/.bashrc
found this here:https://wiki.archlinux.org/index.php/Locale#Enabling_necessary_locales
Monday, November 22, 2010
Dictionaries in Linux
When you're writing in English and understand the language reasonable well I would say Artha is a first and best choice, compact but because based on Wordnet:
WordNet is a large lexical database of English, developed under the direction of George A. Miller . Nouns, verbs, adjectives and adverbs are grouped into sets of cognitive synonyms (synsets), each expressing a distinct concept. Synsets are interlinked by means of conceptual-semantic and lexical relations. The resulting network of meaningfully related words and concepts can be navigated with the browser.
It is of a very high quality; it is fantastic to get a more gutsy feeling for the meaning of many rare or more intricate words.
Are we more in translating I find Goldendict the most feature rich app.
Importing dictionaries is very easy.
Important also is that different kind of dictionaries can be imported; the interface is clean an efficient and you can import a lot of stuff -nearly everything that is in htm format- to make a encyclopaedia or so.
The special feature of Aarddict that is very useful for using an offline wikipedia file.
Stardict and Goldendict are online capable of online Wikipedia viewing.
All programs are through Aur available in Arch.
Sunday, November 21, 2010
Edited PKGBUILD for Aarddict after setuptools not found error
File "setup.py", line 4, infrom setuptools import setup, find_packages ImportError: No module named setuptools
So I had to adapt the pkgbuild, becoming this (thick letters were changed):
# Contributor: Jeffery MacEachern
pkgname=aarddict
pkgver=0.9.1
pkgrel=1
pkgdesc="Aard Dictionary is a multiplatform dictionary and offline Wikipedia reader."
arch=(any)
url="http://aarddict.org/"
license=(GPL)
depends=('python2' 'python-pyicu' 'python-simplejson' 'hicolor-icon-theme' 'setuptools' 'pyqt')
makedepends=('setuptools')
install=aarddict.install
source=(http://bitbucket.org/itkach/${pkgname}/get/${pkgver}.zip aarddict.install)
md5sums=('41224733330d98b61818391e34311802'
'4d14628e16252af7ddf562ad19e3bcb4')
build() {
cd $srcdir/$pkgname
python2 setup.py install --root=$pkgdir/ --optimize=1 || return 1
}
Install with: makepkg -sci PKGBUILD
Virtaal localization and translation tool
Virtaal is a great translation tool for localization of software, but is also usable as a broader translation tool.
Virtaal is a graphical translation tool. It is meant to be easy to use and powerful at the same time. Although the initial focus is on software translation (localisation or l10n), we definitely intend it to be useful for several purposes.
Virtaal is built on the powerful API of the Translate Toolkit. “Virtaal” is an Afrikaans play on words meaning “For Language”, but also refers to translation.
A screencast tutorial is available here
Saturday, November 20, 2010
if system time is not correct on Arch
# pacman -S openntpd
and set time, type in terminal:
ntpd -s -d
Thursday, November 18, 2010
Convert all files in folder from ape to wav
Example of a batch conversion script
First install mac by doing
sudo pacman -S mac
Copy the text below in a text file, call it ape2wav and make it executable (chmod 755 it)
#! /bin/bash
cd $1 # change to the directory we passed as a parameter
for a in *.ape; do # only process ape files
if [ -f "$a" ]; then # is it a file? We _could_ have a me.ape directory
b="${a%.ape}" #set b to filename only
mac "${b}.ape" "${b}.wav" -d
fi
done
Put in /usr/bin. Now doing ape2wav /home/paul/apefolder will extract the audiofiles to wav. Of course change user and folder name.
Another example flv2mp3:
#! /bin/bash
cd $1 # change to the directory we passed as a parameter
for a in *.flv; do # only process flv files
if [ -f "$a" ]; then # is it a file? We _could_ have a me.flv directory
b="${a%.flv}" #set b to filename only
ffmpeg -i "${b}.flv" "${b}.mp3"
fi
done
Wednesday, November 10, 2010
Grant user shutdown permission in suoders file
Yes, you will have to edit your sudoers file in /etc
You will have to edit it so it looks like this:
# %users localhost=/sbin/shutdown -h now
paul ALL=(ALL) ALL
paul ALL=NOPASSWD: /usr/bin/thunar
paul ALL=NOPASSWD: /sbin/reboot
paul ALL=NOPASSWD: /sbin/shutdown
paul ALL=NOPASSWD: /usr/bin/pacman -Sy
In Arch you can define your default editor in /home/user/.bashrc
export EDITOR=nano
Of course replacing paul with your username.
What you do is that as superuser you grant user paul the permission to do certain superuser things like shutting done without password.
You will have to edit the sudoers file not with an ordinary texteditor but with "sudo visudo" in the terminal.
"visudo" is the command used to edit the /etc/sudoers configuration file. It is not recommended that you use any other editor to modify your sudo parameters. "visudo" uses the same commands as the "vi" text editor.
Always make a backup of your old original sudoers file;nevertheless visudo is often configured to work with nano.
To be sure it uses nano you can change the editor visudo uses, by typing
#EDITOR=nano visudo
to edit the file
Ctrl+o, Enter to save
Ctrl+x to exit.
Tuesday, November 9, 2010
Automatic listing of all your partitions in Arch
http://igurublog.wordpress.com/downloads/mod-pcmanfm/
If you open it not too fast after startup, some 20 seconds it will show all your partitions, clicking on each one of them will mount them at once.
Friday, November 5, 2010
If firefox is slow
type
about:config
in the navigation bar (no space between about and : )
of Firefox, accept the warning and then fill in in the search bar: network.dns.disableIPv6 , it is set on false, just toggle it to true.
You may also want to install Tweak Network Settings extension
Thursday, November 4, 2010
Again problem with python script in Arch?
#!/usr/bin/python to #!/usr/bin/python2
For instance:
#!/usr/bin/python to #!/usr/bin/python2 in /usr/bin/linuxconverter
Python is now Python 3
2010-10-18 - Allan McRae
A major Python update has just been moved from the testing repositories and will be available on a mirror near you. The default "python" package is now for the 3.x series while the 2.x series has been moved to a "python2" package, with python-2.7 having been scheduled to be the last major release in the python-2.x series.
Since /usr/bin/python will now point to the 3.x binary, any program requiring 2.x needs to point to /usr/bin/python2 instead. All our packages have been updated accordingly, but any remaining issues found can be reported to the bug tracker (not the forums or mailing lists).
AUR and third-party packages/projects using Python will likely need updating to reflect this move, as many programs are still incompatible with Python 3.
Sunday, October 31, 2010
Chakra installer Tribe
As you probably know has started as a KDEmod+Arch combo, but has evolved since.
http://chakra-project.org/img/slideshow/2.jpg
Tribe, the Chakra installer is a wonder of sophistication and makes installing an OS ridiculously easy.
I think it would be a great idea to see of the work done there couldn't be useful for creating an easy Archbang installer.
With the Chakra live CD I tried to use the KDE partition tool.
Because of earlier bad luck with a non gparted partitioner, I decided to use gparted though to avoid taking risks with my other installs.
The reason I tried Chakra is to get a new impression of the KDE project.
The folder view widget kind of intrigues me and of course the the present KDE sophistication of design and desktop interface galore is a nice equal at least to Win7.
All this blingbling isn't for me, but possible converts to GNU/Linux and Arch might be interested.
I will try a review in another place; mentioning the hiccups and so on.
I'm afraid I'm too spoiled with openbox wm to accept an even great looking interface get so much in the way.
But the installer and the finishing and looks of this distro are impressive.
See also this review: http://jeffhoogland.blogspot.com/2010/09/chakra-linux-distro-review.html
http://chakra-project.org/img/slideshow/3.jpg
http://chakra-project.org/img/slideshow/4.jpg
http://chakra-project.org/img/slideshow/5.jpg
Tuesday, October 26, 2010
Arch issues with Python update Adeskbar
[quote][paul@archbang ~]$ adeskbar
Traceback (most recent call last):
File "/usr/bin/adeskbar", line 30, in
import adesk.bar
File "/usr/share/adeskbar/adesk/bar.py", line 292
print '------------------------------------'
^
[/quote]
On [url]http://aur.archlinux.org/packages.php?ID=26910[/url] the Aur page for adeskbar a solution is presented that doesn't work for me. After copying from pastebin the adapted PKGBUILD I get this error:" ERROR: PKGBUILD contains CRLF characters and cannot be sourced."
Solved this by not using geany but leafpad and cut and paste text there.
Procedure:
First uninstall old package.
Put the PKGBUILD and the package.install file in one folder.
Open terminal in that folder and do:
makepkg -sci PKGBUILD
This will build and install the new package.
I also had a problem with oblogout; solved that by
changing first line in usr/bin/oblogout from #!/usr/bin/python to #!/usr/bin/python2 .
Monday, October 11, 2010
Video playback not smooth in 64 bits arch
sudo pacman -Rd nvidia nvidia-utils
Installing the new ones with
packer -S nvidia-beta nvidia-utils-beta
Do this only when you have problems with the video playback!
Gui for Packer
Packer is a dead simple package manager for AUR packages in Archlinux.
For people who can't do without a gui there is blinky.
Wednesday, July 28, 2010
Updating AUR packages will have consequences for pacman
packer -Su
but if you have to realize that your pacman, the accepted Arch packages will also be updated. So if you have an issue with a certain package as I have now with libgl which interferes with the nvidia-utils
you should give the command the exception rule: packer -Su --ignore libgl
And don't forget to supervise the build process and act on warnings and possible additional dependencies.
Monday, July 12, 2010
Saturday, July 10, 2010
Shortcuts for Firefox tabs overview and control
In fact, I don't think tabs are the best way to organize all your web pages, a better way is needed.
It is not so bad, tabs, I think: wasn't there an addon that gave a sort of cooliris like view of your tabs, something like alt+tab with apps but then with tabs?
What I really have in mind is some sort slideshow like tab switching (all maximized) with the f5 key as toggle to start sliding/switching and stop switching.
Something like this: https://addons.mozilla.org/nl/firefox/addon/5244/102 is a step in this direction
Ctrl+Tab navigation for Firefox tabs:
* Tabs are presented in most-recently-used order, similar to Alt+Tab on various operating systems
* Releasing Tab and pressing it again moves to the next preview
* Pressing W closes the selected tab
* Releasing Ctrl switches to the selected tab
* Hidden preferences: browser.ctrlTab.mostRecentlyUsed
Shift+Ctrl+Tab shows all tabs in a grid:
* Shows all open tabs
* Tabs can be closed by middle clicking
* Search field filters tabs based on their titles and addresses, Enter selects the first tab
Btw some of this is already included in firefox 3.6 when editng about:config
Set browser.ctrlTab.previews to true; default is false.
I would like to see the previews bigger.
Friday, July 2, 2010
creating a new user or logging in as root from grub
To change the password, turn on the computer and press the ESC key when GRUB appears. Scroll down and highlight ‘Recovery Mode’ and press the ‘B’ key; this will cause you to enter ‘Single User Mode’.
You’re now at the prompt, and logged in as ‘root’ by default. Type ‘passwd’ and then choose a new password. This will change the root password to whatever you enter. If you’re interested in only gaining access to a single account on the system, however, then type ‘passwd username’ replacing ‘username’ with the login name for the account you would like to alter the password for.
Use firefox bookmarks in Uzbl and set Bookmarks page as Home page
Now open the uzbl config file.
This can be according to your setup at different places; on my Arch it is in /home/paul/.config/uzbl
Find uzbl. org till you discover:
# --- Hard-bound bookmarks ---
@cbind gh = set uri = http://uzbl.org
change to:
@cbind gh = set uri = file:///home/paul/bookmarks.html
and find:
menu_add Go Home = set uri = http://uzbl.org
and change to:
menu_add Go Home = set uri = file:///home/paul/bookmarks.html
So in the cmd mode (when you want to type do i; when returning to cmd do Esc, like in Vi) type gh to get to your bookmarks.
Or right click and choose: go home.
Thursday, July 1, 2010
Dangers of editing your host file
Also many years ago some sites weren't functional and reachable anymore and
it turned out it had something to do with the adapted hosts file, which I had totally forgottenabout;in linux it is etc/hosts.
Because I couldn't get the adblock.py for uzbl to work I decided to use the host file again.
See: http://someonewhocares.org/hosts/
Just copy the list of the to be blocked sites in your host file.
Hopefully I will think about it when I will get some trouble with accessing sites.
But it always better than using a proxy which can really make your internet a lot slower.
Installing Moblock
Dependencies:iptables libnetfilter_queue
Install: packer -s moblock
Start daemon: sudo blockcontrol start
Gui for moblock: mobloquer
Tuesday, June 29, 2010
Update a package that is not in AUR
Put the PKGBUILD and the package.install file in one folder.
Open terminal in that folder and do:
makepkg -sci PKGBUILD
This will build and install the new package.
And here is an example for adeskbar 0.3.8:
the new PKGBUILD
and adeskbar.install for 0.3.8.
Trying new font configuration has desastrous effect
Arch wiki Font Configuration page recommends the following:
Ubuntu uses the original LCD patched packages and adds extra configurations, and occasionally patches.
First, the conflicting packages need to be removed:
pacman -Rd libxft cairo fontconfig freetype2
Then install the patched packages from the AUR using an AUR helper of your choice. The package names are:
freetype2-ubuntu fontconfig-ubuntu libxft-ubuntu cairo-ubuntu
Halfway the installation I get into problems because there are some dependency problems and not all the ubuntu packagescan be installed. The lxterminal comes to a halt and when rebooting I can't login.Well I login but get thrown back.
The only solution in this case i sto start another terminal session at the login by doing Ctrl+Alt+F2.
In terminal session on tty2 I first uninstall what was recently installed.If you don't know exactly any more what was installed and not, just try everything, what you told pacman to do: sudo pacman -Rd packagename1 then on with package2 etc.In this situation I did it one for one to get precise feedback.Then I reinstalled freetype2 cairo libxft and fontconfig in this order.This all seems rather easy but it took me some experimenting to find out what went wrong. Didn't realize that a wrecked fontconfig could have such devastating effects.
But as always the most recent changes will be responsible for what wrecked your system.
Monday, June 28, 2010
Find your image back on the internet
To find the same: upload the image to tineye: http://www.tineye.com/
To find similar use the find similar images function in Google Images Search:
http://similar-images.googlelabs.com/
Monday, June 21, 2010
Mouseless browsing in Firefox and Chromium
Shortcuts In Firefox:
I did not leave much out, even some the most obvious like F11 but if I forgot some important one and you have some good suggestions, let me know.
(chromium) means that in Chromium the shortcut is the same.
Navigation Shortcuts
Forward, backward, home, address bar and search bar can be done via keyboard shortcuts:
alt+left arrow : back (chromium)
might not work in debian: solution use backspace key: if this also won't work for you, make sure to set browser.backspace_action to 0 ( found in about:config iceweasel settings )
alt+right arrow : forward (chromium)
alt+Home : Home (chromium)
ctrl + or - : larger/smaller page layout (chromium)
F11, toggle full screen (chromium)
ctrl+n opens new window (chromium)
ctrl+f: opens search page dialogue F3=find again Shift+F3= find previous (chromium)
ctrl+h toggle history sidebar (chromium)
ctrl+b toggle bookmark sidebar (chromium)
ctrl +F11 Stumble Upon toolbar
super alt c Next Stumble (configure in tools, toolbar options, shortcuts).
/ (slash) : find as you type text
' (apostrophe) find as you type link and focus it(enter to activate), use the two following in combination with these two
ctrl+enter: opens already focused link in new tab
shift+enter: opens already focused link in new window
arrow down/up: Select Next/Previous Form Entry or Auto-Complete Entry
ctrl+l or F6: focus address bar (chromium)
ctrl+K : focus search bar
F4+arrow up/down +enter: only when search engine is focused: select from search engine list
Tab Shortcuts
Opening, closing and navigating your tabs can be done via these shortcuts:
ctrl+t : new tab (chromium)
ctrl+w : close tab (chromium)
ctrl+Page Up : previous tab (chromium)
ctrl+Page Down : next tab (chromium)
ctrl+tab : next tab (chromium)
alt+num (1, 2, 3, etc) : tab number (chromium)
ctrl+shift+T : open recently closed tabs (chromium)
ctrl+r : refresh tab content (chromium)
ctrl+shift+r : force-refresh tab content
ctrl+u : view tab source (chromium)
F7: toggle on/off caret browsing:(inserts a cursor into the text of the page and is very useful for highlighting and copying text)
More here:
http://www.accessfirefox.org/Firefox_Large_Print_Keyboard_and_Mouse_Shortcuts.php
Mouseless browsing takes keyboard control to a whole new level.
This site features two addons: the first is called Customize your Web and is a nifty Greasemonkey wysiwyg-editor addon for code dummies like me.
What is especially awesome, is how the developer manages to make page segments selectable and browsable with the keyboard. He shows how to focus elements of a search result page of Google with the keyboard. You can create extensive macro's of a couple of actions you perform regularly on a site and automate them with a keyboard shortcut. The downside of these great features is that each customization is limited and has to be tailored to a certain site. Of course when the build up a a page is similar you can try if it works with the similar pages/websites.
It's amazing and a wonderful add on to customize your webbrowsing.
The second add on from this site is the simpler but very effective mouseless browsing addon:
Mouseless Browsing (MLB) is a Firefox-Extension which enables you to browse the internet with the keyboard. The basic principle is to add small boxes with unique ids behind every link and/or form element. You just have to type in the id and press enter (there is also an automatice mode available) to trigger the corresponding action i.e. following a link, pressing a button or selecting a textfield.
You will need only the numerical keyboard to do your browsing. This is my preferred set up: that you only use the numkeys for controlling this add on.
You can toggle the visibility of the numerical id's. I set visibility out as default; visible by pressing a defined key; I chose to use the decimal key for this purpose.
The numerical id are quite unobtrusive to watch, compared to solutions I tried some years ago. Watch the two excellent videos to get a grip of the possibilities.
I use it most to select a certain tab, focus text fields and open links.
[solved]After update to xorg 1.8: Other partitions weren't shown in Pcmanfm
They said on the fora that rebooting would do the trick.
But not for me; editing the rc.conf file in the etc folder I made an @hal , putting the @ before hal makes the daemon load in the background.
Couldn't say if this really did the trick, but after rebooting again, the problem is solved!
Friday, June 18, 2010
Keybindings to manipulate windows Openbox
Activate windows or window switching
[Obkey variable mentioned between brackets, see below for more info on Obkey]
Super z Focus Next window [Obkey options Action: NextWindow; Raise AllDesktops or Desktop, linear; finalactions: Focus, Raise Unshade]
Super Alt z Tab Focus Previous window [Obkey options Action: PreviousWindow; Raise AllDesktops or Desktop, linear; finalactions: Focus, Raise Unshade]
Super Esc Unfocus, Iconofy [Obkey options Action: iconofy,unfocus]
(preferred here Super combinations because Alt combinations are often already in use by the active window app itself)
Alt F4 Close window
Super F5 ShowMenu [Obkey options Action: menu: ShowMenu client-list-combined-menu]
(shows all apps running on diverse desktops,select with up/down, enter)
Super Alt r Resize focused window [Obkey options Action: Resize edge:none]
Super Left - resizes window to half the screen then snaps it to the left [Obkey options Action: unmaximizefull, maximizevert, move resize to x=0,y=0, width:half horizontal monitor resolution 1920:2=960]
Super Right - resizes window to half the screen then snaps it to the right [Obkey options Action: unmaximizefull, maximizevert, move resize to x=960,y=960, width=960 change to half of your horizontal monitor resolution 1920:2=960]
Super F11 Maximize full, toggle [Obkey options Action:ToggleMaximizeFull]
Super F12 Iconofy
Super D Show/Hide Desktop [Obkey options Action:ToggleShowDesktop]
Moving to different workspaces and moving windows to them
Super F1 Go to Workspace 1 [Obkey options Action: Desktop desktop: 1]
Super F2 Go to Workspace2
Super Up Go to the workspace on the left [Obkey options Action: PreviousWindow]
Super Down Go to the workspace on the right [Obkey options Action: NextWindow]
Super Alt F1 Send window to workspace 1 [Obkey options Action:SendToDesktop, desktop:1 follow:yes]
Super Alt F2 Send window to workspace 2
Super Alt Left Send window to the workspace on the left [Obkey options Action:SendToDesktopLeft]
Super Alt Right Send window to the workspace on the right [Obkey options Action:SendToDesktopRight]
All above keybindings use the easy accessible super and alt keys.
When you use Pytyle; activate with Alt-a (halt it with Alt-u)
then Alt-Ctrl-C cascade windows, Alt-Ctrl-M maximize all windows,
Alt-Ctrl-h tile windows horizontal, Alt=Ctrl=v vertical.
Use Obkey to change keybindings
[For the lazy people: the first section of the keyboard part of the rc.xml with all the relevant keybindigns for manipulating windows you can find here http://aur.pastebin.com/6400yCJE ]
Select a keybinding, which one is not important and click on plus sign top left (insert sibling keybind); click on the new key till you see " new accelerator", press the key or keys whcih you wnat to use for that action.
Now add, action by clicking on plus sign action bottom middle right, you see as default possibility focus, click on that word and you will see a whole range of options of which you can choose by clicking an that option. When done don't forget to save.
For explanations on the terminology:
http://openbox.org/wiki/Help:Actions#Window_actions
This is a conky file to memorize the keybindings (to be placed in home/username/)
TEXT
#${color red}Manipulate Windows{color}
SHORTCUT KEYS:
${color beige}Change the Active Window
Super+z$alignr Raise Nxt Wind
Super+Alt+z$alignr Raise Prev Wind
Super+Le$alignr Raise Half wind Le
Super+Ri$alignr Raise Half wind Ri
Super F9$alignr Toggle Shade
Super F10$alignr Toggle fullscreen
Super F11$alignr Toggle Max Full
Super F12$alignr Iconofy
Super+d$alignr Show Desktop
Super+Esc$alignr Unfocus and Iconofy
Super Alt+r$alignr Resize Window
${color beige}Move between Windows
Super+up$alignr Go Left Wind
Super+down$alignr Go Right Wind
Super F1$alignr Go Desktop 1
Super F5$alignr Clientlist Combined Menu
Super+d$alignr Show Desktop
${color beige}Moving Windows
Super Alt Left$alignr Send Win to WoLe
Super Alt Right$alignr Send Win to WoRi
Super Alt F1$alignr Send Win to Wo 1
Super Alt F2$alignr Send Win to Wo 2
Want to discover other options?
Download Urukrama rc.xml file by doing in terminal:
wget http://dotfiles.org/~urukrama/rc.xml_07-2008
He shows a lot of options in his rc file;
see also http://urukrama.wordpress.com/2008/07/22/my-openbox-keybindings/
Epilogue: an interesting addition to keybindings are Keychains:
http://openbox.org/wiki/Help:Bindings
A keychain is pressing two keys together, lets say Ctrl and f and releasing them and pressing another key for instance s to
ToggleMaximizeFull and x to ToggleShade
If you leave Openbox in a key chain state for too long without completing it, Openbox will cancel the key chain and restore your normal key bindings.
You can also use the "C-g" (Control key and "g" key together), in the default configuration, to cancel any key chain which you are in.Make qt apps look better in an almost gtk only desktop
QGtkStyle
This is a Qt style which intends to make applications blend perfectly into the GNOME desktop environment by using GTK to render all components. To use this style you must have at least GTK+ 2.0 and Qt 4.3, although Qt 4.4 or higher is preferred.
Having trouble making your Qt applications use QGtkStyle?Qt won't apply QGtkStyle correctly if GTK is using the GTK-QT-Engine. Qt determines whether the GTK-QT-Engine is in use by reading the GTK configuration files listed in the environmental variable GTK2_RC_FILES. If the environmental variable is not set properly, Qt assumes you are using the GTK-QT-Engine, sets QGtkStyle to use the style GTK style Clearlooks, and outputs an error message:
QGtkStyle cannot be used together with the GTK_Qt engine.
Users of Openbox and other non-GNOME environments may encounter this probem. Here is a solution:
- Tell Qt where to look for your GTK configuration file by adding the following to your .xinitrc file:
- To add multiple paths, separate them with colons.
- The $HOME part will expand to be path to your user's home directory. Using the ~ shortcut won't work.
...
export GTK2_RC_FILES="$HOME/.gtkrc-2.0"
...
- In .gtkrc-2.0 you must specify a GTK theme. For example:
- This is usually done for you by an application which sets GTK2 Styles
...
gtk-theme-name="Crux"
...
However it seems in sume cases those tools insert only an include directive like
...which apparently is not recognized by all versions of QGtkStyle. You can hotfix this problem by inserting the gtk-theme-name manually in your .gtkrc-2.0 like above, note however that Gtk2-style-change applications might overwrite that change when you use them.
include "/usr/share/themes/SomeTheme/gtk-2.0/gtkrc"
...
To choose your GTK theme for QT apps you must run:
qtconfig
source: http://wiki.archlinux.org/index.php/Uniform_Look_for_QT_and_GTK_Applications#GTK-QT-Engine
Monday, June 14, 2010
Pytyle nice tiler for Openbox
Edit the pytylerc in the /home/user/.config/pytyle folder
Uncomment by removing # before and read the file to see the other keybindings
'Alt-Ctrl-H': 'tile.Horizontal',
'Alt-Ctrl-M': 'tile.Maximal',
'Alt-Ctrl-C': 'tile.Cascade',
'Alt-Ctrl-V': 'tile.Vertical',
Read more
http://pytyle.com/wiki/Configuration
Wednesday, June 9, 2010
Setup Multiple conky with build in weather script
This is a report on recreating a complicated multiple conky script without a manual howto set it up.
This is how I did it.First created a folder in home/paul named .conky.
In the folder I put four, later five scripts named .conkyrc1, .conkyrc2, etc.
The content of these scripts I found here
Download the nice and clean conkyscripts here .
Wallpaper found here on Filckr, choose the resolution you want.
When unpacked you will find: conkydate, conkhr, conkymin, conkystats.
Rename these to .conkyrc1 etc and copy to folder .conky.
Conkydate:
background no
use_xft yes
xftfont Helvetica:size=40
xftalpha 0.9
update_interval 3.0
total_run_times 0
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 800
maximum_width 800
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color 808080
default_shade_color 101319
default_outline_color green
alignment top_left
gap_x 400
gap_y 415
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
TEXT
${color ce2c51}${time %d} ${color ffffff}${time %B}
${time %A}
Conkyhr:
background no
use_xft yes
xftfont Helvetica:size=100
xftalpha 0.9
update_interval 3.0
total_run_times 0
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 170
maximum_width 170
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color 808080
default_shade_color 101319
default_outline_color green
alignment top_left
gap_x 20
gap_y 400
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
TEXT
${alignr}${color 000000}${time %H}
Conkymin:
background no
use_xft yes
xftfont Helvetica:size=100
xftalpha 0.9
update_interval 3.0
total_run_times 0
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 170
maximum_width 170
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color 808080
default_shade_color 101319
default_outline_color green
alignment top_left
gap_x 195
gap_y 400
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
TEXT
${color ffffff}${time %M}
Conkystats:
background no
use_xft yes
xftfont Helvetica:size=15
xftalpha 0.9
update_interval 3.0
total_run_times 0
own_window yes
own_window_type desktop
own_window_transparent yes
own_window_hints undecorated,sticky,skip_taskbar,skip_pager
double_buffer yes
minimum_size 800
maximum_width 800
draw_shades yes
draw_outline no
draw_borders no
draw_graph_borders yes
default_color 808080
default_shade_color 101319
default_outline_color green
alignment top_left
gap_x 400
gap_y 615
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale no
TEXT
${color ce2c51}RAM Usage: CPU Usage: Weather:
${color ffffff}Used: ${mem} Core 1: ${cpu} % ${execi 300 /home/paul/.weather.sh "EUR|NL|NL004|NIJMEGEN"}
From: ${memmax}
So you get a hang of these scripts; the last one will need some extra editing.
The weather script has been placed in and as /home/paul/.weather.sh
It goes like this:
[code]#!/bin/sh
#AccuWeather (r) RSS weather tool for conky
#
#USAGE: weather.sh
#
#(c) Michael Seiler 2007
METRIC=1 #Should be 0 or 1; 0 for F, 1 for C
if [ -z $1 ]; then
echo
echo "USAGE: weather.sh
echo
exit 0;
fi
curl -s http://rss.accuweather.com/rss/liveweather_rss.asp\?metric\=${METRIC}\&locCode\=$1 | perl -ne 'if (/Currently/) {chomp;/\
The weather.sh needs a rss localization code you will find here:
http://www.accuweather.com/rss-center.asp
Inside the US you can suffice with an easier ZIPcode:
${execi 300 /home/buttons/bin/weather.sh 08534}
More info on the weather script here.
The only thing we still need is to get the multiple conkies working:
sleep 20
conky -c /home/paul/.conky/.conkyrc1 &
conky -c /home/paul/.conky/.conkyrc2 &
conky -c /home/paul/.conky/.conkyrc3 &
conky -c /home/paul/.conky/.conkyrc4 &
fi
Note the sleep delay of 20 seconds; this is done to be sure the internet connection is up and working else you won't have the weather info.
Put the multiconky bash script in usr/bin and put it in the autostart.sh in /home/.config/openbox: multiconky &
Don't forget to make the bash files executable!!
Result full image: http://img99.imageshack.us/img99/1020/2010060912761101201920x.png
Another wallpaper behind it: http://img709.imageshack.us/img709/7298/2010060912761103981920x.png
Tuesday, June 8, 2010
Some useful pacman commands
To remove a single package, leaving all of its dependencies installed:
# pacman -R package_name
To remove a package's dependencies which are not required by any other installed package:
# pacman -Rs package_name
There should be a clear warning about regular dist upgrades,
Having explained that:
Doing an upgrade but excluding a package that causes trouble
sudo pacman -Syu --ignore libgl
In this case the libgl packages has a conflict with nvidia-utils
and shouldn't be installed or updated to avoid further conflicts.
sudo pacman -Ss dvd lists all programs connected to dvd.
Install a 'local' package that is not from a repository:
# pacman -U /path/to/package/package_name-version.pkg.tar.gz
see http://wiki.archlinux.org/index.php/Pacman
Info on tools and gui for pacman:
http://wiki.archlinux.org/index.php/Pacman_GUI_Frontends
Sunday, June 6, 2010
Add on for Chromium set minimum font size
Minimum Font allows you to set the minimum font size that you would like to see on web pages. For instance, if you set the minimum font size to 8, and you visit a site that has text with a font smaller than size 8, this extension will increase the size to 8. Currently, because I'm an incompetent JavaScript...author(?), only certain tags are checked (I'll list them below). If you know a better way, or if you want more added to the list, let me know!
Friday, May 28, 2010
How to submit a package to Aur Unsupported
What you have to do.
Make the package.
What I had to do for this was to compress the usr/share/themes/maddpable/openbox-3 folder
and upload it to ompload.org; used gompload for that.
Result is a downloadlink at: http://omploader.org/vNGZoOA.bz2
Had to md5sum the madpablo.tar.bz2
or terminal in the directory of your PKGBUILD, and to generate md5sum do this:
- Code:
makepkg -g >> PKGBUILD
Result: f8bd9530b5ae503cb773dfa66a1d51d0
Now I can edit PKGBUILD :
# Contributor: Pablo
pkgname=openbox-madpablo-theme
pkgver=20100528
pkgrel=1
pkgdesc="MadPablo OpenBox Theme"
arch=('any')
url="http://archbang.47.forumer.com/viewtopic.php?f=28&t=278"
license=('GPL')
depends=('openbox')
source=(http://omploader.org/vNGZoOA.bz2)
md5sums=('f8bd9530b5ae503cb773dfa66a1d51d0')
build() {
install -d ${pkgdir}/usr/share/themes/
cp -r ${srcdir}/madpablo ${pkgdir}/usr/share/themes/ || return 1
}
The url is provided as link for more info about the theme:
http://archbang.47.forumer.com/viewtopic.php?f=28&t=278.
pkgver=20100528 just is the date of doing this.
Now I have to make a folder openbox-madpablo-theme
and put only the PKGBUILD in it and compress this to
openbox-madpablo-theme.tar.gz
Now I have to register at http://aur.archlinux.org/account.php
And upload the openbox-madpablo-theme.tar.gz file and give a comment if needed.
This is the result: http://aur.archlinux.org/packages.php?ID=37577
When a package is submitted by someone else and is not maintained you can submit a new
PKGBUILD in the form of a code pastebin: http://aur.pastebin.com/
How to change an existing openbox theme?
Go to the folder where it is located for instance usr/share/themes.
Create a folder of the new theme variation and give it the name you want.
For example changing the madbox theme, I created a new folder to MadPablo and copied the content of the Madbox folder to this new folder.
Of course it is easier to work from an existing theme.
Now open in the text editor of choice (I prefer geany) the file themerc, it is located in usr/share/themes/openbox-3/.
If it is not there you can use the whereis command in the terminal: whereis themrc
Now we have to use a good colour tool; gcolor2 is perfect for the job and will appear installed as a plugin in geany. Install in Arch with sudo pacman -S gcolor2
Open the themerc file in geany and open the gcolor2 program and use the eyedropper to choose colours. Use a large resolution image of something you like colour wise (content is unimportant). If you got the colour code copy it and put it in place in the themerc file on the spot you want it to be overwriting the existing colourcode
Make some changes and try to understand the various designations of the diverse window items; for more info http://openbox.org/wiki/Help:Themes
If you have trouble identifying an element in the theme use the colour dropper to determine the existing colour of the element you want to change and use the found colour code by doing find code in geany in the themerc file
Now make some changes and save the themerc you're editing.
Open Openbox Gui Config tool, in terminal obconfig
Now select the theme that you took as starting point and make it active. Look around in your browser, open some windows and apps to get a feel how it will look, but already obconfig will give you a rather good example of how it will look.
If you're done with adaptations you can use the create a theme archive .obt option of obconfig and navigate to usr/share/theme/Newtheme folder and name and save it.
It will be saved in /home/user.
Obtheme
There is a gui app to edit a theme called obtheme; have tried it but didn't find it so nice to work with: http://xyne.archlinux.ca/projects/obtheme#screenshots
This is the Madpablo theme I created
Colours are quite different from the original Madbox theme:olive green and light blue.
The fonts used are bitstream vera sans mono for the conky
Monofur,acitve window title; Sans inactive window header and menu header
Menu item and on screen display Neutra Text Book Alt
Apperance settings: Avenir LT Std 12.
Direct link full res screenshot:http://img375.imageshack.us/img375/7655/2010051612740389671920x.png
Gomploader to upload to ompload.org
Install in Arch by packer -S omploader.
The command to start is terminal gompload.
Make a keybinding in openbox!
Thursday, May 27, 2010
Dmenu with better and larger fonts
See this screenshot: http://omploader.org/vMmJicg
Look here: http://aur.archlinux.org/packages.php?ID=28745
There is a problem with the packagebuild on this page though.
It should be:
pkgname=dmenu-xft
pkgver=4.0
pkgrel=1
pkgdesc="Dynamic X menu - with xft support"
arch=('i686' 'x86_64')
url="http://code.suckless.org/"
license=('MIT')
depends=('libx11' 'libxinerama' 'libxft')
conflicts=('dmenu')
provides=('dmenu')
source=(http://dl.suckless.org/tools/dmenu-4.0.tar.gz
http://z.ip.fi/~henkka/dmenu-xft/dmenu-4.0-xft.diff)
md5sums=('66e761a653930cc8a21614ba9fedf903'
'1f3ecd819a39dea88a3dde9b5271bec6')
build() {
cd $srcdir/dmenu-$pkgver
patch -p1 < ../dmenu-4.0-xft.diff || return 1 make || return 1 make DESTDIR=$startdir/pkg PREFIX=/usr install || return 1 # LICENSE mkdir -p $startdir/pkg/usr/share/licenses/$pkgname || return 1 cp LICENSE $startdir/pkg/usr/share/licenses/$pkgname/ || return 1 }
Save this as PKGBUILD textfile and run makepkg where you saved PKGBUILD.
But first uninstall the dmenu version you have with
sudo pacman -Rd dmenu
This all in Arch.
Otherwise: download the two sources at the bottom of the page. Extract the tar.gz and then place the .diff into dmenu-4.0 directory. Apply the patch with:
patch -p1 < dmenu-4.0-xft.diff
Then run make and copy dmenu into /usr/bin
source: http://crunchbanglinux.org/forums/topic/4524/dmenu-with-xft-support/
Wednesday, May 26, 2010
Installed Archbang 2010.05 from git
Full image: http://img265.imageshack.us/img265/8021/201005261225461920x1200.png
I installed Archbang 2010.05 from git.
Created the iso from git this way:
packer -S base-devel git archiso-git
git clone git://gitorious.org/archbang/archbang.git
cd archbang
sudo make all
The resulting iso is about 470 mb and 64 bits.
After a successful live session using the nvidia option I installed the system in a before hand prepared logical partition in a multiboot setup.
Install went rather well' small issues time setting did not went well in ncurse; 15:34 instead of 11:34 also the gtm-1 option did not give the correct time.
I corrected the later but it still isn't correct after install It is now 9.54 instead of the real 13.54,
=====================
Solution time issue
Time issue is indeed there. Will take a look when I can.
Usually the best way to nip that problem is to install openntpd.
Code:
pacman -S openntpd
Then add openntpd to your daemons array in your /etc/rc.conf file so it will start with your next boot up, and then
Code:
/etc/rc.d/openntpd start
and your clock should be correct. This worked for me.
Decided it not to run as daemon because of the delay in booting and adding it to obautostart with
/etc/rc.d/openntpd start
===========================
The second issue was the bootloader install; I choose a grub2 install in the same partition as the new abinstall because I edit a menu.lst legacy grub in a different partition.
I gave an error that the bootloader couldnt be installed but it was instaled all the same.
Because I use the grub legacy on another partition I can't really check if the grub 2 would have done the job if necessary.
I did not install the plymouth splash screen, which I should have done for test purposes; but just forgot that because I was following my own preferences.
Internet (wired) is very slow and the webbrowser unresponsive.
Found the solution for the slow webbrowser
In Firefox adressbar type about:config
and search network.dns.disableIPv6 and set to true:
true disables IPv6 support - may not work for all networks,
but for me considerable speed increase maybe due to older router.
Other issues and adaptations>
First
tried to rankmirror my repository list;
rankmirrors will take a list of mirrors and arrange them in order of speed.
If you want to find the 5 fastest mirrors where you are, pass it your mirrorlist with servers near you uncommented
along with the "-n 5" option and redirect the output to a file, e.g.
Code:
cd /etc/pacman.d
cp mirrorlist mirrorlist.bak
rankmirrors -n 5 mirrorlist >mirrorlist
Got error message: get error: bash: mirrorlist: Permission denied, even if I sudo
Then update package list: pacman -Syy
Then error:
error: failed to synchronize any databases,
looked at the mirrorlist file and it was empty;
so made a handmade selection of servers and copied that from mirror.bak
My mistake was: had not installed reflector yet.
Installed packer
How to install packer in Arch?
Packer is a nice tool to build packages via the aur.
You need fakeroot and base-devel and git
pacman -S base-devel fakeroot git
2) get PKGBUILD: http://aur.archlinux.org/packages.php?ID=33378
3) run makepkg where you saved PKGBUILD
4) pacman -U packer-*.pkg.tar.xz
for instance: packer -S pcmanfm-mod
This is a stable version of pacmanfm
With pcmanfm I can easily access my other partitions.
Now I changed some looks:
The theme Madpablo and Madbox theme is copied as root from usr/share/themes and the icons Simple theme from usr/share/icons on another partition using pcmanfm as root. Copy fonts from other partition from usr/share/fonts/ttf to usr/share/fonts/ttf.
Installed geany as a nice test file editor: sudo pacman -S geany
Created Autologin:
/etc/inittab
Another way of circumventing display managers and booting straight into a preferred window manager or desktop environment involves editing /etc/inittab, changing:
id:3:initdefault:
[...]
x:5:respawn:/usr/bin/xdm -nodaemon
to:
id:5:initdefault:
[...]
x:5:once:/bin/su PREFERED_USER -l -c "/bin/bash --login -c /usr/bin/startx >/dev/null 2>&1"
changing PREFERED_USER as necessary.
Tuesday, May 25, 2010
How to build an iso from git
- Code
packer -S base-devel git archiso-git
git clone git://gitorious.org/archbang/archbang.git
cd archbang
sudo make all
Instead of using the aurscript you can now add the ArchBang repo so that you don't need to waste your precious time compiling manually!
Archbang Repo:
! You can now add it to your pacman.conf as:
- Code
[archbang]
Server = http://www.archbang.org/repo/
This means you don't have to manually build packages.list.aur from AUR. You can just get it using pacman -Syyu
This will also help us push dist-upgrades in future.
Thursday, May 20, 2010
Burning with Arch
Setting permissions
Users that should be able to use CD/DVD burning devices must have permissions to access the devices. If you are using udev (which is default in Arch Linux kernels), you only need to add the user(s) to the optical group:
# gpasswd -aoptical
Log out and back in for the changes to take effect.
source: http://wiki.archlinux.org/index.php/CD_Burning
Downgrading a package in Arch
source: http://wiki.archlinux.org/index.php/Downgrading_Packages
The Details
However, the user must keep in mind the following points. First, there is going to be the need to consider the dependencies of each program. The required libraries and such often change with each version, and the functionality of associated files may be completely different from previous ones. The solution will require changing these to earlier versions as well.
Second, one must consider if the necessary files have been removed from the system and are even going to be available from any source. Arch Linux's rolling release system of repositories are automatically upgraded without saving any older versions. See more about this problem below.
Third, we must be careful with changes to configuration files and scripts. At this point in time, we will rely upon pacman to handle this for us, as long as we do not bypass any safeguards it contains.
Please keep in mind that this issue brings us to the cutting edge of pacman package management development. The Arch Rollback Machine concept is being developed and awaiting useful incorporation into pacman. Once that occurs, this will become automated. Until then, please follow the instructions following this.
How to downgrade a package
- Q: I just ran pacman -Syu and package XYZ was upgraded to version N from version M. This package is causing problems on my computer, how can I downgrade from version N to the older version M?
- A: You may be able to downgrade the package trivially by visiting /var/cache/pacman/pkg on your system and seeing if the older version of the package is stored there. (If you have not run pacman -Scc recently, it should be there). If the package is there, you can install that version using pacman -U pkgname-olderpkgver.pkg.tar.gz after you moved to /var/cache/pacman/pkg.
This process will remove the current package, it will carefully calculate all of the dependency changes, and it will install the older version you have chosen with the proper dependencies down the line.
Via internet use http://arm.konnichi.com/2011/
In case of Kernel Panic or a roll back to a previous kernel
source: http://wiki.archlinux.org/index.php/Kernel_Panics
Reinstall kernel
Reinstalling the kernel is probably the best bet when no other major system modifications have taken place recently.
Start from the installation CD
The first step is booting the installation CD. Once booted, do not select to login with "arch", like you would when installing arch. Instead, you'll first want to login with "root".
# root
Mount your partitions
When booted, you are in a minimal but functional live GNU/Linux environment with some basic tools. Now, you have to mount your normal root disk (or partition) to /mnt.
# mount /dev/sdXY /mnt
If you are using legacy IDE setup, then use the command:
# mount /dev/hdXY /mnt
If you use a separate boot partition, don't forget to mount it with:
# mount /dev/sdXZ /mnt/boot
Gather your files for later troubleshooting
This is a good point to stop and gather your information onto another drive or partition so that it can be analyzed and/or emailed for outside viewing before the files change again. Simply create a separate directory on your main partition or mount a usb drive to contain the files. Then you may copy any files you will need to keep unchanged during the next boot with your new kernel.
Configure your chroot environment
Newer kernels use an initial ramdisk to set up the kernel environment. When you reinstall a kernel, that initial ramdisk will be regenerated with mkinitcpio. One of mkinitcpio's features is that it does autodetection to find out what kernel modules are required for starting up your computer. For this autodetection to work, /dev, /sys and /proc need to mounted in your chroot:
# mount -t proc none /mnt/proc
# mount -t sysfs none /mnt/sys
# mount --bind /dev /mnt/dev
Chroot to your normal root
Now, we will chroot to this disk:
# chroot /mnt
Roll back to previous kernel version
If you keep your downloaded pacman packages, you now can easily roll back. If you didn't keep them, you have to find a way to get a previous kernel version on your system now.
Let's suppose you kept the previous versions. We will now install the last working one.
# pacman -U /var/cache/pacman/pkg/kernel26-2.6.23.xx-x.pkg.tar.gz
(Of course, make sure that you adapt this line to your own kernel version. You can find the ones you still have in your cache by examining the directory above.)
Otherwise, check the install CD for a package. For example, the version 2008.06 i686 CD contains addons/core-pkgs/kernel26-2.6.25.6-1-i686.pkg.tar.gz.
Reboot
Now is the time to reboot and see if the system modifications have stopped the panic. If reverting to an older kernel works, don't forget to check the arch-newspage to check what went wrong with the kernel build. If there is no mention of the problem there, then go to the bug reporting area and search for it there. If you still don't find it, open a new bug report and attach those files you saved during the troubleshooting step above.
Wednesday, May 19, 2010
Speechsynthesis using Espeak and Mbrola
With Synaptic install Espeak and mbrola packages.
Now go to this site and download your favourite voice:
http://www.tcts.fpms.ac.be/synthesis/mbrola/mbrcopybin.html
I downloaded a Dutch voice
Unzipped it and created a folder named mbrola in usr/share/
Copied the big language file in the root of that folder usr/share/mbrola (in a subfolder it won't be found).
Now can we give espeak teh command to read it.
Open the terminal in a folder where you have a txt file to be spoken:
espeak -v mb-nl2 -f test.txt | mbrola -e /usr/share/mbrola/nl2 - - | aplay -r16000 -fS16
To make a wav file of it:
espeak -v mb-nl2 -f test.txt | mbrola -e /usr/share/mbrola/nl2 - test.wav
Tuesday, May 18, 2010
WriteType
In the area of adaptive software the linux arternatives are not very strong and convincing.
Write type looks like a promising application though.
It combines auditive support and wordprediction when typing and is in this way very useful for visually impaired or dyslectic people.
Lets hope it will take off and develop well
More info: WriteType is an application designed specifically for students who have difficulty typing. As you type, WriteType will offer suggestions for words. It also has TTS (text-to-speech) abilities to read text back to the author. WriteType is Free Software available under the GPL. It has only undergone small-scale field testing so far, and should therefore be considered beta.
http://bernsteinforpresident.com/software/writetype
How about internationalizing the app by adding the option to change dictionaries (and voice)?
It would just require different word lists. As it is right now, TTS (via eSpeak), spellcheck, and the interface can be easily internationalized. In fact, there is a (currently useless) option in the config file to specify the language. Word completion would would take only a little bit of code, but would require a list of words in the desired language. If you (or anyone) is interested in submitting a translation, I would be more than happy to fully make translations available.
Tried to isntall this in Arch and wnet well with sudo python2 setup.py install
But when running it got an error; aspell-en was not installed.
To use a different locale, word prediction list interface and espeak voice, use writetype -l nl_NL
Monday, May 17, 2010
Adapting an outdated PKGBUILD -Arch
this will be normally enought but with an outdated PKGBUILD you will have to change
some variables
Lets take this packagebuild as example
# $Id: PKGBUILD,v 1.00 2009/05/31 01:00 darkbaboon Exp $
# Contributor: Ronan Rabouin
pkgname=adeskbar
pkgver=0.1.7.4
pkgrel=1
pkgdesc="A Quick Application Launcher"
arch=('i686' 'x86_64')
url="http://www.ad-comp.be/index.php?category/ADesk-Bar"
license=('GPL3')
depends=('python')
provides=($pkgname)
conflicts=($pkgname-bzr)
source=(http://www.ad-comp.be/public/projets/ADeskBar/$pkgname-$pkgver.tar.bz2)
md5sums=('9d07f253905fda8f986795415f684550')
build() {
cd $srcdir
install -d $pkgdir/usr/{bin,share/$pkgname,share/pixmaps,share/applications}
cp -a $srcdir/$pkgname-$pkgver/src/* $pkgdir/usr/share/$pkgname
install -m 644 $srcdir/$pkgname-$pkgver/$pkgname.png $pkgdir/usr/share/pixmaps/
install -m 644 $srcdir/$pkgname-$pkgver/$pkgname.desktop $pkgdir/usr/share/applications/
echo -e "#!/bin/bash\nif [ -f ~/.config/$pkgname/config ]; then\n/usr/share/$pkgname/$pkgname\nelse\n \
/usr/share/$pkgname/$pkgname-conf\n/usr/share/$pkgname/$pkgname\nfi" >$pkgdir/usr/bin/$pkgname
chmod 755 $pkgdir/usr/bin/$pkgname
}
What had to be changed??
pkgver=0.1.7.4 had to become pkgver=0.2
source=(http://www.ad-comp.be/public/projets/ADeskBar/$pkgname-$pkgver.tar.bz2) did not work because in the version 0.2 there was suddenly an underscore in the name
so had to be changed to>
source=(http://www.ad-comp.be/public/projets/ADeskBar/adeskbar_0.2.tar.bz2)
Third the validity check was negative because the file size has changed.
So determine md5sum of the now downloaded file:
Open in terminal the folder were it is and
md5sum adeskbar_0.2.tar.bz2
which gives e71f44e1a76054af9f2d2c939c1f6d3b
So change
md5sums=('9d07f253905fda8f986795415f684550')
to
md5sums=('e71f44e1a76054af9f2d2c939c1f6d3b')
Now we can do again:
makepkg -sci PKGBUILD
And all should go well.
This last md5sum problem can also be solved by
makepkg -g >> PKGBUILD
And then:
makepkg -sci PKGBUILD
Blog Archive
-
▼
2010
(90)
-
►
November
(15)
- Nvidia-beta update problem -Arch
- Update problem because of bad package
- problem to install a basket note pads tutorial get...
- Writetype chokes in wrong text file
- Set locale in Arch
- Dictionaries in Linux
- Edited PKGBUILD for Aarddict after setuptools not ...
- Virtaal localization and translation tool
- if system time is not correct on Arch
- Convert all files in folder from ape to wav
- useful tools gprename
- Grant user shutdown permission in suoders file
- Automatic listing of all your partitions in Arch
- If firefox is slow
- Again problem with python script in Arch?
-
►
June
(11)
- Update a package that is not in AUR
- Trying new font configuration has desastrous effect
- Find your image back on the internet
- Mouseless browsing in Firefox and Chromium
- [solved]After update to xorg 1.8: Other partition...
- Keybindings to manipulate windows Openbox
- Make qt apps look better in an almost gtk only des...
- Pytyle nice tiler for Openbox
- Setup Multiple conky with build in weather script
- Some useful pacman commands
- Add on for Chromium set minimum font size
-
►
May
(14)
- How to submit a package to Aur Unsupported
- How to change an existing openbox theme?
- Gomploader to upload to ompload.org
- Dmenu with better and larger fonts
- Installed Archbang 2010.05 from git
- How to build an iso from git
- Burning with Arch
- Downgrading a package in Arch
- Speechsynthesis using Espeak and Mbrola
- WriteType
- Adapting an outdated PKGBUILD -Arch
-
►
November
(15)