Tuesday, April 10, 2007
How to associate the Start key in KDE
$ xev
And obtain the corresponding info. Example:
eyPress event, serial 30, synthetic NO, window 0x3e00001,
root 0x60, subw 0x0, time 5783328, (-83,158), root:(594,323),
state 0x10, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyRelease event, serial 30, synthetic NO, window 0x3e00001,
root 0x60, subw 0x0, time 5783427, (-83,158), root:(594,323),
state 0x50, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
XLookupString gives 0 bytes:
Execute in console (or put in .bashrc)
$ xmodmap -e "keycode 115 = F13" #esto es para que StartKey sea F13
$ xmodmap -e "keycode 91 = 46" #esto es para que la coma del teclado numerico, sea un punto
This is for making StartKey behave like F13
Now, in Control Center -> Regional & Accesibility -> Keyboard Shortcuts -> Global Shortcuts ->
Popup Launch Menu -> change Alt+F1 to F13, simply pressing the StartKey
DONE
Tricks for Maria
$ xmodmap -e "keycode 96 = minus" #F12 se vuelve minus
$ xmodmap -e "keycode 96 = underscore" #F12 se vuelve underscore
$ xmodmap -e "keycode 61 = space" #minus se vuelve space
Sunday, March 25, 2007
Samba tips
smbstatus to see who is connected in the samba network to my computer... and to see which file that person is actually checking.
Thursday, March 15, 2007
Going from Fedora to Ubuntu
Instead of executing su, we have to execute sudo; this command will ask you a password. Just introduce the user password. If you want to be root you have to make
$ sudo su
Basically instead of yum we have another command, namely apt-get. Its use is as follows (more details executing $ man apt-get):
sudo apt-get install nameprogram
sudo apt-get remove nameprogram
sudo apt-get search nameprogram
sudo apt-get update nameprogram
examples:
$ sudo apt-get install thunderbird
$ sudo apt-get install ubuntu-desktop #do this if you are using kubuntu, to install gnome
$ sudo apt-get dist-upgrade #this command updates all the packages of the system
apt-get requires a list of the sources. You can edit it:
$ kdesu kedit /etc/apt/sources.list
Some other packages that are worth to install are:
adept, kpackage #those are similar to yumex
to execute:
$ kdesu adept
amarok
kdm libdvdread3 #I don't remember what is "kdm"
libxine-extracodecs
koffice
Some pages that contain useful information:
https://help.ubuntu.com/6.10/book/book/ubuntubook-ch3-html/UsingUbuntuontheDesktop.html
https://help.ubuntu.com/6.10/book/book/ubuntubook-ch6-html/SupportandTypicalProblems.html
https://help.ubuntu.com/6.10/book/book/ubuntubook-ch7-kubuntu/Official-Ubuntu-Book-Kubuntu-Chapter.html
Finally, a good forum is www.kubuntuforums.net
Thursday, February 1, 2007
Samba shares
mount -t smbfs -o fmask=444,dmask=555,iocharset=utf8,guest //server/share /path/to/mount-pointThis create a read-only share, for all users, including root.
Example:
mount -t smbfs -o fmask=444,dmask=555,iocharset=utf8,guest //ariadne/videos /tmp/rapoldinet
Explanation:
fmask=444 gives owner, group and other read permissions
dmask=555 gives owner, group and other read and execute permissions for directories
guest mounts the share without any authentication.
iocharset=utf8 this is because Windows uses Unicode for their filesystem since Windows 2000. This way you are able to use special characters abroad ASCII in your filenames without running into problems.
Saturday, January 27, 2007
Recovering lost files
There is a utility called libtrash. This is a wrapper library (LD_PRELOAD hack) around the system calls which Linux uses when deleting files, and which moves them to a configurable location instead.
However, if the damage is done:
It might be easy but it might be as well impossible to recover the lost files. One should for heaven's sake not unmount and re-mount the partition (that is, not reboot!).
If there is still any process running which holds the specific file open, then you're lucky and just copy the file descriptor from the /proc directory.
Here's a guide for that:
http://www.linux.com/article.pl?sid=06/10/30/1652211
There are utilities for ext2 based file systems. One is called recover, and one e2undel. But you need to remember some informations about the files. And it won't work with ext3...
Also, depending on file type you might want to try "forensic utilities". These scan the whole partition for "magic bytes"/headers of known filetypes and *try* to restore them.
* Magic Rescue
* foremost
* The Coroner's toolkit
* PhotoRec (this claims even to recover from USBs, and memory cards).
* probably others...