Sep 21 2009

Vim Syntax Highlighting In Ubuntu

Spending a lot of time on the command line lately I noticed that Ubuntu does not come with Vim syntax highlighting by default. Apparently it installs a version of Vim called vim-tiny which doesn’t include any syntax highlighting.

There are two packages that you can install to get syntax highlighting to work in Vim: vim-full and vim-common. Because I didn’t have gnome installed vim-full was a very large download (like 50MB) and it errored out anyway. vim-common is definitely the way to go.


sudo apt-get install vim

The above line will replace vim-tiny with vim-common and will allow for syntax highlighting. A lot of the time you will have to enable syntax highlighting by editing the vimrc config file either in /etc/vim or in yur home directory. You will need to uncomment the line “syntax on”.

Share

Sep 20 2009

Bash Shell Script Error. “bad interpreter: No such file or directory error”

Today I created a simple shell script and I was getting a few odd errors:


cody@taylor:/var/some_folder/server$ ./process_xml.sh
-bash: ./process_xml.sh: /bin/sh^M: bad interpreter: No such file or directory

I figured it was probably a permissions error or an issue with the shebang (#!/bin/sh) line. I tried removing the shebang line, changing it to use dash or bash explicitly, chmoding to 777 and still no luck and another odd error.


cody@taylor:/var/some_folder/server$ sh process_xml.sh
: not found.sh: 4:

I then checked the log file that the commands were supposed to be writing to and it was filled with ‘^M’ on every line break and the log name itself was followed by a ‘?’. Took a minute or two but I finally clued in that I wrote that script on a windows machine and then exported it to an ubuntu linux server via subversion. It was just a basic text format issue.

Under DOS (Windows/PC) the end of a line of text is signalled using the ASCII code sequence CarriageReturn,LineFeed. Alternately written as CR,LF or the bytes 0x0D,0x0A. On the Macintosh platform, only the CR character is used. Under UNIX, the opposite is true and only the LF character is used.

After a quick :


cody@taylor:/var/some_folder/server$ apt-get install tofrodos
cody@taylor:/var/some_folder/server$ dos2unix process_xml.sh

Everything worked fine.

Share

Aug 16 2009

Re-Enable Grub For Linux After Windows Install

Following the installation of Windows 7 on my desktop machine that was previously running Ubuntu 9.04, I realized that one of my partitions was missing. It was formatted as ext3 so of course it wouldn’t show up in windows. When I went to boot back into linux the grub boot manager was gone. The machine just booted straight into windows 7.

To re-enable grub was a lot simpler than I thought it would be. Since the Ubuntu 8.04 install disc that I had lying around also works as a live disc I booted my desktop off that. Once Ubuntu started up I opened up a terminal and typed these commands:


sudo grub
root(hd0,7)
setup(hd0)
quit

I then rebooted and grub was back to normal with both my Ubuntu operating system and windows 7 listed. Note that hd0,7 was the partition where I installed Ubuntu. If you installed linux before windows then you will probably want to use hd0,0. I installed windows 7 over a broken windows xp partition that I had installed before everything else.

If you installed ubuntu before you installed windows then you’re probably going to have to edit your ‘/boot/grub/menu.lst’ file. The grub documentation may be helpful.

Share

Aug 16 2009

Burning DVD ISO Images Fails In Ubuntu 9.04

I upgraded to Ubuntu 9.04 Jaunty Jackalope 64 from Ubuntu 8.04 Hardy Heron 64 the other day with the hopes that some of my issues with the operating system and desktop experience would be resolved. While a lot of my problems seemed to be improved if not fixed, the Ubuntu 9.04 upgrade did introduce one big problem that is a deal breaker. I can no longer burn dvd images. I can still burn CD data discs and I didn’t try and CD ISO’s because I didn’t want to waste the discs.

K3b gives me this error :


:-[ WRITE@LBA=0h failed with SK=3h/ASC=0Ch/ACQ=80h]: Input/output error
:-( write failed: Input/output error

And Brasero gave me this error :

BraseroWodim process finished with status 254
BraseroWodim called brasero_job_error
BraseroWodim finished with an error
BraseroWodim asked to stop because of an error
  error    = 0
  message  = "no message"
BraseroWodim stopping
BraseroWodim got killed
Session error : unknown (brasero_burn_record burn.c:2602)

Apparently other people are having the same issue. After a bit of searching I gave up on finding a fix or workaround for either K3b or Brasero. I even tried installing the Nero Linux Trial for 64 bit but I got some ambiguous write error.

I ended up taking my burner out of my ubuntu machine and putting it in an old windows box. The first dvd that I’m burning is a windows 7 install disc. After using ubuntu for about 6 months as my primary desktop operating system I think I’m done.

Share

May 30 2009

What Happened to My Terminal??

I tried a ‘tail settings.pyc’ in a new django project and I guess pyc means compiled?
Kinda neat what it did to my terminal though. Those lines ending in the dollar symbol are actually me hitting enter, that is my prompt.
whats wrong with cody taylors terminal?

Share

May 13 2009

Linux : Dropbox Clone Ubuntu One.

The cloud-based service Ubuntu One goes into the public beta phase. Through this, computers can be synchronized via online memory. As of yet, Canonical is withholding details.


Share

May 13 2009

Hands on: Canonical aims for the cloud with new Ubuntu One

Canonical is preparing to launch Ubuntu One, a new Web service that will offer cloud synchronization and collaboration features. Ars gives you a detailed hands-on look at the service and some of the underlying technology.


Share

May 7 2009

There’s WAY More to Linux than Ubuntu: 8 Distros Compared

Yes, there is more to Linux than Ubuntu. As you are probably aware, there are many different types of Linux to choose from, even though not all get the attention they deserve. This guide sheds more light on some of the more common distributions in use today and covers the distinct advantages or disadvantages of each.


Share

May 5 2009

Shuttleworth Says Ubuntu Can’t Just Be Windows

ruphus13 writes “When Mark Shuttleworth was asked what role WINE will play in Ubuntu’s success, he said that Ubuntu cannot simply be a better platform to run Windows apps. From the post, according to Shuttleworth, ‘[Windows and Linux] both play an important role but fundamentally, the free software ecosystem needs to thrive on its own rules. it is *different* to the proprietary software universe. We need to make a success of our own platform on our own terms. if Linux is just another way to run Windows apps, we can’t win. OS/2 tried that …’ The post goes on to say, ‘Linux simply isn’t Windows (nor is Windows Linux) and to expect fundamentally different approaches (and I’m not just thinking closed versus open) to look, feel, and operate the same way is senseless.'”

Read more of this story at Slashdot.


Share

May 4 2009

The Biggest Cults In Tech

bobby f. writes “Infoworld has published its list of the biggest cults in tech — including Palmists, Newtonians, Commodorians, the Brotherhood of the Ruby, IBM power systems fanboys, Ubuntu-ists, and Lispers. A pretty fun read (unless you really are a cult member).” Although I think it’s pretty clear that the Apple camp isn’t an opinionated cult, they’re just always right. Fire away.

Read more of this story at Slashdot.


Share