[131023500010] |File sharing with Windows [131023500020] |I have a small home network consisting of two computers. [131023500030] |One is running Windows 7 and the other Ubuntu 10.04. [131023500040] |Neither computer is permanently on. [131023500050] |I am trying to set up file sharing between the two. [131023500060] |Ideally the Windows files will be mounted whenever the Windows machine is on, and unmounted when it is not. [131023500070] |Currently I have added an entry to /etc/fstab to mount the share. [131023500080] |This appears to vaguely work. [131023500090] |However, I have noticed that it takes considerably longer to login to the Ubuntu computer if the Windows computer is not turned on. [131023500100] |It exhibits bizarre behaviours if the Windows machine is not turned on, including not being able to interact with the desktop. [131023500110] |Is there a way to remove this delay, or should I set up the share in a different way? [131023510010] |Isn't simpler to mount-as-needed? [131023510020] |Most applications does not deal with appearing/disappearing mountpoints and mounting in Gnome/Ubuntu/... [131023510030] |Windows Share is as easy as filling several fields in dialog box. [131023520010] |You could use autofs to mount the share only when it's needed. [131023520020] |There is even some documentation for Ubuntu about this. [131023530010] |In the Gnome file manager Nautilus you can directly access windows shares like this: Hit Ctrl+L so that the Location buttons turn into an edit filed. [131023530020] |There you write smb://192.168.1.1 and hit enter. [131023530030] |(Replace 192.168.1.1 with IP or hostname of your Windows computer.) [131023530040] |It should ask for your windows Password and then show all shares. [131023530050] |For accessing your Linux files from Windows, you can use WinSCP. [131023540010] |how to convert ^I character [131023540020] |I have a text file like this: [131023540030] |In which when I use cat -A display this: [131023540040] |How do I edit this so I'll get something like this instead: [131023550010] |if that pattern appears multiple times on a line, use the global option: [131023550020] |if you want to restrict it to certain lines, for example that start with "info": [131023550030] |You can use the -i option to edit the file in place: [131023550040] |If you don't do that you can do this equivalent operation [131023560010] |build script: how to implement a "skip previously completed step" [131023560020] |Hi, [131023560030] |I'm trying to create a build script for GCC (which works, for now), but I would like to be able to skip rebuilding all the prereq libraries when I'm only updating GCC/binutils for example. [131023560040] |I thought of making the script create a file in the main build directory containing all the steps to skip. [131023560050] |How would I do that (something with the cat command and find to see if a step is in the file?). [131023560060] |This would allow me, albeit manually, to enable a rebuild of certain parts when needed. [131023560070] |UPDATE: The answers posted seem to assume that I need a makefile, while I find that very troublesome and don't want it; the build procedure consists of many cd, configure, make, make install steps that I simply don't want in a makefile. [131023560080] |The script is near-finished, this is the last step I need for it... [131023560090] |UPDATE2: as I said in the comment below, I'm on windows, using MSYS bash as shell. [131023560100] |Thanks! [131023560110] |PS: this "skipping completed steps" needs to be performed each time the script is run. [131023570010] |It sounds like you need an introduction to make, produced by our friends over at GNU, I believe. [131023570020] |Make can look at a bunch of intermediate files and determine which ones need to be recompiled. [131023570030] |And based on which one(s) of those, also figure out which ones need their supporting files rebuilt, thus recursing. [131023570040] |You will need to set it up in advance by creating a Makefile, but this is something which it sounds like you are willing to do. [131023570050] |For more information, I would check out this URL: http://www.gnu.org/software/make/. [131023570060] |Actually, bullet point number 2 sounds like it does a better job of describing it than anything I could do. [131023580010] |You might want to look into CMake. [131023580020] |For what you've described, it's probably overkill and make would be a better fit, but if you start getting into the autotools stuff, it could make your life a lot easier. [131023590010] |So, it looks like you're not really asking a question around build frameworks, but rather a specific question about how to determine if a certain line exists in a text file? [131023590020] |If you want to find out if the string foo exists in a file, then: [131023590030] |should do the trick. [131023600010] |How do I count the number of occurrences of a word in a text file with the command line? [131023600020] |I have a large JSON file that is on one line, and I want to use the command line to be able to count the number of occurrences of a word in the file. [131023600030] |How can I do that? [131023610010] |If it is not guaranteed that there are spaces between the words, you have to use some other character (as delimiter) to replace. [131023610020] |For example alternative tr parts are: [131023610030] |or [131023610040] |If you want to replace double or single quotes. [131023620010] |With GNU grep, grep -o '\' | wc -l works. (\< asserts the start of a word and \> asserts the end of a word (similar to Perl's \b), so this ensures that you're not matching a string in the middle of a word.) [131023620020] |For example, [131023630010] |How can I simulate keyboard shortcuts in a bash alias? [131023630020] |For example, one of my bash aliases is this [131023630030] |clear also clears the history which I don't want. [131023630040] |I just want to clear the screen momentarily. [131023630050] |Ctrl+L however does exactly what I want. [131023630060] |How can I use it in my alias? [131023640010] |What you've asked for in general is called executing a readline command from bash (the equivalent of zle -U $key_sequence or zle $widget $arguments[@] in zsh). [131023640020] |As far as as I know, this is not possible in bash. [131023640030] |However, in this specific case, I don't observe any difference between running clear and typing Ctrl+L (readline command clear-screen). [131023650010] |If clear is clearing history and the terminal there must be a function, alias or script that is doing that. [131023650020] |See what type -a clear tells you. [131023650030] |Another way to clear the terminal is to use tput clear which does exactly the same thing as what clear is supposed to do. [131023650040] |You can also try doing it directly using the escape sequence (for xterm for example), but it may be different for different terminals (it should work for any that emulate xterm, such as gnome-terminal, PuTTY, etc.): printf '\e[H\e[2J' [131023660010] |How do I install GCC on a system with no compiler? [131023660020] |I've been messing around with my NAS which runs on Linux. [131023660030] |I have root access, but there is no compiler. [131023660040] |I seem to remember something about being able to compile on another system, but I'm not certain. [131023670010] |Maybe your platform is included in http://gcc.gnu.org/install/binaries.html [131023680010] |Cross-compiling may be the solution for you It allows you to compile executables for one architecture on a system of a different architecture. [131023680020] |Here's an introduction [131023690010] |Maybe there is a binary distribution available for your NAS? [131023690020] |For example there are binary packages available for DNS323, not to mention that you can install Debian on it. [131023700010] |A distro without a package for GCC would be extraordinarily unlikely! [131023700020] |You should not have to compile it, in other words, you can just use a package manager. [131023710010] |pgrep and pkill alternatives on mac os x? [131023710020] |Are there alternatives to pgrep and pkill commands on Mac OS X or should I just create aliases for them using other commands available for me? [131023720010] |following should help for pgrep [131023720020] |poor-mans-pgrep-on-mac-os-x [131023730010] |Assuming that you are using some relatively recent version of Bash in the Mac, you could write your own version of pgrep as function and then add that to your .bashrc file: [131023730020] |as for pkill you can use the following: [131023740010] |Proctools includes pgrep and pkill and is available for OpenBSD and OSX. [131023740020] |It hasn't been updated in a while, but it should still work (at least on OSX which rarely modifies its ABI). [131023750010] |You could use MacPorts: sudo port install proctools [131023750020] |Here's the result of port search pgrep: [131023760010] |Capturing OS/hardware communication / reverse engineering drivers [131023760020] |This may be too broad of a question, but I'm not really sure what exactly I'm looking for. [131023760030] |My main question is how the open source community reverse engineers windows drivers (for say, video cards) to re-write them under linux. [131023760040] |I'm an EE graduate, so I've taken courses in microprocessor design and such, assembly, C for embedded systems, and I've worked on embedded linux. [131023760050] |But I feel like I'm missing something when trying to understand how drivers are written for linux without an API from the hardware manufacturer. [131023760060] |What leads to my question is that on some new laptops, they come with dual video cards. [131023760070] |Both an integrated one and a discrete one. [131023760080] |There's driver software that allows switching between the 2 in windows, but as far as I know, there's no either open source or proprietary drivers. [131023760090] |Obviously I'm not asking something stupid like "omg how do I write that msyelf". [131023760100] |But it did make me realize that I've always wondered the process of getting hardware support on linux. [131023760110] |Links to resources are fine, I don't expect a tutorial on driver development in an answer. [131023760120] |But at least I need to be pointed in the right direction. [131023770010] |There are of course a lot of possibilities. [131023770020] |For example if it is an USB device you could monitor the USB traffic between the device/compute on a system with driver support (analogous to tcpdump for network). [131023770030] |For example for Windows there are several USB monitor tools available (IIRC usbsnoop for example). [131023770040] |In the case of a USB scanner you could e.g. generate a trace with the default settings, then change one setting, generate another trace, compare them and figure out what changed and so on. [131023770050] |Analogous to that you could trace stuff for SCSI, Firewire etc. devices. [131023770060] |Then you could try to dis-assemble/debug a proprietary driver (for example with IDA pro). [131023770070] |Or you could execute Windows in a virtual machine or emulator (e.g. qemu) and use breakpoints and inspect the hardware state before/after driver calls. [131023770080] |Analogous to that you could observe to what registers or something like that a driver writes/reads. [131023780010] |Default mark for packets using iptables [131023780020] |I am trying to set up a QOS script on my Tomato-enabled WRT54G router. [131023780030] |The script does the basics of what I need (make sure that a particular machine on my network has lower priority than anything else), but I am not satisfied with the fact that I had to define a specific rule for the outgoing traffic from all other machines instead of using some 'default' behavior. [131023780040] |Specifically, I would like to get rid of the two lines that mark packets with marks 11 and 12. [131023780050] |I tried to just remove them (adding a 'default 12') at the creation of the qdisk, but throughput dropped down dramatically. [131023780060] |I also tried to mark all packets with either [131023780070] |or [131023780080] |as the first or last filtering rules, but this did not work either. [131023780090] |Here is the complete script... [131023790010] |I was able to declare a 'default action' by adding a first rule that matches every packet. [131023790020] |It seems that the 'mangle' table does not act like the others, and tries to match every rule instead of stopping at the first matching rule. [131023790030] |This makes sense because one may want to do several modifications to the same packet... [131023800010] |How to reset Linux root and grub passwords? [131023800020] |If we forget our Linux root password, we can change it by changing grub's boot options. [131023800030] |But in this case, we also set a grub password and forgot both passwords. [131023800040] |How can we recover both? [131023810010] |Boot from a LiveCD, then mount the / harddrive partition. [131023810020] |You can now "chroot" into your harddrive and just run "passwd" as root there changing the root pw. [131023810030] |That's also the way to change to grub password. [131023820010] |complicated bonding and network question (HARD ONE) [131023820020] |I am not a network guy and would like to know how can I setup the below two configurations and their pros and cons: [131023820030] |
  • Networking component: --
  • [131023820040] |
  • WAN: Cisco 2970 * 1
  • [131023820050] |
  • Load balancer: F5 switch 1600 * 2
  • [131023820060] |
  • Private subnet: Cisco 2950 * 2
  • [131023820070] |My situation is like that, my F5 switch 1600 will connect to Cisco 2970 upstream to the public (WAN) and all my host will connect to the pair of Cisco 2950 private lan which then interconnect to the pair of F5 switch 1600 providing load balancing as well as fault tolerance function. [131023820080] |All of my host equip with two ethernet interface (most of them are using broadcom 5700) and they will team up and each interface will connect to one cisco switch so as to privide fault tolerate as well as link aggregation. [131023820090] |My question is, how can I config my equipment (Cisco 2970, F5 switch 1600, Cisco 2950 as well as my host) physically (cabling) and logically (system configuration?), and what are their pros and cons? [131023820100] |
  • Host using balance-ALB.
  • [131023820110] |
  • Host using 802.3ad.
  • [131023830010] |Is it possible to use pendrive as key for Linux system [131023830020] |I want to give high security for my linux box. [131023830030] |So i planed to use my pen drive as key for my linux box. [131023830040] |How can i do it ? [131023840010] |If you mean to use a pendrive to decrypt and encrypt your harddrive, yes that is possible and actually not that complex. [131023840020] |You can find full documentation at this Gentoo Wiki article (applies to other distributions as well) [131023850010] |Additionally you can authenticate by usb device (including one time pads and any mix with other PAM modules of course). [131023850020] |As tante said you can also store keys to harddrive on usb device. [131023860010] |Alternatively, check out the Yubikey concept, from Yubico. [131023860020] |Pretty nice. [131023860030] |I used to use pam_usb, like Maciej suggests, but the project's last release is three years old. [131023870010] |You can put your whole Linux system on a 64G or 128G pendrive and boot from it. [131023870020] |Your Linux box will be as secure as your pocket. [131023880010] |`$XAUTHORITY` appears from 'nowhere' on su+tmux [131023880020] |When I switched from su+bash to su+tmux+zsh I noticed that I get $XAUTHORITY variable defined as /root/.xauthXXXXXX where XXXXXX are 6 random alphanumeric characters. [131023880030] |With previous configuration X worked with root flowlessly but now I need to copy ~username/.Xauthority to $XAUTHORITY. [131023880040] |Variable is nowhere defined (I checked .zshrc, /etc/profile*, /etc/profile.d/* etc.). [131023880050] |Edit: [131023880060] |su is aliased to su - toor and it opens tmux as shell. toor is an alias of root with different shell. [131023880070] |PS. [131023880080] |I just discovered that it appears on normal su as well. [131023880090] |It did not some time ago... [131023880100] |Edit 2 set-enviroment didn't help either [131023880110] |Edit 3 xhost +localhost did not helped but xhost + (disabling all control) DID helped. [131023890010] |Here's what I think is happening. [131023890020] |When you're using su and bash, the su-session inherits the environment with the exception of USER, HOME and SHELL, thus XAUTHORITY still points to ~username/.Xauthority and everything is fine. [131023890030] |However (from the man page), when the tmux server is started: [131023890040] |... tmux copies the environment into the global environment; in addition, each session has a session environment. [131023890050] |When a window is created, the session and global environments are merged with the session environment overriding any variable present in both. [131023890060] |and I suspect (without knowing invocation details) that when you switch credentials, su tries to find .Xauthority in /root and since it can't find one when you need to run an X app, it creates one. [131023890070] |I can think of a couple ways you can try to fix this: [131023890080] |
  • Invoke su by using su -. [131023890090] |This will copy over the real user's evironment
  • [131023890100] |
  • Add set-environment to your tmux config.
  • [131023890110] |Unfortunately, I can't test this since I recently switched over to i3 (which is awesome) and I don't have a spare machine. [131023900010] |This could be due to a misconfigured pam_xauth PAM module. [131023900020] |It is supposed to copy your keys to a temporary file when you run su. [131023900030] |The behavior you describe is consistent with pam_xauth creating the temporary file but somehow not copying the keys (perhaps because you have a ~/.xauth/export or a /root/.xauth/import). [131023910010] |How do I merge two *.avi files into one [131023910020] |I have two *.avi files: [131023910030] |How do I merge these two files using a command-line or GUI? [131023920010] |There's a dedicated tool to do this, avimerge: [131023930010] |Easy with mencoder (shipped with mplayer in Arch Linux): [131023940010] |Avidemux can paste two videos together, at least if they have the same resolution and a few other constraints. [131023940020] |Use “Append” from the “File” menu. [131023950010] |You can merge avi files with avimerge from Transcode package: [131023950020] |I know that it isn't GUI tool, but to have GUI you could use that script: [131023950030] |It uses kdialog so it's for KDE users, GNOME users should modify it to use Zenity... [131023960010] |How do I put a hat on 'e' (ê)? [131023960020] |Since I've migrated to linux a few years ago, one issue still remains. [131023960030] |The ê character features a lot in my "moeder taal" (home language). [131023960040] |In Windows making the character was easy, I simply had to type Alt-136 and voila! [131023960050] |Is there a simplistic way in linux/unix to access special characters? [131023960060] |I'd like to be able to type an ê anywhere on my (or any other) system, not only in the DE, but on the command-line as well. [131023970010] |Press Ctrl+Shift+U and an underlined U will appear. [131023970020] |Next to it type in EA, which equals ê. [131023970030] |Found the info here [131023980010] |In the terminal you can type Compose e ^. [131023980020] |On a Windows keyboard Compose is the Menu key to the right of the right-side Windows key. [131023980030] |Wikipedia entry: Compose key [131023990010] |May be I'm not understanding something but why don't you simply install the US_intl keyboard layout and you'll have all accents available to all letters (possible) (and on windows too) and you make ê pressing ^ and e. ^ is on shift-6 on us keyboards, no idea on moeder taal keyboard! [131024000010] |How do I get a mapping of Pid to Port? [131024000020] |I have a process which I need to run on a specific port. [131024000030] |I have started some other process on that port and I need to kill it. [131024000040] |Unfortunately, I don't remember the name/pid of the other process so I need a quick way to find which PID are associated with it. [131024000050] |I tried lsof -i :7080 but that returned nothing. [131024000060] |I can telnet localhost 7080 so I know its running. [131024000070] |For reference I'm running RHEL5 [131024010010] |Try: [131024020010] |In FreeBSD: [131024020020] |for IPV6 [131024030010] |How do I merge two *.srt files [131024030020] |Please see this question. [131024030030] |I have just merged two avi files cd1.avi and cd1.avi into movie.avi using: [131024030040] |Problem is that I had to subtitle files linked to the first avi files: [131024030050] |At first I tried simply to concatenate the files together: [131024030060] |But that caused havoc with the subtitles... any suggestions? [131024040010] |This is pretty trivially done, since .srt files are just text files that contain time stamps -- all you need to do is add the length of cd1.avi to the times of all the subtitles in cd2.srt. [131024040020] |You can find the length of cd1.avi with ffmpeg: [131024040030] |And then add that to cd2.srt using srttool [131024040040] |or: [131024040050] |Then you should just be able to concatenate the files together and renumber: [131024040060] |I picked srttool because in Arch it comes with transcode, which you installed for this question; there are lots of other tools that can shift and merge .srt files too, and at least one website, submerge [131024050010] |ls'ing through an entire directory tree to produce one pipeable list of files [131024050020] |This might have been answered already. [131024050030] |But I wasn't able to find it. [131024050040] |I have: [131024050050] |each directory and subdirectory contains files. [131024050060] |I want to list them all, pipe the list to cat, and cat the list to a text file. [131024050070] |Can this be done with a 'one liner'? [131024050080] |If so, please provide it. [131024050090] |Or does it require a script and, if so, what commands/structures will I need to write the script? [131024060010] |I think that your best bet is the find command. [131024060020] |If you want just the files and not the directories in your list, something like this: [131024060030] |The find command will recursively list the files. [131024060040] |(If you want the directories listed too, remove the -type f). [131024060050] |The >textfile redirects stdout to a file named textfile with no need for cat. [131024060060] |find is a powerful tool with many options. [131024060070] |See man find if you find that you need to tweak the output slightly. [131024060080] |UPDATE (thanks gvkv): [131024060090] |If you want to put the contents of the files into a single text file, then one way to do it is: [131024070010] |find is the generic way, as Steven D's answer explains. [131024070020] |If your shell supports it, ** can be used to match any number of subdirectories (on bash it's the same as * and only matches one by default, but see Dennis' comment), so you can just do: [131024080010] |CentOS: List the installed RPMs by date of installation/update? [131024080020] |I'm on a CentOS 4 machine. [131024080030] |I updated and installed some packages a few weeks back, but I don't remember the name of every package or the names of every dependency. [131024080040] |I used yum. [131024080050] |Can I list the packages on my system by the date they were last installed or updated? [131024090010] |This should work on any RPM based machine: [131024090020] |(To get a list of all possible tags, use rpm --querytags.) [131024100010] |Error when using stat, errno=2 [131024100020] |The case is as this, I create many files, and after the file generation, I use stat to get the all files info under the directory. [131024100030] |The purpose is to purge all the files which are old than the specific days. [131024100040] |But I got a ERROR after the file generation. [131024100050] |The code is like this: [131024100060] |I got a ERROR during this line: [131024100070] |The errno is 2, No such file or directory. [131024100080] |But I checked file, it does exit, and I flush the stream after the file writing. [131024100090] |Any one knows the cause? [131024100100] |Thanks. [131024110010] |I guess you just forgot to strcat-prepend the outputDir before your fileName. [131024120010] |Why does /var/log/wtmp becomes so huge? How to inspect wtmp files? [131024120020] |Just noticed some 640MB wtmp file in a virtual container (Ubuntu Hardy). [131024120030] |logrotate was not installed (I just did that and forced rotating). [131024120040] |Are there records in there not being displayed by last (which should show the last 1000 entries, but apparently there are only 384). [131024120050] |From quickly skimming the wtmp/utmp man page, it does not look like a single entry should use about 1,6MB. [131024120060] |Is there another program besides last to inspect these files? [131024130010] |logrotate was a good idea. [131024130020] |Like any regular file, wtmp could have been "sparse" (cf. lseek(2) "holes" and ls -s) which can show a extreme file size that actually occupies little disk. [131024130030] |How did the hole get there, if it was a hole? getty(8) and friends could have had a bug. [131024130040] |Or a system crash and fsck repair could have caused it. [131024130050] |If you are looking to see the raw contents of wtmp, od or hd are good for peeking at binaries and have the happy side effect of showing long runs of empty as such. [131024130060] |Unless it recurs, I wouldn't give it much more thought. [131024130070] |A marginally competent intruder would do a better job than that, the contents aren't all that interesting, and little depends on them. [131024140010] |Problem with graphics [131024140020] |I'm using internal VGA these days and I've got a problem: [131024140030] |I can't run any games. [131024140040] |I always get this errors: [131024140050] |My motherboard is K8S-MX and I'm using linux 10.04 Do you know how can I fix it? [131024150010] |What is the Vendor of your graphics card? [131024150020] |It looks like you might not be using the right (or optimized) driver for it. [131024150030] |You can install "mesa-utils" and run "glxinfo" to get more details about the GLX extension on your machine, but since you seem to be using Ubuntu I'd suggest using the "Additional Drivers" thingy that you can find under "System->Administration->Additional Drivers" to try to let Ubuntu figure out whether you do for example need a binary driver for your card. [131024160010] |checking hardware on linux [131024160020] |How can I check what hardware do I have? (with bios version etc) [131024170010] |You can use 'lshw'. [131024170020] |Install it using 'sudo apt-get install lshw' on Debian and derivatives. [131024170030] |There's even a graphical version called lshw-gtk. [131024180010] |If your system supports a procfs, you can get much information of your running system. [131024180020] |Its an interface to the kernels data structures, so it will also contain information about your hardware. [131024180030] |For example to get details about the used CPU you could cat /proc/cpuinfo For more information you should see the man proc. [131024180040] |More hardware information can be obtained through the kernel ring buffer logmessages with dmesg. [131024180050] |For example this will give you a short summary of recently attached hardware and how it is integreated in the system. [131024180060] |These are some basic "interfaces" you will have on every distribution to obtain some hardware information. [131024180070] |Other 'small' tools to gather hardware information are: [131024180080] |
  • lspci - PCI Hardware
  • [131024180090] |
  • lsusb - USB Hardware
  • [131024180100] |Depending on your distribution you will also have access to one of these two tools to gather a detailed overview of your hardware configuration: [131024180110] |
  • lshw
  • [131024180120] |
  • hwinfo (SuSE specific but availible under other distributions also)
  • [131024180130] |The "gate" to your hardware is thorugh the "Desktop Management Interface" (-> DMI). [131024180140] |This framework will expose your system information to your software and is used by lshw for example. [131024180150] |A tool to interact directly with the DMI is dmidecode and availible on the most distributions as package. [131024180160] |It will come with biosdecode which shows you also the complete availbile BIOS informations. [131024190010] |To display a nice overview of my hardware, I use lshw -short, best run (as root). [131024190020] |You can just run lshw plain of course, but I prefer the conciseness that the -short option offers. [131024190030] |To check my HDD usage, I use df --human-readable, which should be available by default on your system (unlike lshw). [131024190040] |Also, have a look at checking hardware on linux. [131024200010] |This is highly variable between unix variants. [131024200020] |Check the column for your variant on the Rosetta Stone for Unix. [131024200030] |Under Linux, lshw collects a lot of information scattered in various text files under /proc and /sys. [131024210010] |for cpu info [131024210020] |cat /proc/cpuinfo [131024210030] |for disk usage [131024210040] |df -h [131024210050] |for pci cards and buses [131024210060] |lspci [131024210070] |you may find lshw useful [131024210080] |if you need usb devices [131024210090] |lsusb [131024220010] |Can I pipe /dev/video over ssh [131024220020] |I have two computers, a desktop in my office ( with a webcam attached ) and a laptop somewhere else on the network. [131024220030] |Usually I take a look at my office through my webcam by running [131024220040] |from my laptop. [131024220050] |I don't like Xforwarding mplayer, so why can't I tunnel /dev/video to my pc by running this on my laptop? [131024220060] |and then to watch the webcam ( on my laptop ) [131024230010] |I don't know if there's any reason you can't do it, but one problem I see with your implementation is that the remote system will look for /dev/video1 on its system, but won't be able to find it because you created it on your local system. [131024230020] |What I'd do is something along the following [131024230030] |and then try something by telling it to go to your local system's TCP port 12345. [131024240010] |The VideoLAN Project exists in large part to do just what you desire. [131024240020] |I've not used its streaming capabilities but in its single machine use it has shown to be rock solid for me. [131024250010] |Something like: [131024250020] |works for me (SOA#1) locally. [131024250030] |So does: [131024250040] |As well as [131024250050] |Hence: [131024250060] |
  • Try without named pipe
  • [131024250070] |
  • Check bandwidth
  • [131024250080] |Also - how does in not work (display black screen, complains about unknown device etc.)? [131024260010] |Looking for a complete TUI script for configuring date and networking of CentOS 5 [131024260020] |I'm looking for a script that allows complete configuration of a CentOS 5 system via TUI (no GUI, X, etc.). [131024260030] |I found system-config-network-tui but other than the fact it looks unprofessional (typos, bugs, etc.) I actually would like to find a script which supports the configuration of many other aspects (such as date/time, timezone, routing, etc.) [131024260040] |Is there anything available? [131024270010] |Did you try setuptool ? [131024270020] |Install it with yum install setuptool [131024280010] |Network printer needs to be manually enabled after reboot [131024280020] |I've recently installed Debian squeeze on a new machine, and decided to try out the default gnome setup rather than attempt to do everything myself. [131024280030] |I added a printer using System >Administration >Printing -- it found my network printer just fine. [131024280040] |However, when powering on the machine this printer is disabled. [131024280050] |I have to go to the same dialog as above, enter the root password and enable the printer manually before jobs will be accepted. [131024280060] |Any ideas on how to enable the printer automatically? [131024280070] |Note that it's quite possible the printer is turned on after the computer, if this makes a difference. [131024280080] |Either way it would be nice if the computer noticed when the printer was turned on. [131024290010] |Sounds like maybe the cups daemon is not running on start up. [131024290020] |That is what it was when I had similar issue. [131024290030] |You can check to see if it is running at start up. [131024290040] |As root run [131024290050] |if it is not running, then run [131024290060] |See if that changes in the printer dialog. [131024290070] |If that worked, to have cups run at startup [131024290080] |Just a thought, on my current system the daemon is listed as cups, but; if you try cups and it returns [131024290090] |cups: unrecognized service [131024290100] |you might try [131024290110] |cupsd in place of cups [131024300010] |I think this is the same problem as here: [131024300020] |http://serverfault.com/questions/135783/why-my-samba-printer-is-not-visible-after-boot-until-i-restart-smb [131024300030] |Samba comes before Cups, therefore it doesn't know that there are any printers. [131024310010] |How to implement conditional update of deb package [131024310020] |I am creating a deb package of a product which is part open source and part proprietary. [131024310030] |In order to reuse the built in functionality of some distributions like Ubuntu to monitor a list of repositories and update the package when a new version comes available I will probably create such a repository. [131024310040] |The problem is that the proprietary part of the package depends on licenses which are valid for a limited interval versions (valid for all the versions in a course of a year). [131024310050] |Which means that at some point of time when a new version is available it will be nice to at least warn the user that his license will not be valid for the new version. [131024310060] |Is there a way to do that check and interact with the user? [131024310070] |I see that there are scripts in the deb package itself that can be executed before installation, but I have no idea if they can interact with the user and abort the package installation. [131024310080] |Any suggestions on how such a functionality can be created are appreciated. [131024320010] |If this is possible or not depends on the package management of the specific linux distribution. [131024320020] |Usually you can include your own scripts which are called pre/post installation of the package. [131024320030] |See the Debian Policy Manual - Chapter 6 Package maintainer scripts for example. [131024320040] |Anyway, every user with a little bit of experience will be able to bypass this "protection". [131024320050] |If you really want to include such kind of protection (which IMHO is useless and will do more harm then good) do it in the binary of the file. [131024330010] |What you want is debconf. [131024330020] |See http://www.fifi.org/doc/debconf-doc/tutorial.html [131024340010] |You could set up and remove your repository by asking a debconf question and copying/removing a file to/from source.list.d if the answer is positive. [131024340020] |Users normally expect a high level of control on where we get updates from, and adding a source has security implications beyond the security of the current package, so make this easy to disable. [131024350010] |Unix & Linux pranks [131024350020] |Which harmless pranks do you know that would be great to play on your collegues? [131024360010] |I do not know if this qualifies as a prank, but you can watch StarWars on a shell ! [131024360020] |About it. [131024370010] |set DISPLAY variable to their PC name/IP. open debug (wdb) windows to someones PC and they are confused whats happing. [131024370020] |Of course their PC should have xwin running and xhost +. [131024380010] |I'm sure you'd be able to find more creative variants of ~/.bashrc pranks. [131024390010] |alias cd="eject -T" [131024390020] |In ~/.${shell}rc [131024390030] |Such fun :) [131024400010] |...I'm not sure about harmless, but I once set my roommate's default runlevel to 6. [131024400020] |That was an amusing afternoon (for me). [131024410010] |Not necessarily UNIX-specific, but I like modifying the /etc/hosts file: [131024410020] |et cetera, and then setting up Apache with an ErrorDocument 404 click_harder.html pointing to this page. [131024420010] |Warning: Its a fork bomb! [131024420020] |But you should try it once ; ) [131024420030] |A fork bomb is a process that clones (forks) itself, the clone then does the same, and those clones do the same, etc etc. [131024420040] |It grows exponentially until all system resources are consumed, and the system hangs. [131024420050] |It's a real nasty piece of work, and not a prank by any means. [131024430010] |Append this line to ~/.bashrc (assuming the default shell is bash) [131024430020] |No matter where the victim cd to, he/she will still end up in $HOME [131024430030] |From the bash man page: [131024440010] |My favorite is logging in to a nearby computer and playing cricket or frog sounds. [131024440020] |While working away in Miami FL, I had my whole family, back in Oregon, searching for a frog in the garage. [131024450010] |Back in school, in the CS lab (sun workstations at the time) I compiled mpg123 from source in my home directory (that was fun) and then whenever anyone would walk out of the lab (w/out locking their workstation), I would modify their .cshrc (the workstations default shell) to play "Imagine" by John Lennon whenever they logged in. [131024450020] |It amused me to no end hearing that song, playing ever so quietly (the workstations only had internal speakers) from all over the lab any time of day or night that I walked in. [131024460010] |Heres a harmless prank. [131024460020] |You will be surprised how many people dont know about the tty stop character. [131024460030] |So when your victim leaves his or her terminal, stop the terminal using Ctrl-S (thats what it generally is, stty -a would show you the key on that terminal). [131024460040] |And then when the victim comes back, he or she will be trying hard to get the terminal back to life... [131024460050] |And if you find someone who keeps leaving his terminal.... you are really in luck! [131024470010] |Way back when I was in university, working late night on a project on a Unix terminal (just a tty, not X Windows), all of a sudden messages like "Are you hungry?" [131024470020] |"Why are you still working?" [131024470030] |"Deadline is tomorrow, just give up &go to sleep!" started appearing on my screen. [131024470040] |Turns out a buddy was across the room, cat'ing or echo'ing to my terminal's device (/dev/pts/) -- the messages showed up directly on my terminal, without any kind of attribution (unlike write or wall). [131024470050] |These days systems are more locked down, I doubt it's as easy to find writeable terminal devices. [131024470060] |Unfortunately this was many many years ago, so I haven't tried it in a long time, maybe there is a different way to do it now. [131024480010] |I've used this re-direction script prank inside my office to turn browser images upside down. [131024480020] |You'd be amazed to see how people panic when they think they've acquired some type of virus. [131024480030] |You can also use the prank to make images blurry (you choose the degree of blurriness), pretty funny when you don't overdo it -- people think their eyes are tired or the monitor is wonky. [131024490010] |One I really like is to alias ls="sl" (requires sl installed, which may or may not be a problem). [131024490020] |For those not in the know, sl is a program that, being a common typo of ls, was created to train you out of typing sl. [131024490030] |It displays a rolling choo choo train, that you can't break out of with C-c or C-d (unless -e is passed). [131024490040] |You can even make it do different things with some parameters. [131024490050] |Per sl(6): [131024490060] |I don't recommend using -e if you're going to mess with your coworkers, but the rest have some serious laugh potential. [131024500010] |Install "sl". [131024500020] |Choo choo! http://www.tkl.iis.u-tokyo.ac.jp/~toyoda/index_e.html [131024500030] |"SL (Steam Locomotive) runs across your terminal when you type "sl" as you meant to type 'ls'. [131024500040] |It's just a joke command, and not usefull at all. [131024500050] |Put the binary to /usr/local/bin." [131024510010] |For emacs users, there's the nefariously evil broken-keyboard.el which makes the victim think their keyboard has weird problems. [131024520010] |Sometimes I'll ssh into my machine at home and spook my wife (or the cat) by playing a message over the speakers using festival text-to-speech. [131024530010] |Back in the days of terminal-only systems, I created a program that simulated the login program but just kept saying, "Login incorrect". [131024530020] |I then set it running on a colleague's terminal while he was at lunch. [131024530030] |When he came back, he got really confused and panicked wondering if his password had changed or something, and actually called me over to ask me to help him with the problem. [131024530040] |I started to make all sorts of plausible-sounding but useless suggestions for things he might try, and was able to get away with sounding completely innocent for several minutes, until finally he smelled a rat when I ran out of reasonable suggestions and started saying some truly outlandish things! [131024530050] |We then had a good laugh over it together. [131024540010] |This one works great on Windows, but can be applied to KDE or Gnome as well: [131024540020] |
  • Open some programs, just so it looks like a normal work session
  • [131024540030] |
  • Make a screenshot of the whole desktop with all apps running
  • [131024540040] |
  • Set all panels (or under windows the start bar) to hidden
  • [131024540050] |
  • Move all Desktop icons to a folder outside the desktop
  • [131024540060] |
  • Set the screenshot as desktop background image
  • [131024540070] |It will look as if the computer completely hangs, however in fact it is working perfectly well. [131024540080] |If you are especially mean, you might have in the screenshot a Firefox window with a tillating or embarrassing web site. [131024540090] |(Don't do this in the office.) [131024550010] |User-local package management system [131024550020] |I need to deploy, manage and run software as a non-privileged user in SuSE (that is, no root access whatsoever, can't use system's package management, etc). [131024550030] |What are my options? [131024550040] |I'd prefer reusing system's package manager (YaST) by somehow setting up a separate user-local repository. [131024550050] |Second best choice is a separate package management system that supports user-local repositories. [131024550060] |Preferably it would also support push-style updates (as opposed to pull). [131024560010] |Well for Gentoo there is the Gentoo Prefix project which allows you to install packages to somewhere different than / . [131024560020] |Gentoo's Package manager portage is written in Python and very portable so you could easily setup a new tree for a user that that user has full access to without breaking anything. [131024560030] |Two Problems I see: [131024560040] |
  • You'll probably have to compile a lot of stuff or build binary packages for your users that way and you'll probably have to install a lot of stuff twice so that the prefix thingy works properly (I think it would be hard to build stuff against you already installed packages that way)
  • [131024560050] |
  • You'd not have a push-service.
  • [131024560060] |The other approach I see would be to offer a punch of tar.gz files that are basically just custom made packages from your distribution patched to use a different prefix: Let's say you create a "Library" dir in every user dir and add "~/Library/usr/bin" to each user's path, a simple package manager could be whipped up to take care of installations (you could also look at Arch Linux's pacman for that since it's basically just .tar.gz files and dependencies. [131024570010] |Use a privileged user manager [ licensed :( ] and you could run commands that need super user access as a normal user. [131024570020] |Everything is tracked and audited [131024580010] |How do I stop thunar trying auto-mount a partition [131024580020] |When I plug in SIPOD, my pet ipod, thunar tries to auto-mount two partitions instead of one. [131024580030] |This annoying pop-up is starting to kill me: [131024580040] |This is what /dev/sde looks like: [131024580050] |Is there a way to tell thunar to completely ignore /dev/sde1? [131024590010] |I don't belive that the thunar automount is configurable to ignore special devices (I'm not for 100% sure...). [131024590020] |Anyway in my point of view, mounting filesystems is not the job of an application, it should be the job of the operating system. [131024590030] |You could disable thunars automount feature and use udev and autofs. [131024590040] |With udev rules you can recoginze your devices and define how to handle it. [131024600010] |Reseting USB for scanner. [131024600020] |This is a question on:superuser, since one reply suggested I ask here... [131024600030] |My distro does not yet have a backend for my scanner, but the last release of SANE does. [131024600040] |So I downloaded the source and installed. [131024600050] |Scanning goes fairly well except that for some reason at the end of a scan I get an error message: [131024600060] |"reset high speed USB device using ehci_hcd and address xx" [131024600070] |After that I can't scan anything until I unplug and replug the ( USB ) scanner. [131024600080] |Since I expect my distro to pick up the latest sane version within a few months, for now all I would like to do is reset the scanner so it can do the next page. [131024600090] |Any suggestions on how to do this? [131024600100] |PS: The kernel version is: 2.6.31-22 [131024610010] |Not a solution but a workaround: [131024610020] |Some devices have a problem working with USB 2.0 and ehci_hcd. [131024610030] |I'm not really sure if this is a bug in the ehci_hcd code or on some other place, I just encountered it sometimes. [131024610040] |You could try a modprobe -r ehci_hcd so the USB 2.0 module will be unloaded and uhci_hcd is used. [131024620010] |How to mimic zsh named directories with bash [131024620020] |Possible Duplicate: bash directory shortcuts [131024620030] |zsh has the concept of named directories, so you can say in ~/.zshrc [131024620040] |and later use this short cut in the shell like this [131024620050] |How to best emulate this with bash? [131024620060] |I can of course say [131024620070] |and then [131024620080] |however firstly, the $ is complicated to input on German keyboard layout and secondly, I fear binding a variable with just a single letter name might give problems with unwanted variable expansion. [131024630010] |all media converter [131024630020] |do you know something which is able to convert almost all media types? from flv to music to wav to mp3? [131024640010] |ffmpeg is what you are looking for. [131024640020] |You can read through the official documentation. [131024640030] |Otherwise just search on google "convert X to Y with ffmepg", where X and Y would be the formats you trying to convert between. [131024640040] |A few resources that has helped me: [131024640050] |here and here [131024650010] |You should have a look at the FFmpeg project. [131024650020] |From the project description: [131024650030] |"FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video. [131024650040] |It includes libavcodec - the leading audio/video codec library." [131024650050] |It is likely already installed on your system because a lot of media players depend on the libavcodec library. [131024650060] |To see the available codecs on your system, execute ffmpeg -codecs [131024650070] |
  • list of codecs provided by ffmpeg
  • [131024650080] |
  • list of video codecs provided by libavcodec
  • [131024650090] |
  • list of audio codecs provided by libavcodec
  • [131024660010] |I regulary use http://www.online-convert.com/ which is an online service for conversion between all kinds of audio, video, image and document formats. [131024670010] |You can try transcode too, its a great command line application. [131024680010] |Check out Handbrake. [131024680020] |I use it on linux. [131024690010] |Shell Script Certification [131024690020] |I'm a UNIX shell script programmer, and I would like to know if there is any certification specific for Shell (bash, korn,etc) programmers. [131024690030] |Also how about CX-310-105 exam to take Oracle Solaris Associate; does it have value on the market? [131024700010] |Perhaps you reach a high reputation score in unix.stackexchange and you can put a link to that in your CV. ;) [131024700020] |Otherwise, I saw some time ago some Unix/Shell related multiple-choice test at Wikiversity. [131024700030] |They were described as official Linux-foo-certification like tests. [131024700040] |But I cannot find the link now. [131024710010] |A certificate might sound nice, but it's probably not worth your time. [131024710020] |Few employers will take a Shell Script certificate seriously. [131024710030] |It would look bad on your CV, and would not help you land a position. [131024710040] |Understand that some job candidates try to pad their resume with certifications, but that makes them look dishonest and inexperienced. [131024710050] |Certifications are not a valid substitute for experience. [131024710060] |A Google search for "shell script certification" shows a few results, but none of the certificates look reputable. [131024710070] |Shell scripting is probably most commonly used by System Administration. [131024710080] |There are a number of sysadmin certifications, and acquiring one of those might be better for you. [131024710090] |In my 13 years of experience, I've seen hundreds of resumes and interviewed dozens of people. [131024710100] |I don't think anyone has mentioned "shell script certificate" on their resume (It would certainly stick out). [131024710110] |While many people mentioned "shell scripting" on their CV/resume, more then half couldn't solve some basic shell scripting questions. [131024710120] |If you are applying for a position which requires shell scripting, they'll ask you during the interview process. [131024710130] |Make sure you can answer the questions well. [131024710140] |But granted, I'm in the San Francisco, USA area, and Unix is well used here. [131024710150] |Things may be different in Brazil. [131024720010] |Why is there a * When There is Mention of Unix Throughout the Internet? [131024720020] |I've noticed that throughout the Internet, within forums and blog posts, Unix always has a * in the word, whether it is *nix or Un*x, as I noticed at the welcoming banner at the Unix StackExchange site. [131024720030] |Why is this like this? [131024730010] |To officially be called a "Unix", an OS has to adhere to the Single UNIX Specification put out by the Open Group. [131024730020] |OSes that are similar to Unix without actually complying with the SUS are typically called "Unix-like", which is sometimes abbreviated as Un*x or *nix (since the OSes often have -ix or -nix suffixes: Linux, Minix, IRIX, etc.). [131024730030] |Not specifically using "Unix" when referring to them also helps avoid trademark problems [131024740010] |Unix ® is registred as a trademark and was owned by several companys, such as [131024740020] |
  • AT&T
  • [131024740030] |
  • Novell
  • [131024740040] |
  • Univel
  • [131024740050] |
  • Open Group
  • [131024740060] |
  • SCO
  • [131024740070] |
  • Caldera
  • [131024740080] |Nobody likes to read documents like the 12 pages trademark usage guide by the open group (pdf). [131024740090] |So the easiest way to refer to Unix was Un*x or *nix. [131024740100] |The ® is not really necessary, but its simply a habit. [131024750010] |The trademarked term "UNIX" actually refers to an actual thing, as described by others in this post. [131024750020] |The general community lacks a good term for the class of product which we call Unix, Linux, BSD, *BSD, Solaris, etc. [131024750030] |These products are related and have alot in common. [131024750040] |A CentOS administrator can perform many tasks on a Solaris or FreeBSD system, for example. [131024750050] |Also, many people have never heard of Solaris or FreeBSD, but they've heard of "Unix". [131024750060] |So, some people use the term "Un*x" to refer to this class of software. [131024750070] |I also think that "Un*x" is a humorous word. [131024750080] |How do you verbally pronounce "Un*x", for example? [131024750090] |I noticed at the welcoming banner at the Unix StackExchange site [131024750100] |I created that wording, so I'll tell you why I did it. [131024750110] |I used "Un*x" because I thought it was clever and funny, and I wanted to answer questions like "Does this include things like $MY_FAVORITE_UNIXLIKE_PRODUCT?". [131024760010] |As @echox noted, Unix is a registered trademark. [131024760020] |Traditionally, Unix types loathed trademarks and the like. [131024760030] |This extended to Linux, which was not originally trademarked. [131024760040] |At least not until one William Della Croce registered Linux as a trademark for himself in the mid-nineties - when Linux started to become popularly known and used in trade. [131024760050] |Della Croce then sent cease-and-desist letters to anyone who used the Linux mark. [131024760060] |Only then did the Linux community rally and take legal action to claim the trademark. [131024760070] |Linus is now the holder of the Linux trademark, but it was not his original wish. [131024760080] |That is how much trademarks were reviled by the Unix crowd. [131024760090] |See http://www.informationweek.com/blog/main/archives/2007/05/who_owns_linux.html for details on the Linux trademark. [131024770010] |Most of these answers are far too late to the game, as the * usage was used on Usenet and elsewhere to refer to the multiplicity of Unixoid systems. [131024770020] |This was significantly before "the suits" even knew what was happening in cyberspace and didn't understand it if they did. [131024770030] |I found a reference in the comp.risks archive dated May 1987 where the title [131024770040] |Concerning UN*X (in)security [131024770050] |was already so pedestrian as to warrant no explanation. [131024770060] |By this time Xenix had been long on the market as were various "*ix" based variants which were decidedly "unix" but not "Unix". [131024780010] |It's a trademark of SCO [131024790010] |Application shortcuts [131024790020] |Where are the application shortcuts (Settings -> XFCE 4 Settings Manager -> Keyboard -> Application Shortcuts) saved? [131024800010] |You can take a look at this file see if that is what you are looking for. [131024800020] |~/.config/xfce4/xfconf/xfce-perchannel-xml/xfce4-keyboard-shortcuts.xml [131024810010] |samba does not work when offline [131024810020] |Hello, [131024810030] |I have recently set up a virtual machine and I want to share files between the host and the guest. [131024810040] |Samba seems to be a perfect solution, and indeed it does all that I expect it to. [131024810050] |However, if the host machine is not connected to the internet, the Samba server appears offline too. [131024810060] |Can somebody show me how to make it work? [131024810070] |Note: ps -ef | grep smb shows that smbd -F is running, so I think the process is started properly. [131024810080] |EDIT: I'm using VirtualBox for the virtualization. [131024810090] |Below is my config in /etc/samba/smb.conf (I have never changed it, comments removed for simplicity). [131024810100] |Sharing is enabled through the GUI in nautilus. [131024820010] |Have you checked if changing the type of the VirtualBox network adapter makes a difference? [131024820020] |Shut down the virtual machine, got to Settings->Network and try to change the value of "Attached to". [131024820030] |The default is NAT, which should be fine, however if you have NAT and it doesn't work for you, you might try bridged. [131024820040] |If you already have bridged there, try NAT. [131024820050] |Before doing this, you should read the information found in VirtualBox Help, Chapter 6.2. [131024820060] |Introduction to networking modes. [131024830010] |Monitoring USB traffic. [131024830020] |Kernel version: 2.6.31-22 [131024830030] |I wish to monitor the USB traffic to and from a device. [131024830040] |I've searched, but different sites seem to give different information and I'm confused. [131024830050] |
  • Some sites suggest that I need to recompile the kernel, while others suggest that all I need to do is install the latest wireshark. [131024830060] |Do I need to recompile?
  • [131024830070] |
  • Can someone suggest a website describing the most recent approach to USB sniffing?
  • [131024840010] |You need to recompile kernel/load module. [131024840020] |It is present in 2.6.32 (LTS) kernel - probably 2.6.31 as well. less /usr/src/linux/Documentation/usb/usbmon.txt. [131024840030] |Format is "well known" and it acts like character devince. [131024840040] |It can dump in text format as well. [131024840050] |Wireshark can provide live stream and/or read file from USB as far as GUI is concerned. [131024850010] |How do I execute a program in gnome and make it use another gtk theme other than the default one? [131024850020] |I use a dark theme and the program that I am trying to run hard-codes some color values that make it unusable with the dark theme settings. [131024850030] |I want to run this program without the dark theme being applied. [131024850040] |Is this possible? [131024850050] |The application that I'm trying to retheme is the ActiveState Komodo IDE. [131024860010] |Launch the program as so: [131024860020] |GTK2_RC_FILES=/path/to/your/theme/gtkrc application-command [131024860030] |I got this from here, which has some additional information about more complicated scenarios. [131024870010] |Quantify unix responsiveness [131024870020] |I am one of the n users of a shared unix machine. [131024870030] |For reasons unknown, the machine is not "responsive" enough. [131024870040] |For example, it is slow on interactive commands, it takes few noticeable moments for any action (e.g. mouse movement, editor (e.g. gvim) keystrokes) to be visible. [131024870050] |The problem is, the people supposedly responsible for addressing the issue do not agree that the machine is not responsive. [131024870060] |They do some few simple things and say, "It works fine!" [131024870070] |How can responsiveness be quantified? [131024870080] |What (all) can I measure? [131024870090] |I can run shell commands (e.g. top) periodically with cron and collect statistics, but I am clueless regarding what is a good statistic to go after. [131024870100] |EDIT [131024870110] |I connect to the machine over VMC. [131024880010] |This isn't strictly speaking the same as "responsiveness", but one metric you should probably check is the system load average; uptime will show the average over the last 1/5/15 minutes: [131024880020] |$ uptime 02:30:33 up 6 days, 6:30, 12 users, load average: 0.85, 0.65, 0.57 [131024880030] |A high enough load will perceptibly slow the system down [131024890010] |If many people work on a system IO can become a big problem: When starting a program the system might have to load stuff from the harddisk (program files, libraries, resources) and the memory might be full as well (leading to swap being used heavily). [131024890020] |Harddisks are slow. [131024890030] |As in really slow. [131024890040] |There is a program called "iotop" that allows you to track which user uses how much IO and how much disk IO you have overall. [131024890050] |Might help you get some material to prove to the admins that the system is in fact running badly and why. [131024900010] |Are you connected directly to the machine or are you logged in remotely via ssh or the like? [131024900020] |If the latter, make sure that the perceived lag isn't caused by the network... [131024900030] |If connected directly, besides looking at IO and system load, you might have a look at memory usage. [131024900040] |If a system starts swapping heavily, the perceived responsiveness dramatically decreases. [131024900050] |The command "free" shows how much memory is available and how much of it is used. [131024910010] |Servers are usually built for high throughput instead of high responsiveness, so you should keep that in mind when evaluating the responsiveness of a server system. [131024920010] |Program for decrypt linux shadow file [131024920020] |Is there any program or script available for decrypt Linux shadow file ? [131024930010] |It is practically impossible to decrypt those paswords since they are one-way encrypted. [131024940010] |You can only decrypt the shadow file by brute force: It includes hashes of the passwords, so your only chance is to guess passwords, calculate the hash and look if the hashes are identical. [131024940020] |See wikipedia for details about the hash generation. [131024950010] |As others have said, you can't really decrypt the shadow file. [131024950020] |The only thing you can try is to brute-force guess the password using a tool like John the Ripper. [131024950030] |This may or may not succeed, and will almost certainly take a long time. [131024960010] |Passwords on a linux system are not encrypted, they are hashed which is a huge difference. [131024960020] |It is not possible to reverse a hash function by definition. [131024960030] |For further information see the Hash Wikipedia entry. [131024960040] |Which hash function is used, depends on your system configuration. [131024960050] |MD5 and blowfish are common examples for used hash functions. [131024960060] |So the "real" password of a user is never stored on the system. [131024960070] |If you login, the string you enter as the password will be hashed and checked against your /etc/shadow file. [131024960080] |If it matches, you obviously entered the correct password. [131024960090] |Anyway there are still some attack vectors against the password hashes. [131024960100] |You could keep a dictinoary of popular passwords and try them automaticly. [131024960110] |There are a lot of dictionaries availiable on the net. [131024960120] |Another aproach would be to just try out all possible combinations of characters which will consume a huge amount of time. [131024960130] |This is known as bruteforce attack. [131024960140] |Rainbowtables are another nice attac vector against hashes. [131024960150] |The idea behind this concept, is to simply pre calculate all possible hashes and then just lookup a hash in the tables to find the corresponding password. [131024960160] |There are several distributed computing projects to create such tables, the size differs on the characters used and is mostly several TB. [131024960170] |To minimize the risk of such lookup tables its a common practice and the default behaviour in Unix/Linux to add a so called "salt" to the password hash. [131024960180] |You hash your password, add a random salt value to the hash and hash this new string again. [131024960190] |You need to save the new hash and the salt to be able to check if a entered value is the correct password. [131024960200] |The huge advantage of this method is, that you would have to create new lookup tables for each unique salt. [131024960210] |A popular tool to execute dictionary or brute force attacks against user passwords of different operating systems is John The Ripper (or JTR). [131024960220] |See the project homepage for more details: [131024960230] |John the Ripper is a fast password cracker, currently available for many flavors of Unix, Windows, DOS, BeOS, and OpenVMS. [131024960240] |Its primary purpose is to detect weak Unix passwords. [131024970010] |Passwords are encrypted using an algorithm that will take a password and create a hash that is unique to that password. [131024970020] |This hash is stored in the /etc/shadow file. [131024970030] |It is not possible to recover the password from the hash. [131024970040] |The only methods of recovering a password is to either brute force the entire keyspace or to use some sort of dictionary attack. [131024970050] |Early hash functions used the DES standard. [131024970060] |The increase in computing power has made it possible to brute force the DES keyspace in a reasonable time. [131024970070] |Modern hash functions used to encrypt passwords include MD5, SHA etc. [131024970080] |More information on the crypt(3) library can be found here. [131024980010] |How to display duplicates between 2 repositories [131024980020] |I got 2 repos locally. [131024980030] |One is a copy of Squeeze and another is a custom one, and is managed by reprepro. [131024980040] |Are there ready-made tools that would generate a list of duplicate packages between the two? [131024990010] |You could go along with fdupes which uses md5sum to compare files and allows deletion of duplicates. [131024990020] |I don't know enough about Debian repositories though, so you'll probably have to drop those files from some package registry as well (I think there is a file called packages.gz or similar in each repository). [131024990030] |So what you should do: [131024990040] |
  • Use fdupes to generate a list of duplicates
  • [131024990050] |
  • use that list to drop packages from the repository information
  • [131024990060] |
  • delete the actual files
  • [131025000010] |Linux Distro specifically for benchmarking? [131025000020] |At my current position, we use some outdated proprietary software in order to benchmark new computers that the company is testing and evaluating for purchase. [131025000030] |We would like to move on to something more current. [131025000040] |It would seem to me that using a GNU/Linux distro with a completely automated installation process would be ideal for this task. [131025000050] |Basically, what I want to have is a minimalist GNU/Linux distribution that will allow me to simply input a network location to store the benchmarking results, and will install the OS and run a suite of benchmarking software completely automated. [131025000060] |This seems like a problem that others have likely come across, but I have been unable to find anything similar that fits my needs. [131025000070] |Any suggestions on where to start with this? [131025000080] |Does a distro like this exist out there somewhere? [131025000090] |If not, I currently plan on just writing a script that will install a list of benchmarking software onto the machine and run them. [131025000100] |Any suggestions on specific software choices for this? [131025010010] |I know of no existing distro but this should be rather simple to build with Debian using preseeding. [131025010020] |You Just create your own package that basically depends on the packages for your benchmarking solution. [131025010030] |That package comes with a /etc/init.d/ script that starts the benchmarking at boot, stores the results wherever you need them and shuts the system down afterwards. [131025010040] |With preseeding you can automate the debian installer to just take the system, slap debian on, install your custom package, reboot, have the tests run and shut the system down. [131025020010] |It's not a distro, you'll still have to put this on a LiveCD or automated Debian install, but I'd try the Phoronix Test Suite. [131025020020] |It's quite automated, and supports storing benchmark results on a central server. [131025030010] |What is the best book to learn Linux system programming? [131025030020] |Title says it all. [131025030030] |I am trying to learn Linux system programming, which is the best book to learn this? [131025040010] |W. Richard Stevens: Advanced Programming in the UNIX Environment [131025050010] |Linux Systems Programming [131025050020] |you can refer this also link [131025060010] |Here you can find a database of best book to learn Linux : http://www.tldp.org/guides.html [131025060020] |I'm currently reading Introduction to Linux - A Hands on Guide by Machtelt Garrels [131025060030] |And I like it, the way it's written make it easy to understand. [131025070010] |I second the Stevens recommendation. [131025070020] |The only real alternative is Advanced UNIX Programming by M.J. Rochkind: http://basepath.com/aup/ [131025070030] |ORA's POSIX Programmer's Guide (http://oreilly.com/catalog/9780937175736) may be useful, but I haven't read it myself. [131025080010] |The Linux Programming Interface by Michael Kerrisk [131025080020] |Note that the author is the current maintainer of the Linux man pages. [131025080030] |And that it's not out yet so I can't actually say how good it is, but I've read the blog posts about it and it sounds like a good book. (and he is the maintainer of the man pages, and those are mostly well written and he ought to know his stuff) [131025080040] |http://blog.man7.org/2009/07/whats-book-about.html [131025080050] |http://www.man7.org/tlpi/index.html [131025080060] |http://www.nostarch.com/linuxprogramming.htm [131025090010] |I'd recommend Bruce Molay's "Understanding Unix/Linux Programming" (http://wps.prenhall.com/esm_molay_UNIXProg_1/). [131025090020] |I had him as an instructor at Harvard, and he was fantastic. [131025100010] |This may sound like a bad answer to some, but I recommend switching to Arch linux. [131025100020] |With Arch, you will learn the nuts and bolts of Unix/Linux by reading through a lot of your own error messages. [131025110010] |The Linux Programming Interface is now available... [131025110020] |http://www.man7.org/tlpi/ [131025120010] |How to disable system beep for non-privileged user [131025120020] |How to disable system beep on Linux? [131025120030] |I don't have superuser powers so I cannot recompile kernel/unload module. [131025120040] |PS. [131025120050] |System is modification of ubuntu 8.04 but soon it will be upgraded to 10.04. [131025130010] |For beeps generated in your shell (which seem to be the most annoying ones) you can say set bell-style none in ~/.inputrc. [131025130020] |Note that this is not terminal- but host-specific. [131025130030] |I.e. when you log in to an other computer via ssh where this setting in .inputrc doesn't exist, the beep is back. [131025130040] |(Not tested on Ubuntu, I use Fedora.) [131025140010] |Have you already unchecked "Enable system beep" in System -> Preferences -> Sound -> System Beep? [131025150010] |NFSv3 with Kerberos "unmatched host" error [131025150020] |I've setup NFSv4 using Kerberos (works great), but now I need to add NFSv3 with Kerberos. [131025150030] |When trying to mount the NFSv3 export, I get a permission needed error on the client and on the server the error is "unmatched host". [131025150040] |The "unmatched host" error usually means that you haven't specified that the client can access the server in the export file. [131025150050] |But with kerberos you shouldn't need to. [131025150060] |The export man file states: [131025150070] |RPCSEC_GSS security To restrict access to an export using rpcsec_gss security, use the special string "gss/krb5" as the client. [131025150080] |It is not possible to simultaneously require rpcsec_gss and to make requirements on the IP address of the client. [131025150090] |I'm pretty sure Kerberos is setup correctly (again NFSv4 with kerberos works) and from what I've read on the web, I think the NFS server is setup correctly (settings are below) and the necessary services are running. [131025150100] |I currently testing on Ubuntu 10.4, but had the same problem on Novell SLED 10.3. [131025150110] |Anyone have an idea what I could be doing wrong? or can point me to a NFSv3 w/kerberos how-to? [131025160010] |Here are a few thing's I'd change/check: [131025160020] |Use the new GSS export syntax and allow integrity/privacy protection: [131025160030] |Make sure required kernel modules are availabe: rpcsec_gss_krb5, auth_rpcgss [131025160040] |Check the mount command options - which you could also add to your question. [131025170010] |I'm actually using NFS v3 + Kerberos between some boxes at home (mix of CentOS 5 and Gentoo clients and servers, with Gentoo KDCs). [131025170020] |To get it to work, I ended up using an /etc/exports entry that looks like: [131025170030] |On the client, /etc/fstab contains: [131025170040] |When mounted, 'mount' returns the following for that filesystem: [131025170050] |From the NFSv4 experiments, I do still have rpc.idmapd running, but I don't think it's needed for v3. [131025170060] |The last tricky bit was the /etc/exports bit when I set it up. [131025170070] |A lot of tutorials list something else like the gss/krb5 export entry you have above, but that never worked for me, although if you read the nfs utils source, it looks like it should. [131025170080] |I hope this steers someone else in the right direction. [131025170090] |Good luck. [131025180010] |closing unused gnome terminals [131025180020] |Hi, [131025180030] |while working I start lots of gnome-terminals and do something with them. dd on first terminal, 12 ssh sessions to a bunch of servers to do something. [131025180040] |These sessions are finishing it's job and get disconnected for idle or because the session is closed after the command. [131025180050] |However, I need a script which closes unused gnome-terminal processes. [131025180060] |I thought about softly killing all zsh processes without child processes. [131025180070] |This will hopefully close the terminal in a clean way. [131025180080] |I thinking about writing a more or less simple bash script to check the running processes and end them if zsh has no child processes and no activity for 4 hours. [131025180090] |I am unsure [131025180100] |
  • If this is a good idea generally.
  • [131025180110] |
  • If somebody already published a tool to do this
  • [131025180120] |
  • If there is a way to get the child processes of zsh (without greping and awking the pstree output ;)
  • [131025180130] |
  • How I get the last activity (thought about a pre and post command in zsh)
  • [131025180140] |
  • If there is a better way than kill -HUP to end the processes
  • [131025180150] |Thanks in advance [131025190010] |According to the zsh manual [131025190020] |TMOUT If this parameter is nonzero, the shell will receive an ALRM signal if a command is not entered within the specified number of seconds after issuing a prompt. [131025190030] |If there is a trap on SIGALRM, it will be executed and a new alarm is scheduled using the value of the TMOUT parameter after executing the trap. [131025190040] |If no trap is set, and the idle time of the terminal is not less than the value of the TMOUT parameter, zsh terminates. [131025190050] |Otherwise a new alarm is scheduled to TMOUT seconds after the last keypress. [131025190060] |I tested [131025190070] |and the superior gnome-terminal died when the shell quit. [131025190080] |The same mechanism also works within bash. [131025190090] |This does address your concerns about nuking busy terminals, as it only starts counting after issuing a shell prompt [131025190100] |I don't think it a good idea generally, as it creates "magical" events which could potentially lose state. [131025190110] |I'd recommend getting better with the "close window" and "focus another window (maybe a terminal)" keys of your window manager of choice. [131025190120] |But if you do want poofing terminals, this is probably the best way to go. [131025200010] |If you use exec to start your command (e.g. exec ssh *hostname*), the gnome-terminal it's running on should close when the process exits (assuming you have it set to exit the terminal when the command exits, which is the default). [131025200020] |You would still need to use the shell's timeout capability or other smarts for hung processes, but that would take care of normal exits or disconnected remotes if you're just trying to close the terminal sessions. [131025210010] |What would cause ps to report uid instead of username? [131025210020] |I have Eucalyptus installed on my Linux machine, and I've noticed that for processes owned by the eucalyptus user, ps reports the userid instead of the username. [131025210030] |For example: [131025210040] |What would cause this to happen? [131025210050] |Note that there's a proper entry in /etc/passwd: [131025210060] |Also note that ls property reports the ownership of files by the eucalyptus account: [131025220010] |Sure you have a problem with your /etc/passwd... you edited it manually, didn't you? :) [131025220020] |anyway, I reproduced the problem copying the line of the user in /etc/passwd and changing the user name by the user id. [131025220030] |Like this: [131025220040] |Note that the "numbered user" is the first. [131025220050] |Try to execute "whoami", sure it returns 107 :) [131025220060] |It is a strange behaviour, ps returns the number and ls the normal name :-m... [131025220070] |To solve it: [131025220080] |
  • just edit /etc/passwd and delete the incorrect entry
  • [131025220090] |
  • or use 'userdel 107', but all programs from eucalyptus must be stoped
  • [131025230010] |ps uses the uid when the username is longer than 8 characters. [131025240010] |You can control the width of columns: [131025240020] |this reproduces the u format of ps u, but it makes the user field 12 characters wide. [131025250010] |Why is my hostname different in Emacs? [131025250020] |So I changed the name of my computer recently, by editing /etc/hostname. [131025250030] |The bash prompt is user@name, so I know it has worked. [131025250040] |But in emacs, in the window bar it says emacs@name.tiscali.co.uk. [131025250050] |Tiscali is my internet provider. [131025250060] |Before I changed it, emacs just had emacs@oldname in the window bar. [131025250070] |How can I remove my IP's name from the window bar in emacs? [131025260010] |You might walk through the steps in http://www.debianadmin.com/change-hostname-or-server-name-of-a-linux-machine.html [131025260020] |Emacs seems to use the full qualified domain name, so make sure this matches your desired name. [131025270010] |The name in /etc/hostname is what your computer thinks it's called. [131025270020] |That's often what is meant by hostname. [131025270030] |Computers connected to the Internet (including intranets) have names; more precisely, most Internet network interfaces have a name associated with their IP address. [131025270040] |Internet nodes that are not routers generally have a single network interface worth consideration, and the name associated to this interface is called its fully qualified domain name (FQDN). [131025270050] |The FQDN is the name you can use to designate your computer from any other Internet node (well, assuming there are no complex configurations involved). [131025270060] |Generally, to keep confusion down, the FQDN is something like foo.example.com where foo is the host name. [131025270070] |When you have a single frame open, Emacs uses the value of the system-name variable as the frame title. [131025270080] |This variable is set to the FQDN when Emacs starts. [131025270090] |You can change it from your .emacs if you wish. [131025270100] |This variable isn't used much, so don't worry about changing it. [131025270110] |It is used to form a default email address when you send mail or news posts from within Emacs, but you'd almost always override that email address setting anyway. [131025270120] |The frame title format is determined by the frame-title-format variable (unless overridden for a specific frame). [131025270130] |You can change it if you'd like to use something other than system-name when there is a single frame. [131025270140] |For example, if you want to always see the buffer name in the frame title (as opposed to when there is only one Emacs frame), you can set it to "%b". [131025280010] |Mounting a partition into a 'sandbox' [131025280020] |I'm wondering if this is possible. [131025280030] |I want to set up a linux system that mounts / remote linux machine to / on the local machine. [131025280040] |However, I want all changes on the local machine to be saved to ram so that it doesn't affect the remote machine. [131025280050] |Ideally the changes would NEVER be written, so that when I reboot, it mounts the original / partition again disregarding all changes made during the previous session. [131025280060] |Is something like that possible? [131025290010] |If / fits into the RAM of the local machine and leaves enough room for running applications, the basic idea would probably be to boot a minimal Linux system on the target machine and then automatically create a ramfs virtual disk, copy / from remote into it and chroot into this new /. [131025290020] |If RAM is not sufficient, you can basically follow the same procedure but not using ramfs but a real disk partition whose content you have to clear before copying. [131025290030] |Instead of clearing and full copy you could also use rsync with appropriate options. [131025300010] |Use unionfs, aufs (both are external patches for kernel) or unionfsfuse/funionfs (uses FUSE) and create union by marking external / as RO and internal filesystem (mounted as tmpfs/ramfs/additional partition which is cleaned each time). [131025300020] |Alternativly you can use filesystem or LVM with snapshots. [131025300030] |Then changes are written but you can clean snapshots at each boot. [131025310010] |There are several ways to go about this. [131025310020] |The easiest set up would use a union filesystem, which presents a single view of two directory trees A and B, such that all changes are saved to B. In your case, A would be an NFS/Samba/sshfs/… mount point, and B would be an initially empty directory on a tmpfs filesystem. [131025310030] |Linux doesn't have an in-kernel union filesystem, but there are several FUSE implementations: funionfs, Unionfs-fuse. [131025320010] |This can be archiev very easy with PXE boot. i am running a live xbmc system over pxe tftp nfs boot. changes are written with COW to NFS share. [131025330010] |Auto login for Ubuntu (or other Linux) without GUI? [131025330020] |I am thinking about doing an Ubuntu installation with their mini ISO, which comes only with the barebones system without a desktop environment/GUI. [131025330030] |I remember being given the option to set up automatic login when doing a full Ubuntu desktop installation, but how to I enable that for the mini ISO install? [131025330040] |Did I miss something? [131025330050] |Also, is there a generalised way to do this on any Linux OS? [131025330060] |Thanks! [131025340010] |You might find some ideas in this thread of linuxquestions.org [131025350010] |All you need is the tool mingetty. [131025350020] |Concrete example and comparison in the mythTV Wiki. [131025360010] |Favorite partitioning and mounting tricks [131025360020] |We all know that mounting a new partition as /home and maybe /boot is extremely useful. [131025360030] |Or mounting a remote directory as /opt can be great for sharing system tools. [131025360040] |Are there any other, maybe more esoteric, uses for extra partitions or hard drives or nifty ways to mount external volumes? [131025360050] |Maybe even if anyone also has windows machines *shudder*, post some cool tricks involving partitioning and hard drive mounting. [131025370010] |Performance related: [131025370020] |Avoid file access time writing: [131025370030] |Usability related: [131025370040] |You can use alternative device names, e.g. labels or uuids. [131025370050] |For example to identify my MP3 player I use this device name in my fstab: [131025370060] |You can print the uuids of connected devices via the blkid command. [131025370070] |Analogous to that you can set a label at mkfs time or later via e2fstune and comparable tools. [131025370080] |Then you can use [131025370090] |in the fstab or at the command line. [131025380010] |I like to have a separate partition for all personal data which I don't have to backup, e.g. svn checkouts, copies of data which mainly resides on an other server etc [131025390010] |You have someone who can only access your server over ftp and are confined to their home directory but you realise they they need access to some other directory not in their home folder. [131025390020] |For example bob has ftp access to your web server, but also you want to let him view the log files in /var/logs/httpd/vhosts/bobssite.com/. [131025390030] |It is a hassle to reconfigure everything so that apache writes logs for bobssite.com to bobs home folder but you can use the bind option to remount the folder like this [131025390040] |More information can be found here. [131025400010] |If your OS supports it, make all your filesystems on RAID 1 arrays, even if you they're not replicated. [131025400020] |That way, if you ever need to transfer the filesystem to a different disk, you can do it online and quickly by adding the partition on the second disk to the array, rebuilding the array and removing the first disk. [131025400030] |Some LVM systems can mirror volumes, so you don't need another layers. [131025400040] |ZFS does it without any external help. [131025410010] |Most unices have a logical volume manager. [131025410020] |Use it. [131025410030] |
  • Filesystems are now designated by meaningful names (like /dev/mapper/darkstar-home) rather than through drive letters (like /dev/sda1, oops, it's now /dev/sdb1 because I booted with an external disk plugged in) or with safe but meaningless UUIDs.
  • [131025410040] |
  • Want to move a filesystem to a different disk? [131025410050] |Create a physical volume on the new disk, add it to the volume group, and move the logical volume onto the new physical volume. [131025410060] |All done without downtime, no unmounting required.
  • [131025410070] |
  • When you make a backup, take a snapshot of the disk and run your backup from the snapshot. [131025410080] |That way the backup is a consistent view of the filesystem (i.e., there really was a point in time when the filesystem was in that state). [131025410090] |This doesn't hold with naive backups (e.g. file A is backed up, then a program modifies first A then B, then B is backed up: the backup has the new B and the old A).
  • [131025410100] |
  • Need to enlarge a filesystem? [131025410110] |Logical volumes don't need to be contiguous, so all you need is enough free space, never mind where.
  • [131025420010] |Most unices clean /tmp on boot. [131025420020] |If you do this, there isn't much point in storing the contents of /tmp on disk in the first place. [131025420030] |Many unices allow a filesystem to be stored in memory (the data will be written in the swap if necessary). [131025420040] |For some reason, even though Linux has tmpfs for this, most distributions don't mount /tmp as tmpfs. [131025420050] |It's easily remedied with a line in /etc/fstab: [131025420060] |By default, the filesystem can grow up to half your RAM. [131025420070] |If you have a lot of swap, you might want to allow it to contain bigger files, e.g. to allow up to 2 GB: [131025420080] |(Making the filesystem larger has a negligible overhead; the virtual memory usage grows as needed. [131025420090] |It's still a good idea to have a limit because a runaway program could fill it very fast, and it's better to run out of /tmp than to run out of memory available for processes.) [131025430010] |FUSE (Filesystem in USErspace) allows many things to be accessible as ordinary files (not an exhaustive list by any means): [131025430020] |
  • remote files accessed via FTP
  • [131025430030] |
  • remote files accessed via ssh
  • [131025430040] |
  • remote files accessed via WebDAV
  • [131025430050] |
  • files in archives
  • [131025430060] |
  • files inside a non-running virtual machine image with xmount
  • [131025430070] |
  • anything that looks like a file to a Gnome application
  • [131025430080] |
  • Blogger blogs
  • [131025430090] |
  • Flickr
  • [131025430100] |There are also many FUSE filesystems that present a view of another filesystem with filtering, renaming or modified metadata or content: [131025430110] |
  • Keep copies of all past versions of files with copyfs, waybackfs, ...
  • [131025430120] |
  • Log every action with loggedfs
  • [131025430130] |
  • Encrypt files transparently with encfs
  • [131025430140] |
  • Convert audio content with mp3fs
  • [131025430150] |
  • See a read-only view or change permissions with bindfs
  • [131025430160] |
  • See a partial read-only view with rofs-filtered
  • [131025430170] |
  • Convert file name character sets with convmvfs
  • [131025430180] |
  • Get a case-insensitive view with ciopfs
  • [131025430190] |More possibilities on the FUSE site and elsewhere. [131025430200] |You can also easily define your own in Erlang, Haskell, Lisp, Lua, Ocaml, Perl, Python, ... [131025440010] |Mount an .iso image as a loopback filesystem. [131025440020] |I keep a number of .iso files around, and this can be a handy way to copy reference files on the disk image. [131025440030] |Or, if I want to read an offline copy of the installation manual, I can do that from the commandline: [131025440040] |stefanl@host1:~ $ links ubuntu-10.04-server-amd64/doc/install/manual/en/index.html [131025450010] |An oldie. [131025450020] |Keep your software on one disk, and your data on another. [131025450030] |Therefore you can seek both at the same time. [131025450040] |Makes for faster disk access. [131025460010] |Getting Ubuntu working with eSATA (Intel H57 chipset) [131025460020] |Does anyone know if there's kernel support for the eSATA controller in the Intel H57 chipset, or if there's a driver for it somewhere? [131025460030] |(Full disclosure: Asked over on SuperUser.com, no luck, but as this is more of a *nix-oriented place...) [131025460040] |I'm just having no luck getting my Ubuntu 10.04 LTS desktop (64-bit) to recognise a drive in an eSATA enclosure. [131025460050] |It works fine if I use the same enclosure via its USB2 connector instead, which tells me that the drive is installed in the enclosure successfully and that the drive works. [131025460060] |Here's what I've tried / checked: [131025460070] |
  • Connecting the drive naively. [131025460080] |Literally, plugging the eSATA cable into the box and turning the drive on, while Ubuntu was running. [131025460090] |No reaction, and nothing shows up in the Disk Uility or fdisk -l.
  • [131025460100] |
  • Leaving the drive connected and cold booting Ubuntu (literally from poweroff). [131025460110] |Still nothing on DU or fdisk -l.
  • [131025460120] |
  • Ensuring that the BIOS has the eSATA port enabled (it did, I didn't have to change it).
  • [131025460130] |
  • Ensuring that the BIOS is using AHCI. [131025460140] |It wasn't, and that hadn't been any problem accessing the internal SATA SSD (the box's primary drive). [131025460150] |(The SSD showed up under the PATA controller, because I think the BIOS was doing emulation or something.) [131025460160] |Switching the BIOS to use AHCI on the SATA controller didn't make any difference other than that the SSD showed up under the SATA controller instead and was listed as using the ahci driver, as you'd expect.
  • [131025460170] |
  • Looking in dmesg for anything useful. [131025460180] |I don't see any mention of the drive at all (except from when I had it attached via USB).
  • [131025460190] |Other info: [131025460200] |
  • eSATA is on the motherboard, an Intel DH57JG, which uses the Intel H57 chipset.
  • [131025460210] |
  • Enclosure is an Apex (cheap, but other than cable length issues people on Amazon seemed to like it, and it's handsome).
  • [131025460220] |
  • Drive is a Samsung F3 HD103SJ.
  • [131025460230] |
  • Cable is, well, a cable.
  • [131025460240] |
  • Intel doesn't seem to have any specific Linux drivers for the board (Ubuntu or Linux aren't even categories here, for instance), they just list that the chipset is supported "native." [131025460250] |But as they don't call out eSATA specifically, that could mean anything.
  • [131025460260] |Unfortunately, I don't have any other machine that supports eSATA so I can do the obvious thing and prove that the rig (enclosure and cable) work over eSATA on another box. :-( And I don't have my desktop set up to dual-boot another OS... [131025460270] |So at this stage, I don't know it's a software problem, could be hardware, could be cable, but the Ubuntu-oriented vendor I bought it from says they don't know how to get it working either (not that they mentioned that on their product page!), so... [131025460280] |Update: [131025460290] |Someone over on the Ubuntu forums suggested installing scsitools and running rescan-scsi-bus.sh as root, just in case. [131025460300] |No luck, but posting that info here for completeness: [131025460310] |Any ideas? [131025460320] |Thanks in advance. [131025470010] |The problem had nothing to do with drivers. [131025470020] |I'm leaving this question and answer here in case someone else searching for Intel H57 / DH57JG eSATA support finds it: Your board is supported by Ubuntu 10.04 LTS, no special drivers necessary. [131025470030] |In my case, it's a build quality issue with the desktop (not the first I've had with this machine, not very happy with the vendor). [131025470040] |The backplate bows out so badly from the eSATA port on the MB that it pushes the eSATA connector out. [131025470050] |If you stand there and forcibly hold it in, it works. [131025470060] |So I'm off to do battle with the backplate... [131025480010] |In case this is helpful to anyone, another quick and dirty way of rescanning your SATA controllers is to issue the following command: [131025480020] |This works for me even with internal, non hot-swappable SATA controllers where using the rescan-scsi-bus.sh command would not.