Tuesday, May 7, 2013

archlinux update gone bad

so i wanted to try out Steam on linux, for which i had to update my 2 years old arch, cause steam requires new nvidia driver, which i couldn't install without updating everything.

now, i just came back from some 2 weeks holiday, and decided to bite a bullet, and ran pacman -Syu. ouch!

no so fast.. pacman couldn't update itself cause of some glibc madness and /lib symlinking nastiness.

read the wiki, try everything. fail. use -f. good bye arch.

still have debian. boot, download fresh arch install image, dd to usb stick, boot.

no installer? ok. vi install.txt. wth? dumb copy+paste from wiki, with no text from all the links, like "read about network configuration here" :D

no really, 2 pages of useless text, which can only be partially understood by someone with some arch and/or gentoo experience. like myself. ok, do all the bootstrap stuff, format /, mount all partitions, generate fstab, restore /etc/passwd, reboot, try to boot, fail, boot debian, update to new arch / UUID in grub config, reboot. works.
displays some weird error, but look at this later.

wth network doesn't work! ifconfig gone. netcfg gone. documentation? seems to be gone too. hmm...

reboot into debian, google. chroot into arch /, try dhcpd eth0, seems to work. reboot into arch, try dhcpd eth0, doesn't work. ouch.

try netctl-auto eth0. works. how to make arch to do it by default? no idea.

install sudo, configure, add myself to wheel.

pacman -S lots-of-goodness

fail. files not found on mirror.

pacman -Syu
pacman -S lots-of-goodness

systemctl start kdm

fail. read xorg logs. can't load nvidia module. try modprobe. try to uninstall nouveau. try many things. fail. reboot.

network doesn't work. netctl-auto eth0. fail!!! dhcpd eth0. fail!!!!!!!! netctl-auto eth0. fail :-(
smoke 3 cigarettes. netctl-auto eth1. fail. netctl-auto eth2. WORKED! why? no idea.

systemctl start kdm. works!
login into openbox. works. install xterm, compile lxpanelx.
unpack google chrome. run. fail. install missing libs. run. fail. libudev.so.0 missing!

systemd has it now, with a new API, and new so version.
google. no proper fix. symlink. run. works! but for how long?...

try to watch youtube. fail. no sound. add myself to audio group

try to watch youtube again. sound works, but stuttering :(
pacman -S lots-of-deadbeef-compile-goodness
cd deadbeef; git checkout devel; make clean; ./autogen.sh
fail
install make, autoconf, automake, libtool, etc
./autogen.sh
./configure --disable-gtk3
fail
install gtkglext
./configure --disable-gtk3
make -j8
smoke a cigarette
make install
deadbeef

plays, no stuttering. but my volume control script is broken.
alsa now exposes master slider as mono, so my alsactl sed magic doesn't work.
fix the volctl script to use the PCM slider, which is stereo. works again.

flash audio is still stuttering.
fonts in the browser look like shit.

install yaourt, install ms fonts, install cairo-/freetype-/fontconfig-ubuntu
fonts look good again.

psi+ devs decided to drop arch i686 package. sigh. build from aur. takes a while, but works.

guess if i don't find how to solve flash sound stuttering -- i'll have to switch to another OS..
but i hope it's a temp problem which will get solved after -Syu.

still need to figure out how to use netctl and setup a permanent network connection.

Saturday, May 26, 2012

my new linux desktop environment

this post is mainly for people who want a fast stable usable desktop environment using GTK, which is easy to setup and maintain. the end result is very nice, but comes at a cost of extra (quite big) dependencies. so it's NOT that lightweight, if you're trying to save hdd space or RAM. i limited my choice to native-only applications, so things written in python or perl have been avoided.

i tried many things, and most of them are bullshit, or very crippled, so here's a

list of things to avoid, because they don't (or didn't) work


pcmanfm in any incarnation: can't mount flash drives (this probably can be resolved, but i was looking for simple-to-setup stuff), can't rearrange icons on desktop, some versions are completely broken, e.g. a folder created on desktop via right click menu doesn't show up without restart (pcmanfm-0.9.x), or desktop support simply cut (pcmanfm-mod)

spacefm: it's a fork of pcmanfm. works slightly better, can even mount flash drives, but still the desktop is a joke, and the FM design is weird, for example -- flash drives are not shown in the left pane, there's a special button which opens special panel with the list, and when an item is clicked - it opens a new tab. most pcmanfm issues apply too.

rox-filer: way too basic.

fbpanel: i wasn't able to even start it up, "/dev/mixer not found, quit"

lxpanel: quicklaunch is crippled - no drag'n'drop editing, no custom launchers. can be used if you don't need it

xfwm4: very slow window resize

pekwm: looks good, but default config is weird, and i failed to reconfigure it to fit my needs. configuration was text-file only at the moment when i last tried, maybe it's better now -- it's worth another try.

thunar: very crippled desktop, e.g. files and folders created via right click menu show up in random places instead of mouse position, also quite slow.

gnome-panel: was crippled too much after transition to gtk3/gnome3.

now, we can see the list of

things that work


openbox: simple to setup, very lightweight, very fast. the only problem is it's limited theme engine, which doesn't support rounder corners

xfce4-panel: works very well, unlike most of other xfce components. i couldn't find anything better in the panel realm. it's important to install plugins, like datetime, notificationarea, and so on.

update from 6.11.2012:

the big thing that is missing is support for launcher buttons which point to specific file pathes -- specifying the path manually doesn't work. i've been using this panel for some time after writing this post, but because of this problem i started looking for another alternative again, and switched to lxpanelx. read below.

xsettingsd: http://code.google.com/p/xsettingsd/ it's good to have. allows configuring fonts, default apps, etc, for the apps that use xsettings protocol (like google chrome).

nautilus: everything works out of the box, except gtk3 theme (which is a fault of gtk3 itself)

this combination gives the excellent desktop environment, which, i believe, is the most usable and fast that you can achieve on linux at the moment.


update from 6.11.2012:

lxpanelx: i was not able to compile it when i originally wrote this post, but then i tried again recently.
it worked very well, but there were 2 quite annoying bugs. now they are both fixed in svn, and it works perfectly for all my needs. setting up is not very user friendly, lacks drag-n-drop, and custom launcher buttons feel like a dirty hack, but once it's setup -- it gets the job done. switched over to it from xfce4-panel.

setting up gtk themes


the most difficult thing in modern linux... setting gtk3 theme.

you need to find a theme which you like, and download or install it from the repositories. i chose to use Zukitwo, it's very good, and has many variations.

now, when you have the theme installed, copy its gtk-3.0 folder to ~/.config, like this:

cp -r /usr/share/themes/Zukitwo/gtk-3.0 ~/.config/

this is not enough to get the theme selected. the trick here is to generate settings.ini, which we don't want to write manually. that can be done using lxappearance. fire lxappearance, and select Zukitwo.

now, you should have working gtk3 theme, and you can uninstall lxappearance. later on, ~/.config/gtk-3.0/settings.ini can be edited manually.

but this also breaks gtk2 theme, if you don't have gtk2 theme with the same name.

to fix it, install and run gtkchtheme, and select the gtk2 theme that you want. simple.

autostart

put this into ~/.config/openbox/autostart.sh

xsettingsd &
nautilus -n &
xfce4-panel &

the end result

i don't have a screenshot right now (writing this from work), but this combination, after tweaking few options here and there, will give you gnome2 look-alike environment, which works much faster.

hope that saves someone some time.

Wednesday, May 2, 2012

dual-booting debian part 2

so, i had debian installed on my machine, but highly unused.

in the last few days i was using it a lot, and i discovered that it's not as stable as it should be.

here's what happened.

i discovered that the cairo version is too old and causes graphical issues in deadbeef, so i decided to do apt-get update ; apt-get upgrade.

it didn't help - cairo is still too old, bugs don't disappear.. but that's different story. the consequences of the update were quite significant.

next day i booted into debian, and discovered that GDM doesn't prompt me with login/password fields, but just shows debian logo and the version number.

i decided that i need to run apt-get update/upgrade again, did it, and noticed there's an error saying something i couldn't understand about psi-plus package which i installed before.

since it wasn't installed from official debian repos, i thought removing it should help, then i removed psi-plus-common/plugins, etc, and ran apt-get upgrade again.

here's where all the fun begins!

it started to restart all system daemons, reconfiguring all the packages, and doing lots of crazy shit. i didn't even know i have so much useless stuff installed in my system (by default!).

there wasn't much i could do about it, so i waited until it finishes (without errors this time), and restarted GDM.

and voila -- login and password are in their place. i logged in, and did the work i planned.

sudo shutdown -h now; sleep 8h; poweron

wtf? 6 entries in the grub menu, most of which look plain wrong, my arch (which i dual-boot with) has disappeared, but i have 6 Debian entries.

some trial and error later, one of the entries worked, and debian booted.

google -> debian grub ; http://wiki.debian.org/Grub - nice. reading.

Configuring grub v2 - just what i need.
it says that everything now is autodetected, and all i need is just to run update-grub, so i do this, and nothing changes, although i see that it found archlinux on sda5.

the /boot/grub/grub.cfg still contains 6 entries, no valid Arch Linux entry that could work.

1 hour later, after reading more documentation and learning how to edit /etc/grub.d/40custom, i'm adding proper archlinux entry, reboot -- of course, now i have 7 entries of which only 2 are valid, but at least now i'm back in arch.

that's 2 hours maintainance time spent on the most stable linux distro which isn't supposed to have anything except security fixes. that is actually more time i spent on maintaining bleeding-edge rolling-release arch linux in several months of _active_ use.

i can't name it a success story.

Monday, April 16, 2012

garmin and linux

so.. you've bought a Garmin unit, and you can't do much with it on linux, and you're getting frustrated with it.. perhaps, you're in the right place. i'll try to outline few problems and solutions here.


first of all, i have a garmin zumo 220 european version with a dvd called "city navigator europe nt".
but the information here should be relevant for many other models.

1. registering the unit and updating maps (need windows for that!)

if you want to register the unit, update maps, use mapsource, or basecamp, or poiloader -- you'll have to have some way to run windows. no garmin software works on wine, and none native versions available. i've used qemu + winxp, and it was fairly tough to configure proper networking and usb mapping. the much easier way would be to install windows natively in dualboot (or just skipping registration/mapupdate step completely). i got it working in qemu, installed mapsource, mapupdater, and then it took me an entire day and night of downloading. then it failed, and i had to start over. 2 times. so 3 days of downloading total. i'm not sure if that's something to be expected for everyone, or it's only when using qemu. mapupdater can't resume. download size was about 7 gigs fof me. stuff from dvd didn't work -- nothing could get installed. i had to download all updated software from garmin websites, then copy dvd to harddrive, replace some files here and there, and then i got the official software installed. not sure if it was worth it, but i wanted to update maps as soon as possible, because i don't have lifetime updates. mapsource is quite shitty. but it has its own benefits over google maps. you'll need to install garmin activex plugin, then it's fairly straight forward how to register/activate your subscriptions.

2. making routes in linux

the unit can read GPX format. which means you an create routes anywhere, then convert into GPX (most software can export to GPX, and gmaps routes can be converted online -- google it). copy the *.gpx files to the /media/UNIT/GPX/ (usb mass storage rocks!).

3. simplifying stuff

there's no official garmin plugin for linux, but there is an excellent project by Andreas Diesner, which replicates garmin plugin protocol on linux



with this plugin, you will be able to use integration on garmin websites, and on many 3rd party websites, like tourstart.org. very useful. even firmware updating works this way.

installation: exit web browser, install the plugin, connect the device to pc, MOUNT IT as disk, start the browser. here the plugin will configure itself. if it doesn't work -- remove its config in ~/.config/..., and try again.

4. how to find GPX routes on the unit

that was tricky for me. the 1st time i tried, i couldn't find a way to open GPX custom route that i uploaded to my unit, so i had to look at the screen in gmaps, and manually recreate it on the unit point-by-point. that took me 1½ hr instead of riding in the beautiful weather.

then, after the ride and about 3 more hours of googling, contacting garmin support, and asking all of my friends, i've found where my routes are. Tools -> My Data -> Import Route From File.
hope that saves someone few hours.

Tuesday, March 27, 2012

MSVS 2010 is annoying

i know this stuff would not be fixed in the next 10 years, but i like to write shit on my blog which no one would ever read and that would never be fixed, so here it goes


* small search box (ctrl+d) had a nifty feature to find a file by partial name using ">of hel" and VS could append the "lo.c" and you could press enter to open the hello.c. now, it's so slow that it became worthy to buy visual assist, because VA's ctrl+alt+o works fast. wtf?

* find (ctrl+f). every time i open this window, it's positioned and sized in the most random way, usually the most inconvenient. why not remember the last used window geometry?

* freezing for minutes every now and then. type a character, go drink coffee while VS editor processes it. i'm not joking.

* randomly, changing single .cpp file and compiling a project takes an hour. i have 12 gigs of RAM and modern 8-core CPU. which is idling by the way..

* by default, text editor is just too slow. i mean, it's slower than zx spectrum48k built-in basic editor. much slower. it's like trying to run msoffice 2007 on 386sx 20mhz. or worse. disabling hardware acceleration in the VS options helps a bit. don't expect wonders though.

now, since VS unfroze after eating one character that i tried to type -- back to work.

Tuesday, May 17, 2011

dual-booting debian

here's my story of migrating the existing archlinux 32bit system to dual-boot with debian squeeze 64bit, and using the debian for couple of days.


i wrote the post almost a week ago, but didn't have time to edit and publish it.

intro

i'm fairly experienced linux user, been using it on my desktop since 2003, and tried many linux distros and other unix oses before - slackware, redhat, fedora, gentoo, arch, ubuntu, freebsd, qnx and maybe i forgot some. i also used debian before for a brief period of time, but never installed it myself.

also, i'm a software developer, but i'm not a hardcore system administrator.

installation

1st i decided to download a netinstall iso, and take off a usb stick. my previous distro was Arch, and there the process was super easy -- download usb image, put it on a usb stick using `dd', and reboot.

it's not so easy with cd image that debian provides. so 1st i tried to flash it using unetbootin.

this is not a debian problem, but unetbootin didn't work. official linux binary didn't work because of dynamic libpng dependency (wtf guys? don't you know how to link statically?), so i built from source (wtf again! you need to run ./INSTALL to build. please learn how to use autotools, and how to make build scripts for unix-like oses! or at least write a Makefile).

after i got working unetbootin binary -- it refused to see my usb stick. people suggested to use windows build of unetbootin under wine, so i did that, with the same result. i think it wanted me to make a partition on usb stick, and format it into fat32. maybe this could have worked, but at this point i found an official debian manual about how to put this cd image onto usb stick.

after a bit of trial and error, this worked, and i got into installer.

i selected textmode installer, to avoid all the regular gfx driver problems, associated slowdowns, etc.

some things surprised me, and some disappointed.

good things:
  • disk partitioning tool has allowed me to select my existing partitions, with their current filesystems, and map them to mount points, like /home, /backup, /boot, etc
  • grub2 found my archlinux grub config, and added archlinux menu entries to the boot menu

bad things
  • while disk partitioner allowed me to use my partitions -- it failed later in the process, complaining that they are using unsupported featuers (ext_attr?), and that i need to disable them using tune2fs. i tried that, but since man pages were not included into netinstall image (business-card size one), i couldn't figure out how to fix this problem, so i had to go back, unmap my partitions, and put them into fstab manually after installation.
  • after i got to the "install packages" stage -- it asked me what categories of packages do i want, and the 1st option was "desktop environment". i assumed it was GNOME2, and i was right, but i didn't know that this option will also install Mono (+ several apps written in it), full OpenOffice.org suite, gnash, and all available gfx drivers, including drivers for ancient 90s S3 cards, but not including driver for my gfx card. all this unnecessary clutter took installation time up to 2 hours, and i have pretty fast WAN connection, up to 25 Mbit/s.
after the installation has finished, i rebooted.

1st day of using (setting up)

i booted, and noticed, that debian boot process is much faster than archlinux. not sure who to blame here - but this is good.

i quickly installed irssi, gmrun and few other apps that were missing, and logged into irc to chat with friends (some of them were helping me to solve problems).

of course, i was prepared that gfx driver will be some nv or vesa or nouveau.
i didn't really look what is it. 1st thing that i wanted was to mount my home partition, login, and install a web browser, so that i can find out how to install nvidia driver.

so i did that, and discovered that Chromium version is very much outdated, it oopsed on all opened tabs, and deleted all of my local bookmarks. this was unpleasant.

change of plans -- let's find out how to install latest version of Chromium. 10 minutes later, i added some ubuntu PPA repository to sources.list, installed proper Chromium, and restored my bookmarks from backup. then i noticed, that chromium executable and icon are called chromium-browser in debian, so i had to make symlinks like "/usr/bin/chromium-browser -> /usr/bin/chromium", so my desktop shortcuts keep working.

at this point, i noticed that GNOME2 is also of some older version, and the panel configuration was lost - no clock, no systray, no taskbar, etc. i didn't bother to update GNOME, but simply re-added all panel applets that i need (my needs are very simple, and configuration is fairly easy to rebuild).

now it was the time to install nvidia driver. i googled, and found out how to enable nonfree repositories. then i installed the necessary packages with obscure hard-to-remember names, added driver section to xorg.conf, and rebooted (had to reboot, because PC hanged as soon as i switched to console to load the driver and restart X).
that worked out of 1st attempt, but was still harder than in archlinux, where you just install nvidia package, modprobe nvidia, and restart X.
at this stage, i had almost fully working system, which looked and behaved exactly the same as my archlinux, using the same /home partition. it helped to have all of gtk themes, icons and configs stored in my $HOME folder. i just had to install couple of gtk engines -- and everything started to look as it should.

i even found a tutorial how to recompile cairo package with ubuntu patches to fix crappy font rendering. it was lots of manual work, but it worked, and it's enough for the start.
but i'll have to find out how to do the same to freetype2, libxft and fontconfig.

2nd day of using (installing missing software)

1st i deleted all the gnash/openoffice/mono/etc. i'm sure there are still about 500 packages that i'd want to remove. but that was a start.

now, i wanted to have my vim7.3 (because i really love undofile feature), adobe flashplayer and psi+. it was late night, and i didn't have much time.

1st i tried to google vim7.3 squeeze packages. didn't find any. so i took vim-common, vim-runtime and vim packages from wheezy, and installed them. only to discover they are compiled --without-x. what a shame :(

googled a bit more, tried to find out how to rebuild packages to fit my needs. failed. had to remove the wheezy packages, and install vim using ./configure && make && sudo make install. sad but true.

and to my surprise -- flashplugin was super-easy, it installed with single apt-get command, and worked great.

next, i tried to find psi+ packages. and discovered there were none :(

some people said that the packages are available in testing/unstable repos, but the whole point for me was to have debian stable.

a friend told me how to change debian logo on the gnome start button to normal gnome foot logo, and that worked beautifully.

time ran out at this stage for this day.

overall impressions

  • debian is _much_ harder and slower to install and configure than archlinux. it took me about 8 hours to get there. archlinux does the same in 1.5-2 hours (that is when you do it for the 1st time in your life).
  • some very important for me applications are missing, and the only way to get them is to compile manually, or run windows versions using wine.
  • i still feel uncomfy in many cases, and i didn't feel like that when i shifted from ubuntu to arch.
  • i still have many aspects of the system untested, and i don't know if _everything_ works
... [maybe] to be continued

Sunday, May 1, 2011

arch linux upgrades to gnome3 - signal to migrate to another distro

http://www.archlinux.org/news/gnome3-in-extra/

Thanks, Arch developers.

it was a great ride, but now it's time for me too look for another distro.

"pulseaudio is now required to run the GNOME desktop" -- no, thanks.