Показ дописів із міткою ubuntu. Показати всі дописи
Показ дописів із міткою ubuntu. Показати всі дописи

пʼятниця, 27 березня 2009 р.

четвер, 22 січня 2009 р.

Flash Switcher Ubuntu Issues

There's a really useful firefox extension for flash/flex developers called Flash Switcher there are win, mac and linux version of it so I decided to try it in Ubuntu.
The way it works is really simple:
- after installing the extension you get a flash icon in status bar with a menu listing your current flash plugin version and two more from the plugin's local repository - those are 7.0 and 9.0 by default. You set the "Firefox plugins directory" in settings to tell the extensions where is your flash plugin located. Each time you change flash plugin version - it gets rewrited by the version you chose from extension's menu.

First thing I decided to do is to add a few more:
1) current ubuntu's "flashplugin-nonfree" lib (that's the one playing sound through pulseaudio so I really need it)
2) and flashplugin developer version (the one that allows debugging you know)

for that I've created two more folders at extension's path:
~/.mozilla/firefox/.default/extensions/flash_switcher@sephiroth.it/plugins/linux/ (the folder containing linux flash plugins of different versions)

10.0 dev and 10.0 ubuntu
and copied the libflashplugin.so to each one (debug version is at adobe's site and the ubuntu's is in /usr/lib/flashplugin-nonfree)

Next thing I've been confused by was that the extension didn't switch anything according to about:plugins flash plugin was still version 10:
By default, the extension uses ~/.mozilla/plugins dir to write the flash plugin lib to, but... there is a symbolic link to /usr/lib/flashplugin-nonfree/libflashplugin.so named @flashplugin-nonfree or something like that which overrides the lib placed into .mozilla/plugins dir by the flash switcher extension... so I decided to fix it in a bit inappropriate way - I made /usr/lib/flashplugin-nonfree writable and set it a "Firefox Plugins Directory" in flash switcher's settings. That fixed the issue.

вівторок, 9 вересня 2008 р.

host lookup problems and hacky solutions

I got this really weird problem today: x apps couldn't connect XMing host saying "cannot connect to X server".
After some trials & errors - I defined that linux box can't resolve "localhost" host and its own local hostname "ninja"...
/etc/nsswitch.conf shows:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
(files go first)
/etc/hosts is all right too...

nslookup shows that it tries to resolve localhost and ninja using dsl isp nameservers
ping shows "unknown host 'localhost'" or something like that - why doesn't it use hosts file? I still don't know... after some time on linux community forums I've decided to fix it my way and here is how I did it:

1) first of all, I turned off some pppoe up and down scripts that rewrite /etc/resolv.conf:
# these must be chmoded to non-executables
# ip-up script uses run-parts that runs all the executable files
sudo chmod -x /etc/ppp/ip-up.d/0000usepeerdns
sudo chmod -x /etc/ppp/ip-up.d/0dns-up
sudo chmod -x /etc/ppp/ip-up.d/dns-totd
# I think these can be left executable, but just to be sure...
sudo chmod -x /etc/ppp/ip-down.d/0000usepeerdns
sudo chmod -x /etc/ppp/ip-down.d/0dns-up
sudo chmod -x /etc/ppp/ip-down.d/dns-totd
# after poff and pon dsl-provider resolv conf remains the same (see 2) so it worked

2) /etc/resolv.conf was looking this way before:
nameserver 195.5.46.12
nameserver 195.5.46.10
search local.lan
these values were set automatically on dsl link up
I changed it to this:
nameserver 192.168.1.2
#nameserver 195.5.46.12
#nameserver 195.5.46.10
#search local.lan
I have to mention that I have bind9 up and running successfully as a local dns server for a few months (so I won't be describing bind9 setup here)

3) bind9 has a "localhost" zone already configured so at this point I could already ping localhost alright. I needed to be able to ping "ninja" hostname, so here's what I did:
- opened bind config file in editor
sudo nano /etc/bind/named.conf
- added "ninja" zone to it
zone "ninja" {
type master;
file "/etc/bind/db.ninja";
};
- added zone definition file /etc/bind/db.ninja mentioned above

sudo nano /etc/bind/db.ninja
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA ninja. root.ninja. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ninja.
@ IN A 192.168.1.2


and it pings.

P.S. XMing is alive again

четвер, 14 серпня 2008 р.

Switching CLI input language in Ubuntu Linux

1. open ~/.bashrc for editing:
nano ~/.bashrc

2. add some aliases at the bottom of .bashrc file:
alias ua="setxkbmap ua"
alias сш="setxkbmap us"

3. save (Ctrl+o), exit nano (Ctrl+x) and reload .bashrc:
source ~/.bashrc