<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<?xml-stylesheet type="text/css" href="http://canmore.annwfn.net/blog/styles/feed.css"?>


<title type="html">Filed under: FreeBSD | Canmore's Blog</title>
<subtitle type="html">Giving the voices in my head the opportunity to communicate with the outer world</subtitle>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog"/>
<link rel="self" type="application/atom+xml" href="http://canmore.annwfn.net/blog/archives/freebsd/index-atom.xml"/>
<updated>2010-04-18T22:03:25+02:00</updated>
<author>
<name>Canmore</name>
<uri>http://canmore.annwfn.net/blog</uri>
</author>
<id>http://canmore.annwfn.net/blog/</id>
<generator uri="http://nanoblogger.sourceforge.net" version="3.4">
NanoBlogger
</generator>

<entry>
<title type="html">Wine + CUPS</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2010/04/18/wine__cups/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2010/04/18/wine__cups/index.html</id>
<published>2010-04-18T21:41:07+02:00</published>
<updated>2010-04-18T21:41:07+02:00</updated>
<category term="FreeBSD" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
Yesterday, I stumbled over an interesting problem with <a
href="http://www.winehq.org">Wine</a>: If a <code>ServerName</code> directive
exists in <code>/usr/local/etc/cups/client.conf</code>, i.e., if you are
connecting to a shared server for printing services, programs started with Wine
seem to hang.
</p>

<p>
This problem is caused by non-reachable servers. It might occur when you
change your network or when the shared server is unavailable. In this case,
Wine will <em>seem</em> to hang. More precisely: If you wait long enough,
the application will run eventually. But nobody likes waiting very much.
</p>

<p>
So, if you have a similar problem, abort the &quot;hanging&quot; application
and check the console output. My output contained the line
</p>

<pre>
module:attach_process_dlls &quot;winspool.drv&quot; failed to initialize, aborting
</pre>

<p>
and to solve the problem, I simply changed <code>client.conf</code> by adding
</p>

<pre>
ServerName localhost
</pre>

<p>
in the first line and restarting CUPS via <code>/usr/local/etc/rc.d/cupsd
restart</code>.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">Using the Microsoft Windows 7 Boot Manager to boot FreeBSD</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2009/10/01/using_the_microsoft_windows_7_boot_manager_to_boot_freebsd/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2009/10/01/using_the_microsoft_windows_7_boot_manager_to_boot_freebsd/index.html</id>
<published>2009-10-01T20:45:18+02:00</published>
<updated>2009-10-01T20:45:18+02:00</updated>
<category term="FreeBSD" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
	Since the blog seems to be the entry point for most of my
	visitors, it makes sense to announce new content. Be it hereby
	known that there is a new HOWTO online. <a
	href="/freebsd/windows_boot_manager.html">It
	explains how to use the Microsoft Windows 7 boot manager to boot
	FreeBSD</a>.
</p>

<p>
	Enjoy.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">SSH tunneling for web surfing</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2009/07/29/ssh_tunneling_for_web_surfing/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2009/07/29/ssh_tunneling_for_web_surfing/index.html</id>
<published>2009-07-29T15:37:40+02:00</published>
<updated>2009-07-29T15:37:40+02:00</updated>
<category term="FreeBSD" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
	If you cannot trust your local network for some reason, SSH
	tunneling can help you. All you need is:
</p>

<ul>
	<li>
		A machine <em>outside</em> your current local network,
		for example a server with a static IP address in some
		data centre.
	</li>	

	<li>
		<strong>ssh</strong> (on your local machine)
	</li>
	
	<li>
		A <strong>proxy server</strong> (on the remote machine)
	</li>
</ul>

<p>
	My remote machine runs Debian, and I decided to install
	<code>tinyproxy</code>, a tiny HTTP proxy server. Configuration
	is done quickly by adding the following lines to
	<code>/etc/tinyproxy/tinyproxy.conf</code>:
</p>

<pre>
	Port 	8888
	Listen  127.0.0.1
</pre>

<p>
	I would recommend commenting out any other <code>Listen</code>
	lines. Assuming you do not want to run an open proxy, you only
	want <code>tinyproxy</code> to listen locally. After editing the
	configuration file, restart the proxy via
	<code>/etc/init.d/tinyproxy restart</code>.
</p>

<p>
	On your local machine, execute the following command:
</p>

<pre>
	ssh user@server.example.net -L 1234:localhost:8888 -N
</pre>

<p>
	This forwards all traffic from your local port 1234 to the
	remote machine's port 8888 (<code>localhost</code> is needed
	because we configured the server to listen only to the loopback
	interface), which is where <code>tinyproxy</code> waits for
	inputs.
</p>

<p>
	You may now tell <a href="http://www.opera.com">your cool
	browser</a> to use <code>localhost:1234</code> as a proxy
	server&mdash;congratulations, your web traffic is now securely
	tunnelled to your remote machine.
</p>

<p>
	Addendum: In the command string from above, you can also use
	<code>-f</code> to request ssh to go into the background.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">Some notes about Xorg 7.4, libxine and CUPS</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2009/03/16/some_notes_about_xorg_7_4_libxine_and_cups/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2009/03/16/some_notes_about_xorg_7_4_libxine_and_cups/index.html</id>
<published>2009-03-16T19:59:10+02:00</published>
<updated>2009-03-16T19:59:10+02:00</updated>
<category term="FreeBSD" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">

<p>
	The last update of my local ports collection was most
	annoying and unnerving. Here are some notes to dodge 3 of the
	bullets.
</p>

<p>
	<b>Xorg 7.4</b>: Either disable HAL at compile time <i>or</i>
	add the following to your <code>xorg.conf</code> (assuming your
	keyboard is configured properly etc.):
</p>

<pre>
Option	"AutoAddDevices"	"OFF"
</pre>

<p>
	Else, you would have to configure your keyboard settings (such
	as layout, rules etc.) in some obscure HAL configuration file
	that is hard to find. And to be frank, I was unwilling to create
	some XML files in a directory pretty well hidden on my hard disk
	<i>just</i> to get my X server to accept input from German
	keyboards.  Seriously, what is wrong with the
	<code>InputDevice</code> section in <code>Xorg.conf</code>?
</p>

<p>
	<b>libxine</b>: Don't compile it with <code>pulseaudio</code>
	support if you don't need it. I did compile it with that option
	and my reward was that programs such as <code>Xine</code> or
	<code>Amarok</code> would hang. Using the last of their
	strength, they would utter cryptic messages on the command-line:
</p>

<pre>
caps.c: Dropping root privileges.
</pre>

<p>
	Since I did not need <code>pulseaudio</code>, I recompiled
	libxine, Xine, and Amarok and successfully resurrected them.
</p>

<p>
	<b>CUPS</b>: Be sure to install <code>print/gutenprint</code>
	from the ports collection. Your applications and printers will
	thank you for it. And as a boon, you will not get any
	<code>Unsupported format 'application/postscript'</code>
	messages because all necessary dependencies will be available.
</p>

<p>
	That's it. FreeBSD FTW! 
</p>
</div>
</content>

</entry>
<entry>
<title type="html">Running SAP GUI for Java under FreeBSD</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2009/02/12/running_sap_gui_for_java_under_freebsd/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2009/02/12/running_sap_gui_for_java_under_freebsd/index.html</id>
<published>2009-02-12T20:15:07+02:00</published>
<updated>2009-02-12T20:15:07+02:00</updated>
<category term="FreeBSD" />
<category term="Work" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
	SAP GUI for Java is SAP's GUI solution for customers that do
	<i>not</i> use Microsoft Windows or that do not want to use SAP
	GUI for Windows for some reason. Officially, it is only
	supported on the following platforms (I have excluded the
	various flavours of Windows and several other systems. For a
	full list, see the <a
	href="https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/208be3bf-ebf4-2a10-3aa1-c42e9bb5beed">official
	SAP document</a>):
</p>

<ul>
	<li>Mac OS X 10.4, 10.5</li>
	<li>SuSE 10.1, SuSE Linux Enterprise Desktop 10</li>
	<li>RedHat Enterprise Linux 4, 5</li>
	<li>Fedora 7, 8, 9</li>
	<li>Open SuSE 10.2, 10.3</li>
</ul>

<p>
	What a shame: FreeBSD is not mentioned. The following steps will
	show you how to install and use SAP GUI for Java under FreeBSD.
	Why would you want to do that, anyway? One simple, convincing,
	and perfectly logical reason: Because we can.
</p>

<p>
	The usual disclaimer: Until Tartarus freezes over, don't expect
	any support from SAP for that.
</p>

<p>
	That being said, the program actually <i>works</i>. I have
	tested some transactions (see the screenshots later) and
	encountered no errors. YMMV.
</p>

<p>
	<b>Requirements</b>: You need a working FreeBSD system (I did
	this with FreeBSD 7.1), the usual X11 ports and a SUN JRE from
	<code>/usr/ports/java/linux-sun-jre16</code>. I am also assuming
	that the Linux ABI support is available and works. If you need
	help with these steps, the <a
	href="http://www.freebsd.org/doc/en/books/handbook/linuxemu.html">appropriate
	handbook section</a> might help. Grab <a
	href="ftp://ftp.sap.com/pub/sapgui/java">SAP GUI for Java</a>
	(choose the Linux version, for example
	<code>PlatinGUI-Linux-710r7.jar</code>).
</p>

<p>
	<b>Installation</b>: <code>cd</code> to the directory where the
	installer is located. Use the JRE to start the installation
	process by executing the following command in a terminal (change
	the filename if necessary):
</p>

<pre>
/usr/local/linux-sun-jre1.6.0/bin/java -jar PlatinGUI-Linux-710r7.jar 
</pre>

<p>
	Choose any installation directory and proceed with the
	install process. When it has finished, check your selected
	directory for the folder <code>SAPClients</code>. 
</p>

<p>
	<b>After the installation</b>: Open the file
	<code>SAPClients/SAPGUI7.10rev7/bin/guilogon</code> in a text
	editor of your choice. Change all references of
	<code>/usr/bin/test</code> to <code>/bin/test</code>. Finally,
	set the <code>PLATIN_JAVA</code> variable to your JRE. For
	example, with <code>tcsh</code> you would to the following:
</p>

<pre>
setenv PLATIN_JAVA /usr/local/linux-sun-jre1.6.0/bin/java
</pre>

<p>
	That's it. You can now run SAP GUI for Java and work with your
	SAP system. If you don't have one, you might want to download
	<a href="http://www.sap.com/minisap">a MiniSAP system</a> for
	Linux or Windows. Trying to install <i>this</i> under FreeBSD is
	another story...
</p>

<p>
	Finally, some nice screenshots with FreeBSD 7.1, XFCE, and SAP
	GUI for Java 7.10rev7:
</p>

<ul>
	<li><a href="http://canmore.annwfn.net/blog/images/sap_sbwp.png"
	title="SAP GUI for Java under FreeBSD running transaction
	SBWP">Fun with transaction SBWP</a>.</li>

	<li><a href="http://canmore.annwfn.net/blog/images/sap_about.png"
	title="SAP GUI for Java under FreeBSD showing its 'About' dialog"> The
	&quot;About&quot; dialog</a>. Note how the OS is declared to be Linux.
	Nice, is it not?</li>

	<li><a
	href="http://canmore.annwfn.net/blog/images/sap_transparency.png"
	title="SAP GUI for Java under FreeBSD with transparency
	effects">XFCE's transparency effects also work</a>.</li>
</ul>
</div>
</content>

</entry>
<entry>
<title type="html">GnuCash and the Euro currency symbol</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2008/09/11/gnucash_and_the_euro_currency_symbol/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2008/09/11/gnucash_and_the_euro_currency_symbol/index.html</id>
<published>2008-09-11T16:08:20+02:00</published>
<updated>2008-09-11T16:08:20+02:00</updated>
<category term="FreeBSD" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
	Having used <a href="http://www.gnucash.org">GnuCash</a> for a
	long time, I was quite startled when the &euro; symbol was not
	displayed properly anymore (after a <code>make buildworld</code>
	odyssey). Instead, all I got was &quot;Eu&quot;. Ironically,
	every other currency seemed to work properly.
</p>	
<p>
	A vicious attack on the currency of many countries? Probably led
	by a cabal trying to undermine the world's economics?
</p>

<p>
	<b>No.</b>
</p>

<p>
	Just a glitch in the locale settings: Changing the second line
	in <code>/usr/share/locale/de_DE.UTF-8/LC_MONETARY</code> to
	&quot;&euro;&quot; brought the currency back. Keep in mind that
	you might have other locale settings; find them out by entering
	<code>locale</code> in your terminal and change the appropriate
	file.
</p>

<p>
	Back to managing money. By the way, did you know that Thursdays
	are really, really bad? According to GnuCash, these are the days
	where I tend to spend more money than usual. Interesting.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">UTF-8 and FreeBSD</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2008/09/09/utf-8_and_freebsd/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2008/09/09/utf-8_and_freebsd/index.html</id>
<published>2008-09-09T15:22:45+02:00</published>
<updated>2008-09-09T15:22:45+02:00</updated>
<category term="FreeBSD" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
	Unicode is really nice: Less meddling with codepages, less
	display problems etc. Here are some notes explaining how to
	enable this functionality for FreeBSD. 
</p>

<p>
	On my system, two steps were required. Step one involved
	changing <code>.login_conf</code> (in my home directory). I
	added the following lines:
</p>

<pre>
me:\
        :charset=UTF-8:\
	:lang=de_DE.UTF-8:
</pre>

<p>
	After logging off and on again, locale settings should work
	properly. Step two involved changing <code>.gvimrc</code> in my
	home directory because the fonts listed there had the wrong
	charset. Instead of <code>ISO8859-15</code> I used
	<code>ISO10646-1</code>. This convinced vim to work properly,
	too.
</p>

<p>
	<b>Filenames:</b>
</p>

<p>
	For those of you who do have files with filenames in the &quot;old
	encoding&quot; the tool <code>convmv</code> might prove invaluable.
	FreeBSD users get it from
	<code>/usr/ports/converters/convmv</code> and might want to take
	a look at the <a href="http://www.j3e.de/linux/convmv/man/">man
	page</a>.
</p>

<p>
	<b>Conclusion:</b>
</p>

<p>
	There is only one drawback: Unfortunately, if you are trying to
	use the console (without X running), things might get ugly.
	Apart from that problem (which can be fixed by temporarily
	resetting the input locale), all things &quot;just work&quot;.
	My, my. Isn't that something?
</p>
</div>
</content>

</entry>
<entry>
<title type="html">Opera and libnpp.so</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2008/04/16/opera_and_libnpp_so/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2008/04/16/opera_and_libnpp_so/index.html</id>
<published>2008-04-16T21:34:47+02:00</published>
<updated>2008-04-16T21:34:47+02:00</updated>
<category term="FreeBSD" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>
	After updating my system to FreeBSD 7.0, I received the following error from Opera:
</p>

<pre>
Opera encountered a problem during plug-in setup.
Plug-ins will not work properly.
Check your installation.

Could not locate plug-in 'libnpp.so'.
This executable is included in the install package.


This executable is included in the install package.

Could not start plug-in executable 'operapluginwrapper'
/usr/local/share/opera/plugins/operapluginwrapper

Plug-in path
(Path can be modified in Preferences dialog)

/usr/local/share/opera/plugins
</pre>

<p>
	Some searching brought me upon a post in the offical Opera forums. For reference purposes,
	I will archive it here. To solve the problem, follow these steps:
</p>

<p>
	Close Opera. Use the root user to edit the file <code>/etc/libmap.conf</code> (create it if it does not exist). Add the following lines:
</p>

<pre>
[operapluginwrapper]
libXThrStub.so.6 libXtst.so.6
</pre>

<p>
	After a restart, Opera should work fine now. Apparently, only the wrong library is used
	to start the plugin wrapper,  the lines above should fix this.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">sSMTP and gmail</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2008/03/09/ssmtp_and_gmail/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2008/03/09/ssmtp_and_gmail/index.html</id>
<published>2008-03-09T20:18:17+02:00</published>
<updated>2008-03-09T20:18:17+02:00</updated>
<category term="FreeBSD" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">

<p> 
According to its <code>man</code>-page, ssmtp is a &quot;send-only
sendmail emulator&quot;, hence allowing your machine to send, say,
status reports via mail without the need for sendmail or any other MTA.
</p>

<p>
ssmtp is simple to use, simple to install and works very well. I use it
on my file-server: Without further ado, several scripts and programs
(such as smartmoontools) can now send me their reports directly to a
given mail address.
</p>

<p>
FreeBSD users just <code>cd</code> to <code>/usr/ports/mail/ssmtp</code>
and do the usual <code>make install clean</code>. Afterwards, this is
how your <code>ssmtp.conf</code> (located in
<code>/usr/local/etc/ssmtp/</code>) should look like:
</p>

<pre>
root=catchall@example.net
mailhub=smtp.gmail.com:587

rewriteDomain=example.net
hostname=mail.example.net

FromLineOverride=YES

UseSTARTTLS=YES
AuthUser=your_gmail_account@gmail.com
AuthPass=swordfish
</pre>

<p>
No, my password is not &quot;swordfish&quot;. The above settings work
very well for my gmail account, providing an easy and secure way to get
status reports. To let the script send you mails, just add a
&quot;MAILTO=me@example.net&quot; statement to your crontab, for example.
</p>
</div>
</content>

</entry>
<entry>
<title type="html">Hyppolyta (or: How to scan your book collection)</title>
<author>
<name>Canmore</name>
</author>
<link rel="alternate" type="text/html" href="http://canmore.annwfn.net/blog/archives/2007/10/21/hyppolyta_or_how_to_scan_your_book_collection/index.html"/>

<id>http://canmore.annwfn.net/blog/archives/2007/10/21/hyppolyta_or_how_to_scan_your_book_collection/index.html</id>
<published>2007-10-21T13:33:43+02:00</published>
<updated>2007-10-21T13:33:43+02:00</updated>
<category term="FreeBSD" />
<category term="Programming" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">

<p>
	It started as a simple idea: Use a barcode scanner to sort a
	collection of books. Of course, the idea grew and became much
	more versatile and interesting. 
</p>

<p>
	And now I finally managed to upload all information about a
	project that has been on my agenda for several weeks. The
	program is called <code>Hyppolyta</code>; it is a simple Perl
	script. If you are armed with a barcode scanner and lots of
	books (or other items of value that have a barcode), this
	project could be very interesting for you.  
</p>

<p>
	You are able to download the program package on my <a
	href="http://canmore.annwfn.net/programming/index.html">programming
	subsection</a>. There is also a simple <a
	href="http://canmore.annwfn.net/programming/hyppolyta.html">documentation
	available</a> which should be read before using
	<code>Hyppolyta</code>.
</p>

<p>
	Essentially, the program is finished, but to facilitate things,
	several helper/wrapper applications might be added &quot;real
	soon now&quot;. It is therefore advisable to come back for
	updates. 
</p>

<p>
	You are, as always, encouraged to change the source code if you
	think some part should be rewritten. It would be nice, however,
	if you notified me of changes so that they are available in
	the &quot;official version&quot;, too.
</p>
</div>
</content>

</entry>

</feed>
