Showing posts with label info. Show all posts
Showing posts with label info. Show all posts

Wednesday, September 30, 2015

5.8-C amd64 X200: Lock X after suspend.

Hi,

Got a good tips from OpenBSD.newbies mailing list. How to lock the machine after suspend. Ok, normally, if I didn't xlock my X session and put the machine under suspend mode (eg: close the lid), my session will be restored when the machine wakes. My session is exposed. So here's how to automatically lock the session when the machine goes into suspend mode.

1) Create a suspend file inside /etc/apm.
In my machine, there's no /etc/apm folder. So I need to create it first. Then create a suspend file inside it.

$ doas mkdir /etc/apm
$ doas vi /etc/apm/suspend

----- /etc/apm/suspend starts -----
#!/bin/sh
pkill -USR1 xidle
----- /etc/apm/suspend ends -----

Then I need to make this suspend executable.

$ doas chmod 744 /etc/apm/suspend

2) Get xidle running on start.
I edited my
.xsession file and add this text:
----- ~/.xsession starts -----
xidle &
----- ~/.xsession ends -----

Then I run the xidle program.

$ xidle &

So basically when I close my machine's lid, suspend will trigger xidle to lock the machine. Nice stuff.

Reference:
http://www.mail-archive.com/openbsd-newbies@sfobug.theapt.org/msg00043.html

5.8-C amd64 X200: Bye sudo, hi doas.

Hey,

Done updating, rebuilding the userland and following the.. err.. "Following -current" guide, now to reboot.

$ sudo reboot
ksh: sudo: not found

Oh. Yeah. I forgot. sudo is old news. Now it's doas time.

man doas
man doas.conf

Now, after all the setups, all I have to do to reboot is:

$ doas reboot

http://www.tedunangst.com/flak/post/out-with-the-old-in-with-the-less

http://www.tedunangst.com/flak/post/doas

Now it's just a matter of learning new habit. Later.

Saturday, September 12, 2015

5.8-C X200 amd64: lib.c.81 not found after upgrading -current, and bunch of others.

Okay, so here I was, updating my -current system. Because, yeah, it's been a while. Fired up my ftp, grab the bsd*, *tgz and all, the usual stuff. Upgraded my system, done changing timezone and sysmerge. All is good. So I upgraded my packages. This is what happened.

Update candidates: xz-5.2.1 -> xz-5.2.1
Can't install xz-5.2.1 because of libraries
|library c.81.0 not found
| /usr/lib/libc.so.78.1 (system): bad major
| /usr/lib/libc.so.79.0 (system): bad major
| /usr/lib/libc.so.80.0 (system): bad major
| /usr/lib/libc.so.80.1 (system): bad major
| /usr/lib/libc.so.82.0 (system): bad major

Ack!. Then I this bunch of warnings like:

Can't install pkg_name because of libraries

Ok. Not bunch. But a lot. I'm guessing that this is about new version of libraries. So, after searching for answers, I found this:

http://comments.gmane.org/gmane.os.openbsd.misc/224817

Whew I'm grateful this is not because of some mistakes I made while upgrading. I even did another upgrade just to make sure. Yeah, so I need to wait for a few days before upgrading my packages. Later.

Friday, August 07, 2015

SNAPSHOT amd64 X200: httpd + PostgreSQL + Drupal 7.

Hey,

Starting with 5.7, OpenBSD have their own httpd replacing nginx in base. This httpd is fairly new and un/fortunately I'm trying to learn Drupal nowadays. Sure I can install Apache or nginx from port but I want to test the new httpd.

Take note!
1) I'm currently on -CURRENT using snapshot.
2) I never installed drupal or any web app before.
3) This is a Work In Progress and will be updated until it's done.

So I guess that's quite a warning for you guys. My installation might not be the correct one or might not even install correctly but I will try to make sure I find out how to make this work. Googling for info on the new httpd with Drupal only return less than handful of info. But as always, web searching is needed. So without any delays, here I go.


SETTING UP HTTPD.
As I'm going Openbsd's own (and new) httpd, the program has been already installed. To enable it, I just need to edit /etc/httpd.conf. I commented all the entries in that file except for this few lines (mostly the "A minimal default server" entries).

---- /etc/httpd.conf start ----
# Macros
ext_addr="*"

# A minimal default server
server "default" {
listen on $ext_addr port 80

location "*.php" {
fastcgi socket "/run/php-fpm.sock"
}
root "/htdocs"

}

# Include MIME types instead of the built-in ones
types {
include "/usr/share/misc/mime.types"
}
---- /etc/httpd.conf end ----

As a simple rule-of-a-thumb, start with the minimum configuration then adjust from there. It's easier to check for error/mistakes. As Drupal is a PHP program, I need to install PHP. I also will be using PostgreSQL for the database. What I've installed is:

php-5.6.11
php-fpm.5.6.11p0
php-gd-5.6.11 (this might be dependency, I can't recall right now)
php-pdo_pgsql-5.6.11 (I'll be using PostgreSQL instead of MySQL)
postgresql-client-9.4.4
postgresql-contrib-9.4.4
postgresql-docs-9.4.4 (optional, but I want it)
postgresql-server-9.4.4

As we can see in the /etc/httpd.conf, there's "php-fpm" entry. As the package has been installed, I need to make it start at boot along with httpd by editing /etc/rc.conf.local.

---- /etc/rc.conf.local start ----
httpd_flags=
slowcgi=
pkg_scripts=php_fpm postgresql

---- /etc/rc.conf.local end ----

The "slowcgi" came with httpd, so I add it in /etc/rc.conf.local. Now we can either start httpd, slowcgi & php-fpm manually now or reboot. Unlike Apache, there's no template webpage that you can see after your httpd has started. So I created a Hello World-like index.html file inside the webserver's root directory which is /var/www/htdocs/. So now I open up my web browser and insert the URL as either "localhost" or "127.0.0.1" (without quotes), I can see the Hello World page. Httpd is running fine. To test the PHP function, I created a phpinfo.php file inside the same directory with this value:

---- /var/www/htdocs/phpinfo.php start ----
<?php phpinfo(); ?>
---- /var/www/htdocs/phpinfo.php end ----

I open the URL "localhost/phpinfo.php" in my browser, the PHP Version page is displayed and I know PHP is working fine.


INSTALLING DRUPAL.
I just pkg_add drupal-7.32.p1. Then I read the info in /usr/local/share/doc/pkg-readmes/drupal-7.32p1 telling me to symlink (symbolic link) the drupal7.conf and follow the database setup for PostgreSQL which is:

ln -sf /var/www/conf/modules.sample/drupal7.conf /var/www/conf/modules

createuser -U postgres --pwprompt --no-superuser --createdb --no-createrole drupal
createdb -U drupal -E UTF8 drupal

The "postgres" name is my PostgreSQL's admin name. There will be input request for password so I create a password, verify it and make sure I don't forget it. For drupal7.conf, I haven't touch anything, yet.


SETTING UP DRUPAL.
Webserver running? Check. PostgreSQL running? Check. Drupal running? Not yet. I tried putting "localhost/drupal7" and "127.0.0.1/drupal7" in the browser but both didn't work. I got Error 403 Forbidden. Ouch. I'm seriously lack of experience for this httpd and drupal stuff so I thought that maybe I need to install either Apache or Nginx (assuming that nobody done drupal with httpd yet). That's until I read a hint in www.drupal.org. So, I insert this in my browser:

http://localhost/drupal7/install.php

And wallah!, the Drupal installation page appears!. Yes! It's making progress. So I proceed with the installation as below:

Choose profile = Standard > Save and continue
Choose language = English (built-in) > Sane and continue
Verify requirements = all is ok except for "Unicode library = Error"

7th August: Ok. The error is about a deprecated function in PHP which must be disabled for Drupal's installation to continue. Yeah quite confusing. The exact error is:

Unicode libraryError
Multibyte string input conversion in PHP is active and must be disabled. Check the php.ini mbstring.http_input setting. Please refer to the PHP mbstring documentationfor more information.

I opened the PHP mbstring documentation but nothing can help me on this. So I google for tips and found that there's 2 ways to resolve this.

1) Add this lines in .htaccess in Drupal's web root (/var/www/htdocs/drupal7)

---- .htacces start ----
php_value mbstring.http_input pass
php_value mbstring.http_output pass
---- .htaccess end ----

I checked the Drupal's web root, but there's no .htacces file inside. I think this is related to Apache but just to make sure, I downloaded a sample .htacces file from www.drupal.org . Restarted the httpd, open the installation page and still have that error. So this is not working for me.

2) Add this line in ../drupal7/sites/default/setting.php

---- setting.php start ----
ini_set('mbstring.http_input', 'pass');
ini_set('mbstring.http_output', 'pass');

---- setting.php end ----

Restarted the httpd. And open the installation page and greeted by this warning message:

  • Deprecated function: ini_set(): Use of mbstring.http_input is deprecated in include_once() (line 318 of /htdocs/drupal7/sites/default/settings.php).
  • Deprecated function: ini_set(): Use of mbstring.http_output is deprecated in include_once() (line 319 of /htdocs/drupal7/sites/default/settings.php).

When I click Save and continue, this message appears in every page. But then the Verify requirement page passed successfully (although the warning is still there). So I'm now at the Set up database page.

Set up database:
Database = PostgreSQL
Database name* = drupal (the one I set before in PostgreSQL)
Database username* = drupal
Database password* = (the password I entered back then in PostgreSQL)

But now I'm in dilemma. I don't know if that "Deprecated function:" warning is harmless or not. I think I will search for more clue before I click on that "Save and continue" button.

Update 9th August: Searching on the net point me out to the most relevant issue stated in drupal's site at:

https://www.drupal.org/node/2332295

There's patch files listed on the top of that page and the most relevant one is the file:

drupal7-unicode_requirements-2332295-23.patch

That file will be patching /includes/unicode.inc file in the root Drupal's folder. I read the patch file, and compared with the current unicode.inc file and found that this is the correct patch. Now to patch it.


PATCHING DRUPAL
I downloaded the patch file, and move it to Drupal's root folder at /var/www/htdocs/drupal7 . Patching is something I rarely do so I refresh what I can by using man patch.

I need to test the patch first, to see if it's working as it's supposed to be. So I proceed with the testing command:

# sudo patch -C includes/unicode.inc drupal7-unicode_requirements-2332295-23.patch

Then the result came:

---- message snipped ----
Patching file includes/unicode.inc using Plan A...
Hunk #1 succeeded at 116.
done

Looks fine to me. So then I proceed with the actual patching:

# sudo patch includes/unicode.inc drupal7-unicode_requirements-2332295-23.patch

Done. Now to test the Drupal's installation. Just remember to delete/comment back both the "ini_set" lines I added in sites/default/settings.php. Restarted httpd and proceed with installation again.

INSTALLATION.
- Get browser to open http://127.0.0.1/drupal7/install.php
- Choose profile > Standard > Save and continue = passed
- Choose language > English (built-in) > Save and continue = passed
- Verify requirements = passed
- Set up database
 > Database name = drupal
 > Database username = drupal
 > Database password = (same as when I set in PostgreSQL)
 > Save and continue

Got this error:

In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your hosting provider.
Failed to connect to your database server. The server reports the following message: SQLSTATE[08006] [7] could not translate host name "localhost" to address: no address associated with name.
  • Is the database server running?
  • Does the database exist, and have you entered the correct database name?
  • Have you entered the correct username and password?
  • Have you entered the correct database hostname?

Ok. I read that because httpd in OpenBSD is chrooted, I need to copy /etc/hosts and put it in /var/www/etc/. By default there's no etc/ folder in www so I need to mkdir it. Make sure that "hosts" file at least have this line:

127.0.0.1   localhost www.example.com

Now that should be it. Restarted httpd again and run throught the installation again.

- Set up database
 > blablabla
 > Save and continue = passed
- Install profile (it will take a moment = passed
- Configure site
 > Site name* = default
 > Site e-mail address* = noreply@example.com (can be changed)
 > Username = karl
 > E-mail address = (real email address)
 > Password* = *********
 > Confirm password* = *********
 > Default country = Malaysia
 > Default time zone = Asia/Kuala Lumpur
 > Check for updates automatically = checked
 > Received e-mail notifications = checked
 > Save and continue = FINISHED!

Congratulations, I installed Drupal. Now to visit my local site.

Unfortunately, currently I can't use http://127.0.0.1/drupal7/ to visit my site (which if my httpd configured correctly, should be the correct address) but I can visit the site by using complete URL instead.

http://127.0.0.1/drupal7/index.html

For Drupal, all seems ok. I need to further test out and start exploring. For httpd issue above, I will also do the same. I will update on these issues when I found any tips. Enjoy the screenshot. Later.


UPDATE!: Bah although Drupal has been installed successfully, it's not functioning as it should. I have a feeling it's related to OpenBSD's httpd's setting. I would be grateful if someone can point me to relevant setting for this issue. Thanks in advance.

Update 10th August: Ok I have configured the /etc/httpd.conf file and now Drupal is working fine. Here's my configuration:

---- /etc/httpd.conf start ----
ext_addr="*"

server "default" {
    listen on $ext_addr port 80

    directory {
        index "index.php"
    }

    location "*.php" {
        fastcgi socket "/run/php-fpm.sock"
    }

    location "/cgi-bin/*" {
        fastcgi
        root "/"
    }

    root "/htdocs/drupal7"
}
---- /etc/httpd.conf end ----

Restarted the httpd server. Now when I type www.example.com or 127.0.0.1 or localhost in my browser, I can see the Drupal start page. I typed my Username and Password then I can see the site correctly. No more errors.


I've also posted a Hello World! entry to test it out. Enjoy the screenshot. Later.

Thursday, May 28, 2015

5.7 amd64 X200: Rotating random wallpaper using feh + cron. And more.

Hi,

Searching for rotating wallpaper on the web has given me a few good shell scripts to use. But what if I just want to use the good ol' crontab and feh? Here's what I've done.

What I'm on now:
- CWM
- feh

Obviously CWM is my WM of choice nowadays. And I've installed feh. My lappy's screen resolution is 1280x800 so I went searching for beautiful nature's wallpaper. Get more than 2 so I'll have many rotation choices.

For me, I mkdir a Wallpapers folder. So it's look like:

~/Wallpapers

I put all the pictures into that folder. Now for the cron part.

$ crontab -e

This is my first cron so the file is empty. I want this wallpaper to rotate using random picture every 5 minutes. So my cron is like this:

*/5 * * * * DISPLAY=:0.0 feh --bg-fill -z --no-fehbg ~/Wallpapers/

In short, human-readable meaning is every 5 minutes (*/5) the screen (DISPLAY=:0.0) will be used by feh to fill the picture as wallpaper (--bg-fill) randomly (-z) without writing a ~/.fehbg file (--no-fehbg) using pictures from the folder ~/Wallpapers .

Then press :WQ to write the changes and quit so the process will start. Enjoy the rotating wallpapers guys.

Ok. Now. What if I want to use random wallpapers everytime I log in to cwm? The command is the same like crontab there but I need to ready 2 things.

Editing ~/.xsession and put this line (before exec cwm or any WM of your choice).

eval `cat ~/.fehbg`
exec cwm

Now create/edit ~/.fehbg and put the command like in crontab (without the DISPLAY=:0.0 bit):

feh --bg-fill -z --no-fehbg ~/Wallpapers/

And it's done. Oh wait, how about another one? Get a menu to change to a random wallpaper in cwm. Open up ~/.cwmrc and put this:

command ChangeWP "feh --bg-fill -z --no-fehbg ~/Wallpapers/"

Then refresh the cwm (by default should be pressing Ctrl+Alt+Shift+R) and click the menu.

Man crontab / feh for more info. Later.

Tuesday, May 26, 2015

5.7 amd64 X200: New experiences

Hi,

This is what I noticed when I upgraded my X200 to 5.7. Take note that I don't have a lot of packages installed so my experience here is minimum.

TMUX:
mode-mouse no longer works. Documentation is saying that setting mouse on is enough now. Tried that but currently mouse not working as expected.
UPDATE: Previously when you scroll the mouse wheel, tmux will automatically scroll. Now you need to press ^B+[ (Ctrl+B [) then you can use the mouse wheel to scroll.

/etc/login.conf:
Now the datasize-cur has been upped in the default installation to 1536M. Great. Firefox and other memory hogging package rarely crash now.

Xombrero:
There's issue with /usr/local/lib/libestdc++.so.16.0 WARNING. Sometime Xombrero would crash and then starting the program will also coredump. After a few tries then Xombrero will run again.

There are others which I can't recall right now as I'm now on -CURRENT and using port to install Libreoffice. More on this later.

Thursday, May 22, 2014

5.5 amd64 X200: Upgraded to 5.5!

Heyya,

I've upgraded my system to 5.5 yesterday using the USB Flashdrive upgrade method. Do check the links on the left side for info about creating USB Bootable Flashdrive for OpenBSD installation/upgrade.

Be sure to check http://www.openbsd.org/faq/upgrade55.html as there's quite major changes been done on this new version.

Oh also OpenBSD have provided disk images for us to create bootable flashdrive installation media. Do check http://www.openbsd.org/faq/faq4.html#MkInsMedia. I personally haven't tried this yet as I upgraded my flashdrive using my old method.

Make sure to create new openbsd.pbr if you're like me, dual-booting. Later.

Saturday, September 15, 2012

5.2 amd64 K43U: Conky not showing correct cpu core's load.

Well, I'm getting more comfortable with cwm. In fact I installed conky again because of cwm. Currently cwm is my main window manager and although spectrwm is still my favorite, I've been using cwm more.

I just found out something interesting today. I'm interested in playing with conky again after I found cwm. Thinking that it will be a great combination. Installation went fine, although I noticed that there's more dependencies needed to install conky now (or I didn't notice it earlier in previous versions).

Then I noticed that the graph and load percentage for 2nd core of my cpu is zero. Nil. Nada. Reading about updates of 5.2 tells me that that version have much more improvements on SMP handling, so obviously OpenBSD is not the issue here. Then I use xstatbar and found that both of my cpu cores are displayed and working as usual. I double check the man for conky and it's confirmed that cpu0 is for all cores, cpu1 is for 1st core and cpu2 is for the 2nd core. So, something wrong with conky again huh. Ok. I know it's not written with OpenBSD in mind so I'm not complaining. Gonna find some sort of workaround for this.

I might try dzen and see if it's any good. Later.

p/s: Oh, this is my 200th post for this blog-o-mine. Hah!

Wednesday, September 12, 2012

amd64 K43U: Upgrading to 5.2-current (via FTP) & cwm - Calm Window Manager.

Hi,

Currently I'm upgrading my K43U to 5.2-current. Using FTP install. But that's not my main point.

Calm Window Manager, or cwm has been in OpenBSD's base install since 4.2. But only now I have the privilege of knowing about it. Sheesh. I'm currently testing it and I can say that it's as fast as spectrwm. But I haven't configured any of it yet. As always, man is the way.


Upgrading 5.1-current to 5.2-current:

Most of the steps are the same as 5.1 amd64: Following -current & radeon 6.14.3 installation topic I posted before. The only thing that's different is the method I'm getting the snapshot files and updating the packages. For this one, I used my Celcom Broadband connection and retrieve all the essential files via ftp.

So first of all, I fired up the Celcom connection, you can check the 4.8 - Script to connect to Celcom 3G link. Bolded is my input:

# celcom3g connect
Connection Celcom3G...


Then it's time to get the files. My fav server is ftp.OpenBSD.org. I make sure I'm in the dir that I want to store all the files first:

# cd /mnt/snapshot/amd64/
# ftp ftp.OpenBSD.org

Connected to openbsd.sunsite.ualberta.ca.
220 openbsd.srv.ualberta.ca FTP server ready.
name (ftp.OpenBSD.org:karl):


Ah. Login name? Err. I just hit Return and got this:

530 User karl access denied.
ftp: Login karl failed.

Now it's getting interesting. After reading the manpage, I found that I should use "-a" to login anonymously. So back to ftp:

# ftp -a ftp.OpenBSD.org
*** Login successful printout ***

Great. Now to get the files.


ftp> cd pub/OpenBSD/snapshots/amd64/
250 CWD command successful.
ftp> mget bsd*
ftp> mget *.tgz
ftp> quit


After this the steps are the same as my previous post. After I done upgrading the OpenBSD to 5.2-current, I updates my packages online (without downloading to local dir like I've always do before).

# export PKG_PATH=http://ftp.OpenBSD.org/pub/OpenBSD/snapshots/packages/amd64/
# sudo pkg_add -vui


Then enjoy, wait, it'll take some time depending on how many stuff you installed already. After a brief testing last night, noticeable improvement is the radeon driver which is updated to 6.14.6. Previously playing 720p mkv movie will stutter like mad but now it's smooth although tearing effect is there. I still have to explore more to comment more on 5.2-current.

Oh, regarding cwm. What's the different between cwm and spectrwm? Short answer:

cwm = stacking
spectrwm = tiling

But cwm is already in base, and spectrwm is available in package. I still need to explore cwm more. Later.

Wednesday, September 05, 2012

Bitrig, fork of OpenBSD.

Hola,

There's another *BSD forked emerge now. It's Bitrig. Notice that there's no "BSD" in it's name? Well I guess there's a first time for everything. Bitrig aims to be OpenBSD with newer PC hardware.

Hopefully the fork can benefit all the other *BSDs in the family.

Oh, I noticed that OpenBSD 5.2 is coming soon. Yeah!

Tuesday, March 20, 2012

5.1 amd64 K43U: Alpine > UW-IMAP > OfflineIMAP > Davmail > OWA stuck.

1) Install Alpine+ldap, setting up DavMail.

Install Alpine using port with FLAVOR set to ldap. I just referred to my previous post. So this post will focus more on OfflineIMAP and UW-IMAPd side of the project.

1) Install imap-uw2007

read the /usr/local/share/doc/pkg_readmes/uw-imap-2007f and follow the instruction. For me, I vim /etc/inetd.conf and add:

imap stream tcp nowait root /usr/local/libexec/imapd imapd
imap stream tcp6 nowait root /usr/local/libexec/imapd imapd


And it's also stated a way to enable plain text login. So I vim /etc/c-client.cf and change:

#set disable-plaintext nil

to

set disable-plaintext nil

You can restart inetd, but I just reboot. Then I telnet to localhost:143.

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
* OK [CAPABILITY IMAP4REV1 I18NLEVEL=1 LITERAL+ SASL-IR LOGIN-REFERRALS STARTTLS] localhost IMAP4rev1 2007f.404 at Tue, 20 Mar 2012 13:27:16 +0800 (MYT)


So far so good. In Alpine I just need to Add Folder collection (S+L+A) with the details:

Nickname: UW-IMAPd
Server: localhost:143
Path: mail/MyCompany/INBOX/
View:


Then after I saved the settings, inside folder list (L) Alpine will ask for my username (same as my OpenBSD's login name) and password (also same as my OpenBSD's password) then I can manipulate my IMAP's INBOX folder. I can add folders, delete etc. So this part is ok.

3) Installing and configuring OfflineIMAP.

I installed OfflineIMAP from OpenBSD's packages. Then I create ~/.offlineimaprc and put the basic as stated in offlineimap.org.

[general]
accounts = MyCompany

[Account MyCompany]
localrepository = Local
remoterepository = Remote

[Repository Local]
type = IMAP
remotehost = localhost
remoteport = 143
remoteuser = karl

[Repository Remote]
type = IMAP
remotehost = locahost
remoteport = 1143
remoteuser = ASIA\karl


Then I run OfflineIMAP by issuing offlineimap. Lo and behold, I got this error:

$ offlineimap
OfflineIMAP 6.3.4
Copyright 2002-2011 John Goerzen & contributors.
Licensed under the GNU GPL v2+ (v2 or any later version).

Account sync MyCompany:
***** Processing account MyCompany
Copying folder structure from IMAP to MappedIMAP
Establishing connection to localhost:1143.
WARNING: Error occured attempting to sync account 'MyCompany':
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/offlineimap/accounts.py", line 177, in syncrunner self.sync()
File "/usr/local/lib/python2.7/site-packages/offlineimap/accounts.py", line 235, in sync remoterepos.syncfoldersto(localrepos, [statusrepos])
File "/usr/local/lib/python2.7/site-packages/offlineimap/repository/Base.py", line 124, in syncfoldersto srcfolders = src.getfolders()
File "/usr/local/lib/python2.7/site-packages/offlineimap/repository/IMAP.py", line 303, in getfolders self.accountname, self))
File "/usr/local/lib/python2.7/site-packages/offlineimap/folder/IMAP.py", line 32, in __init__ self.name = imaputil.dequote(name)
File "/usr/local/lib/python2.7/site-packages/offlineimap/imaputil.py", line 36, in dequote if not (string[0] == '"' and string[-1] == '"'): IndexError: string index out of range

***** Finished processing account MyCompany


Eh. Bah. Something is wrong somewhere. Help....

Sunday, March 18, 2012

5.1 amd64 K43U: Alpine reloaded, but snapshot has been updated.

Heyya,

I was trying to install Alpine this evening but aspell dependency is giving out error like something have changed. Then I checked my fav snapshot site and found that it's updated since 15th March.

So I'll be updating the snapshot tomorrow.

What's with Alpine again? Well previously I mentioned about trying to make Alpine to be offline email client (Alpine+UW-IMAPD+DavMail+OfflineIMAP) but the adventure never took off. So I'm visiting the trail again. Heh.

p/s: Not to mention that the Alpine+DavMail+OWA post have the most comment by readers. So it might be a useful post to some people. Later

Saturday, March 17, 2012

Thunderbird 9: Fixing screwed menu bar position.

Hi,

my -current is using Thunderbird 9x. And yesterday, somehow, I managed to screw the layout of it's Menu bar and Toolbar. The Menu bar should be on top, then below it the Toolbar. But by some magical keyboard shortcut I would never have known nor I can recall, I managed to swap the position between those 2 and leaving the Toolbar on top and below it, the Menu bar. It was ugly, dysfunctional and just plain wrong.

After a few misleading internet articles and forums regarding the issue, or nearly identical issues, I was left with the option of delete-and-test procedure. There's .thunderbird folder inside my $HOME and all the related settings is inside xxxxxxxx.default folder. Because there's a bunch of files, I deleted a subfolder inside then open up Thunderbird just to see did the layout was reverted back to normal. After nearly clearing the content of the .thunderbird folder, I found that the folder extensions is the one that I'm looking for.

So after I deleted the extensions folder, the layout reverted back to factory-default at the expense of losing my downloaded theme. Ah well that made me think that I can achieve the same result by changing theme to default and so it seems so. Better to lose the themes than lose my email settings. Later then.

Wednesday, March 14, 2012

5.1 amd64 K43U: Updated BIOS to 2.20 and found some issues.

Hi,

I updated my K43U's BIOS 2 days ago to version 2.20 from previous version 2.17. Then I noticed something. I'm not sure this is related to me updating the BIOS but for sure, I noticed this issue after updating the BIOS.

Sometime the speaker will not function. Result of mixerctl will show that the speaker is not muted and if I attach a headphone, mixerctl will update accordingly - headphone works and detaching the headphone will result in still no sound coming out from the speaker. Rebooting will result in the same issue unless I opt for shutting down, then boot the machine. In Win7 the speaker is working fine with no issue so this might not be a BIOS update issue.

I also notice that this machine's Multicard Reader will sometime be detected and sometime not. If you refer to my dmesg, there no card reader detected but sometime I can see this dmesg result added:

umass0 at uhub0 port 5 configuration 1 interface 0 "Generic USB2.0-CRW" rev 2.00/38.82 addr 3
umass0: using SCSI over Bulk-Only
scsibus1 at umass0: 2 targets, initiator 0
sd1 at scsibus1 targ 1 lun 0: SCSI0 0/direct removable serial.0bda0138516388200000


To make it ever more weirder, when Multi-Card is detected, the speaker will have no problem. Eh. But then I never tested the Card Reader in either OpenBSD or Win7 so I don't know if it's faulty or what. My machine have 2 years warranty so I better make sure.

UPDATE 14/03/12: I found that my Realtek MultiCard Reader is not working. Even in Win7. So I better send the machine to Asus Service Center ASAP.

Later.

Monday, March 12, 2012

5.1 amd64 K43U: Screenshot anyone?


Hi,

Shown here is my Asus K43U running OpenBSD 5.1 (snapshot). There's tmux displaying a part of dmesg output, then the result of uname -a and lastly the scrot command I use to take this screenshot.

I'm using spectrwm (still scrotwm here) with xstatbar runnin at the bottom.

Oh yeah tmux is using 256 color. Heh. Later.

Friday, March 09, 2012

5.1 amd64 K43U: Something about APM.

Hi,

apm is working fine. In dmesg, I can see that my E-450 APU have 3 speed detected:

cpu0: 1646 MHz: speeds: 1650 1320 825 MHz

So I vim /etc/rc.conf.local and add:

apmd_flags="-A"

Basically this is to tell apm to use Automatic performance adjustment mode. So with power adapter connected, the processor will be in full force (1650Mhz) and will lower down to (825Mhz) when in battery mode and scale up/down according to load. Nice.

I will still need to find something about the LCD's brightness though because that's one of the major power-sucker. Will update on this later.

Tuesday, March 06, 2012

5.1 amd64 K43U: CUPS revisited.

Hi,

I just finished setting up CUPS and successfully made the Firefox to use CUPS for printing. At first I just installed cups-1.5.0p8 and change my /etc/rc.conf.local to add:

# Packages script to start (/etc/rc.d/)
pkg_scripts="cupsd"


At the bottom of the file. Now OpenBSD uses that instead of my previous posting and if I use my previous way, doing ps aux | grep cups will display bunch of cups threads being started. Recent way are much better.

So then when I open the http://localhost:631 (CUPS local page), I just add my network printer (HP Laserjet 9050dn) using socket://ip.address then downloading external driver from CUPS's website. Test printing went successful but when I want to print under Firefox, there's only Print to file and Print to lpr options with no CUPS printer. My office also have a Ricoh Aficio MP4500 printer but currently not working for me. Will try to figure this out later.

After searching for answers, I installed gtk+2-cups-2.24.9p0 with all of the dependencies. Restarting Firefox then checking the Print menu, I can now see the printer correctly. But when I tried to print, I get this pdftops failed error and printing queue stopped. So I went off to search for another answer.

Looking at OpenBSD's packages site, I saw cups-pdf-2.5.1 which might be the solution I was looking for. The packages is to print a file to PDF, but I have a feeling this can solve my printing issue. So I installed that, quit a lot of dependencies too then tried printing in Firefox. Wallah! Printing done, I'm happy so back to work. Later then.

Friday, March 02, 2012

5.1 amd64 K43U: ksh script for Asus K43U keyboard shortcut in spectrwm.

Hi,

I've written a simple script to use my K43U keyboard shortcuts. As stated previously, Fn+F1 (sleep) and Fn+F7 (Off LCD) shortcuts is working. But as the Fn button is undetected in OpenBSD or xorg, I cannot use the Fn button to create other shorcuts, instead I need rely on spectrwm's MOD key. I might change this back to Fn key if later on it's workable.

What's the purpose of this (current) script?
- MOD+F10 to mute/unmute master volume (mixerctl outputs.master.mute)
- MOD+F11 to decrease master volume (mixerctl outputs.master. For both LR channel)
- MOF+F12 to increase master volume (mixerctl outputs.master. For both LR channel)

If you're using xstatbar, like me, xstatbar will show a graph of master volume for each Left/Right channel. So by using this script, you can see how much percentage of the volume you increase/decrease.

Why ksh? Because OpenBSD's default SHELL is ksh and I'm using it. This script might work with other shell.

Copy the asusfn.sh to either your $HOME or if you want to use it exclusively for spectrwm (scrotwm), copy it to /usr/local/share/scrotwm/ but make sure to alter my .scrotwm.conf below accordingly as I put my asusfn.sh in $HOME. Make sure to chmod the asusfn.sh to executable.

Manual usage is:
$ ./asusfn.sh [param]

Replace [param] with:
aup : To increase volume.
adn : To decrease volume.
amt : To mute/unmute volume.

This top part is snippet of my $HOME/.scrotwm.conf. As stated above, alter accordingly.



And this part above is the asusfn.sh. If you read the script carefully, you can see that you can also use the command:

$ ./asusfn.sh info

Which is basically my debugging for the script. I'm not an expert on ksh scripting so I used that to check values/env/bla bla etc.

Future (might be) improvements:
- MOD+F2 to enable/disable athn0 (Wireless LAN)
- MOD+F8 to change display output
- MOD+F9 to enable/disable touchpad

I also found that there's acpiasus which is the Hotkeys driver for Asus's laptop. Currently not automatically working with this machine-o-mine so I need to search for clues on it.

Legal stuff. You can freely copy/use/alter the script any way you want. Don't mock my programming skill because I'm not a programmer and I know this script can be made more simpler. If you alter the script and gave it somebody, make sure you tell them it's not my version. If you find this script useful, thank me or don't either way it's ok. Later.

Thursday, March 01, 2012

5.1 amd64 K43U: Current status.

Hi,

Current status of running OpenBSD -current on Asus K43U.

- xf86-video-ati is at 6.14.3. Display is at 1366x768. But unfortunately xvinfo and glxinfo gave disappointing result so no hardware rendering yet.
- Video using software rendering (see above).
- Fn+f1 (Sleep) function seems to be working.
- Fn+f7 (Turn LCD Off) function is working.
- acpiasus not working for this machine yet.
- Speaker automatically mute when headphone jack is inserted.
- The bloody Firefox 9 cannot use $http_proxy env anymore. I tried Lynx using proxy and it's fine. Bloody mess. I'm searching for solution on this.
- Conky have problem with cpu detection.
- xstatbar is the way to go. Nice graph for both CPU cores.
- Sometime speaker not working, only shutdown then boot will fix it.
- Built-in Multi-Card reader sometime detected and sometime not. No SDCard to test so can't say for sure.

This will be updated when necessary. Later.

Wednesday, February 29, 2012

5.1 amd64 K43U: Where is scrotwm now, eh?

Hi,

I was looking for updated info on my fav wm, scrotwm but heck I can't find any now. What? spectrwm? Uh?

Oh. If you read this conversation, you'll finally know that scrotwm has changed its name to spectrwm. That's why. Well changes are gradual so some reference to scrotwm is still there. Nice name. As long as it perform better each time it's updated, I will be happy. Later

6.5 amd64: Modify existing certbot certificates.

Hi, It's been quite some time eh. As you can see, I still upgrade my OpenBSD system regularly but currently I do not have the time to ...