STumbling In Linux Land, STupid and Unlucky Pablo? The tribulations and happy discoveries of a Linux former Newbie, now bit more experienced user
Wednesday, March 31, 2010
MPD plus NCMPCPP
First, you will need to install mpd. Every self respecting linux distribution has it in their software repositories, hence the installation of the package shouldn’t be a problem. For Ubuntu it would be “sudo apt-get install mpd”, for Arch Linux “sudo pacman -S mpd” and so on. For more information on installing mpd, you can always check out their extensive wiki: http://mpd.wikia.com/wiki/Install. The few configuration changes that have to be made, are done in /etc/mpd.conf for system-wide use, or in ~/.mpdconf for individual users. I will only explain setting it up for each individual user as it has several advantages over a system wide install such as setting up a separate music library, own playlists and resume of songs for each user individually.
1. Copy the system wide configuration file /etc/mpd.conf to ~/.mpdconf (~ denotes the users home directory):
cp /etc/mpd.conf ~/.mpdconf
2. Before we edit the config file, we will create some files and directories we will be using later on:
mkdir -p ~/.mpd/playlists
touch ~/.mpd/mpd.db
touch ~/.mpd/mpd.error
touch ~/.mpd/log
3. Now edit ~/.mpdconf to reflect these settings:
music_directory "/home/paul/downloads"
playlist_directory "/home/paul/.mpd/playlists"
db_file "/home/paul/.mpd/mpd.db"
log_file "/home/paul/.mpd/mpd.log"
error_file "/home/paul/.mpd/mpd.error"
pid_file "/home/paul/.mpd/mpd.pid"
state_file "/home/paul/.mpd/mpdstate"
bind_to_address "127.0.0.1"
port "6600"
Using mpd
Now that you have mpd installed and configured, you can start using it. There really isn’t much to say about using mpd. All you have to do is running the command mpd as user and creating the music library database file. It will look into your music_directory, create an entry for each music file and put information about it in mpd.db:
mpd --create-db
mpd
The cool thing about having a command line music player daemon is that you don’t need a X server running to play music. Are you tired of your music stopping when you log on and off your system? No problem, mpd will keep running when you log on and off. When you start mpd it will also resume the last song that was playing if you abruptly stopped the mpd daemon.
If mpd gives you any trouble like not starting up, no sound or not creating a mpd.db file, check out mpd.log and mpd.error. It will give you a headstart in figuring out what’s wrong.
Setting up ncmpc++
Now we still need something to control mpd with. Ncmpcpp is almost an exact clone of ncmpc but it contains some new features ncmpc doesn’t have. It’s been also rewritten from scratch in C++ and more importantly, it’s actively being developped. As I told before, there exist other clients both command line and graphical as web based. Hell, you can even get a client that runs on your Iphone or Ipod Touch. But I can assure you, ncmpc++ pretty much does it all: playlists, crossfading, tag editing, fetching lyrics… You name it, it’s got it.
As far as I know only Arch Linux, Gentoo and FreeBSD have ncmpcpp in their software repositories. So you might have to get your hands dirty with compiling it yourself. But hey, if you already get so far reading this, it really shouldn’t be a problem. People seriously considering a console music player, probably have the skill to compile it as well. Detailed installation instructions can be found on the ncmpcpp site.
I’m not really going into the configuration of ncmpc++. The default configuration will certainly do. Only when you intend to use the tag editor, you will have to set the proper path to the mpd music directory in ~/.ncmpcpp/config (the path you also filled in the config file of mpd). The rest is a bunch of color and format settings. You can also configure the shortcut keys in ~/.ncmpcpp/keys. More on the shortcut keys later.
Using ncmpc++
You can launch ncmpc++ in the terminal with:
ncmpcpp
When you launch it, you are welcomed by the playlist window that shows the songs of the playlist you are currently listening to
Ncmpc++ Playlist
At the top, you see what menus are available and their corresponding key to access it (by default numbers from 1 to 7 and fn keys):
1:Help
2:Playlist
3:Browse
4:Search
5:Library
6:Playlist editor
7:Tag editor
The meaning of these menus are pretty obvious. A quick way to switch from the playlist to the browse menu and back is the tab key. The global keys to use in each menu are the arrow up and down to navigate and enter to select. To go to the parent directory you can use backspace. To start a selected song, press enter, s to stop a song and P to pause. > and < href="http://www.nepherte.be/howto-use-mpd-and-ncmpc-like-a-pro/">http://www.nepherte.be/howto-use-mpd-and-ncmpc-like-a-pro/
Gui for using mpd: pympd, pympc, gmpc and sonata.
When having an error setting up a database:
First of all setup mpd as user not as superuser!
Edit the .mpdconf file in home/paul/ and be sure to change user from mpd to your_own_username
If you want to link to a NFTS partition or drive:
When run as root, mpd drops user privileges and runs as a user specified in the file /etc/mpd.conf or ~/.mpdconf
The default was "mpd"; in order to make it work with NTFS I had to change this to "root".
Using Multiple Directories Under Parent
Simply: Use symlink(s)
Explanation: Music Player Daemon only supports one directory for the music_directory option in mpd.conf. There is a good reason for that and it is because MPD fully supports symlinks. Symlinks are easy to use. The following example will give you an idea of how to setup multiple directories under your music_directory.
* Start off by going to your music_directory, for instance if your music_directory is "/home/mpd/root" you type
user@computer ~ # cd /home/mpd/root
at a shell prompt.
* Next, if I wanted to link to /mnt/music/albums it would go like this:
user@computer /home/mpd/root # ln -s /mnt/music/albums/ /home/mpd/root/albums
Now, do note that there is no trailing '/' on /home/mpd/root/albums. That is because you are making a file to point to /mnt/music/albums/, a shortcut in the windows world.
A common problem: Remember that a symlink only points to the directory, the symlink itself has all permissions to do anything, but the directory it points to may not, if you have issues using symlinks it is probably a permissions problem with the target directory, be sure to check this.
For Ubuntu users, if your directories and files are on other devices, like /dev/hda1, you must add mpd user to "plugdev" group.
Thursday, March 25, 2010
Groene' se pub versie op Linux
maar het valt me wel tegen dat jullie het op deze pagina
http://www.groene.nl/bericht/2010-01-01/handleiding-egroene alleen hebben over
Adobe Digital Editions die alleen werkt op Windows en Mac producten.
Nooit van Linux gehoord? Toch de enige vrije software, shame on you.
Raad linux gebruikers fbreader aan
http://www.fbreader.org/about.php
Installeer het, het is in de meest repos aanwezig en activeer via snelkoppleing in menu of in terminal met FBReader (let op de hoofdletters).
Wednesday, March 24, 2010
Error building packages in Arch
PKGBUILD: line 18: make: command not found
Had already installed fakeroot bit not yet make
this command solved it:
packer -S make mimms
Better solution install automake>
pacman -S base-devel
Sunday, March 21, 2010
Midori Howto import bookmarks from firefox
Saturday, March 20, 2010
Thursday, March 18, 2010
what to do when Arch repos are slow?
To change your mirror, open the file /etc/pacman.d/mirrorlist, uncomment a mirror near you, and move it to the top of the file.
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
That will save a backup of your current mirrorlist to /etc/pacman.d/mirrorlist.bak and rank your mirrorlist file.
If you want to really increase pacman's speed, take a look at powerpill and reflector (the link is in my sig).
Reflector From ArchWiki
Reflector is a script which can be used to retrieve and filter the latest mirrorlist from the MirrorStatus page.
It can be obtained from the community repository:
# pacman -S reflector
Sample usage
First backup your mirrorlist:
# mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.backup
The following command will filter the first 5 mirrors, sort them by speed and overwrite the file /etc/pacman.d/mirrorlist
# reflector -f 5 -r -o /etc/pacman.d/mirrorlist
For all available commands run
# reflector --help
Wednesday, March 17, 2010
Sudden loss of wired internet connection in archbang
For DHCP IP
For this option, you need the dhcpcd package (already available on most installations). To make use of it, edit /etc/rc.conf
like this:
eth0="dhcp"Strange enough etho was edited out with a ! like INTERFACES=(!eth0 !wlan0)
INTERFACES=(eth0)
ROUTES=(!gateway)
Don't know how that happened
Thursday, March 11, 2010
Making Archbang look like Madbox
As I already have Madbox installed in another partition it is very easy to install the themes in Archbang. The theme Madbox is copied as root from usr/share/themes and the icons Simple theme from usr/share/icons. The theme I was using was Clearbooks theme (Pref, Openbox Config, Gui Config Tool, with BB windows (Pref, User Interface settings (=lxappearance))
Setting a mouse cursor theme in Archbang
First step: Copy icons theme folder unpacked to /usr/share/icons
Sudo update-alternatives as described below doesn' t work in Arch.
So try this:
The same is also accomplished if you edit /usr/share/icons/default/index.theme and add or adjust the following lines (using the cursor theme DMZ-White as an example):
[Icon Theme]
Inherits=DMZ-White
Make sure the name you specify in ~/.Xdefaults matches the name of the folder the theme is stored in (as always case sensitive). When you restart X, the new cursor theme should be applied. Restart X with oblogout or control alt backspace . If that last one doesn' t work:
IYou need to put the following in your .xinitrc:
setxkbmap -option terminate:ctrl_alt_bksp &
This is from http://urukrama.wordpress.com/openbox-guide/#Mousethemes
Mouse cursor themes
What do you do when you want to change the mouse cursor theme? You can do this in two ways: system-wide, or for a single user.
If you install an X cursor theme, such as dmz-cursor-theme, system-wide (in /usr/share/icons) you can change the default X cursor theme with the command: sudo update-alternatives –config x-cursor-theme, which will show you a list of available cursor themes. Select the one you like, and when you restart X the new cursor theme should be used. The same is also accomplished if you edit /usr/share/icons/default/index.theme and add or adjust the following lines (using the cursor theme DMZ-White as an example):
[Icon Theme]
Inherits=DMZ-White
You can also specify the mouse cursor theme in /home/USERNAME/.Xdefaults to change the theme for a single user only. To change the mouse cursor theme in this way, add the following to that file:
Xcursor.theme:NAMEOFTHETHEME
Xcursor.size: SIZE #optional
Change the mouse Xcursor.theme to whatever your preferred theme is named. Some cursor themes support can display more than one size; if you use such a theme, you can specify the size with the second line (normal sizes are 32, 48 or 64). If the cursor theme only has a single size, this line is meaningless.
You can install cursor themes in /home/USERNAME/.icons or /usr/share/icons/. Make sure the name you specify in ~/.Xdefaults matches the name of the folder the theme is stored in (as always case sensitive). When you restart X, the new cursor theme should be applied.
If you prefer graphical tools, you could try out gcursor, a Gtk application to change cursor themes (with previews).
Wednesday, March 10, 2010
Install oblogout in Archbang
first install
packer -S python-imaging
Then
cd /tmp
wget http://assets.tensixtyone.com/releases/oblogout/openboxlogout-0.1-1.tar.gz
tar zxvf openboxlogout-0.1-1.tar.gz
cd openboxlogout-0.1
./oblogout
Thensudo ./setup.py install
found some important clues here.
Decided I didn' tlike these buttoms, installed Adcomp version copying oblogout to /usr/share/
adn creating a symbolic link to /usr/bin:
[paul@archbang ~]$ sudo ln -s /usr/share/oblgout/oblogout /usr/bin/oblogout
Install glitches with ArchBang
When I tried to partition unallocated space on the hard drive, I got a problem that I could not resize the extended partition in which I wanted to create a new partition for Arch. What happened is that the Archbang cd was using the swap partition on that extended partition. I had to swapoff the swap partition and only then the extended partition could be unmounted what is necessary for resizing. In the aftermath quite an obvious thing, but it took me some time to detect the problem.
Problems installing NVidia driver:
64 bits version
no luck with nvidia
trying to reinstall according to http://bbs.archlinux.org/viewtopic.php? … 04#p717804
but first solution gives nvidia package not found not found in sync db
Keeping nv gives
configuration failed
number of screens doesn t match number of detected devices.
Within 10 minute there was a fix from the kind ShyLock, who we are thankful for provding Archbang together with WillExtreme, who took the initiative of creating AB.
The reason you were getting "not found in sync db" error was coz repositories database needed to be created and updated for the first time!
So just use: pacman -Syy
But then another weird problem showed up>
Got this error doing pacman -Syy
Synchronizing package databases...
error: failed to update core (no servers configured for repository)
error: failed to update extra (no servers configured for repository)
error: failed to update community (no servers configured for repository)
error: failed to synchronize any databases
The solution to this problem was:
Check the mirrorlist under /etc/pacman.d/ and make sure it has some mirrors uncommented.
Then I was able to install the Nvidia drivers but still no show.
Error message> fatal server error no screen found
I tried to install the nvidia-beta drivers and nvidia-utils-beta but not found.
Installed the default and shows in the xorg.0.log: nvidia glx module 195.39.80 loaded. The xorg.conf file proved to be the problem.
Second guess was that there was a wrong xorg.conf. This proved the way to a solution;
replaced wrong setup with:
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
EndSection
Change Cursors in Archbang/OpenBox
ArchWike has a great openbox page. That is how I found out about Arch in the first way
Mouse cursors
Extract the desired Xcursor theme to either /usr/share/icons (system-wide access) or ~/.icons (local user access). There are also a limited amount of themes available in the community repository that can be installed using pacman.
Add this to ~/.Xdefaults:
Xcursor.theme: [name-of-cursor-theme]
where [name-of-cursor-theme] is the name of the cursor theme directory. For example:
Xcursor.theme: Vanilla-DMZ-AA
To change the size:
Xcursor.size: [size]
ArchBang howto install Slim login manager
Archlinux is for the tinkerers, who want to know how exactly the systemsetup is done. It's highly configurable, has a rolling release and a very active and helpful community.
Archbang is not for the beginner but for the intermediate linux user.
If you think using Ubuntu for example is your bread and butter but want to expand your knowledge of Linux Arch is the way to go.
As I have written before, every distro using Openbox as window manager really interests me, because of its beautiful simpleness, The K.I.S.S. in a very successful form.
Any way why would you need a graphical login manager? It's superfuous and default it' s not there in Archbang which I like.
But wanted to know how you can install one.
In the splendid ArchWiki you will find under topic DisplayManager:
It is best practice, but not required, to choose the display manager that corresponds to your desktop environment. Typically SLiM is preferred if there is not a corresponding desktop environment.
And on the ArchWiki SLiM page: " SLiM is simple, lightweight and easily configurable. SLiM is used by some because it does not require the dependencies of GNOME or KDE and can help make a lighter system for users that like to use lightweight desktops like Xfce, Openbox, and Fluxbox."
Installation first
pacman -S slimNow we have to edit /etc/inittab what I do as root using Geany, my fav configuration editor.
and then
pacman -S slim-themes archlinux-themes-slim
Check if
id:5:initdefault:
and edit out (add #, we can easily reverse things later this way)
x:5:respawn:/usr/bin/xdm -nodaemonand edit in (removing#)
x:5:respawn:/usr/bin/slim >& /dev/null
On Wikipedia we learn on init>
init (short for initialization) is the program on Unix and Unix-like systems that spawns all other processes. It runs as a daemon . Runlevel 3 is default in Arch and give a command line interface.
On the two Linux distributions defaulting to runlevel 5 in the table above, runlevel 5 is a multiuser graphical environment running the X Window System, usually with a display manager.
Now the only thing we have to do is choose a theme.
I did that by changing default to flower2 on the 'current_theme' line in /etc/slim.conf.
Look in the directory of /usr/share/slim/themes to see which themes are available.
Autologin
For those who want autologin, edit /etc/inittab according to this wiki: http://wiki.archlinux.org/index.php/Start_X_at_Boot.
Boot in 12 seconds from grub to conky this way!!
This will outline methods that do not involve a display manager.
~/.bash_profile
An alternative to a login manager is to add the following to the bottom of your ~/.bash_profile (if ~/.bash_profile does not yet exist, you can copy a skeleton version from /etc/skel/.bash_profile):
if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
startx
logout
fi
/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.
Friday, March 5, 2010
Resizing an extend partition failed because of swap partition was active
Didnt work bcause the live cd was using the swap partition, which was part of the extended partition. Partitions have to be unmounted to be able to work on them.
Selected te swap partition and choose swapoff.
After that ther was no problem resize the partition
Blog Archive
-
▼
2010
(90)
-
▼
March
(14)
- MPD plus NCMPCPP
- Groene' se pub versie op Linux
- Error building packages in Arch
- Midori Howto import bookmarks from firefox
- JDownloader install in Arch
- what to do when Arch repos are slow?
- Sudden loss of wired internet connection in archbang
- Making Archbang look like Madbox
- Setting a mouse cursor theme in Archbang
- Install oblogout in Archbang
- Install glitches with ArchBang
- Change Cursors in Archbang/OpenBox
- ArchBang howto install Slim login manager
- Resizing an extend partition failed because of swa...
-
▼
March
(14)