Tuesday, December 29, 2009

myth in small window

with thanks to spodesabode for this

MythTV is wonderful, and it's backend/frontend separation is ideal for my uses - as it means I can watch TV in my bedroom, where I don't have an aerial. However, it is quite obviously designed for people who use it as a complete Media Center, and not people who run it on their machine. I found the best thing to do is have a secondary launch icon, which loads MythTV with a different resolution.
The following instructions are for Ubuntu, but I did something very similar in Fedora.
First, copy the mythtv.desktop file.
sudo cp /usr/share/applications/mythtv.desktop /usr/share/applications/mythtvsmall.desktop
Then we'll edit this file with sudo nano /usr/share/applications/mythtvsmall.desktop
Edit the file:
"Name=" portion to read "MythTV Frontend (Small)"
"Exec=" portion to read "mythfrontend -geometry 640x400".
640x400 is a nice size for my twin 1680x1050 screens, and keeps the widescreen aspect ratio. Moving the window around is as simple as holding down ALT and click-dragging on the window.
http://www.spodesabode.com/discussion/54/mythtv-in-a-window/
to make the backend setup small windowed:
sudo cp /usr/share/applications/mythtv-setup.desktop /usr/share/applications/mythtv-setupsmall.desktop
edit the file:
sudo nano /usr/share/applications/mythtv-setupsmall.desktop
"Name=" portion to read "MythTV Backend Setup (Small)",
"Exec=" portion to read "mythtv-setup -geometry 640x400"

Saturday, November 21, 2009

Mail merge labels in OpenOffice

Christmas card time again and my usual annual reminder of how tricky this seems to be.

1. There are different ways of creating a data source for OoWriter:
From Egroupware you can use a CSV export of a particular category search. Best to turn this into a MS xls first. Important that you choose 'semi-colon' as delimiter type, NOT comma (commas are used within the fields in egw), when opening up the csv and saving as your xls (strngely couldn't get Base to work with an Oo spreasheet?). In ubuntu it seems tricky to simply to register the xls as a data source using the wizard, but using the spreadsheet as the data for an Oo Base db. still registers it as a viewable datasource in Writer when hitting F4
Egw can also be hooked into as a data source live. to do that...
Everything needed in here: /home/markp/printjobs/Label Runs/christmas The xls feeds the odb, odb is the registered datasource for Oo, the odt template is setup for the 8x3s.

3. to insert such a data source into a sheet full of labels: chose file:new: labels

4. insert the fields when the data source has been selected. Don't be tempted to drag and drop the fields using the F4 view once the thing is opened! (screws the db somehow and field mismatch)

5. To suppress blank fields (per line), view printing characters and change the carriage returns at end of lines for P (paragraphs). Then, with the cursor at the end of the relevant line: (insert:fields:other:functions:hidden paragraph in the condition field the field is referred to, including it's path, a ! means 'NOT'. eg ![addresses1.Sheet1.City (Private)]

5b. To suppress spaces (eg when no < title > field) follow instructions here

6. To see the finished result got to print (huh?) and to create the output as a file choose such. This allows you to save, but not edit that doc. Don't choose 'update all links' that simply inserts that contents of the first (master) label to all the others.

7. To over come the problem of the salutation on the address label being correct for (eg) a family. whilst using an address record that belongs to s ingle person (eg a Church member), I have used the following fields which cover all situations: on first line of address only use prefix, middlename, surname and suffix fields, not firstname, this allows a name to be created thus: prefix MR middlename G & MRS C surname CARRINGTON suffix & FAMILY. conditional text entries required for prefix, middlename fields in case they are blank (suppreses unnecesary spaces). I have also decided to apply a country to all addresses, use conditional text so that only overseas COUNTRIES print, as here. Only use personal (home) addresses, if business address is the only one, copy it to the personal as well.

8. If you need to adjust the layout slightly when you've finished with your sheet here

egroupware add/delete categories error

default 1.6 installation has a bug in file:

usr/share/egroupware/addressbook/inc/class.addressbook_ui.inc.php

not categories are presented when choosing the option to add/delete cats. to multiple contacts

latest version of that file can be found here:

http://www.egroupware.org/viewvc/egroupware/branches/1.6/addressbook/inc/class.addressbook_ui.inc.php?view=log&r1=28226&pathrev=28226

revision 28226 from branches was OK for me Nov 09

Friday, October 16, 2009

Hung openvpn connection

Occasionally (perhaps when rebooting the home PC in a hurry) the previous openvpn connection doesn't get closed down properly. When trying to reconnect openvpn declares that the required UDP socket is already being used.

To solve this, find the pid of the previous connection:

markp@markp-study:~$ ps aux | grep openvpn

markp 5507 0.0 0.0 3240 800 pts/2 S+ 17:47 0:00 grep openvpn
root 6889 0.0 0.1 5132 3060 ? S Oct05 2:38 openvpn --config XXXXX.ovpn

Kill that process:

markp@markp-study-home:~$ sudo kill -KILL 6889

Should fire up OK after that!

Monday, September 14, 2009

Bullet points appearing in Impress (Oo PPT)

Perhaps I'm dim but it's taken me ages to get my head round this:

Choose custom animation
add an entrance
by default all text appears at once, probably not what you want
choose '...' for further options, then 'Text Animation' tab, then 'Group Text' dropdown and choose (most likely) 'All Paragraphs at Once'
Back in the 'Effect Appear' dialogue expand the tree of items by clicking the '+' on the first line.

IF your points are in a text box decide if you want the box itself to be on the slide as soon as it appears (option 'with previous'). If you don't do this it'll take an extra click to bring it in.

DECIDE if you want the first line to appear straight away as well, if yes choose 'with previous'; if you want to bring it in yourself choose 'on click'

CHOOSE 'on click' for all subsequent lines that you want to bring on one click at a time. If a line is treated as it's own paragraph, but really belongs to the point above, make it a 'with previous' item.

Wednesday, June 24, 2009

suse 11.1 on samsung r40

increasingly fed up with the flakiness of xorg on the Samsung R 40 laptop with my ubuntu 9.04. Constantly had to reboot using the rescue mode.

Notes for using suse 11.1 with KDE:

  1. Imagemagick is installed by default
  2. Touchfreeze is a possible solution to the 'cursor jumping whilst typing' problem, although see this forum post desribing how to use syndaemon
  3. Add the comunity based repos, especially the xxxman one
  4. Mythtv frontend can be called from YaST2
  5. DVD playback is an issue

Monday, June 01, 2009

Meeting with Prime Minister






Gordon Brown come to Worksop's Valley School and I long with about 40 other people representing the community sat around tables, discussed and asked questions.

Here's a report on what he said (though I didn't hear him say some of these things!) Perhaps he said them at another part of the meeting(?), or perhaps this is what his speech writer meant for him to say! Nevertheless he spoke well I thought.

Thursday, May 07, 2009

Ubuntu 9.04 - issues with upgrading

Samsung laptop.
All went well using update manager from 8.10 except that I have the bug mentioned here with mythtv not showing any text.

Best fix for this, as of (6/6/09), run mythtv using this command from terminal:

XLIB_SKIP_ARGB_VISUALS="1" mythfrontend

eee 701
Installed ubuntu net book remix for first time.
Has issue of hanging with a desktop background but no gnome icons. it did work first install when it went straight into netbook desktop, although that seemed jerky. Looks like a gnome windows manager problem.

ibook g4 ppc
Installed using an online upgrade from a 8.04 install disk, via 8.10 then 9.04 upgrade manager installs.
Same issue as with eee.

this post fixed it on the ppc (but not the eee)

drop to a shell using ctrl+alt+F2, then:

sudo dpkg --force all --configure -a

Wednesday, April 22, 2009

Gasometers I've known and loved



This is the one that started it all really. My observant friend commented one day in amazement that the gasometer was not the same height as when last seen. my interest has grown from that precious moment...

Kernel Headers explained

Thanks to BrionS at USA Linux Users Group for this info:

Put simply headers are sets of files that define all the application programming interface (API) for a program. So if you're writing some C or C++ code and you want to use the function: getWidget(myContext); Then somewhere in your build path (when you go to compile the code) you need a header that describes where getWidget(Context c) is defined.

Header files end in .h or sometimes .h++. Source code files typically end in .c, .cpp, or .c++ and inside them you'll see references to .h files (sometimes - it can get complicated).

In any event, to compile a program that uses what's called a function library (or just library), you need to have the header files for that library so your compiler can check your code for syntax problems (by comparing what you wrote to the function definition in the header(s)). You don't need the entire source code for the library in order to use the functions - this saves you a lot of space because header files are very small compared to the source files.

You could think of header files like Cliff Notes. Smile Your program needs to know a little bit of information about one of the functions it's using, the header files provide a very brief overview of the function which is enough for you to compile. If you wanted the whole story, you'd need the function's source code.

The reason the header files are not generally included by default is because these days most distributions provide you with binary (pre-compiled) packages for your system. Since you don't have to do any compiling, you don't need to look up any function definitions by their headers, you can simply run your software which has already been verified against the headers when it was compiled and it uses the pre-compiled function libraries (lib*.so) on your system.

If you have the wrong version of a function library on your system, then the pre-compiled binary usually breaks with a segmentation fault or something like that and you either need to get the right library version installed or re-compile the program from source using the library version (and its headers) that you have so it is now referencing the correct API.

Lots of words above, but it all boils down to this:

1. If you install binary packages, you don't need header files

2. If you install source packages, you'll need the header files and/or source of that package's dependencies

Saturday, April 18, 2009

Acts 10: ECG a heart for the nations llandudno 2009

Acts and the Spirit - the Spirit of Mission


Church in transition. a 'home team' for 1000 years. Rules have changed. always got penalty's, free kicks, appointed the ref etc etc when we were at home. Now we're playing 'away' all has changed. For first time for 1600 years the church now faces a time when is much more like the early Church. We are in transition; extremes. we look at Acts 10 in light of that.

Acts 10 here

Pipes with taps on don't work just by planting them in the ground.
the spirit is the spirit of mission, Church can't be removed from it source

More positively: Wherever we seek to be the the church by the spirit we cn be sure of spirit's help.

Great Commission (matt. 28) is it a 'straight' or 'conditional' promise. Missional spirit of acts indicates tht either way when we engage with the task of church the spirit wil be there.

Acts is book of 'waves' of the spirit working

Wave of moving to the Jews
Wave of persecution faced by believers
Wave of moving to the gentiles
  • Cornelius story and Peter's vision an example, along with Ethiopian eunuch.
Key characters

  • cornelius
  • angels - luke loves angels, uses a sign that god's coming. enlightenment meant that we had to tell our story in a liberal way. spent a lot of 19 and 20 c rationalising and demyhtologising faith, just at the time when society re-mythologizes life. secular theology. we do n0t give time to heart all head in past. we don't believe non-spiritual enough. our faith is non sensible, n0n cerible. has our belief been drilled out of us...
  • peter - why peter needed? god could have just zapped faithful cornelius? luke loves journey's donkey, 12 yr old J, samaritan, emmaeus, and lots of journey on road. conversion always happens on road (semon) peter and cornelius journeying. what of the vision of food? Is this a homer simpson moment doh 3 times and 3 time I denied J. dliemma, whether i obey or disobey god's word would appear to be challenged. Is P thiinking about the fact that often in the ministry of Jesus P etc had to ignore ritual purity laws. Nb Peter is in joppa where Jonah had rn way to. Joanh had to go to unclen Nineveh'ns.
Key points

The spirit of mission is pushing us to reconsider everything.
Even those who think they know what's what (Peter) have to journey and move on.

Wesley 'became more vile' when he broke the rules of c of e and spoke to kingswood miners. but he till did it.

God does new things. Peter opts to stick in there depiste difficulty, see acts 11, difficult conversations will follow.

cornelius and peter. who converted who? OK coernelius is converted, but also a progressive conversion of peter. 1st lukewarm towards to cornelius' men, but by time he has travelled to cornelius he has interpreted the dream to say i now see that i must not call anyone unclean (nothing to do with the food). another step along the journey of peters conversion,

Friday, April 17, 2009

Acts 2 14ff: ECG a heart for the nations llandudno 2009

What Happens the Day after the Day Before



Acts 2: 14ff - here



Not so much about Church as:

  1. Community

  2. c

  3. c



Whole of NT can be seen as a commentary on the issue of how these frail xtns were trying to be getting on with each other



Minucius Felix c. 160ad

Beauty of life causes strangers to join our ranks; we do not talk about great things, we live them



v38 Repentance

Many of our Churches minitries bypass repentance. Sign outside church 'Sinners Only' made to take down. Repentance is an ongoing process, a permintant state, not just a one off event. Church at it's best when able to react to all issues in light of a repenting response. church become a common community of repentance.


Primitive Xty is not about a ticklist of beliefs to be subscribed too.


MA says that the more salvation is about fer and terror of God, the shallower and more shrt term that faith is likely to be. Opposite is true as well.


v42 Devotion

to:

Loving devotion is the inspiration of the early disciples.

  • All in the context of the 'teachin of the apostles'
  • discipleing mentoring, exampling, apprenticing.
Fellowship - koinania life together
  • not communism, but generous graciousness
  • poor folk teach us lessons about 'one anotherness'
  • Paul's churches in the ports were wealthy, needed to show
To the breaking of Bread - not HC
  • Alpha didn't invent food and fellowship!
  • MA sees J not as Robert Powell but Jennifer
  • people who you don't normally get on with will be in the fellowship. Acts 6 illutrates that people who shouldn't eat together can be found, there the risen Xt is.
Formal worship by end of 2nd C Tertullian said that basic requirements of worship are HC and intercession.

Thursday, April 16, 2009

Acts 2: ECG a heart for the nations llandudno 2009

Martyn Atkins Bible Study

Thursdy Acts 2: 1-12 here


What kind of God would this have revealed to those who experienced the first Spirit
God who reveals his spirit God of People restoring God of Blessing God who would restore and make Jerusalem a focal point



  1. God who reveals his spirit
  2. God of People restoring
  3. God of Blessing
  4. God who would restore and make Jerusalem a focal point

Being Converted What kind of person were you What happened to you What happened afterwards

Jews believed that the Pent festival was the time that the spirit of God would come:

Jews would have made a connection
Acts 9 is a sudden surrender as much as it is a sudden converstion

Wednesday, April 15, 2009

Acts 9: ECG a heart for the nations llandudno 2009

15-4-09 Martyn Atkins Bible Study

Wednesdy Acts 9: 1-19 here

Being Converted What kind of person were you What happened to you What happened afterwards

Acts 9 is a sudden surrender as much as it is a sudden converstion

Three Q's


1. Paul, What kind of person were you?
  • WITNESS MATTERS - Paul was someone impressed by xtn witness.
  • never underestimate impact of our testimony - MA conversation (one of many). asked God to make himself real. Nightclub clipboard evangelist spoke of Christ. Mr Bell from youth group. Knew Mr Bell loved God and was a deeply xtn man. Stephen didn't know what his witness might effect and affect Paul as he 'held the coats'.
  • So, How is the witness going?? It's tuff. You probably won't know that
  • A GOOD JEW - Philippians 3: 4-6
  • xty not just for big sinners, but also for those, like paul who were good religious people
2. Paul, what happend to you?
  • JESUS APPEARED IN ME - Idea of Jesus appearing in su and to us. Wesleyan theology. He makes the first move. God acts whether we ever realise it or not
  • PAUL MET WITH JESUS. Doesn't always happen like it did with Paul, but regardless meetig with Jesus is the quinntessential xtn experience.
  • RULES OF BEING A JEW, within the rules of being a jew Paul was good, but upon meeting xt P needs to totally reacess, all this is loss because of knowing christ J my lord, all else is rubbish. (anti-semitic problem of this). A radical re-assessment is eqd when meeting xt. Meeting/following xt is like a new magnetic north direction in life. chnge north, evrything else is modified too. so we who are not the 'biggest' sinners in terms of human ranking. Point of feeling conviction is close to turning point.




Notes on this Bible passage
  • Paul is called by name - so was Peter at lakeside, Mary at Gethsemene, Saul too.
  • Saul is asked 'why are you persecuting me' - to persecute xt is to persecute his people. what you do to them you do to me.
  • the Q is in the rabbinic telling of the story of the temple Saul Saul why do you ersecute me. David saying to Saul when he is in the cave 'relieving himself'. story told in samuel, but Luke uses these words to signal to Paul thatb there is an imoportant link here with the OT. J is son of David.
  • Paul is recruited, commissioned and taken on...












What happened fterwards

Monday, April 13, 2009

change pkcs to pem for using ovpn package in ubuntu network manager

Thanks to Craig Millsap for his article on this:

To extract the CA Certificate:
openssl pkcs12 -in myvpn.p12 -cacerts -nokeys -out myvpnca.pem

To extract the Personal Certificate:
openssl pkcs12 -in myvpn.p12 -clcerts -nokeys -out myvpncert.pem

To extract the Private Key:
With a password: openssl pkcs12 -in mydccert.p12 -clcerts -nocerts -out myvpnkey.pem
Without a password: openssl pkcs12 -in mydccert.p12 -clcerts -nocerts -nodes -out myvpnkey.pem


http://www.carbm1.com/?p=184

Update May 2011.
Network Manager 0.8.1 (with Ubuntu 10.10) can now use use the PKCS12 file instead of creating separate pem files as above. simply use the ovpn config file as an import file and that's all that's needed.

icon 225 working in ibex using (gnome's) network-manager

1. Before you can use NetworkManager with these devices you need to check if the the hso module is installed by using this command:

find /lib/modules/`uname -r` -name 'hso.ko'


2. ozerocdoff is needed to stop the Icon's onboard usb virtual cd from firing up.

that requires: libusb

so:

3. sudo apt-get install libusb-dev

4.

If you are running a 64 bit system or if ozercdoff crashes run this command:

sudo make clean

Then compile ozerocdoff:

sudo make

Install the ozercdeoff and the udev scripts

sudo make install

The next time that you plug in a device with ZeroCD enabled the udev scripts will run and call ozercdoff.

5. After that (gnome) network-manager looks after the connection

use orange (contract) as broadband type in n-m



This appeared good intially in eeebuntu but after a few moments (possibly of innactivity (?)) would crash the whole PC.

The version of Pharscape's Option driver that comes with nm 0.7.0 is relatively old, poss v 1.2. So upgrade to HSO module version 1.9. Followed instructions of MartinD here to incorporate the module into the kernel using dkms, which should help if kernel gets upgraded (ie no rebuild necessary).

all goes OK til running the build then is complains that the kernel source headers can't be found by dkms.

So: in Synaptic Package maneger (NOT add/remove programs!) install build-essential and the version of eee kernel headers that dkms is looking for. (kernel: 2.6.27-8-eeepc)


installing of headers hangs after an hour. reboot causes hdd complaints says yes to all when running a manual fsck.

reboot thankfully brings back the gui. nm not working with the Option now so try a rebuild of module:

sudo dkms remove -m hso -v 1.9 --all
then
sudo dkms add -m hso -v 1.9
then
sudo dkms build -m hso -v 1.9

all seems OK has run for an hour now... :-)

Thursday, February 19, 2009

pinout for jbl esc333 surround sound infrared

This is what I've determined from the schematics that I downloaded re: my ESC333 Surround Sound amp - which I purchased without a remote control:

3.5mm jack
1. tip - VDD (power?) on IC201
2. ring - to ground
3. sleeve - to remote on IC201

Q still can't find any info about the remote sensor hardware

Thursday, February 12, 2009

Rationale of UPG (User Private Groups)

5.4. User Private Groups
Red Hat Linux uses a user private group (UPG) scheme, which makes UNIX groups easier to use.
The UPG scheme does not add or change anything in the standard UNIX way of handling groups;
it simply offers a new convention. Whenever you create a new user, by default, they have a unique
group. The scheme works as follows:
Chapter 5. Users and Groups 93
User Private Group
Every user has a primary group; the user is the only member of that group.
umask = 002
Traditionally, on UNIX systems the umask is 022, which prevents other users and other members
of a user’s primary group from modifying a user’s files. Since every user has their own private
group in the UPG scheme, this "group protection" is not needed. A umask of 002 will prevent
users from modifying other users’ private files. The umask is set in /etc/profile.
setgid bit on Directories
If you set the setgid bit on a directory (with chmod g+s directory ), files created in that direc-
tory will have their group set to the directory’s group.
Many IT organizations like to create a group for each major project and then assign people to the
group if they need to access that group’s files. Using this traditional scheme, managing files has been
difficult because when someone creates a file, it is associated with the primary group to which they
belong. When a single person works on multiple projects, it is difficult to associate the right files with
the right group. Using the UPG scheme, however, groups are automatically assigned to files created
within a directory with the setgid bit set, which makes managing group projects that share a common
directory very simple.
For example, say you have a big project called devel, with many people editing the devel files in a
devel directory. Make a group called devel, chgrp the devel directory to devel, and add all of
the devel users to the devel group.
You can add a user to a group using User Manager (see the Official Red Hat Linux Customiza-
tion Guide), or if you prefer to use the command line, use the /usr/sbin/groupadd groupname
command to create a group. The /usr/bin/gpasswd -a loginname groupname command will
add a user loginname to a group. (See the groupadd and gpasswd man pages if you need more
information on their options.) The /etc/group file contains the group information for your system.
If you created the devel group, added users to the devel group, changed the group for devel
directory to the devel group, and set the setgid bit for the devel directory, all devel users will be
able to edit the devel files and create new files in the devel directory. The files they create will always
retain their devel group status, so other devel users will always be able to edit them.
If you have multiple projects like devel and users who are working on multiple projects, these users
will never have to change their umask or group when they move from project to project. If set correctly,
the setgid bit on each project’s main directory "selects" the proper group for all files created in that
directory.
Since each user’s home directory is owned by the user and their private group, it is safe to set the
setgid bit on the home directory. However, by default, files are created with the primary group of the
user, so the setgid bit would be redundant.
5.4.1. User Private Group Rationale
Although the User Private Group (UPG) has existed in Red Hat Linux for quite some time, many
people still have questions about it, such as why UPG is necessary. To illustrate its use, consider the
following scenario.
You would like to have a group of people work on a set of files in the /usr/lib/emacs/site-
lisp/ directory. You trust a few people to modify the directory but certainly not everyone. So first
create an emacs group:
/usr/sbin/groupadd emacs
In order to associate the contents of the directory with the emacs group, type:
94
chown -R root.emacs /usr/lib/emacs/site-lisp
Now, it is possible to add the proper users to the group with gpasswd:
/usr/bin/gpasswd -a username Y
X
Chapter 5. Users and Groups
emacs
Allow the users to actually create files in the directory with the following command:
chmod 775 /usr/lib/emacs/site-lisp
When a user creates a new file, it is assigned the group of the user’s default private group. To prevent
this, perform the following command, which causes everything in the directory to be created with the
emacs group:
chmod 2775 /usr/lib/emacs/site-lisp
If the new file needs to be mode 664 for another user in the emacs group to be able to edit it, make the
default umask 002.
At this point, by making the default umask 002, you can easily set up groups that users can take
advantage of without any extra work every time users write files to the group’s common directory.
Just create the group, add the users, and do the above chown and chmod on the group’s directories.

Rationale of UPG (User Private Groups)

5.4. User Private Groups
Red Hat Linux uses a user private group (UPG) scheme, which makes UNIX groups easier to use.
The UPG scheme does not add or change anything in the standard UNIX way of handling groups;
it simply offers a new convention. Whenever you create a new user, by default, they have a unique
group. The scheme works as follows:
Chapter 5. Users and Groups 93
User Private Group
Every user has a primary group; the user is the only member of that group.
umask = 002
Traditionally, on UNIX systems the umask is 022, which prevents other users and other members
of a user’s primary group from modifying a user’s files. Since every user has their own private
group in the UPG scheme, this "group protection" is not needed. A umask of 002 will prevent
users from modifying other users’ private files. The umask is set in /etc/profile.
setgid bit on Directories
If you set the setgid bit on a directory (with chmod g+s directory ), files created in that direc-
tory will have their group set to the directory’s group.
Many IT organizations like to create a group for each major project and then assign people to the
group if they need to access that group’s files. Using this traditional scheme, managing files has been
difficult because when someone creates a file, it is associated with the primary group to which they
belong. When a single person works on multiple projects, it is difficult to associate the right files with
the right group. Using the UPG scheme, however, groups are automatically assigned to files created
within a directory with the setgid bit set, which makes managing group projects that share a common
directory very simple.
For example, say you have a big project called devel, with many people editing the devel files in a
devel directory. Make a group called devel, chgrp the devel directory to devel, and add all of
the devel users to the devel group.
You can add a user to a group using User Manager (see the Official Red Hat Linux Customiza-
tion Guide), or if you prefer to use the command line, use the /usr/sbin/groupadd groupname
command to create a group. The /usr/bin/gpasswd -a loginname groupname command will
add a user loginname to a group. (See the groupadd and gpasswd man pages if you need more
information on their options.) The /etc/group file contains the group information for your system.
If you created the devel group, added users to the devel group, changed the group for devel
directory to the devel group, and set the setgid bit for the devel directory, all devel users will be
able to edit the devel files and create new files in the devel directory. The files they create will always
retain their devel group status, so other devel users will always be able to edit them.
If you have multiple projects like devel and users who are working on multiple projects, these users
will never have to change their umask or group when they move from project to project. If set correctly,
the setgid bit on each project’s main directory "selects" the proper group for all files created in that
directory.
Since each user’s home directory is owned by the user and their private group, it is safe to set the
setgid bit on the home directory. However, by default, files are created with the primary group of the
user, so the setgid bit would be redundant.
5.4.1. User Private Group Rationale
Although the User Private Group (UPG) has existed in Red Hat Linux for quite some time, many
people still have questions about it, such as why UPG is necessary. To illustrate its use, consider the
following scenario.
You would like to have a group of people work on a set of files in the /usr/lib/emacs/site-
lisp/ directory. You trust a few people to modify the directory but certainly not everyone. So first
create an emacs group:
/usr/sbin/groupadd emacs
In order to associate the contents of the directory with the emacs group, type:
94
chown -R root.emacs /usr/lib/emacs/site-lisp
Now, it is possible to add the proper users to the group with gpasswd:
/usr/bin/gpasswd -a username Y
X
Chapter 5. Users and Groups
emacs
Allow the users to actually create files in the directory with the following command:
chmod 775 /usr/lib/emacs/site-lisp
When a user creates a new file, it is assigned the group of the user’s default private group. To prevent
this, perform the following command, which causes everything in the directory to be created with the
emacs group:
chmod 2775 /usr/lib/emacs/site-lisp
If the new file needs to be mode 664 for another user in the emacs group to be able to edit it, make the
default umask 002.
At this point, by making the default umask 002, you can easily set up groups that users can take
advantage of without any extra work every time users write files to the group’s common directory.
Just create the group, add the users, and do the above chown and chmod on the group’s directories.

inheriting correct group ownership on home linux server

Directory Set Group ID

If the setgid bit on a directory entry is set, files in that directory will have the group ownership as the directory, instead of than the group of the user that created the file.

This attribute is helpful when several users need access to certain files. If the users work in a directory with the setgid attribute set then any files created in the directory by any of the users will have the permission of the group. For example, the administrator can create a group called spcprj and add the users Kathy and Mark to the group spcprj. The directory spcprjdir can be created with the set GID bit set and Kathy and Mark although in different primary groups can work in the directory and have full access to all files in that directory, but still not be able to access files in each other's primary group.

The following command will set the GID bit on a directory:
chmod g+s ictadmin
recursive:
chmod -R g+s ictadmin
The directory listing of the directory "spcprjdir":
drwxrwsr-x 2 kathy spcprj 1674 Sep 17 1999 spcprjdir
The "s'' in place of the execute bit in the group permissions causes all files written to the directory "spcprjdir" to belong to the group "spcprj" .

For the shared directories to work files created must be group as well as owner writeable. The default umask setting, which define the permissions on a users newly created files, need changing from 022 to 002. In  more recent versions of Ubuntu this is set in the UMASK section of /etc/login.defs

Wednesday, February 11, 2009

Changing persmission for unison

When you get unison complaining about wrong group when syncing:

1. To change the group of all files, folders recursive:
eg

cd to folder
sudo chgrp -R circuitadmin *

2. To change the permissions of all files, folders recursive:
eg

cd to folder
sudo chmod -R 770 *

Wednesday, February 04, 2009

mythlounge

  • case: Lian Li C37
  • motherboard: MSI KM3M-V (pt no. ms 7061)
  • graphics: nvidia 6200 256mb ram 64bit, low profile; using dvi-hdmi lead (Zotac: fanless). Don't use restricted v177 (blocky video) use v173
  • network: dlink gigabit; low profile
  • ram: 1gb stick ddr
  • cpu: AMD 2800
  • hdd: 80gb ide