S:[9aug07] How to enable syntax highlighting in vim on Ubuntu
Uncomment (i.e. remove " at line start) of syntax on using:
sudo vi /etc/vim/vimrc
S:[9aug07] Where are all these wierd/random shares coming from in my Windows explorer under My Network Places ???
They are automatically culled from your network neighbourhood by the 'netcrawl' functionality of explorer - see: M$ KB, though the article isn't quite correct on reg path it is actually on WindowsXP: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\WorkgroupCrawler\Shares. Also intriguingly enough Explorer stashes all previously encountered machines at: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\ComputerDescriptions
S:[9aug07] Which package does nvidia.ko come from on debian Ubuntu (7.04) - as no package claims ownership when running dkpg -L . How to I regenerate/recreate nvidia.ko ??
It is generated by the lrm subsystem - linux-restricted-modules-2.* (Note: the module creation is controlled at bootup by /etc/default/linux-restricted-modules-common - make sure you haven't messed that filei - the modules created by /sbin/lrm-manager into a ramfs and mounted onto /lib/modules/2.6.XX-XX-generic/volatile) - why doesn't dpkg know??? (I guess since they're dynamic dpkg would need some more dynamic DB of such files...) Also the nvidia.ko, nvidia_new.ko, nvidia_legacy.ko are loaded by the shell script /sbin/lrm-video (called from /etc/modprobe.d/lrm-video) based on [dot]trigger files in /lib/linux-restricted-modules/ e.g. .nvidia_new_installed
S:[1jun07] Trac setup info
Macros stored at global location: /usr/share/trac/wiki-macros/. Set up tools versions in admin webGUI - versions.
S:20mar07] oprofile-0.9.2 (using LAPIC) on an Athlon running 2.6.19 complains: "/dev/oprofile/0/enabled: No such file or directory... "
Apply the patch from here - it seems to be related to compiling your kernel without CONFIG_ACPI.
S:[19feb07] How do I get two different versions of cygwin to run - complaints of "This problem is probably due to using incompatible versions of the cygwin DLL."
Make sure cygserver.exe isn't running and/or try runaming other cygwin1.dll's on the system.
S:[15feb07] On a Cisco how do I run commands from the EXEC mode (like show, ping etc) when in configuration (configure terminal) mode?
Use do show whatever_u_want_show e.g. To show ip interfaces whilst in config mode use:
do show ip intSee for Cisco tutorials: Cisco, joshgentry.
S:[13feb07] I want to move cgywin from c:\ to D:\.
You need to change C: for D: in the .bat files in the cygwin dir, then you need go and change C: to D: in the PATH - usually by going to the System control panel- Advanced- Environment. Then you start a bash shell (where it will complain of missing /tmp) and run
mount -mand copy and past the lines with C: replacing with D: and hit enter for each one - you can verify the correct mount confg is there if you rerun mount -m. It should then work again. These mount points are stored in the registry at: HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2
S:[11jan07] When trying to debug using GDB I don't see my all my 'local variables' when I do info locals. Also gdb seems to jump around a bit wierdly when I try to follow the source code.
Alot of these problems are caused by the compiler optimising the code such that it is different to the actual src code - though uktimately (hopefully!) acheieves the same goals. The compiler optimisation is a complex (and rather handy) task which usually speeds up the code but can change the order and existence of certain parts of the code when in binary form. There's a good post on it here. You should also, of course, be looking at the gdb manual. There's some nice stuff in there - I rather like the text mode source window (who needs a GUI?!) - the GDB Text User Interface (TUI).
S:[4nov06] Dell D610 laptop with a Broadcom BCM5751 using the tg3 driver in linux-2.6.18-rc5 (and 2.6.16) reports:
tg3: eth1: Link is down.
When it's plugged in to my WLAN router box. It seems that the the WLAN router is a bit dodgy at the link layer but the BCM5751 does work in WinXP. The autonegotiation doesn't always seem to work. (However the tg3 driver seems to report Link up when plugged into other kit). Anyway I discovered that there's a potential bug in the TSO (TCP segmentation offload) tg3 implementation so by switching it and autonegotiation off one can get it to work. Do the following:
ethtool -K your_eth tso off; ethtool -s your_eth autoneg offPS: Here's the FreeBSD driver src - maybe useful if someone can fix this...
ethtool -s your_eth speed your_net_speed; ethtool -s your_eth duplex your_net_duplex;
S:[28oct06] Windows file sharing complains: logon failure: the user has not been granted the requested logon" (from the client) and I can't fine the 'Security' tab in the properties windows to change stuff (on the server).
First one needs to switch off 'simple file sharing' from Explorer in "Tools" menu - "Folder Options" - "View". The you go to "Sharing" tab in the shared directory Properties and change the 'Permissions' so that the users you want can access the share. Also make sure the user is (or is a member of a group) in Local Security Policy tool (Admin Tools) under "User Right Assignment" for "Access this computer from the network". Note that the Everyone group doesn't provide full access for Everyone - it seems to provide 'guest' access, which isn't sufficient in the case of User's docs directories.
S:[16aug06] The [GNU] linker "ld" doesn't find my libraries (e.g. -lX11 or libX11.so) from the default search path?
The linker has built-in search paths which you can display when you run ld with -verbose flag (i.e. "ld -verbose") - look out for SEARCH_DIR entries. The default search path is dependent on the configuration of ld (build time and runtime) - on such things as the "emulation" - set using the -m arg. On alot systems /usr/lib/libc.so actually contains additional ld configuration (see "info ld" for more info on this config), as can /usr/lib/ldscripts or /usr/your-arch-here/lib/ldscripts/. In fact a number of files in the /usr/lib dir contain non-library data - particularly files generated by libtool.
Generally though the simplest solution to persuading ld to find your librarys is just add "-L/path/to/your/lib" to the ld command line - either directly or using the LDFLAGS environment variable (used by such things as configure etc). It appears that different flavours of UNIX do slightly different things with their libraries - so they're not always in the same place - so you need add additional search paths if your library isn't in one of the standard/default locations (e.g. /usr/lib).
S:[2aug06] I don't want my password displayed (on the web or lpstat -v) when I use the cups beh with cups and samba (smb).
Apply this patch to the cups-1.1.23 sources (others may work too), and the beh entries will no longer contain your password.
S:[24jul06] Getting crashes on [Fedora] Linux with messages like: GdkPixbuf-CRITICAL **: gdk_pixbuf_get_height: assertion `pixbuf != NULL' failed
Try regenerating : /usr/bin/gtk-query-immodules-2.0-32 > /etc/gtk-2.0/i386-redhat-linux-gnu/gtk.immodules
gdk-pixbuf-query-loaders-32 > /etc/gtk-2.0/i386-redhat-linux-gnu/gdk-pixbuf.loaders
S:[17jul06] Running configure in msys with mingw in Windows crashes with rxvt00000b84 The NTVDM CPU has encountered an illegal instruction
Make sure that cygwin\bin is after mingw\bin in your msys PATH - change in .profile.
S:[26jun06] Gentoo tweaks
en_US/ISO-8859-1 en_US.UTF-8/UTF-8 en_GB/ISO-8859-1 en_GB.UTF-8/UTF-8and /etc/env.d/02locale - so it contains:
S:[16jun06] Trac stuff
S:[11may06] Setting up sudo (1.6.8_p9-r2) with LDAP (fedora-ds 1.0.1) using groups
Following the info on the sudo site is useful, however I couldn't get fedora-ds to use the imported suggested schema without crashing so I had to manually enter it into fedora-ds. Initially I also had problems with using sudo with LDAP at all - it kept giving an error: "sudo: uid xxx does not exist in the passwd file!" (where xxx is my ID) - We are using LDAPS and although LDAPS worked fine for standard PAM based authentication (for ssh etc), sudo wouldn't work till I'd included the "ssl on" option into the ldap.conf.sudo file (which I have softlinked to /etc/ldap.conf and /etc/openldap.conf and also for /etc/libnss-ldap.conf - u can just use one file for all). See here, and rfc2307 for info on PADL's PAM NSS/LDAP setup.
To get groups working you firstly need to have a unixgroup setup on the LDAP server using an objectclass posixGroup entry containing a number of memberuid (or uniquemember) attributes. Then to set up the Sudo control using a group you firstly need to create an OrganisationalUnit with objectclass sudorole with canomicalname (eg Sudoers) which needs to be referred to in the sudoers_base entry in the ldap.conf.sudo file. Then you create child entries of it (also with objectclass: sudorole) to create sudo rules. For unixgroups you create an attribute sudouser: %groupname plus any other options like sudohost etc. Remember that unixgroup membership (using LDAP or files) of a user only changes when they login/logout. See here for info on setting up netgroups on fedora-ds - for which one uses the "+" prefix according to rfc2307.
Note "ssl start_tls" in /etc/ldap.conf for apache LDAP auth seems to crash apache 2.0.55. Have to use "ssl on" and ldaps: notation.
Q:[9Apr06] I'm getting this error in Visual Studio 2003 / vc6: Project Build Error PRJ0002 2003 custom build?
A: Basically it indicates there's an error with the custon build script (but it can also indicate problems with executing cmd.exe). Firstly maybe there is a problem with your custom build script? Or maybe something (e.g. Flyakiteosx) has added a special registry key : HKEY_CURRENT_USER\Software\Microsoft\Command Processor\autorun - if that's the case try deleting it. Also check to see if your environment variable comspec has any odd looking additions - and get try getting rid of them.
Q:[20Mar06] Will 64-bit CPU's run 32-bit applications and/or OS (windows, linux etc) ?
A: Yes. Well most of today's 64-bit CPU's operate in one of two modes
- "Legacy Mode" Which runs existing 32-bit stuff - so existing stuff will just run in Legacy Mode
- "Long Mode" Which provides access to new 64-bit features
See Wikipedia's section on 64-bit.
S:[14jun05] Handy stuff(packages) to run on a gentoo box:
Q:[21jun05] Winxp SP2 firewall breaks printing to samba
A: You need to enable "File and Printer Sharing" in the firewall exceptions, plus you need to check that the "Scope" each of the ports are appropriate for your network - it seems u need to add the exact hostname as adding networks(e.g. 10.10.0.0/255.255.0.0) doesn't quite work?
Q:[10mar05] Trying to create gentoo ebuild and make digest and get: "aux_get(): ebuild path for ...." error.
A: Is your new ebuild in the right directory heirarchy? ie:
localportage.d/mypackage-category/mynewpackage/mynewpackage-0.1.ebuildYou need to create a separate package category directory AND and a newpackage directory, where your new ebuild is then stored (and visible to emerge by setting the PORTDIR_OVERLAY environment variable pointing at the root of it).
Q:[30nov04 updated 9aug07] smbfs and smbclient behave differently with symlinks (soft links)
A: Basically samba provides clients with two ways of resolving symlinks. Firstly it can now use what are called 'unix extensions' to SMB/CIFS which allow clients that understand unix symlinks to use them as normal soft/sym links. Secondly for clients, such as Windows, which don't understand symlinks these maybe resolved by the server. It's a bit confusing if you have some machines using windows and other on linux attached to the samba exported filestore when following symlinks on the server filesystem. You're probably trying to attach to a samba server running with smb.conf configured in the following way:
unix extensions = yes follow symlinks = yesThe easiest way to have the same behaviour (on all clients) is to just turn off 'unix extensions' (i.e. unix extensions = no). However if you're just a client (i.e. unable to modify the server config directly) or you want both UNIX style symlinks on some client systems and not on others then you need to modify the smbfs kernel module on the machines that want to be able to 'follow links on server' (ala windows). The problem lies in the fact that smbfs' default mode of operation is to use unix capable stuff if it's available.
Here's a nasty (but simple) hack: Modify /usr/src/linux/include/linux/smb_fs.h so that #define SMB_CAP_UNIX is defined as 0x00000000 instead of 0x00800000. Rebuild the smbfs module and install.
[9aug07]It is much easier (i.e. echo "0" > /proc/fs/cifs/LinuxExtensionsEnabled ) in the newer Cifs client.
Q: [20May04, updated 11 Jun 05] My Dell Laptop (e.g. Latitude LS PP01S) crashes / hangs with ALSA Neomagic 256AV driver nm256:
A: Update:For newer kernels there's a module parameter (called
reset_workaround) for the nm256 module which may allow you to make it work.
In the older kernels(2.4.2x) there was flag called chip->latitude_workaround which wasn't being activated for all Dell Laptops as it has a rather narrow check at /usr/src/your-kerenel-here/sound/pci/nm256/nm256.c:1540
It seems that if one sets the flag to zero then the workaround works?! So go to /usr/src/your-kerenel-here/sound/pci/nm256/nm256.c:1537
chip->latitude_workaround = 1;
and change it so the default is zero:
chip->latitude_workaround = 0;The rebuild the module, run modules_install and it hopefully should work!
Q: Electric Fence 2.2.0 on FreeBSD 4.5. When run it says
"ElectricFence Exiting: mmap() failed: Cannot allocate memory"
A: Increase perprocess mmap memory using sysctl vm.max_proc_mmap. See: http://spitfire.velocet.net/pipermail/freebsd-hackers/2002-March/018224.html
Q: Windows XP peer-to-peer update (Q810007) ipv6 multicast:
A: The peer-to-peer update is used by, amongst other things, M$' threedegrees IPv6 P2P app. However this 'update' makes WinXP unable to receive multicast ipv6 (i.e. Gives it back the pre-SP1 functionality). I'm not sure if this problem is dependent on when Q810007 is installed. This is because it installs an IPv6 firewall and switches it on - The firewall can be controlled thruough the netsh command. See ipv6 FAQ on UCL multimedia tools site.
Q: Undeleteing files/directories on Linux ext2
A: Use debugfs /dev/hda1 (for example). Then issue the lsdel command
debugfs shell. Then use cat
Q: Visual Studio .NET: When attempting to convert an old VB project to .NET one it complains:Upgrade failed: Exception occured: The referenced component CommonDialog is missing a design time license
A: See Knowledge base article: 318597 "PRB: Errors When You Use Visual Basic 6.0 Controls in Visual Studio .NET". You either need to install VB6.0 or you can update the registry using a file on one of your CD's (see KB article): Extras\VB6 Controls\vb6controls.reg
Q: 3oct03: openssh sshd replies : "Permission denied, please try again.", after attempting password login.
A: Make sure "PasswordAuthentication yes" is set in your sshd config file. Does your machine use PAM? (then check PAM setup). Your openssh may not be compiled to support PAM in which case does your machine use MD5 hashed passwords? (Hint: look in /etc/passwd or /etc/shadow and see if the password hashes are rather long and begin something like"$1$i..."). In that case try recompiling openssh with MD5 support (this is also good for standard linux installs): ./configure --prefix=/usr --sysconfdir=/etc/ssh --enable-ipv6 --with-md5-passwords . Thanks to SSH FAQ
Q: Can't debug threads - signal SIG32
A: Try adding the following to your ~/.gdbinit
handle SIG32 nostop noprint
Also you might want to recompile glibc with -nostrip
Q: smbfs and smbclient behave differently with symlinks (soft links)
A: Try adding the following to your ~/.gdbinit
handle SIG32 nostop noprint
Also you might want to recompile glibc with -nostrip