Smart cleaning of portage distfiles folder

Nov 30th, 2011 | Filed under gentoo

Is as simple as

# eclean-dist -d
will clean all distfiles wihc are older than currently installed.

Eclean comes from package app-portage/gentoolkit and has couple other nice options -> read man.

no dbus session-bus found

Jun 1st, 2011 | Filed under gentoo, problems

I tried set up a fresh install of gentoo under virtual box. Everything went smoothly with exception of error after entering credentials on kde logging screen.

[   533.067] (EE) [drm] drmOpen failed.
[   533.067] (EE) VBoxVideo(0): DRIScreenInit failed, disabling DRI.
[   533.067] (II) VBoxVideo(0): visual configurations initialized
[   533.068] (==) VBoxVideo(0): Backing store disabled
[   533.068] (II) VBoxVideo(0): RandR 1.2 enabled, ignore the following RandR disabled message.
[   533.071] (==) VBoxVideo(0): DPMS enabled
[   533.073] (II) VBoxVideo(0): The VBox video extensions are now enabled.
[   533.073] (–) RandR disabled

[   543.133] 0: /usr/bin/X (xorg_backtrace+0x3b) [0x80e72fb]
[   543.133] 1: /usr/bin/X (0x8048000+0x5dbf5) [0x80a5bf5]
[   543.133] 2: (vdso) (__kernel_rt_sigreturn+0x0) [0xffffe40c]
[   543.133] 3: /usr/lib/xorg/modules/libfb.so (fbBlt+0xbe) [0xb72c392e]
[   543.134] 4: /usr/lib/xorg/modules/libfb.so (fbBltStip+0x73) [0xb72c46d3]
[   543.134] 5: /usr/lib/xorg/modules/libfb.so (fbGetImage+0x199) [0xb72c9a39]
[   543.134] 6: /usr/bin/X (0x8048000+0x15f0af) [0x81a70af]
[   543.134] 7: /usr/lib/xorg/modules/extensions/libglx.so (0xb74c0000+0x37d5b) [0xb74f7d5b]
[   543.134] 8: /usr/lib/xorg/modules/dri/swrast_dri.so (0xb4bfc000+0x10a5d) [0xb4c0ca5d]
[   543.134] 9: /usr/lib/xorg/modules/dri/swrast_dri.so (0xb4bfc000+0x10aa7) [0xb4c0caa7]
[   543.134] 10: /usr/lib/xorg/modules/extensions/libglx.so (0xb74c0000+0x37cbd) [0xb74f7cbd]
[   543.135] 11: /usr/lib/xorg/modules/extensions/libglx.so (0xb74c0000+0x34412) [0xb74f4412]
[   543.135] 12: /usr/lib/xorg/modules/extensions/libglx.so (0xb74c0000+0x3528a) [0xb74f528a]
[   543.135] 13: /usr/lib/xorg/modules/extensions/libglx.so (0xb74c0000+0x3727f) [0xb74f727f]
[   543.135] 14: /usr/bin/X (0x8048000+0x27e87) [0x806fe87]
[   543.135] 15: /usr/bin/X (0x8048000+0x1aec5) [0x8062ec5]
[   543.135] 16: /lib/libc.so.6 (__libc_start_main+0xe6) [0xb7560db6]
[   543.137] 17: /usr/bin/X (0x8048000+0x1aaa1) [0x8062aa1]
[   543.137] Segmentation fault at address (nil)
[   543.138]
Fatal server error:
[   543.138] Caught signal 11 (Segmentation fault). Server aborting
[   543.138]
[   543.138]

I have enabled 3d support in virtual box, but still I’m not sure whether we can expect working compositing under x in virtualized gentoo.
Don’t know whether exists better solution (let me know), but I’ve did was:

Creating file
/etc/X11/xorg.conf.d/disable-composite.conf
with below content:

Section “Extensions”
Option “Composite” “Disable”
EndSection

How to quickly find duplicated files on linux?

Jan 9th, 2011 | Filed under gentoo

Just a quick direction to program -> fdupes
(on gentoo emerge fdupes -av)

fdupes -r movies_dir1 movies_dir2 > duplicates.txt

Above commands creates hashes of all files within specifies directories (-r recursive) and outputs that list to duplicates.txt. Now you can investigate that list and delete duplicates manualy.

You can also tell fdupes to delete files automatically or to be prompted.

Nvidia drivers error code 43

Nov 29th, 2010 | Filed under microsoft

Suddenly windows device manager shows you problem with graphic’s card driver with error code 43?
Please check your nvidia driver version, after some windows update on win7 the newest drivers are not working (inspite of the fact that they are detected as proper drivers). In my case I have win7  64 bit with geforce 6600 (but I know this issue concerns also newer cards). The solution was to manualy download older nvidia (in my case it was 195.62 version).

For older cards newests drivers are not so important, because new features that these drivers introduces aren’t supported by such cards.

The interesting fact is that on the same maching I have working nvidia-drivers-260.19.21 under gentoo.

Gentoo and webdav

Sep 27th, 2010 | Filed under gentoo

Getting tired of using ftp to sync some resources. Clicking connect is very tiresome so..
emerge devfs2 -av
groupadd -r davfs2
useradd davfs2 -g davfs2

If your webdav resource is secured edit /etc/davfs2/secrets and add simple line
http://yourresurce/path user pass

These are credentials to remote webdav.

Try to mount drive from cmdline
mount.davfs http://http://yourresurce/path /mnt/webdav/path

If it works unmount for a second
mount -u /mnt/webdav/path

If it works you can add following line to /etc/fstab
http://yourresurce/path /mnt/webdav/path davfs uid=wlos,gid=users 1 2

Try now mount -a and voila! Your remote drive will be available automagically.

There are many other options you can provide.. try docs!

Error: glXCreateContext failed

Mar 3rd, 2010 | Filed under gentoo, problems

This kind of message appeard on my maching after invoking
glxinfo | grep -i direct

Error was (at least I think so) caused by compiling nvidia-drivers against sources with slightly different version then running kernel (I forgot to update symlinc to kernel sources (eselect kernel)).

The interesting part of it is that X sever started at all!
So far I tought that after such compiling X will not start as it happed to me couple of times earlier.

(running kernel was 2.6.32-gentoo-r6 and drivers were compile against -r5)

Sun comercials

Mar 2nd, 2010 | Filed under Uncategorized

Tags:

How to add service menu entry in Dolphin.

Feb 10th, 2010 | Filed under gentoo, problems

Peace of simple functionality I’ve been lacking for some time in dolphin was “send to ” option which would create an email with attached file(s) (many files). I have no idea why it does not exists “out of box” but there is quite simple way of adding this.

This descriptions applies to KDE4.
directory /usr/share/kde4/services/ServiceMenus

contains list of actions avaiable in Dolphin for various file types.
If you add file there an entry will appear in Dolphin (Settings -> Configure Dolphin, Services)
In order to Dolphin re-read content of this dir you have to change something in that window (check and uncheck any selectbox and press apply).

Ok. create email.desktop in mentioned dir:

[Desktop Entry]
Actions=attachToEmail
Encoding=UTF-8
ServiceTypes=KonqPopupMenu/Plugin,all/allfiles
ExcludeServiceTypes=application/x-iso,kdedevice/*,inode/directory
Type=Service

[Desktop Action attachToEmail]
Name=Attach to Thunderbird Mail
Name[en]=Send file as attachment
Name[]=Wyslij jako zalacznik
Icon=/usr/share/thunderbird/icons/mozicon16.xpm

#Exec=a.sh -compose “attachment=file:/$(echo %F | sed ‘s/\\ \\//,file:\\/\\//g’)”
# bactick operator also works
Exec=thunderbird -compose “attachment=’file:/`echo %F | sed ‘s/\\ \\//,file:\\/\\//g’`'”

Download above sample from here (if you copy above content directly from browser IT MAY NOT WORK)

As you see you can specify with which file types this context menu should appear.
Above configuration works for thunderbird 2.x (2.x requires files:// prefix, because of some bug)

There is a peace of magic in Exec line, because of the way thunderbirds expects filenames.

More about desktop file format here.

How to action menu entry in Dolphin.

Feb 10th, 2010 | Filed under Uncategorized

Peace of simple  functionality I’ve been lacking for some time in dolphin was “send to ” option which would create an email with attached file(s). I have no idea why it does not exists “out of box” but there is quite simple way of adding this.

This descriptions applies to KDE4.
/usr/share/kde4/services/ServiceMenus

contains list of actions avaiable in Dolphin for various file types.
If you add file there an entry will appear in Dolphin (Settings -> Configure Dolphin, Services)
In order to Dolphin re-read content of this dir you have to change something in that windows (check and uncheck any selectbox and press apply).

Ok. create email.desktop in mentioned dir:

[Desktop Entry]
Actions=attachToEmail
Encoding=UTF-8
ServiceTypes=KonqPopupMenu/Plugin,all/allfiles
ExcludeServiceTypes=application/x-iso,kdedevice/*,inode/directory
Type=Service

[Desktop Action attachToEmail]
Name=Attach to Thunderbird Mail
Name[en]=Send file as attachment
Name[]=Wyslij jako zalacznik
Icon=/usr/share/thunderbird/icons/mozicon16.xpm

[Desktop Entry]
Actions=attachToEmail
Encoding=UTF-8
ServiceTypes=KonqPopupMenu/Plugin,all/allfiles
ExcludeServiceTypes=application/x-iso,kdedevice/*,inode/directory
Type=Service

[Desktop Action attachToEmail]
Name=Attach to Thunderbird Mail
Name[en]=Send file as attachment
Name[]=Wyslij jako zalacznik
Icon=/usr/share/thunderbird/icons/mozicon16.xpm
Exec=thunderbird -compose “attachment=’file:/`echo %F | sed ‘s/\\ \\//,file:\\/\\//g’`'”

Download above sample from here.

As you see you can specify with which file types this context menu should appear.
Above configuration works for thunderbird 2.x (2.x requires files:// prefix, because of some bug)

There is a peace of magic in Exec line, because of the way thunderbirds expects filenames.

More about desktop file format here.

How to let users use new group rights without having to logging out

Jan 28th, 2010 | Filed under gentoo, problems

Have you ever  added users to a group and  they do not have access to the rights of that group until they login again?

Instead of telling them to log out and login again (sounds like MS solution?) they can type:

newgrp name_of_a_group

For more details read
man newgrp