title: Manual Duplex printing

text: I have a printer (Samsung M2022W) which doesn't support duplex printing. However, I would like to manually print on both sides (that is to say, print even pages, then insert these pages again on the printer and launch the odd pages). The problem is that I don't have a "manual duplex" option on my Debian system. And the is not even a "odd/even pages only" option. How can I simply print manually on both sides on *unix?


title: How do I test the performance of my Wifi access point?

text: I have a home wifi access point consisting of a small Intel board with Atom CPU, 4 GB of memory and a PCI wifi card. Everything works fine, only that I experience major lags during playing of computer games online. I am not entirely sure that it is the router's fault, but it seems to vanish after a reboot of the AP. During such lags, for up to 3 seconds, no packages are received by the game, while other services (like Teamspeak) keep working. It seems to be a single UDP (?) connection that hangs for some seconds. Also when I bypass the router and use the ethernet of my internet modem, the lags vanish as well. Now, how could I find the root of the problem? The high traffic of the game seems to trouble the router so that it hangs sometimes and I don't know how to create artificial traffic conditions similar to the ones during gameplay. On the AP, `hostapd` is used for the Wifi and the traffic is routed between the ethernet port and the Wifi clients. I basically followed this tutorial and set up a simple bridged network. So in short: How can I test my Linux Wifi Access Point for high traffic and other heavy conditions?


title: Transform list of files (with date) into list of dates

text: I have a directory where I store backups. The are in the format `Complete Backup YYYY-MM-DD hh-mm-ss.tar.bz2` I have found out that you can feed a date into the `date` command using `date --date="YY-MM-DD hh:mm:ss"`. So how would I get a space separated list of dates. The dates should have run through a call of `date` so that they are formated. I came up with this command that gives me a list (one entry per line) in the format of `YYYY-MM-DD hh-mm-ss`. So how would I format it correctly and do a date on every one of them and the seperate them with a space?               dir backups/ | grep '[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]\\ [0-9][0-9]-[0-9][0-9]-[0-9][0-9]\.tar\.bz2$' | sed 's/\\//g' | sed 's/\.tar\.bz2//g' | sed 's/Complete Backup //g'      Note: The output will be use in a select loop so every space belonging to a date should be escaped.


title: List the files containing a particular word in their text

text: I would like to list the files recursively and uniquely that contain the given word. **Example** : Checking for word 'check', I normal do is a grep               $ grep check * -R      But as there are many occurrence of this word, I get a lot of output. So I just need to list the filenames that contain the given search word. I guess some trick with `find` and `xargs` would suffice here, but not sure. Any ideas?


title: How to run a shell script with export command in crontab

text: I have a shell script that **exports** values of variables when executed. The same values will be used in another script.   How to run this script( **test.sh** ) in cron.               #!/bin/sh     export I="10"     echo $I      I will be using root access for cron. I tried this command :               */5 * * * * /home/ubuntu/backup/.test.sh      I checked with environment variables, nothing is updated.


title: How do I share an internet connection through USB?

text: I have two Linux boxes. One is running KNOPPIX and the other Ubuntu. I have only one wifi dongle between them, and only one of them has an Ethernet port. They both have free USB ports however. I need the box with the dongle to share the connection through a male-to-male USB cable. I know it is possible to do a similar setup with a desktop and certain portable devices, but I need it between two normal computers. I cannot buy any additional hardware.


title: Redhat Grub not working after Fresh Install

text: Today i installed redhat on one server this server will be used on DR site as a backup. System has 2 HDD with 500GB space and I created the RAID0 and after that i completed the installation. But after the installation I had to reboot the server but Just after the BIOS screen I got Black screen with just GRUB written. Raid0 is used Filesystem Structure   * /boot 100M (Normally I assign 500M but this time I assign only 100M because the size of /boot rarely increases)   * swap 8GB VolGroup0 has two LVMs   * / has 50G size (LogicalVol00)   * /u001 has 400G+ size (LogVol01) I found information on redhat pages. That /boot cannot be used on RAID0 How to install Grub ![enter image description here](http://i.stack.imgur.com/ONAGS.jpg)


title: autofs does not prompt for password when needed

text: I am trying to setup an automount point using autofs to mount a samba fileshare. I am using the following syntax in my auto.misc file               mydir    -fstype=cifs,rw,user=myusername ://server.domain/path/to/mount      The problem is that it is denying me with NT_STATUS_WRONG_PASSWORD (seen in /var/log/messages with -verbose turned on). It works if I add my password to the mount options using 'password=secretPass123'. I don't want the password to be stored on disk, so I would like it to prompt me for the password. When I mount it manually using "mount" if I leave out the password option, it does prompt me for the password. How do I get autofs to do the same? I am using CentOS 6.5.


title: ssh behavior for root and non-root user

text: When I ssh as root to a remote machine, the command output looks like this:               root@Machine:/current/path#:      However, if it's a non-root user, all I see is:               $      How can I get the same behavior as for the root user? Why is it different?


title: Wireless on my Dell Latitude E5320 doesn't work on Ubuntu but works on Linux Mint. What can I do to make it work?

text: I have dualboot Ubuntu 12.10 & Linux Mint 14, both are clean install & updated with the latest. My wireless works flawlessly on Linux Mint but it's very unreliable on Ubuntu: every 15~20 minutes, the wireless icon still shows "connected" status but I can't go to any website. Pinging URL & IP both result in no network activities. Reboot fix the problem but it would happen again within 15~20 minutes. I really like Unity. Any idea to help make Ubuntu works for me? Or what's the different in wireless module between Linx Mint & Ubuntu? Anyway I can bring it from Linux Mint to Ubuntu?


title: Mounting USB drive on 3G dongle

text: I've got an Huawei HiLink E303 USB G3-internet dongle that I'd like to use to connect to the internet. I'm using Arch Linux. According to this page, the Linux drivers are actually on the device and can be installed relatively easy, including on Arch. However, I am not able to actually mount this device, and can therefore not extract the drivers. Basically, the device is being recognized as a USB device, then promptly after that it loads as a 'CDC Ethernet Device'. In the aforementioned tutorial, the trick is in mounting the device and then loading the drivers, but I'm unable to do so. No drive letter is being assigned when checking the journal (remember, Arch is using systemd now, so no more /var/log/messages etc files). Here's some output:               $ journalctl -f     Feb 15 02:47:57 S1 kernel: usb 1-2: new high-speed USB device number 21 using ehci_hcd     Feb 15 02:47:58 S1 kernel: scsi12 : usb-storage 1-2:1.0     Feb 15 02:47:58 S1 kernel: usb 1-2: USB disconnect, device number 21     Feb 15 02:48:03 S1 kernel: usb 1-2: new high-speed USB device number 22 using ehci_hcd     Feb 15 02:48:04 S1 kernel: cdc_ether 1-2:1.0 eth0: register 'cdc_ether' at usb-0000:00:1d...2:63     Feb 15 02:48:04 S1 systemd-udevd[12873]: renamed network interface eth0 to enp0s29f7u2          $ lsusb     Bus 001 Device 024: ID 12d1:14db Huawei Technologies Co., Ltd.     ... (other irrelevant devices)          $ ls /dev/disk/by-uuid     No new devices show up here          $ fdisk -l     No new devices show up here          $ ls /dev     No new devices show up here      By not being given a drive letter - or even a cdrom assignation as is shown on the tutorial page, I am unable to mount the device. Anybody any idea? Also, I ultimately want to connect to the internet so if someone knows a shortcut to that, that would work as well. I tried to run `ifconfig enp0s29f7u2 up`, and it is indeed activated, but no real connection is made.


title: how can 'init' and 'service' command can cross normal-user life?

text: i'm just moved to linux world in ubuntu 10.10. i'm using it for normal life, internet and social networks, multimedia enterainement like musics and movie, a bit of coding with c and python.. i've just learned something about run levels and about **init** and **service** command line tools. i understand they are powerful tools and contribute to set up the architecture and a solid base of the entire system. (is this an antiquate model? possible evolutions? alternative models?) but i don't undesrtand how they can cross my normal life and where i can use it, if i have to learn about it in a deep way or if a can only know that they exists but probabilly i will never touch them.


title: How can you get console backgrounds for Arch Linux?

text: I have tested out openSUSE and found that the tty1 is a bit different from other systems as the tty has got a background. I know that Knoppix has a tux penguin for each core the computer has, but I'm not quite sure how I can set the background image for the tty terminal.. **I want to have a tty terminal with a background image.** How exactly can this be done? An example would be the OpenSUSE Gnome-shell LiveCD. When you boot up openSUSE, you see a splash screen (on tty1) so you press [Esc] the splash screen goes away, but you keep the background and the text explaining where we are up to while booting. I am specifically interested in doing this on Arch. Will this require re- compiling the Linux kernel? Other questions:   * What can we do to the was the tty terminal is displayed?   * Can each tty have it's own background image? If yes, how?      * I'm guessing having multiple entries in a config file?   * Can the font color be changed?      * [solved] -- vidcontrol for FBSD.. Google for some reason is not being friendly with the results, no matter what I try all links that are actually related have no answers. **Edit:** I've figured out that the frame-buffer is is being. How do i use it? Mplayer can use the frame-buffer to watch video on a tty terminal:               mplayer -vo fbdev google_main.mp4     # http://youtube.com/demo/google_main.mp4      So how can I make a underlay? (opposite to overlay in which mplayer has done) **Note:** From when I posted this question, I have switched to Archlinux.. ( Debian no more ) **Note:** Today I don't really care about these decorations. Although would still be somewhat interesting to have. I have found what I would need but I've forgotten what the package/program was. If anyone still wants to answer with the package's name would still be good for anyone else who may want to do the same. **Edit:** I've found what is required to set the background/console decorations. https://wiki.archlinux.org/index.php/Kernel_Mode_Setting


title: Why is my mmv command not overwriting the files?

text: I have a batch file that, among other things, uses the command `mmv` to rename some files. The relevant line is like this:               mmv "$BASEDIR/files/*.txt" "$BASEDIR/files/#1.strings"      In essence it works, but the problem is that it keeps asking me for confirmation to overwrite files when they happen to already exist. I want it to just go ahead and do that without confirmation, so I checked the man page for `mmv`, and it says to simply use the `-o` option, like this:               mmv -o "$BASEDIR/files/*.txt" "$BASEDIR/files/#1.strings"      It's not making any difference, though. Every time I run my script, when it comes to the `mmv` part, it starts asking me confirmation. Why is the `-o` option not doing its job, and how do I get `mmv` to overwrite without asking confirmation?


title: Suggestions needed to debug why ps -ef gets stuck

text: A few of my processes consume 100% cpu. I'm trying to figure out which scripts are causing it I tried running `strace ps -ef`:               open("/proc/PID/status", O_RDONLY) = 6     read(6, "Name:\textract\nState:\tR (running)"..., 1023) = 1023     close(6) = 0     open("/proc/PID/cmdline", O_RDONLY) = 6     read(6,      So it gets stuck trying to read `/proc/PID/cmdline`. I tried `cat`ting that, and it got stuck again. Something is obviously screwed in the kernel; what should I try next? Note: rebooting doesn't work -- if I shutdown manually the problem starts again. I'm using SUSE Linux Enterprise Server 11 (x86_64), Linux 2.6.27.19 * * * **Edit** : `ps -e` produces output, and I found there are too many `grep`s. The number of `grep`s varies: 250, 450, and now I see around 520 greps. I traced back and found it is the result of a cron script. I still have to understand those cron scripts. Yes, `top` displays results. We manually shutdown the server 2 days back. System has been running from last 2 days. I see some oracle stuff running all the time. I just did the memory test, no faults detected


title: Moving software RAID 1 to Linux

text: I'm using a RAID 1 (mirrored pair) configuration in my Media Center/ NAS system. Currently it's running Windows 8 (yeah, big mistake I know) and I'm regretting it (did it for the games, not worth it). Currently I'm having two software RAID 1s (3TB + 2TB) configured with Storage Spaces and unfortunately formatted with NTFS. Now I would like to switch to Fedora (or maybe Ubuntu if there are advantages) for good. Is there a way that I could continue using the disks as they are without the need to format them with ext or something? I'm glad for every tip. Oh, the system disk is of cause not in a raid configuration.


title: X11 bad access at first try but working on successive tries

text: I use the following setup to forward `X11` output from my local machine to the server. I will outline the setup:   1. `X11` server and the client are on the same local machine.   2. The `X11` server runs on my local machine `A`.   3. The client runs on my local machine as a docker container and is called `B`.   4. I try to forward graphical output from a program (`R`) on the client `B` to the server on host `A`. Here is how the access works:   * My client `B` has read access to `/tmp/.X11-unix`. Hence, it has access to the unix domain socket `unix:0`.   * I allow access to this socket to the client `B` by issuing `xhost +si:localuser:$(USER)` on the host `A`. (Which is a server interpreted address which grants access to a single local user.) All of this works as expected BUT whenever I try to access the socket the first try is not working and I get the error `X11 protocol error: BadAccess (attempt to access private resource denied)`. When I close the `X11` graphics device again and reopen it everything works. The problem persists even when I use a totally different setup that relies on `ssh`-based `X11-forwarding`. I could trace the problem back to the `cairo` device if I use a `Xlib` device access is successful at first try. Does anyone have experience with programs that access the `X11` server's unix domain socket with a `cairo` device or has any kind of idea why this is happening?


title: Limiting processes to not exceed more than 10% of CPU usage

text: I operate a Linux system which has a lot of users but sometimes an abuse occurs; where a user might run a single process that uses up more than 80% of the CPU/Memory. So is there a way to prevent this from happening by limiting the amount of CPU usage a process can use (to 10% for example)? I'm aware of `cpulimit`, but it unfortunately applies the limit to the processes I instruct it to limit (e.g single processes). So my question is, how can I apply the limit to all of the running processes and processes that will be run in the future without the need of providing their id/path for example?


title: acpi, pm-util and xautolock all happy together

text: I'm currently using the xfce4 power manager on my laptop to manage sleeping and screen locking and dimming and all that good stuff. But I get the feeling that this is just some candy on top of the lower level `pm-util` and `acpi` scripts that live in `/etc` so I'd like to just do it with config files, making it easier to move between the various flavours of Linux that I use in several locations. I have been able to successfully setup my `sudo pm-suspend` to lock the screen on wake-up using this script: https://github.com/fommil/unix/blob/master/etc/pm/sleep.d/00lock-screen but I can't see how to listen to similar triggers for inactivity timeouts. The ideal setup for me is (I use `i3lock` for screen locking):   * dim the screen after 2 minutes of inactivity, and to brighten the screen again if activity is detected (with hotcorners)   * screen locks after 5 minutes of inactivity (with hotcorners to allow watching videos). I am using `xautolock` to spawn this.   * suspending to RAM after 15 minutes of inactivity (again with hotcorners). I looked into using `xautolock`'s `killer` feature for this, but it doesn't seem to ever succeed in calling `sudo pm-suspend`, even though I'm in the sudoers file to not need a password.   * screen is locked when waking from sleep (sleep may be caused by pressing a physical button, closing the lid, or calling `pm-suspend`). Currently I'm relying on the xfce4 power manager to setup the lid closing calls, but it looks like I can use `/etc/acpi/local/lid.sh.post` (at least on Debian) to setup a hook. With relation to screen locking, I'm finding that I have to repeat `i3lock` commands and config in each of   * my `xmonad` config file (so I can force a screen lock)   * the above script for waking from sleep   * in the `xautolock` command which feel clunky. With this in mind, I'd be greatly obliged if the following questions could be answered:   1. **How do I attach idle activity hooks that can suspend to RAM?**   2. **Is there a cleaner way to globally specify the screen locker?**   3. **How do I attach idle / active hooks that can dim/brighten the screen?**


title: What is the modern equivalent of reading `/dev/audio`?

text: Recently my trusty home PC died after 10 years. The ensuing upgrade (from SuSE 10 to OpenSuSE 12.3) was something of a culture shock for me - none of the convenient shortcuts and utilities I had collected work anymore. Today I'm trying to get sound input working again. I used to record late-night programmes from my local radio station via the line input of my sound card via a tiny little utility that does nothing but open `/dev/audio`, perform a few ioctls and then read bytes from it (and write it to a WAV file with libsndfile). Nothing fancy, just a tiny "autorecord" utility that can record N seconds of sound, and can run through `cron`, without a front-end, without requiring X, and indeed without me having to be logged on. (It was originally adapted from xawtv's `record.c`.) Now this no longer works. Although my sound card is configured, I can no longer record sound with this tool - in fact, there doesn't seem to be a `/dev/sound` anymore! From what I've gathered, even in 2004 it was a grudgingly-supported legacy feature, while all the cool people were supposed to program against the much fancier and capable ALSA interface. What is the present-day recommended way of quickly grabbing input from the sound device? Can I re-enable `/dev/sound` emulation somehow? I suppose a third-party program might do the trick as well, as long as it doesn't require me to provide an X session or press buttons in the middle of the night.


title: Monitoring Linux user activities and auditing them

text: `var/log/secure` provides us below information :               Mar 20 08:07:07 testing sshd[29749]: Accepted password for oracle from 10.51.1.12 port 49239 ssh2     Mar 20 08:07:07 testing sshd[29749]: pam_unix(sshd:session): session opened for user oracle by (uid=0)     Mar 20 08:12:16 testing sshd[29759]: Received disconnect from 10.51.1.12: 11: Disconnect requested by Windows SSH Client.     Mar 20 08:12:16 testing sshd[29749]: pam_unix(sshd:session): session closed for user oracle But what commands that `oracle` user executed we can not get from the above information? `/home/oracle/.bash_history` provides us information like this about what commands are executed:               cat /u01/up_apps.sh      cd daily/work     less Auto_Clone.log      cat Auto_Clone.log      exit     exit     cat /home/oracle/ashfaq/Auto_Clone/Auto_Clone.sh      cat /u01/down.sh      cd /u01/oracle/inst/apps/TESTING_testing/admin/scripts/     ./adstpall.sh apps/apps     ./adstrtal.sh apps/apps     cat /home/oracle/ashfaq/Auto_Clone/Auto_Clone.sh      cat /home/oracle/ashfaq/demo/main_exec.sh     cd /home/oracle/ashfaq/demo/     ls -ltr     cat main_exec.sh but does not tell us that user from which IP or hostname and at what time executed these commands. Can we create some custom file where we can store all this information in one file with time, IP, user name (`root`, `oracle`, `ricky` ) and commands executed by these users ?


title: installation causing error

text: I have downloaded g2ipmsg from http://www.ipmsg.org/archive/g2ipmsg-0.9.6.tar.gz while installation this package it causing some error                checking for G2IPMSG... configure: error: Package requirements (libgnomeui-2.0 >= 2.14                     gtk+-2.0 >= 2.4                     glib-2.0 >= 2.8) were not met:              No package 'libgnomeui-2.0' found              Consider adjusting the PKG_CONFIG_PATH environment variable if you         installed software in a non-standard prefix.              Alternatively, you may set the environment variables G2IPMSG_CFLAGS         and G2IPMSG_LIBS to avoid the need to call pkg-config.         See the pkg-config man page for more details      . How to resolve this error please let me know.


title: How to switch the first letters of two words?

text: $ echo 'foo bar' | sed SOMEMAGIC     boo far     $ echo 'one two' | sed SOMEMAGIC     tne owo      **Q:** in general, how can I replace the "b" from the "bar" to the "f" of the "foo"? And in reverse too, replace the "f" from the "foo" to the "b" of the "bar".


title: Linux Mint 14 - Segfault in steam.sh (cannot launch steam)

text: Here is my output when I try to launch steam:               tetra@nick-Inspiron ~ $ steam     Running Steam on linuxmint 14 64-bit     STEAM_RUNTIME is enabled automatically     Installing breakpad exception handler for appid(steam)/version(1373503443_client)     Gen6+ requires Kernel 3.6 or later.     steam: ../../../../../src/mesa/main/context.c:1499: _mesa_make_current: Assertion `newCtx->Version > 0' failed.     [2013-07-13 21:15:04] Startup - updater built Apr 30 2013 10:04:24     [2013-07-13 21:15:04] Opted in to client beta 'publicbeta' via beta file     /home/tetra/.local/share/Steam/steam.sh: line 704:  4342 Segmentation fault      (core dumped) $STEAM_DEBUGGER "$STEAMROOT/$PLATFORM/$STEAMEXE" "$@"     Installing bootstrap /home/tetra/.local/share/Steam/bootstrap.tar.xz     Running Steam on linuxmint 14 64-bit     STEAM_RUNTIME has been set by the user to: /home/tetra/.local/share/Steam/ubuntu12_32/steam-runtime     Installing breakpad exception handler for appid(steam)/version(1373503443_client)     Gen6+ requires Kernel 3.6 or later.     steam: ../../../../../src/mesa/main/context.c:1499: _mesa_make_current: Assertion `newCtx->Version > 0' failed.     [2013-07-13 21:15:05] Startup - updater built Apr 30 2013 10:04:24     [2013-07-13 21:15:05] Opted in to client beta 'publicbeta' via beta file     /home/tetra/.local/share/Steam/steam.sh: line 704:  4430 Segmentation fault      (core dumped) $STEAM_DEBUGGER "$STEAMROOT/$PLATFORM/$STEAMEXE" "$@"      I don't understand why I can't launch steam. I've reinstalled the package.


title: Why can't cron job find basic Linux commands?

text: I'm trying to set up a cron job to run a PHP script daily as part of a web- based booking system. It's been running perfectly for several years on a different Apache server using this in the crontab:               0 3 * * * wget -q -O /dev/null http://www.my_other_domain.org.uk/scheduled/my_script.php      I've just installed the script on another Apache server, and it runs correctly when called through the browser. However when I try to use cron, the cron daemon gives the message:               -: warning: setlocale: LC_ALL: cannot change locale (en_GB.utf-8)     -: wget: command not found      When I tried               0 3 * * * /usr/bin/env wget -q -O /dev/null http://www.mydomain.org.uk/scheduled/my_script.php      I got the message:               -: warning: setlocale: LC_ALL: cannot change locale (en_GB.utf-8)     -: /usr/bin/env: No such file or directory      Firstly, am I right in assuming that the setlocale warning is not relevant to the problem? I've also tried               0 3 * * * /usr/bin/php /var/www/vhosts/mydomain/httpdocs/scheduled/my_script.php      which gives               -: /usr/bin/php: No such file or directory      I also tried putting a shebang as the first line of my script, and getting cron to call it using the full path. The cron daemon reported that there was no such file or directory as /[full_path]/my_script.php . Trying to use curl was no better. I haven't got shell access to the server and I've been setting up the cron job through the Plesk control panel. The cron job seems to be running as scheduled. The system administrator did the following for me:               #which php     /usr/bin/php          #which wget     /usr/bin/wget          #which curl     /usr/bin/curl      That seems to confirm that the commands are in the right location. The above is an abbreviated history - I've lost count of the permutations and combinations I've tried, mostly as a result of reading advice in this and other forums. Can anyone tell me why the cron job is unable to find the commands and suggest a solution?


title: Debian wheezy C++11 source package

text: I'm currently learning debian packaging and I am making a source package for a C++11-based software. Debian wheezy does not have a 4.8+ g++ package, so how could I make a source package on this platform ? EDIT: I have successfully built my package with gcc 4.9 under wheezy using jessie repos, but when installing the package on a vanilla debian wheezy, the program execution errors about a libc conflict (that was to be expected).


title: How to enable someone to SSH to my server from Windows?

text: I want someone from windows to log in into my server using SSH, so he can edit files and install things. Is there a step to step how to do it? I need to:   1. Create his user account.   2. Configure it, giving him access to a single folder and nothing else (how?)   3. Generate a public key for him on Windows (how?)   4. Add his public key to authorized_keys correctly.   5. Tell him the command he needs to use to actually log in from Window's terminal. I pretty much only know how to create the account. How to accomplish the latter steps?


title: Print fields from file only if line starts with a specific word

text: I have the following file:               …        LINK=dummy 172.17.100 => 10.218.11 [PATH=/etc]           FILE=hosts 172.17.100 => 10.218.11 [PATH=/etc]            FILE=network 172.17.100 => 10.218.11 [PATH=/etc/sysconfig]          LINK=empty 172.17.100 => 10.218.11 [PATH=/etc]        FILE#TEST 172.17.100 => 10.218.11 [PATH=/etc/sysconfig]      … How to print the first field and the fifth field only if line start with the word `FILE`? The word `FILE` could be located immediately in the begging of line or after space or TAB in the line. Example of what I expected to get                 FILE=hosts   [PATH=/etc]       FILE=network [PATH=/etc/sysconfig]       FILE#TEST    [PATH=/etc/sysconfig]      I try this awk but doesn't work               awk '$1 == "^[[:blank:]]*FILE*" && '{print $1" "$5}'  file


title: kvm guest Network interface no Authenication

text: i have a kvm host based on ubuntu 10.04 host , and the guest is rhel 5.3 64-bit, on the guest i tried to execute mii-tool eth0               SIOCGMIIREG on eth0 failed: Input/output error     SIOCGMIIREG on eth0 failed: Input/output error     eth0: no autonegotiation, 100baseTx-FD, link ok      and mii-tool -v eth4               eth0: no autonegotiation, 100baseTx-FD, link ok       product info: vendor 00:50:43, model 2 rev 0       basic mode:   software reset, autonegotiation enabled       basic status: autonegotiation complete, link ok       capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD       advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control       link partner: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD      and mii-tool -r eth0 this is output /var/log/message               Feb 20 13:16:44 xil1 kernel: [ 1289.790780] e1000: eth4 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX      so that it is supposed to work with 1000MB/s but it still working with 100MB/s any suggestion what may be the problem ?


title: How can I merge two ddrescue images?

text: I have two ddrescue images created from contiguous recovery attempts of the same media. The two images are the same size but have complementary data:               $ od part-one/ddrescue_image --skip-bytes 227966006774 --read-bytes 32     3242365232766 113056 016517 102014 074371 144073 000000 000000 000000     3242365233006 000000 000000 000000 000000 000000 000000 000000 000000     3242365233026     $ od part-two/ddrescue_image --skip-bytes 227966006774 --read-bytes 32     3242365232766 000000 000000 000000 000000 000000 124616 163450 064251     3242365233006 074567 134433 012742 022160 044301 054235 140604 020633     3242365233026      How can I merge them into a single, complete image? ## Details   * The second image is simply a continuation of the first recovery attempt, à la:              $ ddrescue corrupt-partition part-one/ddrescue_image part-one/ddrescue_log     $ mkdir part-two; cp part-one/ddrescue_log part-two/ddrescue_log     $ ddrescue corrupt-partition part-two/ddrescue_image part-two/ddrescue_log        * The second image is almost entirely zeros, but contains 18 KB of recovered data spread across 1847 isolated regions.   * I tried using the technique mentioned on this mailing list,              $ ddrescue --domain-logfile=part-two/ddrescue_log part-two/ddrescue_image part-one/ddrescue_image part-one/ddrescue_log               GNU ddrescue 1.16     Press Ctrl-C to interrupt     Initial status (read from logfile)     rescued:   937286 MB,  errsize:   62976 B,  errors:     122     Current status     rescued:   937286 MB,  errsize:   62976 B,  current rate:        0 B/s        ipos:         0 B,   errors:     122,    average rate:        0 B/s        opos:         0 B,     time since last successful read:       0 s     Finished      but it doesn't appear to have changed anything.


title: Solaris 10 modified time

text: In Solaris 8, when we access the file, the access time changes but modified time remains same. But in Solaris 10, we see that both access and modified time changes when accessing the file. We checked the `at`, `mt` using `truss -v lstat -t lstat ls -l <file>`. Is this the behavior of Solaris 10?


title: When connected by VNC all files are read only

text: For some reason when I'm connected to my server with VNC, I do not have permission to edit system files, even when I su - root I can only access system files in read only mode. Please can someone help me figure this out?


title: Renaming a Hard Drive

text: I have a secondary internal HDD to store auxiliary data. I want to give it a better name. How do I do it?


title: Kali Linux webcrawling with credentials entered

text: I'm looking for a tool in which I can provide credentials and it should login the webapplication and try to crawl to pages etc. I've found **Vega** but I have to enter a cookie. Is there a tool which I can use providing plaintext username and password? It does not have to be natively in Kali, but it would be welcome.


title: Why does kill not have a parameter for file and not for port number?

text: If I want to stop a program given its tcp port number or its file or named executable, can I run something like `kill -tcpPortNumber $1` where the parameter `$1` is a tcp port number or `kill -filename $1` where the parameter is a filename? The background is a problem in the following question: http://stackoverflow.com/questions/11583562/how-to-kill-process-running-on- particular-port-in-linux The problem does occur in practice and I think that user Bepetersn has a solution that looks like what I mean. `sudo kill $(fuser -n tcp <port_number> 2> /dev/null)` But what I'd like to achieve is that the kill program could take tcp port number and/or filename as a parameter system-wide for any user, including sudo. So is it possible to add parameters system-wide to a system program like kill so that the tcp port number and/or a fileename can be parameters and that this change is permanent for any user including ubuntu sudo?


title: flashcache tuning

text: I installed flashcache version 3.1.1 and created a write-back cache. The performance is good as long as the percentage of dirty blocks is not too high. My application does heavy IO at the beginning and then calculates for a long time. So flashcache has enough time to write the dirty blocks to the hdd but it writes the data with a very small rate (2 MB/s). I tried to change that with sysctl but it didn't have any effect. How can I change the rate properly? Here is my sysctl output.               $sysctl -a | grep flash     dev.flashcache.sda6+sdb9.cache_all = 1     dev.flashcache.sda6+sdb9.clean_on_read_miss = 0     dev.flashcache.sda6+sdb9.clean_on_write_miss = 0     dev.flashcache.sda6+sdb9.dirty_thresh_pct = 20     dev.flashcache.sda6+sdb9.do_pid_expiry = 0     dev.flashcache.sda6+sdb9.do_sync = 0     dev.flashcache.sda6+sdb9.fallow_clean_speed = 100     dev.flashcache.sda6+sdb9.fallow_delay = 600     dev.flashcache.sda6+sdb9.fast_remove = 0     dev.flashcache.sda6+sdb9.io_latency_hist = 0     dev.flashcache.sda6+sdb9.lru_hot_pct = 75     dev.flashcache.sda6+sdb9.lru_promote_thresh = 2     dev.flashcache.sda6+sdb9.max_clean_ios_set = 40     dev.flashcache.sda6+sdb9.max_clean_ios_total = 80     dev.flashcache.sda6+sdb9.max_pids = 100     dev.flashcache.sda6+sdb9.new_style_write_merge = 0     dev.flashcache.sda6+sdb9.pid_expiry_secs = 60     dev.flashcache.sda6+sdb9.reclaim_policy = 0     dev.flashcache.sda6+sdb9.skip_seq_thresh_kb = 0     dev.flashcache.sda6+sdb9.stop_sync = 0     dev.flashcache.sda6+sdb9.zero_stats = 0      PS: My system is Debian testing.


title: UNIX ACL disadvantages

text: I have read a lot about how great UNIX ACLs are. For example, one good example can be viewed here. However, are there any disadvantages or configurations that cannot be expressed using ACL?


title: Trying to improve sound quality with ALSA

text: I'm trying to make ALSA 1.0.23 to use different resampling algorithm. I did some research on the Internet and found that putting the line `defaults.pcm.rate_converter "<library>"` into either `/etc/asound.conf` or `~/.asoundrc` will tell ALSA to use different resampling algorithm. However, it doesn't seem to work. Putting the following line into ~/.asoundrc `defaults.pcm.rate_converter "speexrate_best"` doesn't have any effect on either CPU usage or the list of loaded libraries (doing `lsof -n | grep speex` while playing something yields nothing). Although, the following snippet forces ALSA to use new resampling algorithm:               pcm.!default {         type rate         slave {             pcm "hw:0,0"             rate 48000         }         converter "speexrate_best"     } Doing so makes CPU usage to 10-15% and makes two new shared libraries appear in the list of `lsof`, but software mixing stops working and I can't play multiple audio files. I'm probably missing something obvious, but I'm complete noob. What can be an issue here?


title: What is the best tool/tools to record video from webcam on linux?

text: My webcam is detected correctly (and i can use it in skype without any issues), but how can i record video on linux preferably with gui tool ?


title: Randomise or shred memory of an application

text: Is it possible to randomise or shred memory of a particular application just after its life ends, or better, whenever it deallocates some memory? A command-line utility like this would be perfect: shred-memory [options] [{params to the application...}]


title: Install of pycrypto [Errno 28] No space left on device

text: I am installing this tool to Debian GNU/Linux 7.5 x64 (wheezy) and when I run `install_mnemosyne.sh` I get this error when the pycrypto installation is running:               Downloading/unpacking pycrypto (from -r requirements.txt (line 8))       Downloading pycrypto-2.6.1.tar.gz (446kB): 446kB downloaded     Cleaning up...     Exception:     Traceback (most recent call last):       File "/opt/mnemosyne/env/local/lib/python2.7/site-packages/pip/basecommand.py"         status = self.run(options, args)       File "/opt/mnemosyne/env/local/lib/python2.7/site-packages/pip/commands/instal         requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl       File "/opt/mnemosyne/env/local/lib/python2.7/site-packages/pip/req.py", line 1         do_download,       File "/opt/mnemosyne/env/local/lib/python2.7/site-packages/pip/req.py", line 1         self.session,       File "/opt/mnemosyne/env/local/lib/python2.7/site-packages/pip/download.py", l         unpack_file(temp_location, location, content_type, link)       File "/opt/mnemosyne/env/local/lib/python2.7/site-packages/pip/util.py", line         untar_file(filename, location)       File "/opt/mnemosyne/env/local/lib/python2.7/site-packages/pip/util.py", line         destfp.close()     IOError: [Errno 28] No space left on device          Storing debug log for failure in /root/.pip/pip.log      But `df -i` shows this:               Filesystem                                               Inodes IUsed   IFree IUse% Mounted on     rootfs                                                    85344  20381    64963   24% /     udev                                                     214285    350   213935    1% /dev     tmpfs                                                    216800    287   216513    1% /run     /dev/disk/by-uuid/aa26072b-e0f4-4962-ba44-76d5e65346de    85344  20381    64963   24% /     tmpfs                                                    216800      3   216797    1% /run/lock     tmpfs                                                    216800      2   216798    1% /run/shm     /dev/sda9                                              35323904    576 35323328    1% /home     /dev/sda8                                                 97536    270    97266    1% /tmp     /dev/sda5                                                549440  57132   492308   11% /usr     /dev/sda6                                                183264   8085   175179    5% /var      and `du -sh /*`:               6,0M    /bin     16M     /boot     0       /dev     3,5M    /etc     14M     /home     0       /initrd.img     94M     /lib     12K     /lost+found     3,0K    /media     1,0K    /mnt     158M    /opt     19M     /pokus     0       /proc     294K    /root     808K    /run     5,6M    /sbin     1,0K    /selinux     1,0K    /srv     0       /sys     6,7M    /tmp     1,7G    /usr     2,2G    /var     0       /vmlinuz      If I run `df -i` during installation increase is about 1%:                 Filesystem                                               Inodes IUsed   IFree IUse% Mounted on         rootfs                                                    85344  20381    64963   25% /         udev                                                     214285    350   213935    1% /dev         tmpfs                                                    216800    287   216513    1% /run         /dev/disk/by-uuid/aa26072b-e0f4-4962-ba44-76d5e65346de    85344  20381    64963   25% /         tmpfs                                                    216800      3   216797    1% /run/lock         tmpfs                                                    216800      2   216798    1% /run/shm         /dev/sda9                                              35323904    576 35323328    1% /home         /dev/sda8                                                 97536    270    97266    1% /tmp         /dev/sda5                                                549440  57132   492308   11% /usr         /dev/sda6                                                183264   8085   175179    5% /var      But `df -h`:               Filesystem                                                Space Used Free Use% Mounted on     rootfs                                                     323M  311M     0 100% /     udev                                                        10M     0   10M   0% /dev     tmpfs                                                      406M  832K  405M   1% /run     /dev/disk/by-uuid/aa26072b-e0f4-4962-ba44-76d5e65346de     323M  311M     0 100% /     tmpfs                                                      5,0M     0  5,0M   0% /run/lock     tmpfs                                                      2,4G     0  2,4G   0% /run/shm     /dev/sda9                                                  531G  211M  504G   1% /home     /dev/sda8                                                  368M   18M  332M   5% /tmp     /dev/sda5                                                  8,3G  1,9G  6,0G  24% /usr     /dev/sda6                                                  2,8G  2,3G  402M  85% /var      So how can I expand rootfs please?


title: Automated mounting for usb drives in linux

text: I have a five 4TB usb drives. I want to setup a mount point, `/mnt/backups` so that when I plug in any of those drives, they get automatically mounted to `/mnt/backups`. The problem is that when the drive path changes all the time for the drives even though I put them in the same usb slot. I've seen /dev/sde1 through /dev/sdh1... OS is Ubuntu.


title: Why does Linux use a swap partition rather than a file?

text: It seems to me a swap file is more flexible.


title: SysV init run levels

text: On a system that uses SysV init run levels such as _Centos 5_ , when the OS is booting, does it go straight to the run level defined in `/etc/inittab`? If I change my run level using the `init` command do the kill scripts for my current run level execute and then the start up scripts for the new run level execute? For example if I was at run level 3 and entered `init 1`, would the kill scripts in `/etc/rc.d/rc3.d` be executed and then upon entering run level 1 would the startup scripts in `/etc/rc.d/rc1.d` be run?


title: How to call a service URL from bash shell script in parallel?

text: I have a service which I am calling from another application. Below is my service URL which I am calling -               http://www.betaservice.domain.host.com/web/hasChanged?ver=0      I need to do some load test on my above service URL in multithreaded way instead of calling sequentially one by one. Is there any way from bash shell script, I can put a load on my above service URL by calling it in multithreaded way? I can have 60-70 threads calling above URL in parallel very fast if possible?


title: WMI-based hotkeys on not working

text: On my `Dell latitude e6540`, the WMI hotkeys `Fn+UP` and `Fn+DOWN` are not working. I have all necesary modules compiled in my kernel:               CONFIG_DELL_LAPTOP=m     CONFIG_DELL_WMI=m     CONFIG_DELL_WMI_AIO=m      On the predecessor model (Latitude e6520), all worked fine, without any need for additional setup. I can still change the brightness with `echo`:               echo 35 > /sys/class/backlight/acpi_video0/brightness      but only as `root`, obviously. Pressing `Fn+UP` and `Fn+DOWN` does not change the walue in `/sys/class/backlight/acpi_video0/brightness`. On the previous model, it does change the value. One thing I noticed, on the older model, the max value is `15`. On the new model it is `95`. Looks like something might have changed inside this mechanism. Thus my question: How can I make WMI hotkeys work on my new laptop? # UPDATE: I have just noticed that the WMI hotkeys work fine when I am in BIOS !!! That is quite surprising that they don't work when I boot into linux. following is output of dmesg. The mention of `dell_wmi: Received unknown WMI event` looks relevant to my problem, but I get the same messages on the old laptop, where wmi hotkeys are working. So this alone does not seeem the be the issue.               dmesg | egrep -i '(dell|wmi)'     [Tue Apr 15 22:04:30 2014] DMI: Dell Inc. Latitude E6540/05V0V4, BIOS A05 09/03/2013     [Tue Apr 15 22:04:30 2014] ACPI: RSDP 00000000000eee60 00024 (v02 DELL  )     [Tue Apr 15 22:04:30 2014] ACPI: XSDT 00000000d8fe0080 0007C (v01 DELL    CBX3    01072009 AMI  00010013)     [Tue Apr 15 22:04:30 2014] ACPI: FACP 00000000d8fed7e8 0010C (v05 DELL    CBX3    01072009 AMI  00010013)     [Tue Apr 15 22:04:30 2014] ACPI: DSDT 00000000d8fe0188 0D659 (v02 DELL    CBX3    00000014 INTL 20091112)     [Tue Apr 15 22:04:30 2014] ACPI: APIC 00000000d8fed8f8 00072 (v03 DELL    CBX3    01072009 AMI  00010013)     [Tue Apr 15 22:04:30 2014] ACPI: FPDT 00000000d8fed970 00044 (v01 DELL    CBX3    01072009 AMI  00010013)     [Tue Apr 15 22:04:30 2014] ACPI: HPET 00000000d8feed38 00038 (v01 DELL    CBX3    01072009 AMI. 00000005)     [Tue Apr 15 22:04:30 2014] ACPI: MCFG 00000000d8fef148 0003C (v01 DELL    CBX3    01072009 MSFT 00000097)     [Tue Apr 15 22:04:38 2014] dcdbas dcdbas: Dell Systems Management Base Driver (version 5.6.0-3.2)     [Tue Apr 15 22:04:39 2014] wmi: Mapper loaded     [Tue Apr 15 22:04:39 2014] input: Dell WMI hotkeys as /devices/virtual/input/input10     [Wed Apr 16 18:30:04 2014] dell_wmi: Received unknown WMI event (0x0)     [Fri Apr 18 17:09:41 2014] dell_wmi: Received unknown WMI event (0x0)     [Fri Apr 18 17:09:41 2014] dell_wmi: Received unknown WMI event (0x0)     [Fri Apr 18 17:09:49 2014] dell_wmi: Received unknown WMI event (0x0)      # UPDATE2 after patching the WMI module, I get following messages for `Fn+UP` and `Fn+DOWN`               2014-04-18 19:00:49  kernel: [  120.731480] dell_wmi: WMBU = 0002 0010 0048     2014-04-18 19:00:49  kernel: [  120.731496] wmi: DEBUG Event GUID: 9DBB5994-A997-11DA-B012-B622A1EF5492          2014-04-18 19:00:53  kernel: [  123.935400] dell_wmi: WMBU = 0002 0010 0050     2014-04-18 19:00:53  kernel: [  123.935415] wmi: DEBUG Event GUID: 9DBB5994-A997-11DA-B012-B622A1EF5492


title: detect process eating cpu without: top, htop, ps?

text: I went thru a problem where I could only guess what process was eating the cpu. My cpu usage was about 80% for all cores at psensor. I tried `htop`, `top` and `ps -A -o pcpu,pid,cmd --sort +pcpu` (the last one I even tried with sudo to no avail).   All these shown the culprit pid (that I was aware of) using about 7% only... When I SIGKILL on that pid, all get back to normal. To test, I did an infinite loop on terminal `while true;do echo -n;done` but that I could clearly see at htop; so my guess what was causing trouble was not similar to that... So I wonder if there are other ways I could have found the culprit without having to guess? Thinking again, I think I would like to know what calculations `psensor` and "system load indicator applet" uses that was able to show that value but the others were unable to? PS.: linking about wait time, linking about load average


title: Working DNS-DHCP combo for LAN

text: Can anyone recommend a working DNS-DHCP combo for a small mixed-platform LAN? Preferably one where hosts can be assigned IP addresses and/or names with a web-GUI. The typical DHCP package on Linux claims to support BIND, but last I checked, it did not actually work. Of course, this might be out of date.


title: starting from last line processed when processing log file several times

text: I am designing a logging and reporting system for a web application.   Within the web application some events can happen ("user logged in", "user performed action X", etc..).   I would like the application to log these events in a flat log file.   Then I would like to write another program that would periodically get run and extract data from this file to maintain a running aggregate report in a database table (like "how many events of type X happen per hour", or "get the daily total of event X"). One of the challenges is to make sure that the reporting program doesn't process the same line twice. Is there a Unix way to design this type of system or to deal with the "keep track of lines already processed" kind of problem? I already thought about rotating the logs just before processing them and assigning unique line numbers to each line, but they both seem hacky. Thank you.


title: Unclaim a device

text: So I am using Ubuntu and trying to use some hardware which I had some problems with before. The problem before was that the company who made my hardware sold their internal parts to another company who made some different hardware with the same ID. Someone kindly made a driver for it which came with Ubuntu, but stopped the driver for my device from working. On my last system I just tracked down the kernel module and disabled it. I am getting the same message as on my previous machine: > Could not claim device (Vid: 0x2457, Pid: 0x1002, iface: 0) but plugging in the device does not seem to create an entry in /dev like before. How can I find what is claiming my device? I assume that the dmesg: > usb 4-1: new full speed USB device using ohci_hcd and address 16 is just saying that it is being detected and it is not ohci that is blocking my access.


title: rsync: colon in file names

text: Other than by renaming the files first, how can I `rsync` files that may have colons in their names?


title: What would cause vim not to retain command history?

text: On other distros I have run, vim remembers your command history even between sessions; this is especially handy when doing a lot of similar operations on different files. For some reason, it has been flushing in Ubuntu 12.04, and I can't figure out why. Here is my `:set` info:               :set     --- Options ---       background=dark     helplang=en         history=1000      nomodeline   scroll=27           showmatch           ttyfast       expandtab           hidden              incsearch           ruler      showcmd             softtabstop=4       ttymouse=xterm2       backspace=indent,eol,start       fileencoding=utf-8       fileencodings=ucs-bom,utf-8,default,latin1       printoptions=paper:letter       runtimepath=~/.vim,/var/lib/vim/addons,/usr/share/vim/vimfiles,/usr/share/vim/vim73,/usr/share/vim/vimfiles/after,/var/lib/vim/addons/after,~/.vim/after       suffixes=.bak,~,.swp,.o,.info,.aux,.log,.dvi,.bbl,.blg,.brf,.cb,.ind,.idx,.ilg,.inx,.out,.toc


title: Can't kill process, not in zombie or uninterruptable sleep

text: I can't figure out how to kill this process. I ran `du`, but it took too long so I tried to kill it. It didn't die. I've tried SIGKILL, SIGSTOP, SIGINT, etc, with no effect (can't kill it, can't stop it). It is **not** in `D` or `Z` state, as you can see in the following `top` output:                 PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND                                                                                12047 alex      39  19  5656  496  408 R  99.6  0.0 209:10.04 du --max-depth=1 -h      Since it won't stop, I can't attach to it with gdb either. Does anyone have any ideas how to kill this without rebooting?


title: Dereferencing hard links

text: In the manual page of `tar` command, an option for following hard links is listed.               -h, --dereference           follow symlinks; archive and dump the files they point to          --hard-dereference           follow hard links; archive and dump the files they refer to      How does `tar` know that a file is a hard link? How does it _follow_ it? What if I don't choose this option? How does it **not** hard-dereference?


title: What steps do I need to take to successfully install multiple linux distros on my computer?

text: I want to put my old laptop to use and install several of the most popular Linux distros on it. I currently have Windows 7 on it. My question is: How do I create a set up such that when I start the laptop a list of all the different distros appear as options?


title: Print shell arguments in reverse order

text: I am a bit stuck. My task is to print the arguments to my script in reverse order except the third and fourth. What I have is this code:               #!/bin/bash          i=$#     for arg in "$@"     do         case $i         in             3) ;;             4) ;;             *) eval echo "$i. Parameter: \$$i";;         esac         i=`expr $i - 1`     done      As I hate eval (greetings to PHP), I am looking for a solution without it but I am not able to find one. How can I define the position of the argument dynamically? PS: No its not a homework, I am learning shell for an exam so I try to solve old exams.


title: How come Debian has no time(1) manpage?

text: Searching for manpage for `time` command does not yield any result (search form). As a sidenote, it appears to be a BASH built-in command since `dpkg --search bin/time` cannot find it. Perhaps such commands don't have their own manpages?


title: Internet not working

text: I am using Linux mint. And this is my kernel.               uname -a     Linux nithesh-desktop 3.8.0-19-generic #29-Ubuntu SMP Wed Apr 17 18:16:28 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux      I was having a networking problem, when I had used Lubuntu. So, I installed Linux Mint, thinking that it was a software issue. But even when I had linux mint, the internet didn't work. Critical info: During a lightning strike, my modem's motherboard fried, along with the ethernet port attached in the computer. I bought a new modem, and a new External Ethernet Port [RTL-8139/8139C/8139C+]. It had worked for a few days, before the internet crashed again. I was downloading a torrent (for about 26 hours), when it abruptly stopped working. I was wondering whether this was due to 'collision'. EDIT: Through BIOS settings, I have disabled the inbuilt ethernet card.Even after that, the network isn't working. `ifconfig` gives me this result.               eth0      Link encap:Ethernet  HWaddr 00:e0:5c:00:42:aa             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:190 errors:0 dropped:0 overruns:0 frame:0           TX packets:190 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:27879 (27.8 KB)  TX bytes:27879 (27.8 KB)      I later found out that eth0 is my new ethernet card, and eth1 is the old, fried, non-working one. [Note: The following was requested by M_dk ] `cat /etc/network/interfaces` gives me the following output:               # interfaces(5) file used by ifup(8) and ifdown(8)     auto lo     iface lo inet loopback      `sudo iptables -L -nv` gives me the following output:               Chain INPUT (policy ACCEPT 0 packets, 0 bytes)     pkts bytes target     prot opt in     out     source               destination                   Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)     pkts bytes target     prot opt in     out     source               destination                   Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)     pkts bytes target     prot opt in     out     source               destination      [Note: The following was requested by michas] `ip link` gives the following output:               1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT      link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000     link/ether 00:e0:5c:00:42:aa brd ff:ff:ff:ff:ff:ff      I have a question though. Is this a software problem or a hardware problem? Please help! I've been suffering without internet for a month!


title: mmap() failed: Cannot allocate memory - how do I find out who's complaining?

text: mmap() failed is popping up in my .xsession-errors in bursts. But there's no indication about what application it is failing with. How do I look into this after it has happened? I usually discover the failures only when I occasionally switch to my "tail -f .logs/*" workspace.


title: Selecting icon for tray notifications from Bash scripts (KDE)

text: Q: How to make Qt KDE tray notification from Bash script ? A: @SO: Activating KDE 4 notifications from bash scripts Q: How to make notifications from scripts running as root ? A: @Unix.SE: Show a notification across all running X displays **Q1:** Ok... I see `kdialog` and `notify-send` send tray notification. Am I right only `notify-send -i` allows to setup notification icon? **Q2:** In example there is `notify-send -i 'dialog-information'` icon -> what are other icons available by default ? Q3: Will it work with other window managers ?


title: Difference in file listing for SSH and SFTP

text: I have `SSH` access to a server and I have never bothered to use `SFTP` until now. I transferred a file using `FileZilla` to the server. However, the weird thing is that the file _doesn't_ show up when I `SSH` into the server and do a `ls` or even a `ls -a` (just in case). The vice versa is also true, when I `SSH`, I am able to see the file I created via `SSH` access. However, when I fetch the directory listing via `SFTP`, that file is nowhere to be seen! What is the reason for this -- files created via SSH and SFTP are not shown in the directory listing of each other? I can provide more information if required that might assist in understanding this problem.


title: Measuring internet link downtime

text: My ISP is known for having frequent downtimes. I use a ubuntu 10.04 based server as a primary gateway for my NAT network. I am looking for a tool or script that will measure the duration of each down time.


title: Linux kernel 2.6.38 compilation error

text: When I try to compile the Linux 2.6.38 kernel on my Linux PC, I get:               $ make defconfig     $ make      I get:               ubuntu/ndiswrapper/iw_ndis.c:1966:2: error: unknown field ‘num_private’ specified in initializer     ubuntu/ndiswrapper/iw_ndis.c:1966:2: warning: initialization makes pointer from integer without a cast     ubuntu/ndiswrapper/iw_ndis.c:1967:2: error: unknown field ‘num_private_args’ specified in initializer     ubuntu/ndiswrapper/iw_ndis.c:1967:2: warning: excess elements in struct initializer     ubuntu/ndiswrapper/iw_ndis.c:1967:2: warning: (near initialization for ‘ndis_handler_def’)     ubuntu/ndiswrapper/iw_ndis.c:1970:2: error: unknown field ‘private’ specified in initializer     ubuntu/ndiswrapper/iw_ndis.c:1970:2: warning: initialization makes integer from pointer without a cast     ubuntu/ndiswrapper/iw_ndis.c:1970:2: error: initializer element is not computable at load time     ubuntu/ndiswrapper/iw_ndis.c:1970:2: error: (near initialization for ‘ndis_handler_def.num_standard’)     ubuntu/ndiswrapper/iw_ndis.c:1971:2: error: unknown field ‘private_args’ specified in initializer     ubuntu/ndiswrapper/iw_ndis.c:1971:26: warning: initialization from incompatible pointer type     make[2]: *** [ubuntu/ndiswrapper/iw_ndis.o] Error 1     make[1]: *** [ubuntu/ndiswrapper] Error 2     make: *** [ubuntu] Error 2      Any ideas how to solve this and why it happen with default configuration?


title: Graphical archive manager that uses /tmp

text: I am looking for a (preferably) graphical archive manager that can be configured to use `/tmp` as a scratch area for decompressing. My setup is as follows: I have my local workstation with `/home` mounted from a NFS partition which works well in general and I also have a good chunk of RAM so I have `/tmp` setup as a RAM disk. I also need to work with large (100-300MB) `tar.*` and `zip` archives on a regular basis. In my testing, I've found that decompressing to `/tmp` and then moving the files into the NFS mount is orders of magnitude faster, however doing this currently requires me to drop out to a shell and do it all manually so I rarely bother unless I need something done quickly. So, does anyone have any thoughts on applications that I could use to hopefully automate this a little more? I could easily write a console level wrapper to do the job, but I'm hoping for something that I can use from/with nautilus.


title: Rsync problem with cron and no problem manually

text: I have a backup.sh file that launch an rsync command. This rsync is to backup my dedicated server on a RaspberryPi running raspbian. (I use keychain so I don't need to type any password etc ...) The problem is that when I launch the batch manually everything works, but when it's crontab (with the same user) I have the following error :               2013/10/07 19:36:02 [6456] rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]     2013/10/07 19:36:02 [6456] rsync error: error in rsync protocol data stream (code 12) at io.c(605) [Receiver=3.0.9]      Here is my backup.sh file               #!/bin/bash          echo "_ backup start "$(date +%H:%M:%S)     echo " "          /usr/bin/rsync -avh --rsync-path='/usr/bin/rsync' --delete --log-file='/home/user/rsync.'$(date +%d%m%Y-%H%M%S)'.log' --rsh='ssh -p 1234' user@server.com:/path/to/archives/ /media/backup/          echo " "     echo "_ backup end "$(date +%H:%M:%S)      And now the crontab line (crontab -e)               # m h  dom mon dow   command      30 5  *   *   *     /home/user/backup.sh | mail -s "Backup RPi "$(date +\%d/\%m/\%Y-\%X) user+rpibackup@gmail.com      Regards


title: Why can't I install Debian amd64 in VirtualBox?

text: I'm trying to install the Debian ISO, `debian-live-7.2-amd64-standard.iso` into a virtual machine in VirtualBox but it just hangs. I'm running this version:               $ virtualbox -h     Oracle VM VirtualBox Manager 4.3.6_RPMFusion     (C) 2005-2013 Oracle Corporation     All rights reserved.


title: VNC: Text/fonts not showing up on XFCE tip of day window?

text: Using FreeBSD 8.2. Setup a vncserver on my FreeBSD machine. Accessing it from Windows using Tightvnc Viewer. Most fonts show up fine. However my Xfce tip of the day window shows up blank. If I log directly into the machine the text is there but over VNC it is not. I assume this is some kind of font issue? My vnc options are: > vncserver_options="-geometry 800x600 -compatiblekbd -fp > '/usr/X11R6/lib/X11/fonts/misc/,/usr/X11R6/lib/X11/fonts/75dpi/,/usr/X11R6/lib/X11/fonts/100dpi/'" What's causing this problem and how can I fix it? I'm wondering if I need to add another font directory?


title: Debian unstable chroot security issues

text: This page describes how you can use the `debootstrap` utility to install a base Debian unstable/sid system on an existing Linux machine. The new install is accessible using `chroot`. When doing this, what security issues should be kept in mind? For example, what needs to be done to stop background/startup processes from starting in the new chroot or otherwise interfering with the main system?


title: What are some alternatives to virtualbox

text: I have a lot of trouble lately installing on a box that i can't reboot or change the kernel. Is there any other package that supports gre tunnels (if the os supports ) that i can run on linux? Basically i want linux on linux. I can't yum upgrade or reboot.


title: When is dd suitable for copying data? (or, when are read() and write() partial)

text: _Short version:_ In what circumstances is `dd` safe to use for copying data, safe meaning that there is no risk of corruption due to a partial read or write? _Long version — preamble:_ `dd` is often used to copy data, especially from or to a device (example). It's sometimes attributed mystical properties of being able to access devices at a lower level than other tools (when in fact it's the device file that's doing the magic) — yet `dd if=/dev/sda` is the same thing as `cat /dev/sda`. `dd` is sometimes thought to be faster, but `cat` can beat it in practice. Nonetheless, `dd` has unique properties that make it genuinely useful sometimes. _Problem:_ `dd if=foo of=bar` is not, in fact, the same as `cat <foo >bar`. On most unices¹, `dd` makes a single call to `read()`. (I find POSIX fuzzy on what constitutes “reading an input block” in `dd`.) If `read()` returns a partial result (which, according to POSIX and other reference documents, it's allowed to unless the implementation documentation says otherwise), a partial block is copied. Exactly the same issue exists for `write()`. _Observations_ : In practice, I've found that `dd` can cope with block devices and regular files, but that may just be that I haven't exercised it much. When it comes to pipes, it's not difficult to put `dd` at fault; for example try this code:               yes | dd of=out bs=1024k count=10      and check the size of the `out` file (it's likely to be well under 10MB). _Question_ : In what circumstances is `dd` safe to use for copying data? In other words, what conditions on the block sizes, on the implementation, on the file types, etc, can ensure that `dd` will copy all the data? (GNU dd has a `fullblock` flag to tell it to call `read()` or `write()` in a loop so as to transfer a full block. So `dd iflag=fullblock oflag=fullblock` is always safe. My question is about the case when these flags (which don't exist on other implementations) are not used.) ¹  I've checked on OpenBSD, GNU coreutils and BusyBox.


title: Where to find this specific source (centos 2.6.18-53.el5PAE)

text: okay all my looking around on the normal kernel site ftp can't find it. I need specifically, the PAE version. I am compiling virtualbox and if you don't use the right source you get this lovely: vboxdrv: disagrees about version of symbol struct_module


title: Setgid won't work

text: I'm struggling with the SGID command. Given the following situation:               ----rws--- 1 simon simon 233 nov 24 13:52 hosts      Why can't a user open/edit this file?


title: Connecting to multiple XServers

text: I've got a simple xserver setup: Ubuntu workstation running xserver, to which a remote Beaglebone computer running linuxcnc is connecting. So I'm using the mouse, keyboard and screen of the workstation to control the linuxcnc application. The machines are physically standing next to eachother, but I find that the controls of linuxcnc are a bit laggy... Therefore, I wonder if it is possible to attach a mouse and keyboard to the Beaglebone directly, and only use the screen of the workstation to display the application. It would look like this (adapted from the basic schema on Wikipedia): ![wanted configuration](http://i.stack.imgur.com/im1AR.png) I didn't find any description of this, so I guess it's not possible? I don't know really how xserver internals work, but I can imagine that the mouse needs information about the screen to send relative position events... For the keyboard I can't imagine what the problem could be, somehow I should be able to forward the keystrokes from the remote keyboard to the application, no?


title: Cannot install java after apt-get upgrade

text: When I execute java -version, I get this:               bash: /usr/bin/java: No such file or directory      I followed multiple online guides towards installing java. I followed all the steps but I still get that error. Maybe I did it wrong - I don't know. Output of: `dpkg -l jdk*`               dpkg-query: no packages found matching jdk*      Output of: `ls -l /usr/bin/java`               lrwxrwxrwx 1 root root 22 Nov 16 17:21 /usr/bin/java -> /etc/alternatives/java      Output of: `sudo add-apt-repository ppa:webupd8team/java`               add-apt-repository: command not found      Output of: `file "$(readlink -e "$(type -P java)")"`               /usr/local/java/jdk1.7.0_45/bin/java: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, BuildID[sha1]=0x6849323f527575e206a1b6449617e809158e82be, not stripped      Output of `ldd "$(readlink -e "$(type -P java)")`               not a dynamic executable      Debian version, Ouput of `uname -a`:               Linux Cyneox 3.7-trunk-amd64 #1 SMP Debian 3.7.2-0+kali8 x86_64 GNU/Linux      @Teresa E Junior Sorry, I can't comment to these posts for some reason, static linking problem. The python-software-properties returned this error, which is what I get for most of the programs I try to install:                   E: Package 'python-software-properties' has no installation candidate      Also, I ran the command that you stated above, and typing java -version still doesn't do anything. Joseph R, this was all I typed:               root@Cyneox:/usr/bin# apt-get install ia32-libs ia32-libs:i386     Reading package lists... Done     Building dependency tree            Reading state information... Done     Package ia32-libs is not available, but is referred to by another package.     This may mean that the package is missing, has been obsoleted, or     is only available from another source     E: Package 'ia32-libs' has no installation candidate     E: Unable to locate package ia32-libs          root@Cyneox:/usr/bin# apt-get install openjdk-7-jre     Reading package lists... Done     Building dependency tree            Reading state information... Done     Package openjdk-7-jre is not available, but is referred to by another      package.     This may mean that the package is missing, has been obsoleted, or     is only available from another source          E: Package 'openjdk-7-jre' has no installation candidate      But the first 2 lines that you gave me worked. The output of `cat /etc/apt/sources.list /etc/apt/sources.list.d/*`:               #           # deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot amd64 LIVE/INSTALL Binary 20130905-07:57]/ kali contrib main non-free          #deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot amd64     LIVE/INSTALL     Binary 20130905-07:57]/ kali contrib main non-free          ## Security updates     # Line commented out by installer because it failed to verify:     #deb http://security.kali.org/kali-security kali/updates main contrib non-free     deb http://http.debian.net/debian/ wheezy-backports main contrib     deb http://archive.canonical.com/ lucid partner     cat: /etc/apt/sources.list.d/*: No such file or directory      Joseph, I applied your fix in the update, and everything was going smoothly... until:               Setting up openjdk-7-jre-headless:amd64 (7u25-2.3.10-1~deb7u1) ...     update-alternatives: error: cannot stat file '/etc/alternatives/java': Too many levels of symbolic links     dpkg: error processing openjdk-7-jre-headless:amd64 (--configure):      subprocess installed post-installation script returned error exit status 2     dpkg: dependency problems prevent configuration of ca-certificates-java:      ca-certificates-java depends on openjdk-6-jre-headless (>= 6b16-1.6.1-2) | java6-runtime-headless; however:       Package openjdk-6-jre-headless is not installed.       Package java6-runtime-headless is not installed.       Package openjdk-7-jre-headless:amd64 which provides java6-runtime-headless is not configured yet.          dpkg: error processing ca-certificates-java (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of openjdk-7-jre:amd64:      openjdk-7-jre:amd64 depends on openjdk-7-jre-headless (= 7u25-2.3.10-1~deb7u1); however:       Package openjdk-7-jre-headless:amd64 is not configured yet.          dpkg: error processing openjdk-7-jre:amd64 (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of icedtea-7-jre-jamvm:amd64:      icedtea-7-jre-jamvm:amd64 depends on openjdk-7-jre-headless (= 7u25-2.3.10-1~deb7u1); however:       Package openjdk-7-jre-headless:amd64 is not configured yet.          dpkg: error processing icedtea-7-jre-jamvm:amd64 (--configure):      dependency problems - leaving unconfigured     dpkg: dependency problems prevent configuration of openjdk-7-jre-lib:      openjdk-7-jre-lib depends on openjdk-7-jre-headless (>= 7~b130~pre0); however:       Package openjdk-7-jre-headless:amd64 is not configured yet.          dpkg: error processing openjdk-7-jre-lib (--configure):      dependency problems - leaving unconfigured     Errors were encountered while processing:      openjdk-7-jre-headless:amd64      ca-certificates-java      openjdk-7-jre:amd64      icedtea-7-jre-jamvm:amd64      openjdk-7-jre-lib     E: Sub-process /usr/bin/dpkg returned an error code (1)      Then I tried `apt-get -f install` but that still failed...


title: Remove all but one ( or more ) kind of filetype

text: I've been trying to find a command to remove all files in a folder but not a kind of filetype. But I seems to not have any luck. What I've tried so far :               set extended_glob     rm !(*.dmg)     # this returns zsh:number expected          rm ./^*.dmg     # this returns no matches found       The version of zsh I'm using is `zsh 5.0.2 (x86_64-apple-darwin13.0.1)` .


title: Ubuntu installation 11.10

text: I seem to be having problems installing Ubuntu on windows 7 and I'm getting an error message once boot up saying:               Unable to find a medium containing a live file system      and the drivers are ahci which have been set as default.


title: What is the point of the 'operator' user?

text: Many un*x systems ship with a user account named 'operator'. What is the purpose of this account? Do some systems actually make use of this account, or is this more of a historical legacy? Have you ever made use of this account in your organization? The 'operator' account tends have a home directory set to something like `/root` or `/`. Why is this? Linux:               Login: operator                         Name: operator     Directory: /root                        Shell: /sbin/nologin      Or FreeBSD:               Login: operator                         Name: System Operator     Directory: /                            Shell: /usr/sbin/nologin      On FreeBSD, some files are actually owned by user 'operator':               # find / -user operator -exec ls -ld {} \;     drwx------  2 operator  operator  512 Apr 20 17:11 /var/db/entropy      This question is surprisingly hard to google, since nearly all google results are regarding shell or code operators.


title: FFMPEG video to FLV conversion optimization

text: Would anyone have any tips on optimizing video to FLV conversion using `ffmpeg` so I would get a medium quality video which is not very large? I have a video site where users can upload videos which will be converted to FLV and displayed. Those videos are shown at the size 420x350. I'm using FFMPEG to convert then to FLV, through the following command:               ffmpeg -i $in $out      I find the result to be pretty low quality and whenever I try to change settings, the output will be a very large file. For instance, I've tried this:                 ffmpeg -i $in -sameq -ar 11025 -ab 32 -deinterlace -nr 500 -r 20 -g 500 -s 420x350 -aspect 4:3 -me_range 20 -b 270k -f flv -y $out


title: Name resolution issues in Ubuntu 10.04

text: I am having an error with name resolution that I am not able to figure out. The system is able to resolve names, say, www.google.com when using a graphical browser like chrome or firefox. But on the command line it is not able to (unless I add the domain in /etc/hosts). This extends to all operations on the command line like ping and others. We have a proxy in this environment and the proxy information is set using environment variables. ETA: I noticed that it does seem to resolve IP addresses but it is still not able to reach them. This makes it even more perplexing.               farhat@farhat:~$ traceroute www.google.com     traceroute to www.google.com (209.85.153.104), 30 hops max, 60 byte packets      1  192.168.4.1 (192.168.4.1)  0.496 ms  1.033 ms  1.294 ms      2  210.212.187.65 (210.212.187.65)  0.872 ms  0.942 ms  0.930 ms      3  * * *      4  * * *      5  * * *      6  * * *      7  * * *          farhat@farhat:~$ ping www.google.com     PING www.l.google.com (209.85.153.104) 56(84) bytes of data.     ^C     --- www.l.google.com ping statistics ---     100 packets transmitted, 0 received, 100% packet loss, time 99131ms      pinging www.google.com fails.


title: I want to run commands like make, make install, python setup install without changing directories

text: I have written a script which will download software from the internet to the current user's home directory and then untar it. And then I have to `make` and `make install` it and in some software I have to run `python setup.py install`. The problem is that I do not want to change the current directory to run all those commands. Is there is any way to specify path in commands like:               python /home/username/Desktop/urllib/setup.py install     make /home/username/Desktop/somedir/     make install /home/username/Desktop/somedir/


title: No pppoe-server in Fedora 14?

text: $ yum list | grep -i ppp     ppp.i686                                   2.4.5-12.fc14                @updates     rp-pppoe.i686                              3.10-6.fc12                  @fedora/$releasever     ppp-devel.i686                             2.4.5-12.fc14                updates      $       There isn't any pppoe server in Fedora 14?? Wow! Why?


title: Screen session running as root? (it shouldn't be) node.js

text: cd /serv       screen -R node       {in the screen}       node test.js       C^a d        initially,               ls -l /dev/pts       total 0       crw--w---- 1 tick-tock tty 136, 0 2011-04-19 16:41 0       crw--w---- 1 tick-tock tty 136, 1 2011-04-19 16:41 1       but after just a few seconds               ls -l /dev/pts       total 0       crw--w---- 1 tick-tock tty 136, 0 2011-04-19 16:47 0       crw--w---- 1 root      tty 136, 1 2011-02-21 20:00 1        How is the screen's terminal getting switched to root? Does this mean the node server is actually running with root permissions? It shouldn't be. The only other factor that might be an issue is that iptables forwards port 80 to port 8000 where the node server listens, so it doesn't have to run as root. I apologize if this is the wrong place to ask this, perhaps I should ask in a node.js community? I have not su root or done any sudo commands beforehand, either.


title: How to dump mysql dbs in live boot

text: I can't log in to my fedora linux because of I/O errors(system halts after grub). Now I want to create a backup from my mysql databases. I tried `chroot /path/to/root` and then `mysqldump`, but I get the following error: `mysqldump: Got error: 2002: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (111) when trying to connect ` I'm using an ubuntu live disk. Why does it show this error? Is there a better way to dump dbs?


title: USB2.0 device not recognized anymore

text: I have a Ubuntu 10.10 (x86) system which I use to test GNU Radio applications. I have successfully been using a USRP1 with a USB2.0 connection for some time now, yet at some point yesterday it appears to have stopped working.   * With `lsusb` I don't even see the device listed anymore. I tried multiple ports with no luck.   * A USB1.0 mouse seems to work fine.   * Windows XP seems to recognize the device (no driver, but I see the device ID)   * USRP works fine on my Fedora machine   * tried different cables and another USRP This is a rather old laptop, so part of me thinks the hardware may just be dying. However, Windows still at least recognizes the USRP, so I am hopeing maybe a driver install will fix the problem. So, a USB mouse works fine, but somehow my USB2.0 based USRP stopped working. How can I debug this problem? Can I somehow reinstall the USB2.0 drivers? Thanks!


title: How do I make the 'super' key open the app menu?

text: I'm running LXDE on Mint atm, and I was wondering if there is a practical way to make the super key open the menu up, somewhat like it does in Windows.


title: Ubuntu 10.10 notification system area , many icons disappeared like network manager

text: When I restarted the computer I found no network icon. I tried to access internet but no connection was found. I also didn't have the Bluetooth, sound, battery, and power icon. Its really crazy that I have to use these commands to display them: * * *               bluetooth-applet     nm-applet --sm-disable     gnome-power-manager      * * * Every time I start the system I face this trouble! How can I fix it? Is there anyway to restore previous configuration? the history log               Start-Date: 2011-03-16  11:35:58     Install: hijra-applet:amd64 (0.1.18-3), python-hijra:amd64 (0.1.18-3, automatic), python-eggtrayicon:amd64 (2.25.3-5ubuntu2, automatic)     End-Date: 2011-03-16  11:36:15          Start-Date: 2011-03-16  19:12:49     Upgrade: libkrb5-3:amd64 (1.8.1+dfsg-5ubuntu0.4, 1.8.1+dfsg-5ubuntu0.6), libk5crypto3:amd64 (1.8.1+dfsg-5ubuntu0.4, 1.8.1+dfsg-5ubuntu0.6), chromium-browser:amd64 (10.0.648.127~r76697-0ubuntu0.10.10.1, 10.0.648.133~r77742-0ubuntu0.10.10.1), chromium-browser-l10n:amd64 (10.0.648.127~r76697-0ubuntu0.10.10.1, 10.0.648.133~r77742-0ubuntu0.10.10.1), chromium-codecs-ffmpeg:amd64 (10.0.648.127~r76697-0ubuntu0.10.10.1, 10.0.648.133~r77742-0ubuntu0.10.10.1), libkrb5support0:amd64 (1.8.1+dfsg-5ubuntu0.4, 1.8.1+dfsg-5ubuntu0.6), libtiff4:amd64 (3.9.4-2ubuntu0.1, 3.9.4-2ubuntu0.2), chromium-browser-inspector:amd64 (10.0.648.127~r76697-0ubuntu0.10.10.1, 10.0.648.133~r77742-0ubuntu0.10.10.1), libgssapi-krb5-2:amd64 (1.8.1+dfsg-5ubuntu0.4, 1.8.1+dfsg-5ubuntu0.6)     End-Date: 2011-03-16  19:13:11          Start-Date: 2011-03-16  20:52:52     Install: gpredict:amd64 (1.1-7)     End-Date: 2011-03-16  20:53:03          Start-Date: 2011-03-16  20:55:55     Install: libwxbase2.6-0:amd64 (2.6.3.2.2-5ubuntu1, automatic), tipptrainer-data-de:amd64 (0.6.0-17, automatic), libwxgtk2.6-0:amd64 (2.6.3.2.2-5ubuntu1, automatic), tipptrainer:amd64 (0.6.0-17), wx2.6-i18n:amd64 (2.6.3.2.2-5ubuntu1, automatic)     End-Date: 2011-03-16  20:56:02          Start-Date: 2011-03-16  21:28:07     Remove: libwxbase2.6-0:amd64 (2.6.3.2.2-5ubuntu1), tipptrainer-data-de:amd64 (0.6.0-17), libwxgtk2.6-0:amd64 (2.6.3.2.2-5ubuntu1), tipptrainer:amd64 (0.6.0-17), wx2.6-i18n:amd64 (2.6.3.2.2-5ubuntu1)     End-Date: 2011-03-16  21:28:16          Start-Date: 2011-03-16  21:28:22     Install: libwxbase2.6-0:amd64 (2.6.3.2.2-5ubuntu1, automatic), tipptrainer-data-de:amd64 (0.6.0-17, automatic), libwxgtk2.6-0:amd64 (2.6.3.2.2-5ubuntu1, automatic), tipptrainer:amd64 (0.6.0-17), wx2.6-i18n:amd64 (2.6.3.2.2-5ubuntu1, automatic)     End-Date: 2011-03-16  21:28:27          Start-Date: 2011-03-16  21:28:53     Remove: libwxbase2.6-0:amd64 (2.6.3.2.2-5ubuntu1), tipptrainer-data-de:amd64 (0.6.0-17), libwxgtk2.6-0:amd64 (2.6.3.2.2-5ubuntu1), tipptrainer:amd64 (0.6.0-17), wx2.6-i18n:amd64 (2.6.3.2.2-5ubuntu1)     End-Date: 2011-03-16  21:28:56          Start-Date: 2011-03-16  21:31:49     Install: klavaro:amd64 (1.5.0-1build1), libgtkdatabox-0.9.1-1:amd64 (0.9.1.1-3.1, automatic)     End-Date: 2011-03-16  21:31:57      Another problem that I didn't notice is that there is a problem with the graphics card also the visual effects can't be applied as in these photos![the drivers aren't installed](http://i.stack.imgur.com/XBEC4.gif)![the effect can't be applied](http://i.stack.imgur.com/eFRmX.gif)   it was working before. * * * another problem appeared I can't install any software from software center i click the install but nothing happens i tried many programs but the same result!! the internet connection is ok!!   I think it is virus but heard that Linux is so powerful in security.      I haven't seen a thing like this since windows 98 and XP first edition when viruses change desktop background and disable some menu items


title: Can I mount a microsoft mirrored dynamic disk?

text: I'm testing out sw raid in windows 7, but I almost always use linux and I would like to know if it's possible to mount such a mirrored dynamic disk. I can already mount each members separatly but accessing both of them at the same time would keep it consistent!


title: Encrypted USB 2.5" to unencrypted internal 3.5" hard drive copy speed

text: I am moving data from an external USB 2.5" hard drive (encrypted with `cryptsetup`) to an unencrypted internal 1TB 3.5" hard drive on a GNU/Linux quad-core headless server with 2GB RAM, using Midnight Commander over an SSH connection. The USB drive is connected directly to the server; I am not copying data **over** the SSH connection. Copying speed, according to Midnight Commander, is **maxing** at around 950 KB/s. Is this **very** slow? I'm sure it should copy faster than that? Less than 1MB/s is very slow? The machine, which is otherwise idle, has a load average now of over 2.0. I am moving the files across as a backup, because I am experiencing input/output errors in one folder on the USB drive. I have not selected that folder for copying now, and all other files are copying via Midnight Commander without any errors. **Edit:** Follow-up question here for reference.


title: Open kickoff via shell/script

text: Is there any (undocumented) way to open the KDE Kickoff menu via dbus or some similar mechanism?


title: How to use libraries installed with a package manager in GNU/Linux

text: I hope this is not a very stupid question as I am very new to development in GNU/Linux. I installed a library(for example `lzma-dev`) using a package manager(for example `apt-get` for `Debian` or `Ubuntu`). How can I use it? Where can I find the `libs` and `headers`? How about `so`s(dynamic libraries)?


title: sshd process inoperative

text: I have an AIX server which suddenly stopped servicing SSH connections. When I try to start the service through startsrc -s sshd it says:               0513-059 The sshd Subsystem has been started. Subsystem PID is 258300.      However, right after issuing the command, the services status shows up as inoperative:                sshd             ssh                           inoperative      The init scripts are well located and throw the same result as above. EDIT: Here's the odmget command output:               SRCsubsys:         subsysname = "sshd"         synonym = ""         cmdargs = "-D"         path = "/usr/sbin/sshd"         uid = 0         auditid = 0         standin = "/dev/console"         standout = "/dev/console"         standerr = "/dev/console"         action = 1         multi = 0         contact = 2         svrkey = 0         svrmtype = 0         priority = 20         signorm = 15         sigforce = 9         display = 1         waittime = 20         grpname = "ssh"      When trying to start the service manually, the following error appears:               exec(): 0509-036 Cannot load program /usr/sbin/sshd because of the following errors:     0509-150   Dependent module libz.a(libz.so.1) could not be loaded.     0509-022 Cannot load module libz.a(libz.so.1).     0509-026 System error: A file or directory in the path name does not exist.      Any help would be greatly appreciated.


title: FreeBSD 9.1 buildworld fails in libclangsema

text: I just went thru and updated a dozen or so machines from 9.0-RELEASE to 9.1-RELEASE and the last one is dieing during `buildworld`:               c++  -O2 -pipe -I/usr/src/lib/clang/libclangsema/../../../contrib/llvm/include -I/usr/src/lib/clang/libclangsema/../../../contrib/llvm/tools/clang/include -I/usr/src/lib/clang/libclangsema/../../../contrib/llvm/tools/clang/lib/Sema -I. -I/usr/src/lib/clang/libclangsema/../../../contrib/llvm/../../lib/clang/include -DLLVM_ON_UNIX -DLLVM_ON_FREEBSD -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DLLVM_DEFAULT_TARGET_TRIPLE=\"i386-unknown-freebsd9.0\" -DDEFAULT_SYSROOT=\"\" -fstack-protector -fno-exceptions -fno-rtti -c /usr/src/lib/clang/libclangsema/../../../contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp -o SemaExpr.o     {standard input}: Assembler messages:     {standard input}:108560: Warning: end of file not at end of a line; newline inserted     c++: Internal error: Killed: 9 (program cc1plus)     Please submit a full bug report.     See <URL:http://gcc.gnu.org/bugs.html> for instructions.     *** Error code 1          Stop in /usr/src/lib/clang/libclangsema.     *** Error code 1          Stop in /usr/src/lib/clang.     *** Error code 1          Stop in /usr/src/lib.     *** Error code 1          Stop in /usr/src.     *** Error code 1          Stop in /usr/src.     *** Error code 1          Stop in /usr/src.     *** Error code 1          Stop in /usr/src.     [Exit 1 ]      Things I have tried:               rm -rf /usr/src/* && cvsup     rm -rf /usr/obj/*      `/etc/make.conf` is pretty benign at this point with most optimizations turned off:               # Optimize when possible based on CPU     #CPUTYPE?= pentium4          # Set optimization and use pipes to speed up compiles     #CFLAGS= -O -pipe     NO_CPU_CFLAGS=  true    # Don't add -march=<cpu> to CFLAGS automatically     NO_CPU_COPTFLAGS= true  # Don't add -march=<cpu> to COPTFLAGS automatically          # Set kernel compile with special options.     # CFLAGS is not applicable to kernel builds.     #COPTFLAGS= -O -pipe      I'm feeling a little dumb at this point; so any suggestions are welcome. Thanks for your time.


title: Command-line file reader (like “less”) that can tell the line where the user stopped reading

text: [Context] I'm developing a little app, as a hobby to learn ncurses, that catalogs and lists and searches within a set of documents (for now, they are the HOWTOs from TLDP). The most tricky part of the app is, I believe, the file reader (show the contents of a file nicely). To really be able to provide a good enough user experience, given that the HOWTOs are somewhat long, it would be a valuable feature if I can "save" the line where the user stopped reading, and start on that same line the next time the user opens up that same HOWTO [/context] So to the real question: is there a command-line reader that can not only get a line X as a parameter and position the cursor at that line, but also tell me the line that was last shown? I understand that an app can't "return" that value, given that returns are either 0 or an ERROR#, so maybe some kind of system variable or shared memory or... ? Given that I'll be doing the call from a C app, maybe a different solution that's not an external app will also serve me just right, I'm open to suggestions.


title: Minor upgrades and version numbers on CentOS

text: I installed CentOS 6.0. Later I ran `yum update` to apply software updates. After that my operating system version changed to 6.3. Why did the version change? How far up will it go? How can I choose whether to keep running 6.0 or apply minor upgrades, and why should I change one or the other?


title: Choppy audio CD playback with mplayer

text: When playing audio CDs with mplayer, I always get a choppy playback. Playing audio from files, like MP3 (from any optical media, or other drives), etc. works fine. Watching video DVDs is also ok. Listening to uncompressed media that's on my hard drives, like WAV or CDR, works fine as well. But when playing audio CDs like so:               mplayer cdda://      It spins the CD, plays for a few seconds until the buffer runs out, then it spins the CD again, fills the buffer and the whole procedure repeats. I tried `-nocache`, that didn't help. How do I make mplayer keep a constant buffer fill, i.e. read the CD continuously?


title: Why do I get this error installing virtualbox-4.1 on Arch?

text: I'm trying to install Virtualbox 4.1 from the .run file since Pacman had the 4.0 version only. But when I try installing the file using `sh filelocation/filename.run`, it gives me the following error- > Please install the build and header files for your current Linux kernel. The > current kernel version is 2.6.38-ARCH Is something broken in the kernel, or do I need to install something?


title: why is this init.d-script not being executed at system reboot?

text: I have a selfmade init.d script on a Linux box that worked fine with Debian 4 and Debian 5 but with Debian 6 (fresh install) it gets only executed at system boot but not before rebooting. The script is pratically this one:               ### BEGIN INIT INFO     # Provides:          selfheal     # Required-Start:     # Required-Stop:     # X-Start-Before:    mountall     # X-Stop-After:      umountfs     # Default-Start:     2 3 4 5     # Default-Stop:      0 1 6     # Short-Description: selfheal tool     # Description:       Saves/restores the user partition at (re)boot     ### END INIT INFO          echo $0 $*     sleep 3          # some useful stuff follows here...      At `reboot` I see the system switching to `runlevel 6` and unmounting the file systems (see that `X-Stop-After: umountfs` above). No sign of life from my `selfheal` script. At system _boot_ however, I see the `echo` line and the script is being executed. I've installed the script using:               rm /etc/rc*.d/[SK]??selfheal && update-rc.d selfheal defaults      no errors/warnings there. The symlink exists:               root@intermodul:~# ls -al /etc/rc6.d/     total 12     drwxr-xr-x  2 root root 4096 May 16 16:09 .     drwxr-xr-x 68 root root 4096 May 16 16:07 ..     <snip>     lrwxrwxrwx  1 root root   18 May 16 15:09 K09umountfs -> ../init.d/umountfs     lrwxrwxrwx  1 root root   18 May 16 16:09 K10selfheal -> ../init.d/selfheal     lrwxrwxrwx  1 root root   20 May 16 15:09 K10umountroot -> ../init.d/umountroot     lrwxrwxrwx  1 root root   16 May 16 15:09 K11reboot -> ../init.d/reboot     -rw-r--r--  1 root root  351 Jan  1 06:34 README      Note that with Debian 6 came concurrent booting and I guess there is something wrong with my "INIT INFO". What is wrong here? ## Update The script gets executed when setting `CONCURRENCY=none` in `/etc/init.d/rc` but I'd like to have makefile concurrency enabled. So, why doesn't the script get executed in makefile concurrency mode?


title: How to modify a partitioning layout (which may involve converting a primary partition to an extended one)

text: I am having trouble thinking through how I can achieve my partitioning goals. Now my partitions are:   * sda1 (winA) (primary)   * sda2 (winB) (primary)   * sda3 (/ for linux) (primary) What I want to migrate into is (obviously partition numbers need not be exactly like that)   * sda1 (winA) (primary)   * sda2 (winB) (primary)   * sda3 (/boot) (primary)   * sda4 - extended which will contain      * sda5 (/home)     * sda6 (/)     * sda7 (swap) One way I have thought is:   1. Create a new primary partition for /boot and split it from the root partition into the new one. It shouldn't be too hard. Then the disk will have 4 primary partitions.   2. Somehow convert the root ubuntu partition from primary to extended.   3. Split that last partition in 3 extended partitions (root, /home, swap) and split the contents there. I am obviously stuck on the 2nd part. Another way could be (maybe easier):   1. Create an extended partition (or two)   2. Split /home there   3. Somehow move everything except /boot to the extended partition. This way /boot will stay on the primary partition that exists now, and will be shrunk as needed, and everything else will end up to the extended partitions. This may sound better, but I'm not too sure how to do the 3rd part and I'd like some feedback. Some details: The disk is almost empty, so I have space to move things around in it, shrink the linux partition etc. I don't want to touch the windows partitions in any way. Reinstallation is not an option. Also using a different partitioning scheme with fewer partitions is not an option (for example not having a separate /boot) Any ideas?


title: Does using lvextend destroy data already on the volume?

text: Does resizing a logical volume with lvextend and e2resize destroy data already on the volume? See also this related unanswered question and some examples of the process: Can I resize the root partition without uninstalling and reinstalling Linux (or losing data)?


title: Problematic booting process

text: About a month ago I installed `Lubuntu 11.10`. Since that time there is a problem with booting and shutting down.   1. Booting is endless. This screen never disappears, so I have to manually press the shutdown button of my laptop   2. I turn the laptop on and have the possibility of choice. I choose the second option - `Linux 3.0.0-14-generic (recovery mode)`   3. I will choose `resume normal boot` option   4. Success Sometimes `Lubuntu` boots normally but in most cases I have to go through steps 1-4. When I shutdown the OS I will see this screen forever, so I have to press my laptop button to turn it off. Do you know where is the problem and how to solve it? I'm asking rather here (not in Ubuntu), because this is system problem what I'm interested in (not the matter of one distribution) but booting process and here are more experts interested in the system (what is under the hood). thank you


title: How do you redirect audio output in FreeRDP?

text: I have trouble redirecting audio during my rdp connection with freerdp. When I use this command:               xfreerdp /v:ServerName /u:User /p:Password /d:Domain /audio      I get this error:               Warning rdpsnd_process_connect (/home/USER/Desktop/FreeRDP-master/FreeRDP/channels/rdpsnd/client/rdpsnd_main.c:801): no sound device.