ubuntu

Linux command to remove leading zeros from a file name

I have a directory with a bunch of files with names like: 001234.jpg 001235.jpg 004729342.jpg I want to remove the leading zeros from all file names, so I'd be left with: 1234.jpg 1235.jpg 4729342.jpg I've been trying different configurations of sed, but I can't find the proper syntax. Is there an easy way to list all files in the...

Ad-hoc connection disappearing

I create an ad-hoc connection between my Ubuntu 9.10 laptop (wlan0) and my iPod touch, but the connection only lasts for seconds before it is dropped. Why might this be happening? I use the following to setup my connection: ifconfig wlan0 down iwconfig wlan0 mode ad-hoc iwconfig wlan0 essid Network iwconfig wlan0 enc off iwconfig wlan0...

How to deploy highly iterative updates

I have a set of binary assets (swf files) each about 150Kb in size. I am developing them locally on my home computer and I want to periodically deploy them for review. My current strategy is: Copy the .swf's into a transfer directory that is also a hg (mercurial) repo. hg push the changes to my slicehost VPN ssh onto my slicehost VPN ...

Using USB port from c++

Hello, i was just wondering if somebody could give me any pointers about how to use USB ports on Ubuntu(and other unix systems) &&/|| (and/or :]) windows. I was trying to googling some stuff up but i failed horribly. Even names of libraries to be used etc would be appriciated. Thanks, Tomas Herman ...

Ubuntu exim4 - Config setup and spam filters

I've recently setup my Ubuntu web server with exim4 so my PHP website applications can send email such as "thank you" and "confirmation" notices. I've got it setup and working such that I can send email to gmail, Yahoo! and my work address. However, my work email gets caught up in our spam filter. I'm new to setting up mail servers so...

Weird pynotify behaviour in Ubuntu 9.10

Hi, I wrote a small app and I am using pynotify to show some messages to the user. It all works fine here in arch, but when I tested it in Ubuntu, the behaviour was very weird. Because of the way Ubuntu shows notifications (as what seems to be a rip of of growl), I can't click on them, or interact with them in any way, for that matter....

Download bandwidth difference in Operating Systems?

Hello I've recently discovered an interesting thing. I've made my own Speedmeter using Flash CS4 and ActionScript 3.0. The Download side is based on downloading 2 Mp3 noise files. Using the built-in method getBytesLoaded() and a simple math it's easy to calculate actual connection speed. Actual speed is evaluated every second. It works...

Can't get Erlang based Riak to work under Ubuntu 9

I have been unable to get Riak working under Ubuntu 9 due to many problems. I tried following the current blog: http://onerlang.blogspot.com/2009/10/fighting-with-riak.html : but still Riak is not working. Has anyone else had problems with Riak on Ubuntu 9? I did get this working eventually by following this guide: http://megam.info/...

is "ubuntu netbook remix" and "intel moblin os" built up from the same base ?

hello, i have been debating which OS to use for a car pc.. and ubuntu netbook remix (UNR) and moblin seem to be the best ones suited for a small touch screen.. however, i want to use an OS which has good support from the community.. and was confused upon reading the wikis for each of them which says that both OSes are built by canonic...

Connecting to SQL Server (from Ubuntu): [RubyODBC] Cannot allocate SQLHENV

I'm trying to connect my Ruby on Rails application to a legacy Database that is in a Microsoft SQL Server 2008. I have looked around different tutorials, pages, help pages, and question pages and still haven't been able to make it work. I'm using: Ubuntu karmic Rails 2.3.5 Ruby 1.8.7 activerecord-odbc-adapter 2.0 activerecord-sqlserve...

Starting two mochiweb servers with a single script file

I have a basic web server that I generated from the mochiweb framework. To start it I use the start.sh script that the framework automatically generates. Everything works fine and the server starts up. Now I have one more mochiweb server that I want to start along with the first one. Again, this starts up perfectly standalone with its st...

SVN serve and PySVN Error message: Expected FS format between '1' and '3'; found format '4'

For research purposes, I copied a SVN repo to my Windows machine using svnsync so I can replay on my machine without loading the actual server. I've been using PySVN in scripts to control the revision number I want the repo to be in and have been using it fine so far. Now I got a repo from a different project and svnsync got it fine. Wh...

How to get the name of the current git branch into a variable in a shell script?

I am new to shell scripting and can't figure this out. If you are unfamiliar, the command git branch returns something like * develop master , where the asterisk marks the currently checked out branch. When I run the following in the terminal: git branch | grep "*" I get: * develop as expected. However, when I run test=$(gi...

Error installing mod_wsgi 3.1

I am trying to install mod_wsgi 3.1 on Ubuntu 9.10 and am getting this error when I attempt to make root@me:/src/mod_wsgi-3.1$ ./configure --with-python=/usr/bin/python2.6 checking for apxs2... /usr/bin/apxs2 checking Apache version... 2.2.12 configure: creating ./config.status config.status: creating Makefile root@me:/src/mod_wsgi-3.1...

phusion passenger and ruby 1.9.1 is it working already?

i have a production and a development machine, both running ubuntu 8.10 and both are running the latest phusion passenger. as i am using ruby 1.9.1 on my local development machine on osx, i wondered if people out there are already using phusion passenger with ruby 1.9.1 or even 1.9.2 already? if so, please tell us your setup! furthermor...

extracting jar files

how do we extract jar files in ubuntu???? ...

Building and using shared libraries with bjam

Hello! Using bjam on ubuntu, I am building a c++ shared library and trying to use it in an executable. I have to build as shared since it wont link as static (lots of undefined references arise). Thats fine. Two related problems: 1) Using a heirarchy of Jamfiles, my exe project (testServerHub) has a dependency on the shared library (p...

SSH cannot authenticate to [email protected]

Recently, I sign up for a free plan on Github.com. I follow their instructions to generate a ssh key to add to my account. However, when I try ssh -v [email protected], I get this error: debug1: Server accepts key: pkalg ssh-rsa blen 277 Agent admitted failure to sign using the key. debug1: Trying private key: /home/phuongnd08/.ssh/identit...

Python / Linux/ Daemon process trying to show gtk.messagedialog

Hi, on Ubuntu 8/9, i'm trying to write a daemon in python, that monitors a certain network condition and informs the user using a gtk.messagedialog. I installed this script using rc-update. The daemon starts at boot, but doesn't show the dialog even after I login. I assume because init.d starts my daemon at tty1 and no gnome is availabl...

No plot window in matplotlib

I just installed matplotlib in Ubuntu 9.10 using the synaptic package system. However, when I try the following simple example >>> from pylab import plot; >>> plot([1,2,3],[1,2,3]) [<matplotlib.lines.Line2D object at 0x9aa78ec>] I get no plot window. Any ideas on how to get the plot window to show? ...