xfce4 + kiosk mode
Posted on October 8, 2007
Filed Under linux | 2 Comments
Additional to my previous post where I’ve mentioned about LTSP setup and xfce4, I’d like to post a little about how we’ve setup xfce4.
Following this info (http://wiki.xfce.org/kiosk_mode), we’ve setup xfce4 in “kiosk” mode, which means standard xfce4-panel through-out the system for all non-wheel users.
root@server~# cat /etc/xdg/xfce4/kiosk/kioskrc
[xfce4-panel]
CustomizePanel=%powerusers,foo[xfce4-session]
CustomizeSplash=ALL
CustomizeChooser=ALL
CustomizeLogout=ALL
CustomizeCompatibility=%wheel
Shutdown=%wheel
CustomizeSecurity=NONE
Now, only those users in “wheel” group can customize their xfce4-panel items, the rest of the users will get the standard configuration files from /etc/xdg/xfce4/panel/*
First we had some problems trying to get this standards to work, i don’t know why, but we could not grasp the idea of “kiosk” mode, and were trying to add customized configuration files into $HOME/.config/xfce4/panel/* and were wandering why our custom panel is not there on login…
Later we understood that by creating “kioskrc” file, we’ve forced the xfce4 not to read $HOME/.config/xfce4/panel/* but read /etc/xdg/xfce4/panel/*
Eventually (today) we’ve all that to behave as we wished. You can see below how all that will/should look like:
synack@xcpmd /etc/xdg/xfce4/panel $ ls
actions-12.rc launcher-9.rc separator-6.rc
launcher-10.rc orageclock-11918073222.rc systray-4.rc
launcher-11918071840.rc panels.xml tasklist-3.rc
launcher-11918072271.rc separator-11915433711.rc xfce4-menu-5.rc
launcher-7.rc separator-11918074303.rc
launcher-8.rc separator-13.rc
How to install LTSP-4.2 on Gentoo
Posted on October 1, 2007
Filed Under linux | Leave a Comment
Well, as an introduction I’d like to say that we’re using Linux & quite a bit of Open Source stuff through-out of organization. Stuff like: Linux, PostgreSQL, firefox, thunderbird, claws-mail, openoffice and LTSP.
This post is about LTSP. I’m really amazed at the quality of LTSP development. It’s quite easy to install and configure to fit one’s needs. For example, we’ve decided to use Gentoo Linux as base OS and XFCE environment for to get most out of the hardware at our hands.
Another thing that I must say – Gentoo wiki and documentation project is one of the best sources for technical how-tos, etc.
- Gentoo Linux Handbook: http://www.gentoo.org/doc/en/handbook/handbook-x86.xml
- XFCE Configuration Guide: http://www.gentoo.org/doc/en/xfce-config.xml
- Gentoo – LTSP Guide: http://www.gentoo.org/doc/en/ltsp.xml
I’ve just followed the above given sequence and got running LTSP setup in about 6-7 hours. Thin-clients were able to login, having required application up and running: samba, cups, openoffice, firefox, claws-mail, gftp, xpdf.
Our servers have: AMD Opteron(tm) Processor 242, 3GB RAM, and SATA HDDs, serving about 15-20 simultaneous users each, with an uptime of months, and reasonable performance.
PostgreSQL, copy from a file as non-superuser
Posted on September 29, 2007
Filed Under PostgreSQL, bash | Leave a Comment
testdb=> COPY weather FROM ‘/tmp/input_data.txt’;
ERROR: must be superuser to COPY to or from a file
HINT: Anyone can COPY to stdout or from stdin. psql’s \copy command also works for anyone.
So, how do we copy?
there is more than a way to skin a cat…
CREATE TABLE table1 (
code char(5),
name char(10)
);synack@deimos db $ cat /tmp/input_data.txt
1,kamchi
2,mahabat
3,kamilapostgres@deimos ~ $ cat /tmp/input_data.txt | psql -h localhost -d testdb -c “copy
table1 from stdin delimiter ‘,’;”postgres@deimos ~ $ psql -d testdb -c “select * from table1;”
code | name
——-+————
1 | kamchi
2 | mahabat
3 | kamila
(3 rows)
WordPressDash – Dashboard widget to post to wordpress
Posted on September 8, 2007
Filed Under mac os x | Leave a Comment
I’m using WordPressDash, which is a Dashboard widget to get this post posted on my WP
macbook and mac os x
Posted on September 4, 2007
Filed Under mac os x | Leave a Comment
Recently got a brand new Intel-based MacBook, and these days are getting myself familiar with a new OS – Mac OS X… Here are some of the links that you might check out:
- http://en.wikipedia.org/wiki/Mac_OS_X
- http://docs.blacktree.com/quicksilver/overview
- http://www.coconut-flavour.com/coconutwifi/index.html
- http://www.apple.com/downloads/
Later on will try to put together some text about my experience… For now, trying to get my usual stuff running on gentoo into this new box… all what I can say – awesome!
How to software raid-1 in Linux?
Posted on August 24, 2007
Filed Under linux | Leave a Comment
I’ve got 4 Linux servers running on software raid-1 setup (SATA hard disks), and it took a while before I really felt comfortable with setup process, as well as with troubleshooting (rebuilding when raid array gets broken, etc).
And here are the most important post-installation step, which I strongly suggest not to skip.
- Press CTRL+ALT+F2 and get yourself into bash prompt BEFORE you do your first reboot after completion of installation.
- Get the “grub” installed on both drives, with below steps:
root@server:~# grub
grub> device (hd0) /dev/sda
grub> root (hd0,0)
grub> setup (hd0)
grub> device (hd0) /dev/sdb
grub> root (hd0,0)
grub> setup (hd0)
Basically, what we did here is first instructed “grub” to take “/dev/sda” as the primary disk, later we instructed “grub” to take “/dev/sdb” as the primary disk (even though it’s secondary, meaning connected to 2dn SATA port).
Why this is done? From what I understood, SATA doesn’t really care which port it’s connected if there is a single disk connected. Meaning, even if it’s physically connected to SATA port 2, it will be recognized by your system as “/dev/sda”. If it was normal PATA disk, it would be recognized as “/dev/hdb” not “/dev/hda”. So, installing “grub” onto both disks ensures that your Linux box will boot-up even when 1st disk is down. I hope was able to explain…
The next important process, how to rebuild your array if one of the disks failed, and you got yourself a brand new SATA disk? Assuming that disk #1 has failed, we’ll need to follow these steps:
- Disconnect the functioning disk from port #2 and connect onto port #1. This has to be done, because as soon as you connect your brand new disk into port 1 (remember, it was /dev/sda which failed?) and boot-up the functioning SATA disk will become “/dev/sdb”, whereas just before that it was running as “/dev/sda”.
- Connect the new disk into port #2 and boot-up, and you should be booted without any issues.
- Now, we’ve got /dev/sda (your old functioning disk) and “/dev/sdb” your brand new disk.
- We’ll need to get the new disk partitioned exactly as your “/dev/sda” (assuming that the disks have the same size).
root@dapper:~# sfdisk -d /dev/sda | sfdisk /dev/sdb
Checking that no-one is using this disk right now …
OK
Disk /dev/sdb: 9729 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sdb1 0 - 0 0 0 Empty
/dev/sdb2 0 - 0 0 0 Empty
/dev/sdb3 0 - 0 0 0 Empty
/dev/sdb4 0 - 0 0 0 Empty
New situation:
Units = sectors of 512 bytes, counting from 0
Device Boot Start End #sectors Id System
/dev/sdb1 * 63 192779 192717 fd Linux raid autodetect
/dev/sdb2 192780 2152709 1959930 fd Linux raid autodetect
/dev/sdb3 2152710 60741764 58589055 fd Linux raid autodetect
/dev/sdb4 60741765 154497104 93755340 fd Linux raid autodetect
Successfully wrote the new partition tableRe-reading the partition table …
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
Once that process finishes, just run these steps (based on your partitioning)
root@server:~# mdadm --add /dev/md0 /dev/sdb1
root@server:~# mdadm --add /dev/md1 /dev/sdb2
root@server:~# mdadm --add /dev/md2 /dev/sdb3
root@server:~# mdadm --add /dev/md3 /dev/sdb4
And just keep an eye on the rebuild process:
root@server:~# watch –interval=3 cat /proc/mdstat
linux and boot-time arguments
Posted on August 24, 2007
Filed Under linux | Leave a Comment
Sometimes you might wonder what were the arguments passed to kernel, and what you need is mount /boot and “cat /boot/grub/menu.lst”. But, what if you don’t have root access to mount?
synack@deimos ~ $ cat /proc/cmdline
root=/dev/sda3 video=vesafb:1280x800-32@70 splash=silent,theme:livecd-2007.0 quiet CONSOLE=/dev/tty1
If you need more info: synack@deimos ~ $ man proc
linux and CONFIG_NOHIGHMEM
Posted on August 24, 2007
Filed Under linux | Leave a Comment
Long gone days when the RAM chips were expensive, and nowadays we can easily have >1gb of RAM even on personal computers (desktops, even laptops). So, what can we do to get maximum of that investment made onto RAM chips?
If you like compiling your own kernel, you should have seen that each option has some information provided, if you’re not sure about the purpose of that particular option. Well, not always that info is enough to understand the whole idea, but it does gives you some hints.
Cutting short, if you dig into your kernel configuration, this is what you can see:
|- Processor type and features
|-- High Memory Support
|--- (x) off
|--- () 4GB
|--- () 64GB
Now, CONFIG_NOHIGHMEM option is to be enabled if your box has no more than 1gb of RAM.
If you’ve got 2-4gb of RAM, CONFIG_HIGHMEM4G is an option to be enabled.
If you’ve got >4gb of RAM, your choice is CONFIG_HIGHMEM64G and damned your box should be flying
You can check the configuration of your kernel with:
synack@deimos ~ $ zcat /proc/config.gz | grep HIGHMEM
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
compile-time configuration settings for the kernel
Posted on August 24, 2007
Filed Under linux | Leave a Comment
Sometimes it happens that you’d like to know what are the option enabled in your current kernel configuration. And this can be easily achieved, not much hassle actually. All that has to be done – enable CONFIG_IKCONFIG_PROC option before you compile your own kernel.
This option can be found in:
|-General setup
|-- <*> Kernel .config support
Now, once you reboot into your new kernel, all that you need is use “zcat /proc/config.gz | grep CONFIG_IKCONFIG_PROC” to check if that option is enabled or not. And this is how it looks like:
synack@deimos ~ $ zcat /proc/config.gz | grep HIGHMEM
CONFIG_NOHIGHMEM=y
# CONFIG_HIGHMEM4G is not set
# CONFIG_HIGHMEM64G is not set
tilda – alternative for a terminal
Posted on August 22, 2007
Filed Under linux | Leave a Comment
I really like this terminal… Have set the shortcut to F1 key.
deimos ~ # eix tilda
[I] x11-terms/tilda
Available versions: 0.09.2 ~0.09.3 0.9.4
Installed versions: 0.9.4(23:24:02 07/20/07)
Homepage: http://tilda.sourceforge.net
Description: A drop down terminal, similar to the consoles
found in first person shooters
« go back — keep looking »