Samba … A Windows – Linux dancing story !

I already posted on this subject (actually my first post on Ubuntu), but I just wanted to share a better link I found out here : Dead Simple, Clear, Understandable … Everything a newbie like me needs.

Oh and by the way if the “Connect To server..” function works somewhat great in Gutsy, forget about the “Shared Folders” one : it imply does not work and makes you loose your time !

So now my network is up and running perfectly !

Managing shell history

On linux, if you use multiple terminals, and are a fan of the history command because you always forget which one actually worked, then you have probably noticed something weird : some of your commands sometimes disappear because they don’t appear in history.

It is due to the fact that, by default, the history is saved when a terminal is closed. But more than saved I should say replaced ! Meaning that the history is actually the one of the current terminal plus the one of the last terminal you closed.

If you want to have your history saved across multiple terminal, then I found this link here to guide you. Basically, you need to add

shopt -s histappend

to your .basrc file.

Only thing I’d like to do now, is to have the history file being saved every time I enter a command, not only when the terminal is closed, so that I could easily share information across multiple terminals … But I have not yet found the answer ! If you have it, talk to me !

Watching Sopcast & TvAnts on Ubuntu !!!

It’s Shangaï Master’s time ( Gooooo Gasquet 😉 ), and while blogging, surfing, and whatelse, I wanted to watch the tennis game on my newly configured Ubuntu Gutsy box !
Of course Sopcast and TVAnts are THE P2P programs to watch television right now, so this is the way I went !

First thing firt, you need to install the standard Windows codec, because they don’t come defacto with the Gutsy installation. A really good tutorial on the official site here, and look for “Playing Restricted Formats”.

For TVAnts the installation is straight forward. You need to install Wine, the windows emulator. Then you download the regular Windows setup file and run it with the previously installed Wine. Apparently it needs a rebbot for Wine to add the shortcut to the faked “Windows Programs”. After that you just need to add a channel or select one from the list, and open MPlayer or VLC on the url given by the program, which is usually something like http://localhost:8900/1.asf.

For SopCast, it’s not as simple. Unfortunately the gui does not really seem to work at the moment. So you need to install the command line util. You can download it from their website, and unzip it on your machine. It has a dependency over libstdc++5 which you can install from the package manager. Once this is done, you need to issue a command line of the like :

./sp-sc-auth sop://myserver/mychannel 3908 6908 >/dev/null &

3908 is the port that will connect to the server, 6908 is the port that will have the video, >/dev/null is to prevent the verbose output, and & to make the process run standalone which is obviously optional. Once this is done, you need to wait a little bit for the data to buffer (look at you systray and the network monitor), and then start your preferred player on the http://localhost:6908/tv.asf URL.

And there you go ! P2P Television enabled on your delighted Gutsy Ubuntu box !

If you have any problems, or need more information, don’t hesitate to ask !

How I got to watch Heroes on Ubuntu !

Since I now have a new working Ubuntu install, I decided I’ll watch Heroes on it while “working” on my other machine… Or so I thought.
The graphic card I now have is a S3Trio 3D/2X 8Mo, and I thought I would be on a good run with that one ! Unfortunately any attempt to run a Heroes episode ended up on a window getting killed 🙁

Of course I first thought I was not using the right player, or not having the right codec. So I tried Totem, VLC, MPlayer … No result. So I installed all the codecs I could find … No result. So I decided to run from the command line, and got the fllowing message :

The program 'totem' received an X Window System error.This probably reflects a bug in the program.The error was 'BadAlloc (insufficient resources for operation)'.(Details: serial 86 error_code 11 request_code 140 minor_code 19)(Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful    backtrace from your debugger if you break on the gdk_x_error() function.)

Simply GREAT !

Some more googling took me to this page, where they tell you to add two more lines to your Xorg.conf file … But I was still in no luck, with the same problem.

At last, I found the following page in the netherlands, where they suggested to use the 16 bits default depth instead of 24 in the Xorg.conf file. So I did, and after a restart of the X server … YATTAAAAAAAAAAAAAAA ! There was
Hiro Nakamura !

Now I just need to catch up on 6 episodes 😉

Old graphic card on Ubuntu/Xorg

As you may recall I was kind of having a bad time with Xorg X server configuration for my really old SIS6215 graphic card.

After digging a lot of google, I was not able to get it to work correctly, and found out that it was not supported by Xorg anymore here.
I went to use another crap old graphic card, a Cirrus, this one. I got this one to almost work, but only for a resolution of 800×600. It took me some time, and if you need I can give you the adequate Xorg.conf file. But this resolution was too small for any relevant usage.
I then got to wonder whether Xorg was really supporting old PCI graphic cards ? It turned out with more google searches that the legitimate answer to the question is NO.
So I decided to order some old AGP cards on PriceMinister (Ebay did not get me what I needed ;-)), and got them two days later.
After that, a clean install of Gutsy, aka Ubuntu 7.10, gave me a working machine, with a decent resolution (1280 wide).

The conclusion of all that ? As Clowny said “With X, if it works, it works … If not, then there is no magic !”. And I would add, that if you want to use an old PCI card… Don’t expect it to be a smooth road !!!

How I moved a blog from Serendipity to WordPress

I had a blog using the S9Y framework aka Serendipity but obviously since WordPress is THE blogging framework around I had to move to it.

Unfortunately S9Y is not one of the supported import modes of WordPress. Fortunately, a quick Google search pointed me to the following page, which gives one ! You just need to drop the file in the wp-admin/import directory of your wordpress installation, and use the standard import mechanism.

After that, I ran into the following error beause of my hosting provider ( : “failed to delete and flush buffer. No buffer to delete or flush”. After lots of goggle search which led nowhere since this is a classic PHP error happening on lots of blogs, I decided to tackle the problem myself. After some good old “echo debugging”, I found out, that the problem was the following line of the serendipity.php file :

$cats = $this->get_s9y_cat_assoc($ret_id);

I commented it out and replaced it by :

$cats = array();

Now, you might say “cool, but this has to have some side effects!”. And you’re right. Apparently with the posts category, but since there was none on the imported blogs… Who cares 😉

Don’t hesitate to post, if you know a better solution !

My Two first GreaseMonkey scripts

I just created my two first scripts for the geniusly useful greasemonkey engine, so I thought I’d share this with you !
For those of you not familiar with GreaseMonkey, this is a Firefox addon that basically executes some Javascrit code inside your browser once the page has been loaded. This allows to modify the UI, add some functionalities, etc to some website, without having to actually modify the website itself since everything is done on the client side. I’ll try to write another post to share with you some of the script I use on daily basis !
Anyhow, I also have several computers at home, and one of them is a blackbox running the Azureus bittorrent client, with the HTMLWebUI interface enabled. This allows me to remotely control the engine, and upload, stop, monitor the various torrents I’m downloading. At some point, I was fed up with having to search for the torrent on some torrent search site, then right click to copy the link location of the torrent, and paste that in the WebUI interface. So I created two scripts to facilitate that process.
The first scripts adds a link in the mininova search page to directly send the torrent file to the remote azureus. So I don’t need to right click, paste, change tab and all … Torrent download is only one click away !
The second script goes the opposite way. I sometimes have torrents that don’t start for some reasons. So usually I would go back to mininova, search for the thing I was downloading and re-upload it to Azureus. I accelerated this process by adding a link that directly gets you to the mininova search page with the correct search terms. Again, one click away from finding the perfect torrent !
You can get those scripts on my UserScripts page… Enjoy ! And if you have any question, don’t hesitate to ask !

Samba Configuration

I’m in the process of playing with a linux server box I setup @ home on a really old computer.
Since I’m not system administrator expert, I tend to always forget how I did things … So over the next couple of days/weeks, I’ll post here some info I don’t want to loose, or tips I found out while working with my box !

FYI, I installed an Ubuntu Server edition, because I did not have too much computing power, and my graphical card (SIS6215) seems really difficult to configure for X server !

So here we go with the first thing I don’t want to forget : Samba configuration for easy sharing with my other Windows based computers. I found this really nice HOWTO, that explains simply how to do it … The steps are well written, so I won’t bother making it better 😉