Two Linux Tips — Playing VCDs, DHCP settings

Monday · 7 Jan 08 · 03:21 AM IST | Posted by Karthik | Category: Tech

Ever since shifting exclusively to Linux (Ubuntu Linux 7.10, "Gutsy Gibbon" is what I am running currently), I thought I'd document whatever steps I took to solve certain problems I encountered.  Of course, you could go and look at the same websites I did and find workarounds for what you want to do, but I thought my writing about my experiences might still be helpful.  So here are two tips that I discovered recently.

I mentioned in the last post that I bought a bunch of VCDs yesterday, right?  Well, I ran into trouble playing them on my computer.  Totem Movie Player pops up an error, saying that the playback of the disc required the VCD source protocol which was not installed properly.  Huh?  So I tried playing it back in VLC and that didn't work either.  I tried playing it through VLC's Open Disc menu, and I also tried opening the DAT files with the players.  Didn't work.  A little hunting on the net turned up two solutions —

  • Open up Synaptic Package Manager and install MPlayer and associated codecs.  Now, put in your VCD, right-click on MPlayer's Video Window, go to the VCD menu and click "Open Disc".  You will get a popup with an error message, but the disc will still playback fine!
  • I had best results with this though.  Install the XINE player and associated codecs.  That plays back VCDs properly.

I was kind of surprised that VCDs would have trouble playing back in Linux.  After all, they're just MPEG encoded video, and you could play them back effortlessly even on Windows 95!  I don't think the issue is that the media players lack MPEG codecs.  I think it has more to do with the fact that they're not able to recognise that the DAT files on the VCDs contain MPEG data (I could be wrong though).  Anyway for now I'm happy that I can play back these VCDs.  A side note — the Video CD is still a popular format in India and in Asian countries.  It just didn't pick up in other countries (I think in the US, they went directly from VHS to DVD), but here you get lots of movies released on VCD even till today.  Now many of these are obscure movies that you won't get on DVD either, over here!

Now for Tip #2!  This is regarding configuring my internet connection.  You see, if I plug in my network cable, I'm not able to directly browse webpages.  I have to go to the Network Configuration tool (System » Administration » Network) and then enter my ISP's DNS IP addresses manually.  Then, things work fine.  I've even saved these settings as a Location under that tool.  But the problem is that these settings aren't persistent.  Whenever I restart the computer (or even when the computer wakes up from hibernation), these settings revert to defaults (the only DNS IP is that of my router itself,  So I searched around for a way to retain these settings, and this post gave me a solution.

Apparently, the nameserver IPs are stored in a file called resolv.conf, and the problem is that each time the computer restarts/wakes up, the router is queried or something by DHCP, and the file is overwritten with the default nameserver IP.  So, one way to make the IP settings persistent is to make resolv.conf read-only, but that is a pretty ugly method.  A better way is to follow the third method on that page.  Here, what you are essentially doing, is to tell DHCP to prepend your ISP's known nameserver IPs to resolv.conf.  This worked well for me, and I think my pages load faster too!  Step-by-step, here's what you do —

  • Open up the file dhclient.conf in a text editor.  You'd enter the following command in a Terminal window: sudo gedit /etc/dhcp3/dhclient.conf
  • Now, there should be a line over there that looks something like this: # prepend domain-name-servers;
  • What you do is, you simply remove the hash on the beginning of the line, and enter your ISPs DNS IPs after that.  If you have more than one IP, separate with a comma.  My entry looks like this: prepend domain-name-servers,; (don't forget the semicolon at the end)
  • Save the file and then re-enable your network connection, and that's it.  I restarted my computer and the first thing I did after it booted up was to open Firefox.  I was able to access webpages.

Note: Since I am running Ubuntu, I have described the steps that worked for me, if you are using another Linux distribution, you should be able to follow similar steps to achieve these results.  I have another big Linux-related post coming up shortly.  That one is on using Windows fonts under Linux!

13 comment(s) for this post.

Comments for this News Post

8 Jan 08 · 01:52 AM
Interesting stuff! I am amazed to know that you (still) use VCDs in India...! :o I think they haven't ever existed here in Italy; we passed directly from VHS to DVD.
13 Jan 08 · 02:00 AM
I've been a big fan of mplayer from long time though I use Media Player Classic in windows. I never had any problems with my router though. It worked out of the box all the time.

BTW, try Linux Mint (its based on ubuntu) Its targetted at people who dont hate non-free software. It comes with all the possible media codecs and nice combination of applications.
13 Jan 08 · 08:02 PM
Comment by user Karthik
Ismaele - right, we still have VCDs here... I think the reason people started using them was because they were cheaper than DVDs when introduced. They still are, but nowadays even DVD prices are coming down. Of course, even the best-mastered VCD still can't compare to a DVD.

K - So, you were the one who convinced Krish Ashok to install Mint on his TCS laptop, eh? :) I also used to use Media Player Classic under Windows for a long time. But, later on I started using VLC because it natively supports DivX, Xvid playback (and, don't I have a lot of those files?) and it used to run better than MPC which used to play through DivX codec.
30 Jan 15 · 06:14 AM
Great info. Lucky me I discovered your site by chance
(stumbleupon). I have bookmarked it for later!
31 Jan 15 · 01:07 PM
I need to to thank you for this wonderful read!! I absolutely loved every little bit of it.

I have got you bookmarked to check out new stuff you post_
31 Jan 15 · 03:51 PM
These are in fact enormous ideas in on the topic of blogging.
You have touched some pleasant factors here.

Any way keep up wrinting.
4 Feb 15 · 07:36 PM
Currently it sounds like Expression Engine is the top blogging platform out there right
now. (from what I've read) Is that what you're using on your blog?
6 Feb 15 · 08:02 AM
whoah this blog is magnificent i like studying your posts.

Stay up the great work! You recognize, a lot of people are hunting around for this info, you
can help them greatly.
8 Feb 15 · 08:01 AM
Woah! I'm really enjoying the template/theme of this blog.

It's simple, yet effective. A lot of times it's very difficult to get that "perfect balance" between usability and visual appeal.
I must say you have done a great job with this. Also, the blog loads extremely quick
for me on Chrome. Excellent Blog!
12 Feb 15 · 10:26 AM
I constantly emailed this webpage post page to all my contacts, because
if like to read it then my links will too.
14 Feb 15 · 02:00 PM
During the intervention, be demanding but additionally let anyone in question know
that the main goal is to get their help for his or her problem.
15 Feb 15 · 03:43 PM
It's amazing designed for me to havve a web site, which is good designed
for my knowledge. thanks admin
15 Feb 15 · 04:07 PM
Nice post. I was checking continuously this weblog and I am impressed!
Very useful information specially the remaining section :) I
maintain such info much. I was looking for this particular info
for a very lengthy time. Thanks and best of luck.
Recent Comments
Recent Posts
Latest Doom Map
Dark Fate 2 — a Doom II map by Karthik Abhiram

Dark Fate 2 is a singleplayer level for Doom II, replacing MAP01.  It's a small-sized hellish level — and there's a walkthrough video as well.

Popular Videos
Other Destinations
Favourite Posts
Some Statistics
  • news posts two · 173
  • news posts one · 301
  • comments · 1168
  • drawings · 77
The Author

Karthik Abhiram

27-year old Taurean (birthday 15-May-82), Assistant Manager - HR at Tata Consultancy Services Ltd in Hyderabad, India.  Previously, did Post Graduate Diploma in Management from T A Pai Management Institute (2003-05) and before that, Computer Science Engineering from Sree Nidhi Institute of Science and Technology (1999-2003).

Email: karthik82 -AT- gmail -DOT- com
orkut profile
Facebook profile
YouTube channel
deviantART page
Google Reader Shared Items

Disclaimer: The views expressed on this site are purely my own.

Warning: This site occasionally contains profanity.

Creative Commons License