Co da się zrobić w Firefoxie

Co da się zrobić w FirefoxieJeże­li chciał­byś czy­tać wia­do­mo­ści z por­ta­lu gaze​ta​.pl w nie­co bar­dziej „gaze­to­wej” for­mie (jak na ilu­stra­cji obok) i korzy­stasz z Fire­fo­xa, możesz wyko­rzy­stać jego — stan­dar­do­wą w prze­glą­dar­kach — moż­li­wość pod­ło­że­nia arku­sza sty­lów (CSS) użyt­kow­ni­ka oraz spe­cy­ficz­ne moż­li­wo­ści Fire­fo­xa — ren­de­ro­wa­nie tek­stu w kolum­nach i przy­pi­sy­wa­nie CSSa tyl­ko do kon­kret­nej domeny.

Pobierz plik userContent.css i zapisz go w pod­ka­ta­lo­gu Chro­me swo­je­go pro­fi­lu. W Win­dows XP ma on mniej wię­cej ścież­kę C:/Documents and Settings/LOGIN/Dane aplikacji/Mozilla/Firefox/Profiles/7crhdw2r.default/chrome, gdzie LOGIN to Twój login, a 7crhdw2r.default to kata­log z pro­fi­lem (Fire­fox gene­ru­je jego nazwę loso­wo). Prze­star­tuj prze­glą­dar­kę i odwiedź jeden z arty­ku­łów na por­ta­lu gaze​ta​.pl 🙂

Tuning Freevo: display feedback when manually seeking

The­re is a nice featu­re in Fre­evo that allows one to seek the cur­ren­tly play­ing movie to any given posi­tion. One just needs to press 0 on the remo­te con­trol, then enter to which minu­te of the movie they wish to jump and press enter. For instan­ce, pres­sing 0,6,0,ENTER would fast for­ward the movie to the first hour. Unfor­tu­na­tel­ly, the­re is no visu­al feed­back whi­le pres­sing the­se keys. I tho­ught it would be nice to see „Seek to:” in mplay­er’s OSD when first pres­sed 0 and then see „Seek to: 6”, „Seek to: 60” whi­le pres­sing next buttons.

I mana­ged to do it in this way (sour­ce code edi­ting necessary):

1. Went to the /usr/lib/python2.4/site-packages/freevo/video/plugins directory.

2. Ope­ned up the mplay​er​.py file in text editor.

3. Found a line say­ing: def eventhandler(self, event, menuw=None):

4. Ten lines below def even­than­dler the­re is a line saying:

if event == VIDEO_MANUAL_SEEK:

5. After that line the­re is

rc.set_context('input')

just add that line:

self.app.write('osd_show_text "seek to: "\n')

below the rc.set_context line (self.app.write sho­uld be left ali­gned with tabs the same way rc.set_context is).

6. Fur­ther in the file the­re is a line saying:

self.seek = self.seek * 10 + int(event)

just add the line:

self.app.write('osd_show_text "seek to: ' + str(self.seek) + '"\n')

below the self​.seek line (self.app.write sho­uld be left ali­gned with tabs the same way self​.seek is).

7. Saved the file, restar­ted Fre­evo and voila!, it’s almost wor­king (I don’t know how to make it not disap­pe­ar after a second, but it does give visu­al feedback).

Tuning Freevo: subtitle and audio language switch

I deci­ded that posts in the Fre­evo cate­go­ry will be publi­shed in English so the tar­get audien­ce can be wider.

Fre­evo is a HTPC (Home The­atre Per­so­nal Com­pu­ter) over­lay for some of the most com­mon Linux mul­ti­me­dia appli­ca­tions (mplay­er, xine, etc). It is visu­al­ly and func­tio­nal­ly simi­lar to the Micro­so­ft’s Win­dows XP Media Cen­tre. I have made a PC box of some old com­po­nents that whe­re scat­te­red arro­und in my cel­lar, instal­led Ubun­tu Linux the­re, twe­aked A LOT to make it work with things like TV-OUT and remo­te con­trol and final­ly instal­led and con­fi­gu­red Fre­evo. It allows me to watch vir­tu­al­ly any kind of movies (DVD, DIVX, XVID, MKV, WMA, MPEG, etc.), play a col­lec­tion of my MP3 files, brow­se my pho­to­gra­phs and much more. Thanks to a huge hard dri­ve (250GB) I could put prac­ti­cal­ly who­le mul­ti­me­dia con­tent on the box.

In my first post I would like to give You some tips and tricks to ena­ble featu­res that are­n’t nor­mal­ly ava­ila­ble in Fre­evo (as of ver­sion 1.5.4).

O.K., let’s get going 🙂 The very first thing that I did­n’t like abo­ut Fre­evo was it’s una­bi­li­ty to select dif­fe­rent sub­ti­tles using my remo­te. It was espe­cial­ly annoy­ing when wat­ching MVK movies that have some sub­ti­tles (eg. English and French) enco­ded insi­de the video file. Mplay­er or Fre­evo auto­ma­ti­cal­ly selects embed­ded sub­ti­tles and igno­res the fact that the­re also exi­sts a spe­cial­ly pre­pa­red Movie_title.txt file with Polish (my nati­ve ton­gue 😉 ) subtitles.

So what needs to be done to fix that pro­blem is this:

1. Make sure You have some remo­te con­trol but­ton con­fi­gu­red and not used for any­thing in video con­text. Open up /etc/freevo/lircrc file and one of the sec­tions could be some­thing like this:

begin  
prog=freevo  
button=subtitle  
config=SUBTITLE  
end

2. Open up /etc/freevo/local_conf.py file and seek for a line

# EVENTS['video']['1'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='contrast -100')

I’ve added two lines below:

EVENTS['video']['SUBTITLE'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='sub_select')  
EVENTS['video']['LANG'] = Event(VIDEO_SEND_MPLAYER_CMD, arg='switch_audio')

The first one makes the SUBTITLE but­ton cyc­le thro­ugh all ava­ila­ble sub­ti­tles during the movie. The second line makes the LANG but­ton cyc­le thro­ugh dif­fe­rent ava­ila­ble ver­sions of audio. I find it use­ful when wat­ching DVDs whe­re default lan­gu­age often is dif­fe­rent than my native.

Yes, that is SOOO easy 🙂

WordPress 2.0

Dzi­siaj prze­sze­dłem na wer­sję 2.0 sil­ni­ka blo­go­we­go Word­Press. Upgra­de był bar­dzo pro­sty, uda­ło się bez pro­ble­mu zacho­wać z wer­sji 1.5 spo­lsz­cze­nie, a zmia­ny — widocz­ne od stro­ny pane­lu admi­ni­stra­cyj­ne­go — są bar­dzo faj­ne (zwłasz­cza edy­tor WYSIWYG) 🙂

Zajmujący 100% procesora wuauclt — rozwiązanie problemu

Od jakie­goś cza­su zauwa­ży­łem, że mój Win­dows XPSP2 zacho­wu­je się dziw­nie, a mia­no­wi­cie potwor­nie zwalnia.

Krót­kie śledz­two poka­za­ło, że wszyst­kie­mu winien jest pro­ces wuauclt, któ­ry jak na złość 😉 nie oka­zał się ani wiru­sem, ani mal­wa­rem tyl­ko czę­ścią mecha­ni­zmu Auto Upda­te same­go Micro­so­ftu. Dużo się naszu­ka­łem, aż tra­fi­łem na to: http://​sup​port​.micro​soft​.com/​?​i​d​=​8​8​3​821. U mnie podzia­ła­ło to z usu­nię­ciem Data­Sto­re 🙂 Mam nadzie­ję, że Micro­soft nie puści mnie z tor­ba­mi za poni­żej prze­kle­jo­ny fragment:

Kod błę­du 0×80248011

Przed pró­bą roz­wią­za­nia tego pro­ble­mu nale­ży wyczy­ścić pamięć pod­ręcz­ną pro­gra­mu Micro­soft Inter­net Explo­rer. Aby to zro­bić, wyko­naj nastę­pu­ją­ce kroki:

  1. W menu Narzę­dzia pro­gra­mu Inter­net Explo­rer klik­nij pole­ce­nie Opcje internetowe.
  2. Na kar­cie Ogól­ne klik­nij przy­cisk Usuń pli­ki w sek­cji Tym­cza­so­we pli­ki internetowe.
  3. Klik­nij przy­cisk OK, a następ­nie ponow­nie klik­nij przy­cisk OK.

Aby wyeli­mi­no­wać ten błąd, nale­ży ponow­nie utwo­rzyć bazę danych, któ­ra prze­cho­wu­je na kom­pu­te­rze infor­ma­cje roz­sze­rze­nia Win­dows Upda­te lub Micro­soft Upda­te. Aby to zro­bić, wyko­naj nastę­pu­ją­ce kroki:

  1. Klik­nij przy­cisk Start, klik­nij pole­ce­nie Uru­chom, wpisz pole­ce­nie cmd w polu Otwórz, a następ­nie klik­nij przy­cisk OK.
  2. W wier­szu pole­ce­nia wpisz nastę­pu­ją­ce pole­ce­nie, a następ­nie naci­śnij kla­wisz ENTER: net stop wuauserv
  3. W wier­szu pole­ce­nia wpisz nastę­pu­ją­ce pole­ce­nie, a następ­nie naci­śnij kla­wisz ENTER: cd /d c:\Windows\SoftwareDistribution gdzie c:\Windows jest fol­de­rem, w któ­rym został zain­sta­lo­wa­ny sys­tem Windows.
  4. W wier­szu pole­ce­nia wpisz nastę­pu­ją­ce pole­ce­nie wraz z cudzy­sło­wa­mi, a następ­nie naci­śnij kla­wisz ENTER: rd /S /Q DataStore
  5. W wier­szu pole­ce­nia wpisz nastę­pu­ją­ce pole­ce­nie, a następ­nie naci­śnij kla­wisz ENTER: net start wuauserv.
  6. Zamknij okno wier­sza polecenia.