Notes by voodoo

Displaying keyword search results 1 - 12
Created by voodoo on September 04, 2011 14:23:17    Last update: September 04, 2011 14:25:05
I just installed Ubuntu 11.04 desktop on my old Dell laptop, but the cdrom is not auto-mounting. Normally this simply works. I tried various things like adding cdrom to /etc/fstab and installing halevt (which failed), none worked. However, I found out that despite talks of using gnome-volume-manager etc, at least for this version of Ubuntu automount is managed by Nautilus (file manager): start gconf-editor and navigate to /apps/nautilus/preferences/ , media_automount should be checked (but it's checked by default, unless you changed it). In the end, I wasn't able to make cdrom automount, although USB drives automounted fine. Instead of wasting more time to diagnose the problem, I manually mounted the cdrom drive: $ sudo mount /dev/cdrom /cdrom
Created by voodoo on September 02, 2011 18:12:56    Last update: September 02, 2011 18:12:56
This is how to add the 3GB switch for Windows XP: Remove system and hidden attributes of C:\boot.ini : C:\>attrib -s -h boot.ini Add the 3GB switch to C:\boot.ini : [boot loader] timeout=30 default=multi(0)dis... Add system and hidden attributes: C:\>attrib +s +h boot.ini Reboot
Created by voodoo on June 21, 2011 08:32:15    Last update: June 21, 2011 08:32:15
The Dos2unix package includes utilities "dos2unix" and "unix2dos" to convert plain text files in DOS or MAC format to UNIX format and vice versa. By default, it replaces the original file: $ dos2unix base64_encoded.txt dos2unix: conver... Use the -n switch to write the converted output to a new file: $ dos2unix -n base64_encoded.txt unix_formatted.tx... Using STDOUT ( - ) as output file does not work : $ dos2unix -n base64_encoded.txt - Use input redirection to write to STDOUT: $ dos2unix < base64_encoded.txt
Created by voodoo on June 14, 2011 08:15:57    Last update: June 14, 2011 08:17:25
In below examples, the default gateway is 105.52.84.1 . Use " netstat -rn ": $ netstat -rn Kernel IP routing table Destin... Use " route -n ": $ route -n Kernel IP routing table Destinati... Use " ip route show ": $ ip route show 105.52.84.0/24 dev eth0 proto ...
Created by voodoo on March 04, 2011 12:11:33    Last update: April 13, 2011 13:55:13
By default SELinux blocks execstack permission. According to Ulrich Drepper : "As the name suggests, this error is raised if a program tries to make its stack (or parts thereof) executable with an mprotect call. This should never, ever be necessary. Stack memory is not executable on most OSes these days and this won't change. Executable stack memory is one of the biggest security problems. An execstack error might in fact be most likely raised by malicious code." You can check if a library/application requires execstack by using the execstack utility: execstack -q PATHTOPROGRAM You can try to clean the flag and see if the application still runs: execstack -c PATHTOPROGRAM To allow execstack for cc1 : # grep cc1 /var/log/audit/audit.log | audit2allow ...
Created by voodoo on March 23, 2011 15:32:55    Last update: March 23, 2011 15:36:00
I got "Unknown SSL protocol error" when using curl to get the default page from iis 7 (of course, IE simply displayed "Internet Explorer cannot display the webpage"). The problem was that I used the default iis 7 certificate, which didn't have a name - and that caused SSL to fail. I created a new certificate with a name and that fixed the problem. # curl -v -k --dump-header - https://192.168.80.15... Other possible reasons: 3 Common Causes of Unknown SSL Protocol Errors with cURL
Created by voodoo on February 25, 2011 14:00:41    Last update: February 25, 2011 14:03:46
Suddenly my Windows XP failed to boot with this error message on a blank screen: missing or corrupt <windows root>\system32\hal.dll I took out the hard drive, put it in a USB enclosure and attached it to another PC. Then I ran CHKDSK and it fixed some file system errors. But I did find that hal.dll was intact, so hal.dll was not missing or corrupt . It turned out that the file that was really missing was C:\boot.ini . It is a hidden file, so you have to use attrib boot.ini to see it. The file is missing if attrib boot.ini returns nothing (run in the root folder C:\). In my case I reconstructed the boot.ini file: [boot loader] timeout=30 default=multi(0)dis... and changed the attributes back...
Created by voodoo on July 15, 2010 22:57:48    Last update: July 15, 2010 22:58:37
Use -xl switch when connecting thru LAN: rdesktop -f -xl remote_host_name One effect of specifying LAN speed being Windows contents are displayed when they are dragged. Full documentation: -x <experience> Changes default bandwidth performance behaviour for RDP5. By default only theming is enabled, and all other options are dis- abled (corresponding to modem (56 Kbps)). Setting experience to b [roadband] enables menu animations and full window dragging. Setting experience to l [an] will also enable the desktop wallpa- per. Setting experience to m [odem] disables all (including themes). Experience can also be a hexidecimal number containing the flags.
Created by voodoo on July 12, 2010 18:44:06    Last update: July 12, 2010 18:44:06
Use the \d command to show information about a table: postgres=# \d patchtype Table ...
Created by voodoo on June 17, 2010 15:23:02    Last update: June 17, 2010 15:35:40
Use useradd to add a user (the switches are not required, but it's a good idea to give them. For example, without -m you'd create a user without a home directory): # -d switch specifies user home directory # -m ... You also need to use the passwd command to set a new password before the user can log in. To delete a user, use the userdel command: userdel demo
Created by voodoo on February 08, 2010 04:36:31    Last update: February 08, 2010 05:10:57
If you have X server on the client side, you can run remote desktop with XDMCP . But XDMCP is not secure, and it's somewhat tricky to tunnel XDMCP through ssh. So if you are concerned about security, VNC is a much better choice. Plus vncviewer is a lot easier to set up than X server. There are two options to set up VNC server: VNC vino-server Many Linux distros come with remote desktop server installed. On Fedora Core, you can simply set the configuration from the Desktop menu (Desktop -> Preferences -> Remote Desktop), and use vncviewer from the client machine to access the desktop remotely. Install RealVNC or TightVNC and configure it yourself You need to change ~/.vnc/xstartup in order to see the...
Created by voodoo on February 07, 2010 06:18:47    Last update: February 07, 2010 22:41:38
To start vncserver : # with default screen size of 1024x768 vncserve... To stop vncserver (for display #1): vncserver -kill :1 The first time you start vncserver , it asks you to create a password. To change vncserver password : vncpasswd