Thoughts on Rails

Riding the Train of Thought

Archive for the ‘Open Source’ Category

Mounting samba share with write permissions for regular users

with 4 comments

I have tried looking for this information on the Internet but have successfully managed to make myself look dumb. I found nothing for three consecutive days (nights, actually – mostly I sleep in the day, work at night!) I proudly say this – “I may not know everything, but I know where to find it.” But these three days left me increasingly frustrated at the inability to solve a simple problem. Recent trends are showing that I am finding less and less relevant information in my searches. I’m afraid… am I losing the search-fu skillz?

So anyway, rants aside – this is what I was facing:

I have set up samba on my computer named Jaguar, it runs PCBSD 3.3, I wish to access the samba share from Panther, which also runs PCBSD 3.3. I can simply point Konqueror to “smb://” (the IP address belongs to Jaguar) and I am able to read and write to the share.

Trouble begins when I try to mount the share using mount_smbfs command. I have configured the share to be public, writable and also allowed guests – also, security is on share basis – so no passwords are required. I add the “-N” switch to my mount_smbfs command to disable password prompt.

mount_smbfs -N -I //guest@ /home/harshad/shared

It mounts the samba share, I am able to read the files… but I cannot write to them. And trying to solve this problem took a good amount of time. I know – it should be simple. And trust me – it is simple. You only have to know how to use two simple switches – “-g” and “-u”.

They tell mount what should be the group id and user id for the mounted filesystem. So, go ahead, look up your user id (uid) from /etc/passwd and group id (gid)for whichever group you wish to allow write access to and substitute in the following command:

mount_smbfs -N -u 1002 -g 10 -I //guest@ /home/harshad/shared

That sure fixed my problem – and I hope it can help you too.

Thanks to: ##FreeBSD channel on (IRC)

Written by hiway

March 2, 2007 at 5:24 am

Open Source Photography Workflow Management Software

with 2 comments

A few days ago, I stumbled upon a nice application. From the website it looks nice and might soon contain every feature that I want – I haven’t been successful in making it run on my system (yet).

First of all, it is a Java application… and FreeBSD/PCBSD isnt exactly Java paradise. Yes the support is improving fast, and I’m happy about it 🙂 So, after downloading the “jar” file, I tried double clicking in Konqueror file explorer – which promptly opened the archive and showed me the files inside. Hmm… not exactly what I wanted to do.

So I fired up Konsole and issued the command

jar blueMarine-0.8.6-setup-linux.jar

For which is gave a rather confusing reply:

Exception in thread “main” java.lang.NoClassDefFoundError: blueMarine-0/8/6-setup-linux/jar

Yes folks, I am an outsider to the Java world. I usually am clueless about how things work here. So I searched on the Internet and found nothing that said somebody had the exact same problem and how they solved it. So, I realized that I was probably on my own for generalizing the problem, finding out a generic solution and then applying it here. So after searching a bit, I found out that Java was unable to find the “classpath” for the given jar file and it makes no assumptions that the classes might just be in the same jar file… and so we have to tell it exclusively – it’s in the same file dangit!… well, for a computer to understand that, the command is:

java -jar blueMarine-0.8.6-setup-linux.jar

Finally, (wait, its not really finally) it worked! The interface loaded and complained that I have Java 1.5.0 while it needs 1.5.0_05! So until I make up the mind to try and upgrade Java (which isn’t a lovely process on this Operating System) I’m going to do something else (which includes having a cup of tea or sleeping). I need to make my mind up soon! 😀

*sigh* sometimes, I really dislike softwares. Whoever said that computers make life easy, hasn’t really ever used one.

Oh, and if you are curious, here’s the link to blueMarine:

Written by hiway

February 26, 2007 at 4:43 pm

Beagle on PCBSD / FreeBSD – I tried… :’-(

leave a comment »

UPDATE: I have successfully installed Beagle on PCBSD 1.3.3 / FreeBSD 6.1

NOTE: Later install for KDE integration

1. Got Beagle sources, decompressed, run ./configure
It complains that I don’t have mono installed… right…

2. Installed lang/mono

3. Installed x11-toolkits/gtk-sharp20

Packages NOT found in the ports tree:

Packages found in the ports tree:

4. Installed gmime-sharp

5. Compiling gnome-sharp20

Traceback (most recent call last):
File “/usr/local/bin/xml2po”, line 34, in <module>
import libxml2
File “/usr/local/lib/python2.5/site-packages/”, line 1, in <
import libxml2mod
ImportError: /usr/local/lib/python2.5/site-packages/ Undef bol “xmlPathToURI”

Problem seems difference in library version and python wrapper version:

libxml2-2.6.26 XML parser library for GNOME
py25-libxml2-2.6.27 Python interface for XML parser library for GNOME

6. Installing libxml2-2.6.27

7. Back to compiling gnome-sharp20, done.

8. The dependencies that were NOT found, seem to be automatically satisfied now. Good!

9. ./configure in beagle directory is successful

10. Building Beagle:

panther# gmake
gmake all-recursive
gmake[1]: Entering directory `/usr/home/harshad/Programming/beagle-0.2.16′
Making all in po
gmake[2]: Entering directory `/usr/home/harshad/Programming/beagle-0.2.16/po’
file=`echo ar | sed ‘s,.*/,,’`.gmo \
&& rm -f $file && -o $file ar.po
-o: not found
gmake[2]: *** [] Error 127
gmake[2]: Leaving directory `/usr/home/harshad/Programming/beagle-0.2.16/po’
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/home/harshad/Programming/beagle-0.2.16′
gmake: *** [all] Error 2

It basically says that msgfmt program on my system could be causing this… but following its steps, I think i see sane output.
panther# grep msgfmt config.log
configure:21975: checking for msgfmt
configure:21993: found /usr/local/bin/msgfmt
configure:22006: result: /usr/local/bin/msgfmt

12. What is going wrong?

In the file ./po/Makefile
file=`echo $* | sed ‘s,.*/,,’`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<

Now, I’m basically replacing $(GMSGFMT) with the full path of msgfmt ( /usr/local/bin/msgfmt )

For now, YAY! it seems to work.

13. F%*&K. That’s all I can say…

thread-glue.c:30:26: linux/unistd.h: No such file or directory
gmake[2]: *** [thread-glue.lo] Error 1
gmake[2]: Leaving directory `/usr/home/harshad/Programming/beagle-0.2.16/glue’
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/home/harshad/Programming/beagle-0.2.16′
gmake: *** [all] Error 2

Looks like this bugger isn’t going to run natively… it needs a linux specific library.

The above link practically says that this program cannot run as native under FreeBSD. Or so I understand…

Now backtrack all the way, I don’t feel like uninstalling the applications that I just installed.
Onwards to Plan B: linux binary compatibility layer.

14. Reading about installing commercial linux applications on FreeBSD

15. Reading about installing software on FC4 (since I have linux base fc4 on my machine installed and running)

16. Installed rpm (not rpm4) from the ports tree.

17. Oh Boy!

panther# rpm -i –ignoreos –dbpath /var/lib/rpm –root /compat/linux
error: failed dependencies:
/bin/sh is needed by
/bin/sh is needed by
/usr/bin/pdftotext is needed by
chmlib is needed by
epiphany >= 1.8.0 is needed by
evolution-sharp is needed by
gmime-sharp is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by is needed by
mono-core is needed by
sqlite2 is needed by
zip is needed by

OK, at this point, I feel like just throwing this thing away and enjoying a good night’s sleep – it’s already 1:30 am. Frankly, so much hassle for one software is too much. TOO MUCH.

uname -a inside Linux binary compat shell:
Linux panther 2.4.2 FreeBSD 6.1-RELEASE-p13 #1: Mon Feb 12 06:38:43 IST 2007 i686 athlon i386 GNU/Linux

I try installing one software at a time… but it has many other dependencies… sheesh! Creeps me out. I’m not done installing a single software yet – because every rpm that I try to install wants many more rpms… BLAH! I’m giving up for today.

Written by hiway

February 23, 2007 at 1:58 am

Open Source Projects: Surviving Poisonous People

leave a comment »

I read through the blog at and watched the video, it offers fantastic insights into the working of a large Open Source project.

Here’s the summary for ready reference… (mostly for me to come back to):

1. Comprehend: Preserve attention and focus.

2. Fortify: Build a healthy community.

3. Identify: Look for telltale signs.

4. Disinfect: Maintain calm and stand your ground.

Written by hiway

February 22, 2007 at 5:33 pm