What a lousy title. What I wanted to jot down here is how you can prevent your webpage from showing the subdirectories and the contents of the directories online. For example, if someone has a geocities account and the webpage is geocities.com/XYZ with two subdirectories A and B. If A and B are used mainly for storing files and not part of the links to your webpage, you can prevent the files in those directories from being shown by adding an index.html file in the subdirectories. In the index.html file, you can enter whatever you want, e.g. Forbidden / No authorization to view this page / Go away / Whatever. Therefore, whenever someone opens geocities.com/XYZ/A, instead of getting a list of files which you have kept in A directory, they will only be able to view the index.html page. Ta da! That is probably elementary but it took me a while to figure it out.
Monday, February 05, 2007
Sunday, February 04, 2007
Vim Syntax Highlighting
I've been trying to understand how to get the syntax highlighting to work. I know that it works because when I create files like index.html or when I edit files like .bashrc or .bash_profile, there will be syntax highlighting. However, when I create a file for example 'fluxbox' in order to enter my startup script there, no colours appear even with setting ":syntax on". I was puzzled about that. After looking for a very long time, I finally found out:
1. The type of highlighting will depend on the extension of the file, which I have created. For example, if I create index.html, the colors will appear automatically. If the file was just named index, there will not be any automatic syntax highlighting even with html codes in it. I had to go through a few tutorials, before I found one which actually mention this!
2. You can force syntax highlighting for files with odd, different or no extension.
set: syntax=sh
set: syntax=html
set: syntax=php
and so on
3. You can check for the supported languages in /usr/share/vim/vim70/ftplugin
1. The type of highlighting will depend on the extension of the file, which I have created. For example, if I create index.html, the colors will appear automatically. If the file was just named index, there will not be any automatic syntax highlighting even with html codes in it. I had to go through a few tutorials, before I found one which actually mention this!
2. You can force syntax highlighting for files with odd, different or no extension.
set: syntax=sh
set: syntax=html
set: syntax=php
and so on
3. You can check for the supported languages in /usr/share/vim/vim70/ftplugin
Thursday, February 01, 2007
Time
Being a time freak, I've started timing some of the processes using the command time.
1. $ time updatedb
real 11m23.021s
user 0m2.532s
sys 0m6.276s
2. $ time emerge qt
real 46m19.128s
user 28m45.472s
sys 3m7.316s
1. $ time updatedb
real 11m23.021s
user 0m2.532s
sys 0m6.276s
2. $ time emerge qt
real 46m19.128s
user 28m45.472s
sys 3m7.316s
Monday, January 15, 2007
ATI Open Source Driver
Yesterday I finally ditched the ATI proprietary Linux driver and installed the open source driver. Two reasons:
1. ATI driver 8.27 does not work with the latest kernel. Have to install a newer version of the driver in order for it to work with the kernel.
2. However, ATI has dropped the support for radeon 9200/9250 SE from their latest driver.
Three methods to install the open source driver according to the Wikipedia.
1. Compile everything from the kernel.
2. Emerge the x11-drm module separately. I.e. do not choose 'Direct rendering support' while configuring the kernel.
3. Use the CVS drm source from xorg.
I chose the first method. After compiling kernel:
1. Edited my /etc/modules.autoload.d/kernel-2.6 file
via-agp
agpgart
radeon
2. Edited my /etc/X11/xorg.conf file
## Important bits
Section "DRI"
Mode 0666
EndSection
Section "Module"
Load "dbe"
SubSection "extmod"
Option "omit xfree86-dga"
EndSubSection
Load "freetype"
Load "dri"
Load "drm"
Load "glx"
EndSection
Section "Device"
Identifier "** ATI Radeon (generic) [radeon]"
Driver "radeon"
Option "BusType" "PCI" ## I added this because without this line, x server will start, but it will lock up after I open any application. For example, the computer locked up after I opened xterm and type 'ls' or 'dmesg'.
EndSection
3. I tried playing sauerbraten after installing this driver and it worked fine. Unlike the hiccups that I had trying to play this game using the proprietary driver.
1. ATI driver 8.27 does not work with the latest kernel. Have to install a newer version of the driver in order for it to work with the kernel.
2. However, ATI has dropped the support for radeon 9200/9250 SE from their latest driver.
Three methods to install the open source driver according to the Wikipedia.
1. Compile everything from the kernel.
2. Emerge the x11-drm module separately. I.e. do not choose 'Direct rendering support' while configuring the kernel.
3. Use the CVS drm source from xorg.
I chose the first method. After compiling kernel:
1. Edited my /etc/modules.autoload.d/kernel-2.6 file
via-agp
agpgart
radeon
2. Edited my /etc/X11/xorg.conf file
## Important bits
Section "DRI"
Mode 0666
EndSection
Section "Module"
Load "dbe"
SubSection "extmod"
Option "omit xfree86-dga"
EndSubSection
Load "freetype"
Load "dri"
Load "drm"
Load "glx"
EndSection
Section "Device"
Identifier "** ATI Radeon (generic) [radeon]"
Driver "radeon"
Option "BusType" "PCI" ## I added this because without this line, x server will start, but it will lock up after I open any application. For example, the computer locked up after I opened xterm and type 'ls' or 'dmesg'.
EndSection
3. I tried playing sauerbraten after installing this driver and it worked fine. Unlike the hiccups that I had trying to play this game using the proprietary driver.
Monday, December 11, 2006
Refilling ink cartridges
I guess, I still haven't gotten the knack of refilling colour ink cartridges. I was careful not to inject too much ink and I also let the cartridge stand for a while before inserting it back into the printer. However, I think I didn't insert the needle deep enough when I was injecting the magenta and cyan into the cartridge. As a result, my printer now prints black, yellow and purple. Sigh...
I found a website where one can download videos of how to refill ink cartridges. Very informative and useful.
I found a website where one can download videos of how to refill ink cartridges. Very informative and useful.
Sunday, December 10, 2006
Udev
Usually when I plug in a usb drive, it will be allocated a slot at /dev/sda* (* denotes number 1, 2, 3 and so on). However if there were 2 usb drives or more, the drives will be allocated slots (nodes or slots? I don't know the correct terminology.) at /dev/sd* where * denotes the alphabet a, b, c and so on. This is troublesome as I mount my devices manually using the rules at /etc/fstab and it is a bother changing the rules everything to suite the alphabet sd*. Therefore now I use udev to customise the naming of device nodes. This was done by following instructions at the Gentoo Wiki.
1. My udev rules are kept in the file /etc/udev/rules.d/10-local.rules
2. Examples of rules in the file are:
BUS=="usb", SYSFS{serial}=="00000000000000000182", KERNEL=="sd?1", NAME="%k", SYMLINK="pdrive"
BUS=="usb", SYSFS{serial}=="000000899406", KERNEL=="sd?2", NAME="%k", SYMLINK="ipod"
3. The serial number in SYSFS{serial} is obtain as follows:
a. udevadm -a -p /sys/path/to/hardware/info - which for my pendrive and ipod is actually /dev/sda. Therefore:
i. $ udevadm -q path -n /dev/sda
That will result in /block/sda
ii. $ udevadm -a -p /sys/block/sda
b. (i) and (ii) can be combined : udevadm -a -p 'udevinfo -q path -n /dev/sda'
4. My rules used to read
BUS="usb", SYSFS{serial}="00000000000000000182", KERNEL="sd?1", NAME="%k", SYMLINK="pdrive"
Note the single equal sign. That used to work until udev was upgraded to udev-103. After that the double equal signs have to be used or else the udev rules will not load with errors of 'invalid rules' and 'subsystem' not found (something like that).
1. My udev rules are kept in the file /etc/udev/rules.d/10-local.rules
2. Examples of rules in the file are:
BUS=="usb", SYSFS{serial}=="00000000000000000182", KERNEL=="sd?1", NAME="%k", SYMLINK="pdrive"
BUS=="usb", SYSFS{serial}=="000000899406", KERNEL=="sd?2", NAME="%k", SYMLINK="ipod"
3. The serial number in SYSFS{serial} is obtain as follows:
a. udevadm -a -p /sys/path/to/hardware/info - which for my pendrive and ipod is actually /dev/sda. Therefore:
i. $ udevadm -q path -n /dev/sda
That will result in /block/sda
ii. $ udevadm -a -p /sys/block/sda
b. (i) and (ii) can be combined : udevadm -a -p 'udevinfo -q path -n /dev/sda'
4. My rules used to read
BUS="usb", SYSFS{serial}="00000000000000000182", KERNEL="sd?1", NAME="%k", SYMLINK="pdrive"
Note the single equal sign. That used to work until udev was upgraded to udev-103. After that the double equal signs have to be used or else the udev rules will not load with errors of 'invalid rules' and 'subsystem' not found (something like that).
Saturday, November 04, 2006
Ubuntu - Gripes
1. I can't bloody see anything during bootup. Just the Ubuntu word and a progress bar.
- to rectify by editing /boot/grub/menu.lst and removing the words 'quiet' and 'splash'
2. A whole load of modules and processes which are not needed.
3. Slightly messed up xorg.conf; the wacom and the font thing
4. Gnome login problems
5. Gnome login problems
6. Gnome login problems
7. Gnome login problems
8. ...
9. ...
10. ...
- to rectify by editing /boot/grub/menu.lst and removing the words 'quiet' and 'splash'
2. A whole load of modules and processes which are not needed.
3. Slightly messed up xorg.conf; the wacom and the font thing
4. Gnome login problems
5. Gnome login problems
6. Gnome login problems
7. Gnome login problems
8. ...
9. ...
10. ...
Ubuntu - Installation
I installed Ubuntu 6.10 on the old computer yesterday. Pentium III 667Mhz, 128 RAM with a 3dfx Voodoo graphic card and Soundblaster-I-forgot-the-model sound card. Dual-boot with Windows by the way. I encountered the paradise of problems - GDM, gnome and X server. I did this, did that, got nowhere, created new problems and the list goes on. So I reinstalled Ubuntu again today. And here goes the log:
1. No problems during installation. I had to use the text-mode installation method using the alternate-iso-cd because the other live-desktop-whatever-it-is-called-i386 iso needs 192 MB RAM.
2. Rebooted after installation. Arrived at login screen of gdm. Entered username and password. Gnome started. Halfway-through the startup, the login screen appeared again. Entered username and password. Gnome started, this time without a problem. But why do THREE Nautilus windows have to be started??
3. Update package manager popped up a screen with 2 new updates; imagemagick (I think) and something else. Updates completed without problem.
4. Checked .xsession-errors. Had to edit xorg.conf to:
a. remove all entries which had anything to do with wacom, stylus, cursor and can't-remember (something to do with tablet pc)
b. edit the Font paths in which 'X11' and 'fonts' were in reversed position
5. Checked all the other log files: Xorg.0.log, dmesg, faillog, ... no apparent errors.
6. Ran gdmsetup. Made sure 'Accessible login' was not enabled. Read somewhere that enabling this can cause some kind of errors.
7. Edited startup programs. Later saw some error messages which said that the autostart file cannot be edited. Have to check to see if ~/.config/autostart is under root.
8. Rebooted again. Say hello to 'PROBLEMS'.
7. Login screen keeps on appearing after I have entered username and password for Gnome Session.
8. Nautilus and nothing else pop up after logging into Gnome Failsave. Couldn't even find a way to bring up a terminal. I think I got an error message about Gnome Settings Daemon and dbus.
9. Login into Terminal Failsave successful but there was no detectable error messages.
10. Decided to call it a night.
1. No problems during installation. I had to use the text-mode installation method using the alternate-iso-cd because the other live-desktop-whatever-it-is-called-i386 iso needs 192 MB RAM.
2. Rebooted after installation. Arrived at login screen of gdm. Entered username and password. Gnome started. Halfway-through the startup, the login screen appeared again. Entered username and password. Gnome started, this time without a problem. But why do THREE Nautilus windows have to be started??
3. Update package manager popped up a screen with 2 new updates; imagemagick (I think) and something else. Updates completed without problem.
4. Checked .xsession-errors. Had to edit xorg.conf to:
a. remove all entries which had anything to do with wacom, stylus, cursor and can't-remember (something to do with tablet pc)
b. edit the Font paths in which 'X11' and 'fonts' were in reversed position
5. Checked all the other log files: Xorg.0.log, dmesg, faillog, ... no apparent errors.
6. Ran gdmsetup. Made sure 'Accessible login' was not enabled. Read somewhere that enabling this can cause some kind of errors.
7. Edited startup programs. Later saw some error messages which said that the autostart file cannot be edited. Have to check to see if ~/.config/autostart is under root.
8. Rebooted again. Say hello to 'PROBLEMS'.
7. Login screen keeps on appearing after I have entered username and password for Gnome Session.
8. Nautilus and nothing else pop up after logging into Gnome Failsave. Couldn't even find a way to bring up a terminal. I think I got an error message about Gnome Settings Daemon and dbus.
9. Login into Terminal Failsave successful but there was no detectable error messages.
10. Decided to call it a night.
Sunday, October 15, 2006
Thursday, September 07, 2006
Cannot access websites
Today I cannot access websites like google, yahoo and lycos with firefox. However when I ping www.google.com, there is 0% packet loss. I did notice though that the website being pinged is www.l.google.com. (notice the extra 'l'?) So I entered this web address in firefox, and I can access google again. Strange, isn't it? The same with yahoo. Address entered is www.yahoo.com, but address being pinged is www.yahoo-ht2.akadns.net. And again, I can use yahoo by entering the second address in firefox.
Wednesday, September 06, 2006
Eject works only with root
Had a strange problem. Couldn't eject my Ipod. Got this error:
$ eject /mnt/ipod
$ eject: unable to open `/dev/ipod'
The same thing happened with my usb flash drive. I know, some people say that we don't have to eject a flash drive; umount will do. But ejecting a flash drive makes the LED light switch off. I like seeing that... hehe
Anyway, this has never happened before and I don't know why I suddenly cannot eject as a normal user. With root, I get this message:
$ eject -v /mnt/ipod
eject: device name is `/mnt/ipod'
eject: expanded name is `/mnt/ipod'
eject: `/mnt/ipod' is not mounted
eject: `/dev/ipod' can be mounted at `/mnt/ipod'
eject: `/dev/ipod' is not a multipartition device
eject: trying to eject `/dev/ipod' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/ipod' using SCSI commands
eject: SCSI eject succeeded
I solved the problem temporarily by doing chmod +s /usr/bin/eject
I read this in this bug website:
That's an eject bug because it opens for read-only.
From "strace eject -s /dev/sdb1":
open("/dev/sdb1", O_RDONLY|O_NONBLOCK) = 3
EDIT: I searched through my old posts, and found the post titled 'Ipod Works Under Gentoo' where I have already encountered this problem with eject! Why do I even note down these things if I'm not going to look through them first?!
$ eject /mnt/ipod
$ eject: unable to open `/dev/ipod'
The same thing happened with my usb flash drive. I know, some people say that we don't have to eject a flash drive; umount will do. But ejecting a flash drive makes the LED light switch off. I like seeing that... hehe
Anyway, this has never happened before and I don't know why I suddenly cannot eject as a normal user. With root, I get this message:
$ eject -v /mnt/ipod
eject: device name is `/mnt/ipod'
eject: expanded name is `/mnt/ipod'
eject: `/mnt/ipod' is not mounted
eject: `/dev/ipod' can be mounted at `/mnt/ipod'
eject: `/dev/ipod' is not a multipartition device
eject: trying to eject `/dev/ipod' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/ipod' using SCSI commands
eject: SCSI eject succeeded
I solved the problem temporarily by doing chmod +s /usr/bin/eject
I read this in this bug website:
That's an eject bug because it opens for read-only.
From "strace eject -s /dev/sdb1":
open("/dev/sdb1", O_RDONLY|O_NONBLOCK) = 3
EDIT: I searched through my old posts, and found the post titled 'Ipod Works Under Gentoo' where I have already encountered this problem with eject! Why do I even note down these things if I'm not going to look through them first?!
Monday, August 21, 2006
Another day ...
This blog is not meant for this., maybe I'll delete this post some day... but I just have to let it out: AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAARRRRRRRRRRGHHHHHHHHHHHHHHH!!!
Yet another discouraging and disappointing day. *@!! Puh-leasee remind me again why I chose to do this and why the heck am I still doing it?! Yargh!
I think I'll go and have a haircut. Nah, I'm not shaving the head bald, have a punk haircut or anything like that. I'm not that traumatised ... yet. Will just have the fringes and the back part trimmed slightly. Not at all adventurous ... Maybe if someone were to pop out of a bank and hand me a wad of cash, I might have my hair dyed. Hmmm... then again, I think I'll probably take the cash and buy either another set of graphic novels or another ipod! 'Hair' is not on top of my priority list at all!
Yet another discouraging and disappointing day. *@!! Puh-leasee remind me again why I chose to do this and why the heck am I still doing it?! Yargh!
I think I'll go and have a haircut. Nah, I'm not shaving the head bald, have a punk haircut or anything like that. I'm not that traumatised ... yet. Will just have the fringes and the back part trimmed slightly. Not at all adventurous ... Maybe if someone were to pop out of a bank and hand me a wad of cash, I might have my hair dyed. Hmmm... then again, I think I'll probably take the cash and buy either another set of graphic novels or another ipod! 'Hair' is not on top of my priority list at all!
Sunday, August 20, 2006
Kernel compile and kernel sources
I didn't know that everytime the package gentoo-sources is updated, the symlink of /usr/src/linux still points to the first original sources, from which the kernel was compiled. Therefore, although I compile a new kernel everytime there is an updated version of the source, it is actually not compiled using the updated version but rather the old version. I found this out while trying to compile the new ATI-drivers and found that there were errors because they were using the old kernel source. Am I making any sense? Ah well, as long as I know what I'm saying... Anyway, I got this from the Gentoo Linux Documentation regarding kernel upgrade:
Three ways in order to make the /usr/src/linux symbolic link point to the sources of the kernel you are running.
1. Portage can update the symlink automatically when you emerge new kernel sources. All you have to do is add the symlink flag to the USE variable in /etc/make.conf
(Add the symlink keyword)
USE="symlink x86 3dnow 3dnowex X aac aalib adns alsa apache2"
2. Use app-admin/eselect to modify the symlink.
Install eselect if you don't have it)
#emerge eselect
(See the list of available kernels)
#eselect kernel list
Available kernel symlink targets:
[1] linux-2.6.9-gentoo-r1
[2] linux-2.6.9-gentoo-r2
(Select the correct kernel)
#eselect kernel set 1
3. Manually update the symlink
# cd /usr/src
# ln -sfn linux-latest-version linux
Three ways in order to make the /usr/src/linux symbolic link point to the sources of the kernel you are running.
1. Portage can update the symlink automatically when you emerge new kernel sources. All you have to do is add the symlink flag to the USE variable in /etc/make.conf
(Add the symlink keyword)
USE="symlink x86 3dnow 3dnowex X aac aalib adns alsa apache2"
2. Use app-admin/eselect to modify the symlink.
Install eselect if you don't have it)
#emerge eselect
(See the list of available kernels)
#eselect kernel list
Available kernel symlink targets:
[1] linux-2.6.9-gentoo-r1
[2] linux-2.6.9-gentoo-r2
(Select the correct kernel)
#eselect kernel set 1
3. Manually update the symlink
# cd /usr/src
# ln -sfn linux-latest-version linux
Thursday, August 10, 2006
Firefox and Mouse 2
Another thing I noticed about Firefox: Scrolling up and down a page very quickly with the mouse wheel will trigger the command 'Go Back' and 'Go Forward' respectively.
After reading some websites, I've found out that this is not a Firefox bug (therefore the title of this post is actually not justified) but rather a problem with xorg or something like that. Apparently this will occur in all applications with a horizontal scroll bar.
To prevent this from occuring in Firefox alone:
set mousewheel.horizscroll.withnokey.action to 0 in about:config
Or edit the xorg.conf:
For my case, I edited this line:
Option "ZAxisMapping" "4 5 6 7"
into
Option "ZAxisMapping" "4 5"
## Note the absence of 6 and 7. Why they were there in the first place, I don't know. I only have one mouse wheel. At least, I think that 6 and 7 represent the second wheel (for horizontal scrolling?)
After reading some websites, I've found out that this is not a Firefox bug (therefore the title of this post is actually not justified) but rather a problem with xorg or something like that. Apparently this will occur in all applications with a horizontal scroll bar.
To prevent this from occuring in Firefox alone:
set mousewheel.horizscroll.withnokey.action to 0 in about:config
Or edit the xorg.conf:
For my case, I edited this line:
Option "ZAxisMapping" "4 5 6 7"
into
Option "ZAxisMapping" "4 5"
## Note the absence of 6 and 7. Why they were there in the first place, I don't know. I only have one mouse wheel. At least, I think that 6 and 7 represent the second wheel (for horizontal scrolling?)
Sunday, July 30, 2006
Firefox and Mouse
Well, I'll be! I can be so dense sometimes. I've just discovered some enlightening stuff about my mouse. I've been using a Microsoft mouse for more than a year now and only today(!) I've noticed that the scroll wheel can actually be depressed and it can act as a middle mouse button! (My current mouse setting is '3 Button Emulate' or something like that.) No wonder sometimes other webpages load when I'm scrolling through a page. That was reeeeeeeally annoying! The discoveries that I've made:
1. Scroll wheel can act as 3rd button. If it is pressed, firefox will search for the term currently in the clipboard and display a page based on that. To prevent that from happening, go to 'about:config' and change the value for 'middlemouse.loadContentURL' to false. I'm so glad I've finally solved this mystery!
2. Recently, ever since I've installed Firefox 1.5.0.4, I've been having trouble with copy and paste. Everytime I try to paste some text using the 'middle button' (pressing left and right buttons together), this little weird sphere would appear with little arrows and the whole page would move up and down when I move the mouse, and I couldn't paste the text!! It was so annoying and I was cursing away at Firefox. The poor thing didn't deserve all that. Hehe. It was actually my own ignorance. Autoscrolling was enabled by default in the new version. Du-uh... yes I know! As I've never used autoscrolling before, I didn't know what was going on until today. So, I disabled it and can now cut and paste in peace with another new bit of information tucked safely away.
1. Scroll wheel can act as 3rd button. If it is pressed, firefox will search for the term currently in the clipboard and display a page based on that. To prevent that from happening, go to 'about:config' and change the value for 'middlemouse.loadContentURL' to false. I'm so glad I've finally solved this mystery!
2. Recently, ever since I've installed Firefox 1.5.0.4, I've been having trouble with copy and paste. Everytime I try to paste some text using the 'middle button' (pressing left and right buttons together), this little weird sphere would appear with little arrows and the whole page would move up and down when I move the mouse, and I couldn't paste the text!! It was so annoying and I was cursing away at Firefox. The poor thing didn't deserve all that. Hehe. It was actually my own ignorance. Autoscrolling was enabled by default in the new version. Du-uh... yes I know! As I've never used autoscrolling before, I didn't know what was going on until today. So, I disabled it and can now cut and paste in peace with another new bit of information tucked safely away.
Thursday, July 27, 2006
Nimbus Roman No 9 L
OpenOffice Writer: The characters of this font will be displayed overlapping each other when the text is in bold. Weird. The printed text is normal though. Anyway, I installed 'urw-fonts' and the problem was rectified.
Saturday, July 22, 2006
Great song!
I first heard this song while listening to the podcast 'Filme und So'. The song is called 'Tom Cruise scares me' by David Ippolito. I'm not sure if I will be offending anyone / breaking some rules / doing something wrong by posting the direct link here, (These things are soooo sensitive nowadays - sheesh!) so I'll just post the link to the main website. It's a great song and I love it!
http://www.thatguitarman.com/
EDIT: Just as well, that I didn't post the direct link. I read through the 'Legal, Terms of Service and Usage' part of the website, and apparently they don't allow direct link to 'images, sounds or executable applications'.
http://www.thatguitarman.com/
EDIT: Just as well, that I didn't post the direct link. I read through the 'Legal, Terms of Service and Usage' part of the website, and apparently they don't allow direct link to 'images, sounds or executable applications'.
Monday, July 17, 2006
Users and Groups
I hate searching for this every time I have to add a user to a group. I keep forgetting the commands!
1. To view the list of groups and their users: $ cat /etc/group
2. Create new user: $ useradd
3. Create new group: $ groupadd.
4. To list all groups to which the user is a member: $ groups <user id> ## This is the one I keep forgetting!!!!
5. Add user to group z.B. cdrom: $ usermod -G <comma separated group list> <user id>
### Be sure to list all groups as this is an absolute list and not an addition. THIS IS IMPORTANT. Use the 'groups' command and then enter all the groups in addition to the new one under usermod.
EDIT: No need to list all the groups. I just found out that you can append the user to a supplementary group by using the -a option. Meaning:
usermod -a -G wireshark user
This will add 'wireshark' to the user's groups in addition to the other groups that the user already belongs to.
or
gpasswd -a username group
This is a usefule website.
1. To view the list of groups and their users: $ cat /etc/group
2. Create new user: $ useradd
3. Create new group: $ groupadd.
4. To list all groups to which the user is a member: $ groups <user id> ## This is the one I keep forgetting!!!!
5. Add user to group z.B. cdrom: $ usermod -G <comma separated group list> <user id>
### Be sure to list all groups as this is an absolute list and not an addition. THIS IS IMPORTANT. Use the 'groups' command and then enter all the groups in addition to the new one under usermod.
EDIT: No need to list all the groups. I just found out that you can append the user to a supplementary group by using the -a option. Meaning:
usermod -a -G wireshark user
This will add 'wireshark' to the user's groups in addition to the other groups that the user already belongs to.
or
gpasswd -a username group
This is a usefule website.
/etc/conf.d/net
My network connection = Modem --> Router --> Computers
At first, I set my Gentoo system to automatically use DHCP and obtain the IP address. However this resulted in a very slow startup for the computer if the router is switched off. Hence I edited the file /etc/conf.d/net and added this:
###
config_eth0=( "my-ip-address-allocated-by-router netmask 255.255.255.0" )
routes_eth0=( "default gw router's-ip-address" )
###
At first, I set my Gentoo system to automatically use DHCP and obtain the IP address. However this resulted in a very slow startup for the computer if the router is switched off. Hence I edited the file /etc/conf.d/net and added this:
###
config_eth0=( "my-ip-address-allocated-by-router netmask 255.255.255.0" )
routes_eth0=( "default gw router's-ip-address" )
###
Friday, July 14, 2006
SCIM
The commands to start scim:
$ export XMODIFIER="@im=SCIM"
$ export GTK_IM_MODULE="scim"
$ scim -d
I used to put these 3 commands in bash_profile but that did something to my keyboard, whose layout is set to us international, and I couldn't type umlauts and eszett, or something like that. I can't really remember. Maybe I'll try again. Anyway, because of whatever that went wrong, I just type these commands in a terminal everytime I need to use scim, which is not very often. But it is still troublesome to enter all those words. I wonder if it will work if I create an alias for them. Will try later
EDIT: The alias works: alias chinese='export XMODIFIER=@im=SCIM && export GTK_IM_MODULE=scim && scim -d'
Hmmm... the Trebuchet '&' (&) looks ugly.
To use scim with eg. openoffice:
$ LC_ALL=zh_CN.utf8 oowriter2
$ export XMODIFIER="@im=SCIM"
$ export GTK_IM_MODULE="scim"
$ scim -d
I used to put these 3 commands in bash_profile but that did something to my keyboard, whose layout is set to us international, and I couldn't type umlauts and eszett, or something like that. I can't really remember. Maybe I'll try again. Anyway, because of whatever that went wrong, I just type these commands in a terminal everytime I need to use scim, which is not very often. But it is still troublesome to enter all those words. I wonder if it will work if I create an alias for them. Will try later
EDIT: The alias works: alias chinese='export XMODIFIER=@im=SCIM && export GTK_IM_MODULE=scim && scim -d'
Hmmm... the Trebuchet '&' (&) looks ugly.
To use scim with eg. openoffice:
$ LC_ALL=zh_CN.utf8 oowriter2