title: How to Connect Internet in Zedboard using Linux via SDCard

text: I am working on Zedboard Zynq 7020. I have booted the Linux via SD card through Zedboard. The linux display can be shown onto the monitor via VGA cable. But I cannot connect that linux to internet. Linux is not detecting any wireless network as well. I plugged the one end of LAN cable into Zedboard and other into PC. I tried to write `ifconfig` into the terminal of linux and I get this message :               root@localhost:˜# ifconfig     eth1 Link encap:Ethernet HWaddr 00:11:22:33:44:55     inet6 addr: fe80::211:22ff:fe33:4455/64 Scope:Link      Here I cannot see this sort of thing:               "inet addr:10.1.1.164 Bcast:10.1.1.255 Mask:255.255.255.0"      As it is essential for detecting the ip address of PC.   Please guide and suggest me the solution.   Thanks


title: Passing named arguments to shell scripts

text: Is there any easy way to pass (receive) named parameters to a shell script? For example,               my_script -p_out '/some/path' -arg_1 '5'      And inside `my_script.sh` receive them as:               # I believe this notation does not work, but is there anything close to it?     p_out=$ARGUMENTS['p_out']     arg1=$ARGUMENTS['arg_1']          printf "Argument p_out is %s" "$p_out"     printf "Argument arg_1 is %s" "$arg_1"      Is this possible in Bash or Zsh?


title: Where can I find a good boilerplate bashrc?

text: I've used unix/linux at work in the past, and recently started developing on a Mac. I'd always (lovingly) borrow co-workers' bashrc's for a good starting point, such as common aliasing and commands, but I'm a bit at a loss when it comes from building my own from scratch. Is there a resource that has good "boilerplate" bashrc files (or other shell config files, for that matter) that will have most if not all of what I want -- even stuff I don't know I need yet? ;)


title: Canon iP3600 under Scientific Linux

text: I bought a new printer (I googled before and it looked like it's working under my OS..) I plugged the printer in a win7 machine, installed a few hundred MBytes of software, and it worked. Then I plugged it in my Scientific Linux 6.1 (64bit) notebook. A printer configuration window opened, I could add the printer, great! But: If I want to print from this notebook the status of a job is "finished", so it looks like it prints ok, but from the real world side, the printer does nothing. I don't know what to do. Canon's website provides rpm's for Linux, but it's for i386. What can I do? Some info: When I plug in the printer:               Apr 11 21:16:48 a kernel: usb 2-6: new high speed USB device using ehci_hcd and address 45     Apr 11 21:16:48 a kernel: usb 2-6: New USB device found, idVendor=04a9, idProduct=10ca     Apr 11 21:16:48 a kernel: usb 2-6: New USB device strings: Mfr=1, Product=2, SerialNumber=3     Apr 11 21:16:48 a kernel: usb 2-6: Product: iP3600 series     Apr 11 21:16:48 a kernel: usb 2-6: Manufacturer: Canon     Apr 11 21:16:48 a kernel: usb 2-6: SerialNumber: 1754F5     Apr 11 21:16:48 a kernel: usb 2-6: configuration #1 chosen from 1 choice     Apr 11 21:16:48 a kernel: usblp0: USB Bidirectional printer dev 45 if 0 alt 0 proto 2 vid 0x04A9 pid 0x10CA     Apr 11 21:16:48 a udev-configure-printer: invalid or missing IEEE 1284 Device ID     Apr 11 21:16:49 a kernel: type=1400 audit(1334171809.432:164): avc:  denied  { module_request } for  pid=22860 comm="udev-configure-" kmod="net-pf-10" scontext=system_u:system_r:cupsd_config_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=system     Apr 11 21:16:49 a kernel: type=1400 audit(1334171809.434:165): avc:  denied  { module_request } for  pid=22860 comm="udev-configure-" kmod="net-pf-10" scontext=system_u:system_r:cupsd_config_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=system     Apr 11 21:16:49 a kernel: type=1400 audit(1334171809.434:166): avc:  denied  { module_request } for  pid=22860 comm="udev-configure-" kmod="net-pf-10" scontext=system_u:system_r:cupsd_config_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=system     Apr 11 21:16:49 a kernel: type=1400 audit(1334171809.472:167): avc:  denied  { module_request } for  pid=22860 comm="udev-configure-" kmod="net-pf-10" scontext=system_u:system_r:cupsd_config_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=system     Apr 11 21:16:49 a kernel: type=1400 audit(1334171809.473:168): avc:  denied  { module_request } for  pid=22860 comm="udev-configure-" kmod="net-pf-10" scontext=system_u:system_r:cupsd_config_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=system     Apr 11 21:16:49 a kernel: type=1400 audit(1334171809.473:169): avc:  denied  { module_request } for  pid=22860 comm="udev-configure-" kmod="net-pf-10" scontext=system_u:system_r:cupsd_config_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=system     Apr 11 21:16:49 a kernel: type=1400 audit(1334171809.473:170): avc:  denied  { module_request } for  pid=22860 comm="udev-configure-" kmod="net-pf-10" scontext=system_u:system_r:cupsd_config_t:s0-s0:c0.c1023 tcontext=system_u:system_r:kernel_t:s0 tclass=system     Apr 11 21:16:49 a udev-configure-printer: Re-enabled printer ipp://localhost:631/printers/Canon-iP3600-series


title: xrandr -o right causes black screen

text: I use Fedora 20 on lxde. `lxrandr` allows me to only choose resolution. When I run                   xrandr -o right      it makes my screen black with just cursor visible. `/root/xorg.conf.new` contains:               Section "ServerLayout"         Identifier     "X.org Configured"         Screen      0  "Screen0" 0 0         Screen      1  "Screen1" RightOf "Screen0"         Screen      2  "Screen2" RightOf "Screen1"         Screen      3  "Screen3" RightOf "Screen2"         InputDevice    "Mouse0" "CorePointer"         InputDevice    "Keyboard0" "CoreKeyboard"     EndSection          Section "Files"         ModulePath   "/usr/lib/xorg/modules"         FontPath     "catalogue:/etc/X11/fontpath.d"         FontPath     "built-ins"     EndSection          Section "Module"         Load  "glx"     EndSection          Section "InputDevice"         Identifier  "Keyboard0"         Driver      "kbd"     EndSection          Section "InputDevice"         Identifier  "Mouse0"         Driver      "mouse"         Option      "Protocol" "auto"         Option      "Device" "/dev/input/mice"         Option      "ZAxisMapping" "4 5 6 7"     EndSection          Section "Monitor"         Identifier   "Monitor0"         VendorName   "Monitor Vendor"         ModelName    "Monitor Model"     EndSection          Section "Monitor"         Identifier   "Monitor1"         VendorName   "Monitor Vendor"         ModelName    "Monitor Model"     EndSection          Section "Monitor"         Identifier   "Monitor2"         VendorName   "Monitor Vendor"         ModelName    "Monitor Model"     EndSection          Section "Monitor"         Identifier   "Monitor3"         VendorName   "Monitor Vendor"         ModelName    "Monitor Model"     EndSection          Section "Device"             ### Available Driver options are:-             ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",             ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",             ### <percent>: "<f>%"             ### [arg]: arg optional             #Option     "NoAccel"               # [<bool>]             #Option     "AccelMethod"           # <str>             #Option     "Backlight"             # <str>             #Option     "DRI"                   # <str>             #Option     "ColorKey"              # <i>             #Option     "VideoKey"              # <i>             #Option     "Tiling"                # [<bool>]             #Option     "LinearFramebuffer"     # [<bool>]             #Option     "SwapbuffersWait"       # [<bool>]             #Option     "TripleBuffer"          # [<bool>]             #Option     "XvPreferOverlay"       # [<bool>]             #Option     "HotPlug"               # [<bool>]             #Option     "ReprobeOutputs"        # [<bool>]             #Option     "XvMC"                  # [<bool>]             #Option     "ZaphodHeads"           # <str>             #Option     "TearFree"              # [<bool>]             #Option     "PerCrtcPixmaps"        # [<bool>]             #Option     "FallbackDebug"         # [<bool>]             #Option     "DebugFlushBatches"     # [<bool>]             #Option     "DebugFlushCaches"      # [<bool>]             #Option     "DebugWait"             # [<bool>]             #Option     "BufferCache"           # [<bool>]                  Identifier  "Card0"         Driver      "intel"         BusID       "PCI:0:2:0"     EndSection          Section "Device"             ### Available Driver options are:-             ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",             ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",             ### <percent>: "<f>%"             ### [arg]: arg optional             #Option     "SWcursor"              # [<bool>]             #Option     "kmsdev"                # <str>             #Option     "ShadowFB"              # [<bool>]         Identifier  "Card1"         Driver      "modesetting"         BusID       "PCI:0:2:0"     EndSection          Section "Device"             ### Available Driver options are:-             ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",             ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",             ### <percent>: "<f>%"             ### [arg]: arg optional             #Option     "ShadowFB"              # [<bool>]             #Option     "Rotate"                # <str>             #Option     "fbdev"                 # <str>             #Option     "debug"                 # [<bool>]         Identifier  "Card2"         Driver      "fbdev"         BusID       "PCI:0:2:0"     EndSection          Section "Device"             ### Available Driver options are:-             ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",             ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",             ### <percent>: "<f>%"             ### [arg]: arg optional             #Option     "ShadowFB"              # [<bool>]             #Option     "DefaultRefresh"        # [<bool>]             #Option     "ModeSetClearScreen"    # [<bool>]         Identifier  "Card3"         Driver      "vesa"         BusID       "PCI:0:2:0"     EndSection          Section "Screen"         Identifier "Screen0"         Device     "Card0"         Monitor    "Monitor0"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection          Section "Screen"         Identifier "Screen1"         Device     "Card1"         Monitor    "Monitor1"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection          Section "Screen"         Identifier "Screen2"         Device     "Card2"         Monitor    "Monitor2"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection          Section "Screen"         Identifier "Screen3"         Device     "Card3"         Monitor    "Monitor3"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection


title: Comment (automatically) a LaTeX source file to make it more readable

text: I am looking for a simple way to do the following : Input :               \begin{document}     ...     \section{}     ...     \subsection{}     ...     \subsubsection{}     ...     \section{}     ...     \end{document}      Output :               \begin{document}     ...     %1     \section{}     ...     %1.1     \subsection{}     ...     %1.1.1     \subsubsection{}     ...     %2     \section{}     ...     \end{document}      The purpose of this is to make long documents more readable. I want to always know where I am in the whole plan of the document.


title: How can I configure OpenBox session for opening files by mime type?

text: I've started using OpenBox and I really like it. But my **chromium opens everything with firefox**. Is there any fix for that? I'm looking for most lightweight solution, but also with easy and fast configuration.


title: Custom Bluetooth Configuration through terminal

text: I am running a Bluetooth module on my circuit for transmitting data. I want to connect this module to my Linux OS (openSUSE) and read data from it. I want to do custom configs and also custom read from bluetooth. Is there a way to do so?


title: Shell is option given

text: I have a couple of arguments inside a list (array, e.g. `$@`) and I'd like to know if the option `-v` is in the list. In Python I would simply do:               verbose = "-v" in sys.argv      How do I achieve that in shell without much code?


title: How to run streamripper and mplayer in a split-screen X terminal, via a single script

text: I want to run streamripper in its own X Terminal (window), then split the terminal horizontally, and then run mplayer in the lower half.   This is simple enough to do manually, but getting a script to do it eludes me.   * start a new terminal window    * run `streamripper http://radio.net:8000 -r 8000`   * split the terminal window horizontally    * run `mplayer http://localhost:8000` in the bottom panel. `mplayer` cannot be allowed to run immediately. It needs to wait for stream data, so a test for this would be better than "wait x seconds" (which is effectively what the manual method does. If the terminal is significant to this, anything will do, but I currently have installed konsole, gnome-terminal, and terminator (in Ubuntu)


title: Upgrade to Mozilla Firefox 5.0 using terminal on CentOS?

text: On the screenshot below is an icon squared in red. Clicking it will launch Mozilla Firefox 3.0.18. I want to upgrade Firefox to version 5.0 so that clicking the same icon should launch the new version. I do not want to simply install Mozilla Firefox on a different location but overwrite the existing setup so that only one version of Mozilla exists (I do know that I can have different versions by extracting the tar.bz file to a different location). Finally, all this should be done via terminal. How can this be done? ![enter image description here](http://i.stack.imgur.com/jfTf5.jpg)


title: How to execute a Bash comand and execute two statements on failure?

text: Ì want to execute a Bash command, followed by two actions if and only if the test returns an error. I would prefer to solve this task as a one-liner in Bash. Here are the two forms I have tried:               ssh user@1.2.3.4 "ls /home/somefile" || echo "File does not exist" && exit 1     ssh user@1.2.3.4 "ls /home/somefile" || echo "File does not exist"; exit 1      The meaning is as follows: I want to test the existance of a file on a remote machine (or whatever, just an example), and in the case the first command returns an error, then - and only then- the two following commands (`echo` /`exit`) should be executed. The examples above execute the `exit 1` statement independent of the return value of the `ssh` command. How to rewrite this line, so the `echo` and the `exit` commands are only executed if the first (`ssh`) command fails?


title: Difference between Linux Mint LXDE 11 RC(28 June) and Linux Mint 11 (released 28 May)

text: What is the difference between `Linux Mint LXDE 11 RC`(28 June) and `Linux Mint Katya 11` (released 26 May)? The release notes seems exactly the same.


title: How can I play a sound when script execution is ready?

text: I am executing every now and then some python scripts which take quite long to execute. I execute them like this: `$ time python MyScript.py` How can I play a sound as soon as the execution of the script is done? I use Ubuntu 10.10 (Gnome desktop).


title: Getting PHP to work with apache to run .php files through browser

text: I have VPS running Debian 5.0 (I think) and I would like to get it to run PHP files. I was told it needed to be configured with Apache. I tried entering the command `apt-get install apache2 php5 libapache2-mod-php5`. But there was no change. Console output: http://pastebin.com/sVMWq6mA This is everything in my `/etc/apache2/mods-enabled`: `http://img35.imageshack.us/img35/6474/modsb.jpg` My webserver can be accessed here: http://206.217.223.136/test/ In my test.php file I have the code :               <?php      phpinfo();     ?>      but instead of displaying the page, it tries to download it. How can I fix this?


title: Time/Date grep for 15 mins

text: I need to `grep` a specific type of line in a specific time of the log, do you have any ideas? Here's my working script:               cat *.log |grep -E '2011-06-30 (1[0-1]:[0-1][0-5]|10:16)'| grep -ach '0110 478655 ..  51' * | awk '{SUM += $1} END { print SUM }' The above line is working for 00:00-00:16 time. I need to sum all the `grep` results for that specific time. How do I `grep` the string:               00:15-00:31, 00:30-00:46, 00:45-01:01 Note that the time should be variable as well, meaning it wont be always 00:00-01:01 - is there a way I can do this?


title: jdb2 keeps Hard Disk busy all the time

text: My system became too slow last few days. The hard disk indicator is on all the time. To discover which process is keeping the disk busy i run this command:               # while true; do date; ps auxf | awk '{if($8=="D") print $0;}'; sleep 1; done | grep -v 2014     root       273  0.2  0.0      0     0 ?        D    Mar09  10:12  \_ [jbd2/sda7-8]     root       273  0.2  0.0      0     0 ?        D    Mar09  10:12  \_ [jbd2/sda7-8]     root       273  0.2  0.0      0     0 ?        D    Mar09  10:12  \_ [jbd2/sda7-8]     root       273  0.2  0.0      0     0 ?        D    Mar09  10:12  \_ [jbd2/sda7-8]     root       273  0.2  0.0      0     0 ?        D    Mar09  10:12  \_ [jbd2/sda7-8]     root       273  0.2  0.0      0     0 ?        D    Mar09  10:12  \_ [jbd2/sda7-8]     root       273  0.2  0.0      0     0 ?        D    Mar09  10:12  \_ [jbd2/sda7-8]     root       273  0.2  0.0      0     0 ?        D    Mar09  10:12  \_ [jbd2/sda7-8]     root       273  0.2  0.0      0     0 ?        D    Mar09  10:12  \_ [jbd2/sda7-8]     root       273  0.2  0.0      0     0 ?        D    Mar09  10:12  \_ [jbd2/sda7-8]      Unless there are many other programs including web browser, mysql-workbench, libreoffice, mediaplayer turning at the same time, but JDB2 is the top process using the system I/O ! How can i stop it safely or at least configure the system to disable it for the next boots.


title: Are there "esoteric" (weird) but standards-compliant C compilers or runtimes?

text: As we know, the C standard does not specify a lot of details of the implementation, for example value of NULL pointer, order of bits and bytes (endiannes), alignment in structs and of stack parameters, actual organization of memory (I don't think stack layout is necessary at all, just "auto"). Additionally, some other parts are instead defined (or undefined) to produce undefined behavior, such as dereferencing null (commonly segfault but not necessarily) Since modern platforms (or is it up to the compiler?) (intentionally?) behave similarly, some consistent behavior of programs is actually dangerous to rely on. So, is there a unix variant or unix inspired platform, (or a compiler if it is mostly up to the compiler?) which is standard but intentionally weird to produce bugs and point out undefined behavior and unportability? Does a similar thing exist but for POSIX instead of C? Is it even a reasonable thing to try and implement?


title: Applying limits to the Trash on Debian Wheezy

text: I'm using Debian Wheezy, with Gnome 3 and Nautilus and I was wondering if there was any way to limit the Trash to a certain total size or at least file age. I'm in need of this as I usually handle many GB file sizes and trashing them makes them still use the whole space. Directly removing them could be an option but I would lose the ability to recover them (something I usually need for one or two days). I also guess I could write a cron job to remove files from the Trash based on whatever criteria I want using the `find` command but I was hoping for a more 2014 solution. Any input would be appreciated.


title: Attaching different LibreOffice Writer documents

text: I have a lot of .odt documents. How can I attach them together without hurting their contents? Copy and paste in LibreOffice is not safe and may change the format. For example, the position of sliders for lines may be forgotten.


title: How to open tty or execute some script when the shortcut Ctrl+Alt+F[1-6] doesn't work and X11 is partially frozen but system is still working?

text: I'm using Ubuntu 10.10 with Gnome on Acer Aspire One netbook. The X11 or just some parts of Gnome like panels and partially windows (details described below) are frozen which doesn't allow to do anything with mouse (although the cursor can move, but clicking anywhere brings no results - panels are frozen (the clock is standing etc) and windows minimized), but generally the system, all processes (obviously except gnome shell) and hardware are working right - all leds (main hard disk, external swap disk, network) are blinking from time to time and there is a power supplied to USB ports so for example a keyboard is working and also some shortcuts like `Super+D` (minimizing and maximizing all windows but all I can see is only one blank window with plain surface and no contents displayed, the other windows I probably moved to another workspace with a shortcut or they are not showed due to the problem) but `Ctrl+Alt+F[1-6]` unfortunately not and I don't know the reason but I assume it probably never have been working before (I just had no opportunity to use it in the past and check if it works) even when it's pressed on external USB keyboard. The things I already used to try are:   * Firstly just waiting hoping that Gnome will handle it alone because it happened during doing some windows' actions like moving. minimizing and so on.   * Secondly the shortcut `Alt+F2` during the focus was on desktop and then typing certain commands to run (like trying to force playing some sound to ensure that system is reacting, `xdotool` to emulate shortcut opening tyy or just running `sudo chvt`) with no seeing what I'm doing and typing in hope that it's working in background but sadly it brings no effects.   * Then some other Gnome's shortcuts but they are not working in such circumstances or I just can't see their results by now.   * Finally I used to try to execute a bash script from pendrive with `autorun.inf` file inside - I'm aware that it couldn't run automatically after plugging in but as I suppose it should probably ask in dialog box what to do after detecting it and then I would try to allow execution trying to choose "run" option not seeing it but acting step by step from memory like I observed on the second machine and executing playing sound as a proof the system is alive and then try it with some more useful commands as I mentioned above but I have another computer with identical OS and configuration on which I verified it and it probably wouldn't ask - I assume that the frozen one would react in the same way - it just opens directory window when there is no autorun there or do nothing when autorun file exists and is detected - however please notice that the pendrive is mounted automatically - maybe it still would be helpful somehow. The thing which I also tried is obviously `Ctrl+Alt+F[1-6]` but it's sadly not effective too. I have no idea why it doesn't work but I think there is no chance to fix it right now or maybe I don't know about something. I'm looking for even extreme solutions - the point is how can I execute even small piece of code in such a case to execute `chvt` or `xdotoll` or eventually hibernate processes and copy RAM contents to external disk to secure unsaved data? Is there a possibility or any even theoretical chance to get an access to the computer/tty through making direct connection via crossover network cable between two computers if I've never installed or configured anything related to it before now? Or is there any other way to make connection with the frozen computer to get a remote access and control it in my situation? I have an external automatically mounting CD-ROM, maybe that could be used for something helpful? Moreover I can see and hear a reaction after plugging something to USB port because the hard disk start working hard for a moment. The main aim is to open tty or run script with the same commands that I would typed there like as a first of all refreshing gnome-shell or then some other marked above because system is still working. That's why I believe that there exist more reasonable and less drastic methods than cold boot attack which I've just read about and there is no need to do it although I'm desperate and ready to do a lot of things to handle it. The computer will be working until I will find some satisfying solution allowing bringing back a stability or although save a RAM state which is just one line of code but I need to know the way to execute it. I'm going to post it on other Stack sites too because it's really urgent and I'm looking for help everywhere - I hope it's not a serious wrongdoing and please excuse me that. Please share your ideas - I will really appreciate every hint. - EDIT: I've got a new idea - the 4GB swap partition is mounted and still working as well as system. The idea is to run something big which would need and use almost all RAM memory during the rest of processes are unused and sleeping, causing moving the rest of contents to the swap partition, then unplug the external USB drive which work as swap and then trying to extract some text strings from it. The computer has only 1GB of RAM so it may be possible. How about it? It's still a necessity to execute some code or commands but maybe is it possible to do it somehow with some shortcuts? I mean executing any active, hard working, RAM consuming processes. How do you rate a reasonableness and generally what do you think about it? How would I do it? I forgot to mention that the computer is all the time connected to my WLAN and connection is not broken. Would it help somehow? I've got no experiences with SSH, pinging etc...


title: Changing file time using touch

text: Im trying to change the file time of a m#merge the files to a temporary file.               mergecap -w  "${dir_dcn}"/merge_dcn.pcap "${FILES_dcn[@]}"          touch -r "${FILES_dcn[14]}" dcn_file               ls -l dcn_file >> /mnt/md0/capture/file1.txt     ls -l "${FILES_dcn[14]}" >> /mnt/md0/capture/file2.txt          #delete originals     rm  ${FILES_dcn[@]}     #rename to proper name     mv  "${dir_dcn}"/merge_dcn.pcap  "${dir_dcn}"/"${TAG1_dcn}".pcap          touch -r dcn_file "${dir_dcn}"/"${TAG1_dcn}".pcap     ls -l "${dir_dcn}"/"${TAG1_dcn}".pcap >> /mnt/md0/capture/file3.txt      But the log files suggest that after the last touch command the file time is current time rather than the time from dcn_file. I'm using Ubuntu 12 with samba share to access the files. File 1               -rw-r--r-- 1 root root 0 Mar 10 14:30 dcn_file      File 2               -rw-rw-rw- 1 nethawk nethawk 2098040 Mar 10 14:13 /mnt/md0/capture/dcn/dcn_2014_03_10_14_13_58_930.pcap      File 3               -rw-r--r-- 1 root root 60510376 Mar 12 10:15 /mnt/md0/capture/dcn/dcn_2014_03_10_14_30_29_985.pcap


title: How to set "statements" attribute for group object in Omshell

text: Dhcpd has group objects which contains two attributes:               name data               the name  of the  group.  All  groups that  are created               using  OMAPI must  have names,  and the  names must  be               unique among all groups.          statements data               a list  of statements in  the format of  the dhcpd.conf               file that  will be executed  whenever a message  from a               client whose host declaration  references this group is               processed.      How do I actually set the data in "statements" attribute correctly in Omshell? What is the format of "a list of statements"? I tried semicolon separated list of statements, but it can only produce a group object with the first statement, in the file `dhcpd.lease`. Omshell: http://linux.die.net/man/1/omshell Dhcpd: http://linux.die.net/man/5/dhcpd.leases


title: Sorting by Last Name in the Scond Column

text: I'm trying to sort a file that has entries that look like so:               Essie    |   Vaill   |    14225 Hancock Dr       |      Anchorage  |   AK  |   99515 907-345-0962      Please note the "|" stand for tabs of various sizes. I'm trying to sort this by the second field which in this case are last names in alphabetical order. I've tried several different commands such as (note addresses.txt is the name of the file):               sort -k 2 addresses.txt     sort -t$'\t' -k2 addresses.txt     sort -t "`/bin/echo '\t'`" -k 2 addresses.txt      None of these are giving me the desired result and after searching the internet, I simply cannot find a solution that works the way I need it to. If anyone could help me find the way to sort these by the second column in alphabetical order, it would be greatly appreciated.


title: Redirect the output of a command in `time command`

text: I am trying to time something using:               /usr/bin/time myCommand      However, since `/usr/bin/time` writes to stderr, if _myCommand_ also writes to stderr, I will get more than just time's output on the stream. What I want to do is, redirect all of myCommand's output to `/dev/null`, but still write time's output to stderr. Using an example _myCommand_ that writes to stderr of `ls /nofile`, we see that (obviously) there is no output at all with the following:               $ /usr/bin/time ls /nofile 2> /dev/null     $      Without any redirection, we see both the output from `ls` (to stderr) and the output from time (also to stderr):               $ /usr/bin/time ls /nofile     ls: cannot access /nofile: No such file or directory     0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata 3776maxresident)k     0inputs+0outputs (0major+278minor)pagefaults 0swaps      What I want is something that simply produces:               $ /usr/bin/time ls /nofile > RedirectThatImAskingFor     0.00user 0.00system 0:00.00elapsed 0%CPU (0avgtext+0avgdata 3776maxresident)k     0inputs+0outputs (0major+278minor)pagefaults 0swaps      Any ideas?


title: Error when constructing an associative array

text: I am trying to construct an associative array in bash               #!/bin/bash     declare -A hero_escore              hero_escore=( "Invoker_Anti-Mage : -44"         "Tinker_Nyx Assassin : 32"         "Troll Warlord_Drow Ranger : 3" )      These are 3 different lines. It is intended to be like that only. But the above code gives an error for each line - `Troll Warlord_Drow Ranger : 3: must use subscript when assigning associative array`. Is it because it is expecting me to use something like this - `[Invoker_Anti-Mage]="-44"`? If so is there anyway I can make it work the way I have used in my program using bash 3 or something? I want to construct an associative array with the format that I have given. Is it possible?


title: How to use btrfs send/receive for transmitting backup snapshots over a slow and unreliable network connection?

text: I'd like to use btrfs' send/receive feature for transmitting backup snapshots over a rather slow (initial seed of about 50-100GB, upstream bandwith ~1-2MBit/s) and unreliable (daily forced interruption on both ends) connection. I see following requirements:   * **encrypted transfer** (usually achieved by using an SSH tunnel)   * robustness to **interrupted connections** It seems ZFS is able to resume interrupted transfers automatically, similar to how rsync does. Does this also apply to BTRFS? The send/receive wiki page is not useful with respect to interrupted transfers. If btrfs would resume interrupted transfers, all I would have to do is using an SSH tunnel and resume if interrupted. If not, I'd have to use some buffer in-between that make sure the btrfs- connection survives interrupts, or get both servers close to each other for seeding (which will be a problem with respect to added files that excel the daily transmission capacities and sending snapshots). **What will I have to consider for transmitting the seed and snapshots?**


title: Delete files in a directory that match a regexp, using a Mac terminal

text: How do I delete files in a directory that match a given regexp, or a similar solution, using a Mac terminal?


title: How to batch clean filenames containing invalid characters

text: I have a larger directory with files whose filenames contain special characters such as line breaks. The origin of these characters is seemingly that I copied and pasted text from within pdf files (titles and author names) to the 'save as' dialog of pdf-readers, ignoring that they contained these invalid characters. With `ls` or a file manager I do not see the special characters but their presence hinders me to copy or to rename them. So how can I recursively rename the files removing all invalid characters? Note that I do not want to remove regular utf8 characters such as umlauts, spaces etc.


title: How to force `dpkg` to install dependencies

text: I would like to install `.deb` file via `dpkg` in Arch Linux. This `.deb` file needs many dependencies. I don't want to install dependencies by hand. How do I force `dpkg` to install dependencies?


title: How can I download all usernames?

text: I have access to a university's Linux server where all students have accounts. I can retrieve their full name by typing the `finger username`, and their departments by typing `id username`. All the student usernames are consecutive. For example:               e205846     e205847     e205848     e205849     e205850     ...      Is it possible for me to write a some kind of script and retrieve all the information to some kind of database? Or is there already an available tool for that? Also, as side note there some www folders in the Linux which has all the usernames. Here is one example               e147290@beluga:~$ finger e204158     Login: e204158                          Name: april oneil     Directory: /home705/e204158             Shell: /bin/bash     Never logged in.     No mail.     No Plan.          e147290@beluga:~$ id e204159     uid=53653(e204158) gid=5621(ce_bs) groups=5621(ce_bs)


title: What is the safe way to allow Java 7 to run on SELinux

text: **Short version:** What is the most secure way to allow Java 7 to run on (with?) SELinux? **Long version:** Sorry in advance if I use incorrect terminology. I'm really just a Java developer with a meager smattering of Linux skills. I just installed Java 7 on CentOS release 5.3 (Final) that is apparently has Security Enhanced Linux. After the install was complete (which I "installed" by unzipping the tar.gz file from Oracle in `/usr/java/jdk/jdk1.7.0_25`), I ran `java -version` and got this error:               Error: dl failure on line 864     Error: failed /usr/java/jdk1.7.0_25/jre/lib/i386/server/libjvm.so,           because /usr/java/jdk1.7.0_25/jre/lib/i386/server/libjvm.so:           cannot restore segment prot after reloc: Permission denied`      I found a few articles stating this can be due to SELinux and to try `setenforce 0` and see if the problem goes away. I ran that command and Java worked. But these same articles say that leaving `setenforce 0` on an Internet connected host is dangerous, and my host is connected to the Internet. There are other articles that suggest this next approach, but also say it can be dangerous, so I haven't tried it yet.               chcon -t textrel_shlib_t /usr/jre1.7.0_10/lib/i386/client/libjvm.so      ...in the above command the path at the end of the command is replaced with the path of my JDK. What I can't find is something "official" (which can mean many things) on how to run Java 7 on (with?) SELinux safely. Does anyone have any information for me? **Edit:** I discovered an article that referred to editing `/etc/selinux/config`. I have set as shown in the sample below. This allows Java to run but I assume I now have some security holes.               # This file controls the state of SELinux on the system.     # SELINUX= can take one of these three values:     #       enforcing - SELinux security policy is enforced.     #       permissive - SELinux prints warnings instead of enforcing.     #       disabled - SELinux is fully disabled.     SELINUX=permissive     # SELINUXTYPE= type of policy in use. Possible values are:     #       targeted - Only targeted network daemons are protected.     #       strict - Full SELinux protection.     SELINUXTYPE=targeted


title: IDE for large, multi-language projects (ie linux kernel)

text: I know the "which IDE do you guys use" question has been asked a million times. But I've never seen it asked in this context. What are some suggestions for an IDE when working on huge projects that encompass multiple languages and thousands of files. A good example is the android source. Not only is a good C/C++ IDE required for the kernel, but also Java and shell scripts. Is there anything that's built for this kind of project? What I normally use is KDevelop for C/C++. I love it, however, it seems to explode when using it for huge projects such as the linux kernel. Also it doesn't even do anything for Java or python. So what I'm basically looking for is suggestions for IDEs/setups (ie vim + scripts) for working with large projects, including the linux kernel itself. **Edit** : I think I may have been unclear. I'm not exactly looking for an IDE per se. What I'm really interested in is a tool (set of tools?) that make working with large, coupled projects easier. For example. The linux kernel defines a lot of macro functions. I want to be able to open any given source file in the kernel tree and be able to see the definition of that macro (whether it be by mousing over, or a vim extension window, or anything).


title: Disable detection of certain hardware?

text: I have a computer with two PCI TV cards. One is Compro (Win friendly), another is Leadtek (Linux friendly). Now, I'm trying to optimize my Ubuntu boot process and I would like to disable detection of my Compro card because it's not working on Linux, it won't work and even if it does, I don't care.   I sometimes use Windows so removing the Compro card is not an option. Is there any way to tell Linux "ignore any hardware placed THERE (appropriate PCI slot)"? My dmesg concerning tv card detection looks like this:               1.933868] cx88/0: cx2388x v4l2 driver version 0.0.8 loaded     [    1.933885] cx8800 0000:05:01.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19     [    1.935571] cx88[0]: Your board isn't known (yet) to the driver.  You can     [    1.935573] cx88[0]: try to pick one of the existing card configs via     [    1.935574] cx88[0]: card=<n> insmod option.  Updating to the latest     [    1.935575] cx88[0]: version might help as well.     [    1.936574] cx88[0]: Here is a list of valid choices for the card=<n> insmod option:     [    1.936890] cx88[0]:    card=0 -> UNKNOWN/GENERIC     [    1.937089] cx88[0]:    card=1 -> Hauppauge WinTV 34xxx models     [    1.937328] cx88[0]:    card=2 -> GDI Black Gold     [    1.937519] cx88[0]:    card=3 -> PixelView     [    1.937690] cx88[0]:    card=4 -> ATI TV Wonder Pro     [    1.937890] cx88[0]:    card=5 -> Leadtek Winfast 2000XP Expert     [    1.938137] cx88[0]:    card=6 -> AverTV Studio 303 (M126)     [    1.938366] cx88[0]:    card=7 -> MSI TV-@nywhere Master     [    1.938586] cx88[0]:    card=8 -> Leadtek Winfast DV2000     [    1.938803] cx88[0]:    card=9 -> Leadtek PVR 2000     [    1.939004] cx88[0]:    card=10 -> IODATA GV-VCP3/PCI     [    1.939211] cx88[0]:    card=11 -> Prolink PlayTV PVR     [    1.939417] cx88[0]:    card=12 -> ASUS PVR-416     [    1.939603] cx88[0]:    card=13 -> MSI TV-@nywhere     [    1.939799] cx88[0]:    card=14 -> KWorld/VStream XPert DVB-T     [    1.940040] cx88[0]:    card=15 -> DViCO FusionHDTV DVB-T1     [    1.940264] cx88[0]:    card=16 -> KWorld LTV883RF     [    1.940460] cx88[0]:    card=17 -> DViCO FusionHDTV 3 Gold-Q     [    1.940691] cx88[0]:    card=18 -> Hauppauge Nova-T DVB-T     [    1.940917] cx88[0]:    card=19 -> Conexant DVB-T reference design     [    1.941174] cx88[0]:    card=20 -> Provideo PV259     [    1.941367] cx88[0]:    card=21 -> DViCO FusionHDTV DVB-T Plus     [    1.941605] cx88[0]:    card=22 -> pcHDTV HD3000 HDTV     [    1.941812] cx88[0]:    card=23 -> digitalnow DNTV Live! DVB-T     [    1.942055] cx88[0]:    card=24 -> Hauppauge WinTV 28xxx (Roslyn) models     [    1.942329] cx88[0]:    card=25 -> Digital-Logic MICROSPACE Entertainment Center (MEC)     [    1.942651] cx88[0]:    card=26 -> IODATA GV/BCTV7E     [    1.942851] cx88[0]:    card=27 -> PixelView PlayTV Ultra Pro (Stereo)     [    1.943123] cx88[0]:    card=28 -> DViCO FusionHDTV 3 Gold-T     [    1.943354] cx88[0]:    card=29 -> ADS Tech Instant TV DVB-T PCI     [    1.943599] cx88[0]:    card=30 -> TerraTec Cinergy 1400 DVB-T     [    1.943842] cx88[0]:    card=31 -> DViCO FusionHDTV 5 Gold     [    1.944075] cx88[0]:    card=32 -> AverMedia UltraTV Media Center PCI 550     [    1.944352] cx88[0]:    card=33 -> Kworld V-Stream Xpert DVD     [    1.944584] cx88[0]:    card=34 -> ATI HDTV Wonder     [    1.944779] cx88[0]:    card=35 -> WinFast DTV1000-T     [    1.944982] cx88[0]:    card=36 -> AVerTV 303 (M126)     [    1.945191] cx88[0]:    card=37 -> Hauppauge Nova-S-Plus DVB-S     [    1.945430] cx88[0]:    card=38 -> Hauppauge Nova-SE2 DVB-S     [    1.945657] cx88[0]:    card=39 -> KWorld DVB-S 100     [    1.945857] cx88[0]:    card=40 -> Hauppauge WinTV-HVR1100 DVB-T/Hybrid     [    1.946132] cx88[0]:    card=41 -> Hauppauge WinTV-HVR1100 DVB-T/Hybrid (Low Profile)     [    1.946452] cx88[0]:    card=42 -> digitalnow DNTV Live! DVB-T Pro     [    1.952195] cx88[0]:    card=43 -> KWorld/VStream XPert DVB-T with cx22702     [    1.952253] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input2     [    1.957988] cx88[0]:    card=44 -> DViCO FusionHDTV DVB-T Dual Digital     [    1.963725] cx88[0]:    card=45 -> KWorld HardwareMpegTV XPert     [    1.969424] cx88[0]:    card=46 -> DViCO FusionHDTV DVB-T Hybrid     [    1.975040] cx88[0]:    card=47 -> pcHDTV HD5500 HDTV     [    1.980535] cx88[0]:    card=48 -> Kworld MCE 200 Deluxe     [    1.986008] cx88[0]:    card=49 -> PixelView PlayTV P7000     [    1.991482] cx88[0]:    card=50 -> NPG Tech Real TV FM Top 10     [    1.997005] cx88[0]:    card=51 -> WinFast DTV2000 H     [    2.002538] cx88[0]:    card=52 -> Geniatech DVB-S     [    2.008027] cx88[0]:    card=53 -> Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T     [    2.013714] cx88[0]:    card=54 -> Norwood Micro TV Tuner     [    2.019407] cx88[0]:    card=55 -> Shenzhen Tungsten Ages Tech TE-DTV-250 / Swann OEM     [    2.025299] cx88[0]:    card=56 -> Hauppauge WinTV-HVR1300 DVB-T/Hybrid MPEG Encoder     [    2.031338] cx88[0]:    card=57 -> ADS Tech Instant Video PCI     [    2.037373] cx88[0]:    card=58 -> Pinnacle PCTV HD 800i     [    2.043379] cx88[0]:    card=59 -> DViCO FusionHDTV 5 PCI nano     [    2.049444] cx88[0]:    card=60 -> Pinnacle Hybrid PCTV     [    2.055525] cx88[0]:    card=61 -> Leadtek TV2000 XP Global     [    2.061631] cx88[0]:    card=62 -> PowerColor RA330     [    2.067686] cx88[0]:    card=63 -> Geniatech X8000-MT DVBT     [    2.073779] cx88[0]:    card=64 -> DViCO FusionHDTV DVB-T PRO     [    2.079891] cx88[0]:    card=65 -> DViCO FusionHDTV 7 Gold     [    2.085954] cx88[0]:    card=66 -> Prolink Pixelview MPEG 8000GT     [    2.092031] cx88[0]:    card=67 -> Kworld PlusTV HD PCI 120 (ATSC 120)     [    2.098160] cx88[0]:    card=68 -> Hauppauge WinTV-HVR4000 DVB-S/S2/T/Hybrid     [    2.104363] cx88[0]:    card=69 -> Hauppauge WinTV-HVR4000(Lite) DVB-S/S2     [    2.104366] cx88[0]:    card=70 -> TeVii S460 DVB-S/S2     [    2.104368] cx88[0]:    card=71 -> Omicom SS4 DVB-S/S2 PCI     [    2.104370] cx88[0]:    card=72 -> TBS 8920 DVB-S/S2     [    2.104372] cx88[0]:    card=73 -> TeVii S420 DVB-S     [    2.104374] cx88[0]:    card=74 -> Prolink Pixelview Global Extreme     [    2.104375] cx88[0]:    card=75 -> PROF 7300 DVB-S/S2     [    2.104377] cx88[0]:    card=76 -> SATTRADE ST4200 DVB-S/S2     [    2.104379] cx88[0]:    card=77 -> TBS 8910 DVB-S     [    2.104381] cx88[0]:    card=78 -> Prof 6200 DVB-S     [    2.104383] cx88[0]:    card=79 -> Terratec Cinergy HT PCI MKII     [    2.104384] cx88[0]:    card=80 -> Hauppauge WinTV-IR Only     [    2.104386] cx88[0]:    card=81 -> Leadtek WinFast DTV1800 Hybrid     [    2.104388] cx88[0]:    card=82 -> WinFast DTV2000 H rev. J     [    2.104390] cx88[0]:    card=83 -> Prof 7301 DVB-S/S2     [    2.104392] cx88[0]:    card=84 -> Samsung SMT 7020 DVB-S     [    2.104394] cx88[0]:    card=85 -> Twinhan VP-1027 DVB-S     [    2.104395] cx88[0]:    card=86 -> TeVii S464 DVB-S/S2     [    2.104398] cx88[0]: subsystem: 185b:e000, board: UNKNOWN/GENERIC [card=0,autodetected], frontend(s): 0     [    2.104401] cx88[0]: TV tuner type -1, Radio tuner type -1      I know, I won't see any speedup benefit from disabling that detection, but those lines appear before plymouth splash and I don't like it :\


title: Which distro should I switch to?

text: I've been an Ubuntu user for quite a few years now. However, with the recent release of Gnome 3, and with Ubuntu not going to include it by default, instead including its own customizations (such as unity) -- I'm akin for something _vanilla_ (I see this unity similar to HTC's "Sense" that they put on their Android phones, which I can't stand). So I'm looking for a distro to switch to. It should:   * be as up to date as possible   * be stable (I have to give credit to Ubuntu for _just working_ in most situations), so no Archlinux :) -- I have tried it and, while nice, it seems to always crash like hell right when I need it most   * ship packages as unmodified as possible.   * have good support (large user base) I'm currently looking at Fedora, it seems to satisfy all my needs: up to date (the next release will include Gnome 3), stable, pretty vanilla as far as I can tell, good support (widely used). Any other suggestions?


title: BCRYPT - Why doesn't the Linux Distributions use it by default?

text: Does OpenBSD use bcrypt by default? Why doesn't every modern Linux Distribution use BCRYPT? http://codahale.com/how-to-safely-store-a-password/ https://secure.wikimedia.org/wikipedia/en/wiki/Bcrypt WHY????


title: Keyboard shortcut for horizontal scrolling

text: Is there a utility I could use to scroll the active window horizontally using the keyboard?


title: Yum file conflicts due to my mistake. How do I fix?

text: I did something stupid. I simply `scp`ed my _rpmforge_ repo files from another (working) machine on to my dev box, and ran `yum update`. This yielded:               root@dev07 /etc/yum.repos.d # yum update     Loaded plugins: refresh-packagekit, security     rpmforge                                                                                | 1.9 kB     00:00          rpmforge/primary_db                                                                                | 2.7 MB     00:01          Setting up Update Process     Resolving Dependencies     --> Running transaction check     ---> Package htop.x86_64 0:1.0.1-2.el6 will be updated     ---> Package htop.x86_64 0:1.0.3-1.el6.rf will be an update     ---> Package libewf.x86_64 0:20100226-1.el6 will be updated     ---> Package libewf.x86_64 0:20100226-1.el6.rf will be an update     ---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.021-136.el6 will be updated     ---> Package perl-Compress-Raw-Bzip2.x86_64 0:2.052-1.el6.rf will be an update     ---> Package testdisk.x86_64 0:6.14-1.el6 will be updated     ---> Package testdisk.x86_64 0:6.14-1.el6.rf will be an update     --> Processing Dependency: libreiserfs-0.3.so.0()(64bit) for package: testdisk-6.14-1.el6.rf.x86_64     --> Processing Dependency: libntfs-3g.so.84()(64bit) for package: testdisk-6.14-1.el6.rf.x86_64     ---> Package xclip.x86_64 0:0.12-1.el6 will be updated     ---> Package xclip.x86_64 0:0.12-1.el6.rf will be an update     --> Running transaction check     ---> Package fuse-ntfs-3g.x86_64 0:2013.1.13-2.el6.rf will be installed     ---> Package progsreiserfs.x86_64 0:0.3.0.4-1.2.el6.rf will be installed     --> Finished Dependency Resolution          Dependencies Resolved          ========================================================================================================================================================================================================================      Package                                                      Arch                                        Version                                                   Repository                                     Size     ========================================================================================================================================================================================================================     Updating:      htop                                                         x86_64                                      1.0.3-1.el6.rf                                            rpmforge                                       87 k      libewf                                                       x86_64                                      20100226-1.el6.rf                                         rpmforge                                      343 k      perl-Compress-Raw-Bzip2                                      x86_64                                      2.052-1.el6.rf                                            rpmforge                                      104 k      testdisk                                                     x86_64                                      6.14-1.el6.rf                                             rpmforge                                      451 k      xclip                                                        x86_64                                      0.12-1.el6.rf                                             rpmforge                                       27 k     Installing for dependencies:      fuse-ntfs-3g                                                 x86_64                                      2013.1.13-2.el6.rf                                        rpmforge                                      483 k      progsreiserfs                                                x86_64                                      0.3.0.4-1.2.el6.rf                                        rpmforge                                      119 k          Transaction Summary     ========================================================================================================================================================================================================================     Install       2 Package(s)     Upgrade       5 Package(s)          Total download size: 1.6 M     Is this ok [y/N]: y     Downloading Packages:     (1/7): fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64.rpm                                                                                | 483 kB     00:00          (2/7): htop-1.0.3-1.el6.rf.x86_64.rpm                                                                                |  87 kB     00:00          (3/7): libewf-20100226-1.el6.rf.x86_64.rpm                                                                                | 343 kB     00:00          (4/7): perl-Compress-Raw-Bzip2-2.052-1.el6.rf.x86_64.rpm                                                                                | 104 kB     00:00          (5/7): progsreiserfs-0.3.0.4-1.2.el6.rf.x86_64.rpm                                                                                | 119 kB     00:00          (6/7): testdisk-6.14-1.el6.rf.x86_64.rpm                                                                                | 451 kB     00:00          (7/7): xclip-0.12-1.el6.rf.x86_64.rpm                                                                                |  27 kB     00:00          -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------     Total                                                                                873 kB/s | 1.6 MB     00:01          warning: rpmts_HdrFromFdno: Header V3 DSA/SHA1 Signature, key ID 6b8d79e6: NOKEY     Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmforge-dag      Oops. I didn't follow the directions. So I deleted the `*rpmforge*` files from `/etc/yum.repos.d/`, and started over the correct way. Which all went fine until I tried another `yum update`:               [snip]     Transaction Check Error:       file /sbin/mount.lowntfs-3g from install of fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64 conflicts with file from package ntfs-3g-2:2011.4.12-5.el6.x86_64       file /sbin/mount.ntfs from install of fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64 conflicts with file from package ntfs-3g-2:2011.4.12-5.el6.x86_64       file /sbin/mount.ntfs-3g from install of fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64 conflicts with file from package ntfs-3g-2:2011.4.12-5.el6.x86_64       file /usr/bin/ntfs-3g from install of fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64 conflicts with file from package ntfs-3g-2:2011.4.12-5.el6.x86_64       file /usr/bin/ntfsmount from install of fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64 conflicts with file from package ntfs-3g-2:2011.4.12-5.el6.x86_64       file /usr/share/man/man8/ntfs-3g.8.gz from install of fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64 conflicts with file from package ntfs-3g-2:2011.4.12-5.el6.x86_64       file /usr/share/man/man8/ntfs-3g.probe.8.gz from install of fuse-ntfs-3g-2013.1.13-2.el6.rf.x86_64 conflicts with file from package ntfs-3g-2:2011.4.12-5.el6.x86_64          Error Summary     -------------          root@dev07 /etc/yum.repos.d #      I suppose I could just delete those files, but I want to be sure that by getting a bigger hammer, I'm not just breaking my system in to smaller pieces first. How should I fix this?


title: Why would attempts to bind affinities for rcu kthreads fail?

text: I am trying to get full tickless mode working on my box on Ubuntu kernel 3.10.39. I am running the following command:               for i in `pgrep rcu` ; do taskset -pc 0 $i ; done      It seems to work on some of the rcu processes but doesn't work for the rcuc processes. Then my full tickless mode doesn't work. The following is the output from the command:               pid 54's new affinity list: 0     pid 55's current affinity list: 0     pid 55's new affinity list: 0     :sched_setaffinity: Invalid argument     failed to set pid 209's affinity.     sched_setaffinity: Invalid argument     failed to set pid 215's affinity.     sched_setaffinity: Invalid argument     failed to set pid 221's affinity.     sched_setaffinity: Invalid argument     failed to set pid 227's affinity.     sched_setaffinity: Invalid argument     failed to set pid 233's affinity.     sched_setaffinity: Invalid argument     failed to set pid 239's affinity.     sched_setaffinity: Invalid argument     failed to set pid 245's affinity.     sched_setaffinity: Invalid argument     failed to set pid 251's affinity.     sched_setaffinity: Invalid argument     failed to set pid 258's affinity.     sched_setaffinity: Invalid argument     failed to set pid 264's affinity.     sched_setaffinity: Invalid argument     failed to set pid 270's affinity.     sched_setaffinity: Invalid argument     failed to set pid 276's affinity.     sched_setaffinity: Invalid argument     failed to set pid 282's affinity.     sched_setaffinity: Invalid argument     failed to set pid 288's affinity.     sched_setaffinity: Invalid argument     failed to set pid 294's affinity.     pid 56's current affinity list: 0     pid 56's new affinity list: 0


title: Nouveau cursor "tearing"

text: I am trying to find the proper terminology for the problem I am having so I can hunt down a solution. I am using the nouveau driver. When the mouse pointer becomes a grabbing hand, a box forms around it that no longer shows the proper image on the screen. It shows the screensaver image (if one is set) or a black image (if there is no screen saver). It is as though the screen saver is behind the image of the desktop and I am getting a square box that tears through it to see behind the desktop. My searches keep turning up vanishing cursors, cursors that don't move, cursors using the wrong image, etc... I cannot find anyone describing the problem of seeing through to the background around the cursor. If this helps, this is a more technical description of what I am seeing, based on my understanding of how X works: When a part of the screen needs to be updated, a bounding box is defined that encompasses the area. X, eventually, updates the graphics in that area. As you move your mouse around, you tell X that it needs to redraw around your pointer - otherwise you would have a pointer smeared all over the desktop. For nearly all versions of the cursor (pointer, paragraph, scroll) this works fine. When I have a grabbing hand, such as the one when you mouse over Google Maps, the box is sent to X. Instead of updating it with the proper image, it is updating it with my screensaver image. Then, a second later, it updates it with the proper image. So, as I move my mouse over Google Maps, I see a square of my screensaver surrounding the little hand.


title: Heirloom Toolchest tr: error(s) trying to delete the complement of a set containing a multibyte character?

text: I'm trying to use the `tr` command from the Heirloom Toolchest to overcome a current limitation of the _coreutils_ implementation, so as to be able to "pump" (with the `-dc` options) multibyte characters from a "random" generator ( _/dev/urandom_ ) to the terminal. Noteworthy is the fact that this has been compiled from source on _Archbang_ after having failed to do so using the AUR version(s). To simplify this, let's pick a character(☠) and figure out its octal value because this is how it must be expressed for toolchest `tr`:               echo '☠' | hexdump -b            # -b for octal     0000000 342 230 240 012                                                     0000004     echo -e '\0342\0230\0240'        # uses the "0nnn" format, make sure it prints     ☠      There is a difference in how the octal value is expressed in _Bash_ with the `echo` builtin ( _0nnn_ ) compared to the toolchest `tr` here ( _nnn_ ): > The character '\' followed by 1, 2 or 3 octal digits stands for the > character whose byte code is given by those digits. Multibyte characters can > be specified as a sequence of octal bytes. Let's try it. The `-dc` option simply deletes the complement of SET1. You specify a single set, and anything from standard input that doesn't contain an element from the set gets discarded:               echo '012345' | /usr/5bin/tr -dc '456'   #sanity check     45                                       #all good      Now these:               echo -e '\0342\0230\0240' | /usr/5bin/tr -dc '\342\230\240'     echo -e '☠' | /usr/5bin/tr -dc '☠'      which should both print one(1)☠, or ultimately the following (much more characters) all produce the same error:               /usr/5bin/tr -dc '\342\230\240' < /dev/urandom          *** Error in `/usr/5bin/tr': double free or corruption (!prev): 0x0000000000d24420 ***      Actually every time the input and SET1 both contain the chosen character the error appears with `-dc`. The behavior is also the same accross the _SysV 3rd, 4th, Posix, Posix2001, or ucb(BSD)_ versions of the command provided in the toolchest. Sometimes, as with the case of `tr -dc '1' < /dev/urandom` I get a segfault proper or some few lines of output followed with this:               Error in `/usr/5bin/tr': realloc(): invalid pointer: 0x00007f93ee284010 ***     ======= Backtrace: =========     /usr/lib/libc.so.6(+0x73f8e)[0x7f93ee338f8e]     /usr/lib/libc.so.6(+0x7988e)[0x7f93ee33e88e]     /usr/lib/libc.so.6(realloc+0x1c8)[0x7f93ee342918]     /usr/5bin/tr[0x401a74]     /usr/5bin/tr[0x400e93]     /usr/lib/libc.so.6(__libc_start_main+0xf0)[0x7f93ee2e5000]     /usr/5bin/tr[0x400f63]     ======= Memory map: ========     00400000-00403000 r-xp 00000000 08:21 1579535                            /usr/5bin/tr     00602000-00603000 rw-p 00002000 08:21 1579535                            /usr/5bin/tr     0067a000-006bc000 rw-p 00000000 00:00 0                                  [heap]     7f93edc6e000-7f93edc84000 r-xp 00000000 08:21 1448153                    /usr/lib/libgcc_s.so.1     7f93edc84000-7f93ede83000 ---p 00016000 08:21 1448153                    /usr/lib/libgcc_s.so.1     7f93ede83000-7f93ede84000 rw-p 00015000 08:21 1448153                    /usr/lib/libgcc_s.so.1     7f93ede84000-7f93ee2c5000 rw-p 00000000 00:00 0      7f93ee2c5000-7f93ee469000 r-xp 00000000 08:21 1440453                    /usr/lib/libc-2.19.so     7f93ee469000-7f93ee669000 ---p 001a4000 08:21 1440453                    /usr/lib/libc-2.19.so     7f93ee669000-7f93ee66d000 r--p 001a4000 08:21 1440453                    /usr/lib/libc-2.19.so     7f93ee66d000-7f93ee66f000 rw-p 001a8000 08:21 1440453                    /usr/lib/libc-2.19.so     7f93ee66f000-7f93ee673000 rw-p 00000000 00:00 0      7f93ee673000-7f93ee694000 r-xp 00000000 08:21 1440340                    /usr/lib/ld-2.19.so     7f93ee6eb000-7f93ee874000 r--p 00000000 08:21 1448356                    /usr/lib/locale/locale-archive     7f93ee874000-7f93ee877000 rw-p 00000000 00:00 0      7f93ee891000-7f93ee893000 rw-p 00000000 00:00 0      7f93ee893000-7f93ee894000 r--p 00020000 08:21 1440340                    /usr/lib/ld-2.19.so     7f93ee894000-7f93ee895000 rw-p 00021000 08:21 1440340                    /usr/lib/ld-2.19.so     7f93ee895000-7f93ee896000 rw-p 00000000 00:00 0      7fffed79c000-7fffed7bd000 rw-p 00000000 00:00 0                          [stack]     7fffed7e9000-7fffed7eb000 r-xp 00000000 00:00 0                          [vdso]     ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0                  [vsyscall]      Is all that suggesting a compiling error on my part or am I not using this properly? * * * With the contributed **patch** we have:               echo -e '\0342\0230\0240' | /home/me/bin/trsc -dc '\342\230\240'     echo -e '☠' | /home/me/bin/trsc -dc '☠'     ☠      As we should!! But:               /home/me/bin/trsc -dc '\342\230\240' < /dev/urandom      still remains a mystery as the picked character is not in the output...


title: Can xxd be used to output the binary representation of hex number , not a string?

text: I would like to generate a raw binary packet from hex in the command line for the purpose of testing a protocol. I'm hoping its simpler to do it this way than writing an aplication. Here is what currently happens:               echo '0A' | xxd  -b     0000000: 00110000 01000001 00001010      What i would like to have is:               echo '0A' | xxd  -b     0000000: 00001010          or               echo '0A' | xxd  -b     0000000: 01010000          Since I'm not jet sure about the required endianess. I would like to be able to change it when necessary. Is this achievable?


title: Wlan0 (Ralink RT2870/RT3070) missing after apt-get upgrade

text: As I've mentioned before I've run `apt-get update && upgrade` and my **wlan0** isn't working anymore - please help. The details you've may be asking me:               uname -a      `Linux pi.local 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux`               lsusb     Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub     Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.      Bus 001 Device 004: ID 05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB         Bus 001 Device 005: ID 148f:3070 Ralink Technology, Corp.        RT2870/RT3070 Wireless Adapter     Bus 001 Device 006: ID 04fc:0801 Sunplus Technology Co., Ltd      Bus 001 Device 007: ID 046d:c315 Logitech, Inc. Classic New Touch Keyboard      **ifconfig** & **iwconfig**               ifconfig          eth0      Link encap:Ethernet  HWaddr b8:27:eb:52:db:e1                 inet addr:192.168.0.182  Bcast:192.168.0.255  Mask:255.255.255.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:13098 errors:0 dropped:0 overruns:0 frame:0               TX packets:10478 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:8288713 (7.9 MiB)  TX bytes:4455841 (4.2 MiB)          iwconfig          lo        no wireless extensions.          eth0      no wireless extensions.               lsmod     Module                  Size  Used by     xt_multiport            1582  8      iptable_filter          1493  1      ip_tables              11490  1 iptable_filter     x_tables               16962  3 ip_tables,xt_multiport,iptable_filter     snd_bcm2835            16432  0      snd_pcm                77728  1 snd_bcm2835     snd_seq                53482  0      snd_timer              20110  2 snd_pcm,snd_seq     snd_seq_device          6462  1 snd_seq     snd                    58744  5 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device     snd_page_alloc          5169  1 snd_pcm     crc_ccitt               1530  0      **rt2x00usb              11240  0      rt2x00lib              42342  1 rt2x00usb**     mac80211              273979  2 rt2x00lib,rt2x00usb     cfg80211              184390  2 mac80211,rt2x00lib     rfkill                 18298  1 cfg80211     leds_gpio               2243  0      led_class               3570  2 leds_gpio,rt2x00lib     evdev                   9450  2      joydev                  9356  0       I've already tried to reinstall drivers as a last time - this time it didn't help :(               pi@pi / $ cat /etc/network/interfaces           auto lo          iface lo inet loopback     iface eth0 inet dhcp          allow-hotplug wlan0     iface wlan0 inet manual     wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf     iface default inet dhcp      and finally wpa_supplicant.conf               sudo cat /etc/wpa_supplicant/wpa_supplicant.conf      ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev     update_config=1          #network={     #   ssid="SKYA767C"     #   psk="House!-01"     #   proto=RSN     #   key_mgmt=WPA-PSK     #   group=CCMP TKIP     #}          network={         ssid="SKYA767C"         psk="House!-01"         proto=WPA         key_mgmt=WPA-PSK         pairwise=TKIP         auth_alg=OPEN     }      Please note that above # are as I've try 1st and 2nd configuration and any of them didn't work. What else I need to do? Can anyone help to fix my **wlan0** interface


title: two .csv files compare using awk

text: **I need to compare two files, File1.csv and File2.csv (Separated by ',') using Awk** Logic: Column PID in both files are reference. If for same 'PID' in 'File1.csv' and 'File2.csv' and in both files column 'Value' value is same then 'File2.csv' column 'UTS' value update for this column getting value from 'File1.csv' column 'RTS'. Else for same 'PID' in 'File1.csv' and 'File2.csv' and in both files column 'Value' value is not same then 'File2.csv' column 'Value,RTS,UTS' value update for this column getting value from 'File1.csv' column 'Value,RTS,UTS' File1.csv:               PID,Value,RTS     1,50,10:30:00     2,22,10:15:00     3,34,10:18:00     4,54,10:20:00     5,54,10:22:00     6,54,10:25:00     7,80,10:50:00     8,60,10:32:00     9,45,10:35:00      File2.csv:               PID,Value,RTS,UTS     1,12,10:10:00,10:14:00     2,22,10:15:00,10:17:00     3,34,10:18:00,10:19:00     4,54,10:20:00,10:21:00     5,54,10:22:00,10:24:00     6,54,10:25:00,10:29:00     7,60,10:30:00,10:31:00     8,60,10:32:00,10:34:00     9,45,10:35:00,10:35:00      Output:               PID,Value,RTS,UTS     1,50,10:30:00,10:30:00     2,22,10:15:00,10:15:00     3,34,10:18:00,10:18:00     4,54,10:20:00,10:20:00     5,54,10:22:00,10:22:00     6,54,10:25:00,10:25:00     7,80,10:50:00,10:50:00     8,60,10:32:00,10:32:00     9,45,10:35:00,10:35:00


title: Display full ISO time in OSF1

text: I am working on an HP OSF1 (Tru64) based server and need to display file listings with the full-iso time format style. Example of this in Ubuntu Linux,               user@hostname:~/Desktop$ ls -lrt --full-time     total 56     -rw-r--r-- 1 user group  3500 2014-01-28 23:02:11.036072341 +0530 sample_config.conf     -rw-r--r-- 1 user group  9123 2014-01-28 23:02:45.290084160 +0530 vxprint.inp     -rw-r--r-- 1 user group  2312 2014-01-29 08:55:22.068250913 +0530 op_metastat.txt     -rw-r--r-- 1 user group   348 2014-01-29 08:56:11.214369737 +0530 op_drbd.txt     -rw-r--r-- 1 user group 11844 2014-01-29 08:56:55.429858843 +0530 op_prtdiag.txt     -rw-r--r-- 1 user group  1701 2014-01-29 11:42:08.320187594 +0530 drbd.pl     -rw-r--r-- 1 user group  1256 2014-01-30 09:23:37.037858800 +0530 prtdiag.pl     -rw-r--r-- 1 user group  5089 2014-01-30 10:00:56.357497995 +0530 crs_alerts.txt     -rw-r--r-- 1 user group  2761 2014-01-30 10:41:31.452528726 +0530 metastat.pl     user@hostname:~/Desktop$      Example in Solaris SunOS,               user@hostname> ls -lErt     total 128750     -rwxr-x---   1 user group          174 2012-09-10 16:28:59.000000000 +0530 local.profile     -rwxr-x---   1 user group          157 2012-09-10 16:28:59.000000000 +0530 local.login     -rwxr-x---   1 user group          136 2012-09-10 16:28:59.000000000 +0530 local.cshrc     drwxr-xr-x   3 user group           96 2012-10-09 22:11:57.000000000 +0530 etc     drwxr-xr-x   2 user group           96 2012-10-11 14:48:59.000000000 +0530 Documents     user@hostname>      How do I display the directory listing in the same manner in OSF1?


title: Is it possible to move established connections on one port, to another without dropping data?

text: this problem has been bugging me for a couple of days now. I can't figure out a good enough solution using iptables without having dropped packets. So here is the back story. Say I have a client connect to port 1000, which is forwarded to port 2000 at the time. Now, I have one client connected to port 1000 which is actually port 2000 on the server (netstat). Say I want to now move this already ESTABLISHED connection from port 2000, to port 3000. How would I go about doing this without dropping the connection? The way I'm doing it now is DROP'ing that port (2000), then making a new rule which does port 1000->3000. This works, but it takes ~20s for the client to realize and during that time packets are dropped.


title: Why I can't pass ip to rsync script?

text: I am writing script were rsync should be called and ask for password. However I cannot pass IP as argument. I think I am missing something simple. Any ideas? Even trivial script like this just outputs nothing, just stucks: `rsync -avzh -P $1 $3@$2:/opt/stuff/` When I put IP it worked: `rsync -avzh -P $1 $3@192.168.0.100:/opt/stuff/` Tried escaping colon, didn't helped, echo'ed everything and it just showed similar line. I think it is something related to interactivity.


title: yum installs kernel-devel different from my kernel version

text: I am attempting to install the VMWare player in Fedora 19. I am running into the problem that multiple users have had where VMware player cannot find the kernel headers. I have installed the `kernel-headers` and `kernel-devel` packages through `yum` and the file that appears in `/usr/src/kernels` is:               3.12.8-200.fc19.x86_64      However, when I do `uname -r` my Fedora kernel version is:               3.9.5-301.fc19.x86_64      which is a different version. This seems to mean that when I point VMware player at the path of the kernels I get this error:               C header files matching your running kernel were not found.       Refer to your distribution's documentation for installation instructions.      How can I install the correct Kernel and where should I be pointing VMware if its not `/usr/src/kernels/<my-kernel>` ?


title: Bash: show prompts if arguments weren't provided

text: What is the best way of supporting in the script prompts and arguments at the same time? I want to show prompts if arguments weren't provided. Is there something better/shorter than this? ⇩               PROJECT_DIR=$1     SITE_NAME=$2     ADMIN_PWD=$3     THEME_DIR=$4     THEME_NAME=$5          if [ -z "${PROJECT_DIR}" ]; then         echo "Directory where project resides:"         read PROJECT_DIR     fi          if [ -z "${SITE_NAME}" ]; then         echo "Name of the website:"         read SITE_NAME     fi          if [ -z "${ADMIN_PWD}" ]; then         echo "Admin password:"         read ADMIN_PWD     fi          if [ -z "${THEME_DIR}" ]; then         echo "Directory of the theme:"         read THEME_DIR     fi          if [ -z "${THEME_NAME}" ]; then         echo "Name of the theme:"         read THEME_NAME     fi


title: rm -f files starting with a digit

text: I've accidentally redirected the output of a CSV file to my directory. How can I `rm` only the files that start with a number, and leave the files that start with a letter intact?               mymachine$ ls     71.24         README.md        30            4.29     8             filter.sh        42.81         5.58              8.36          purchases.csv    1,208.8       100               16.7          2.56             21.78         269.96


title: How to install matplotlib on Linux?

text: I have the Ubuntu 12.04 LTS for windows installer. I'm trying to install matplotlib on it. From this page it says I need to download the dependencies first using `sudo apt-get build-dep python-matplotlib` But when I do that I get this               me@ubuntu:~/Desktop$ sudo apt-get build-dep python-matplotlib     Reading package lists... Done     Building dependency tree            Reading state information... Done     Picking 'matplotlib' as source package instead of 'python-matplotlib'     E: Unable to find a source package for matplotlib      How can I get rid of this error?


title: Copy/paste into SSH'd VIM from local (Windows) clipboard

text: I would like to copy from a local machine and paste into vim on a remote box which I am SSH'd into. That's it. I have tried `"+p and "*p`, mouse middle-clicking, and a couple other things to no avail :( Also acceptable (though less convenient) is to just skip vim and pipe clipboard into file. My problem was that I am using PuttyTray and not Putty, when I tried to do the same thing in Putty it worked -- I didn't think there would be a problem with that.


title: Add poweroff to startup script

text: Yes, as the title says I want to add `poweroff` to startup script `/etc/rc.local` (Ubuntu). It sounds odd or silly, the reason is I want to tease my friend for few minutes. I didn't tried it up to now. Question:   1. Does the system really shutdown after startup?   2. If above case is true, how to stop it?   3. Is this really dangerous?


title: autostarting scripts in debian

text: I have a service that I install as so:               install -m 755 init_script /etc/init.d/spacenavd     cd /etc/rc2.d     ln -s ../init.d/spacenavd S99spacenavd      what the init_script does is start the script:               /usr/local/bin/spacenavd -v      All of this works fine and allows the service to start automatically on startup. However I am having trouble running another script on startup that uses the spacenavd service. This script works normally when I run it manually after login in. However, running it on startup on as so doesn't work when I put it in rc.local. I do the following in rc.local:               cd /home/filedirec     sudo ./my_script &      This works sometimes and sometimes doesn't. I can't seem to determine what the cause is. Whats a good way to trouble shoot?


title: How to measure the time a packet spends on the system(router)?

text: I have a streaming system and one if its components is a router/firewall. I'm using `iptables` for setting the required behaviour on the router. I'm having performance issues in forms of a constant multiple second lag on the destination computer where the stream is interpreted. I would like to try to eliminate the routers processing time as the source of the lag. Is there a way to measure the time a packet spends on the router?


title: update-alternatives just for one user

text: I'm using a shared server. On that server different versions of Java are installed:                 Selection    Path                                      Priority   Status     ------------------------------------------------------------       0            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      auto mode     * 1            /usr/lib/jvm/java-6-openjdk/jre/bin/java   1061      manual mode       2            /usr/lib/jvm/java-6-sun/jre/bin/java       63        manual mode      I would like to choose the Second options, but if I tried to do that it complains that I do not have the permissions (I'm not root). Is there a way to do that in "user-space"? Can the Root user make this preference works only for me?


title: Testing, from a script, if audio devices are in silent?

text: Is there a default program where I can check if my audio devices are in silent? **Edit:** By silence, I mean that if there is something playing on that (not just activated or opened) Something like this:               if [[ device0 is silent ]] ; then         radio $RANDOM     fi      **Edit 2:** What I'm trying to achieve is a script that plays radio and can keep playing when the player fails, e.g. if the internet connection goes down and the player didn't recovery, I will kill the player and start over again


title: Count and merge consecutive patterns

text: I'm searching for a short snippet to find, count and merge _consecutive_ duplicates using standard tools or a common scripting language. Say our input is:               1 2 2 2 7 22 a b b c c c c c d dd 2 2 c c      And as output we would like to have something _similar_ to:               1 3*2 7 22 a 2*b 5*c d dd 2*2 2*c      It is important to keep the order and to merge only _consecutive_ patterns.


title: help with laptop tv-tuner

text: I have bought a new laptop tuner (I think it's the same as the one in this thread: http://ubuntuforums.org/showthread.php?t=2028123). `lsusb` gives                Bus 002 Device 005: ID 048d:9135 Integrated Technology Express, Inc.       Zolid Mini DVB-T Stick      `dmesg | grep -i dvb` after plugging in the usb stick gives               [12280.493513] dvb-usb: found a 'ITE 9135 Generic' in cold state, will try      to load a firmware     [12280.523395] dvb-usb: downloading firmware from file 'dvb-usb-     it9137-01.fw'      and I've followed the steps in the above thread I mentioned (moving the .fw files to relevant places) but end with the errors below. I thought this would now be resolved in a newer Kernel. Was this ever really resolved? my syslog tail shows               myuser@mylap:~$ tail /var/log/syslog     Jan 15 11:38:29 mylap kernel: [12280.493513] dvb-usb: found a 'ITE 9135      Generic' in cold state, will try to load a firmware     Jan 15 11:38:29 mylap kernel: [12280.523395] dvb-usb: downloading firmware      from file 'dvb-usb-it9137-01.fw'     Jan 15 11:38:29 mylap kernel: [12280.524030] it913x: FRM Starting      Firmware Download     Jan 15 11:38:29 mylap kernel: [12281.022573] it913x: FRM Firmware Download     Failed (ffffffed)     Jan 15 11:38:29 mylap kernel: [12281.222204] it913x: Chip Version=6f Chip      Type=0203     Jan 15 11:38:30 mylap kernel: [12282.056523] it913x: DEV it913x Error     Jan 15 11:38:30 mylap kernel: [12282.056584] usbcore: registered new     interface driver it913x      The Kernel version I'm using is `uname -a`                Linux mylap 3.2.0-35-generic-pae #55-Ubuntu SMP Wed Dec 5 18:04:39 UTC      2012 i686 i686 i386 GNU/Linux       I can't seem to get any further than this (I followed the steps earlier in the thread and put the .fw files in the firmware folders , but still get above errors). Kaffeine doesn't seem to pick up any tuner and wont even start a scan. Can anyone help?


title: Qualcomm based modem Venus converted to ttyUSB0 but not responding forever on fedora 18

text: I've one usb modem qualcomm based, here is my configuration what I've done in the past. ### wvdial               # wvdial phone      --> WvDial: Internet dialer version 1.61      --> Cannot get information for serial port.      --> Initializing modem.      --> Sending: ATZ      --> Sending: ATQ0      --> Re-Sending: ATZ      --> Modem not responding.      ### udev               $ cat /etc/udev/rules.d/option.rules     ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="1000", RUN+="/usr/bin/usbModemScript"     ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="1000", RUN+="/sbin/modprobe option"      ### script               $ cat /usr/bin/usbModemScript          #! /bin/bash     echo 05c6 1000 > /sys/bus/usb-serial/drivers/generic/new_id      ### lsusb               $ lsusb |grep "1000"     Bus 003 Device 004: ID 05c6:1000 Qualcomm, Inc. Mass Storage Device      ### /dev               $ ls /dev/ttyUSB0     /dev/ttyUSB0      ### wvdial.conf               $ cat /etc/wvdial.conf     [Dialer phone]     Modem Type = Analog Modem     Phone = #777     ISDN = 0     Baud = 460800     Username = "user"     Password = "pwd"     Modem = /dev/ttyUSB0     Init1 = ATZ     Stupid Mode = 1      ### wvdialconf               $ wvdialconf     Editing `/etc/wvdial.conf'.          Scanning your serial ports for a modem.          Modem Port Scan<*1>: S0   S1   S2   S3        WvModem<*1>: Cannot get information for serial port.     ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 2400 baud, next try: 9600 baud     ttyUSB0<*1>: ATQ0 V1 E1 -- failed with 9600 baud, next try: 9600 baud     ttyUSB0<*1>: ATQ0 V1 E1 -- and failed too at 115200, giving up.               Sorry, no modem was detected!  Is it in use by another program?     Did you configure it properly with setserial?          Please read the FAQ at http://alumnit.ca/wiki/?WvDial      ### wvdial               $ wvdial phone     --> WvDial: Internet dialer version 1.61     --> Cannot get information for serial port.     --> Initializing modem.     --> Sending: ATZ     --> Sending: ATQ0     --> Re-Sending: ATZ     --> Modem not responding.      I'm using x86 fedora 18. ### UPDATE #1 ### lsmod               $ lsmod     Module                  Size  Used by     option                 29833  0      usb_wwan               18701  1 option     ip6table_filter        12712  0      ip6_tables             17745  1 ip6table_filter     ebtable_nat            12696  0      ebtables               21316  1 ebtable_nat     fuse                   71577  9      bnep                   18864  2      bluetooth             275642  7 bnep     vboxpci                22897  0      vboxnetadp             25637  0      vboxnetflt             27262  0      vboxdrv               264146  3 vboxnetadp,vboxnetflt,vboxpci     be2iscsi               76220  0      iscsi_boot_sysfs       15122  1 be2iscsi     bnx2i                  49543  0      cnic                   57574  1 bnx2i     uio                    14413  1 cnic     cxgb4i                 32075  0      cxgb4                  97513  1 cxgb4i     cxgb3i                 28034  0      cxgb3                 130967  1 cxgb3i     mdio                   13244  1 cxgb3     libcxgbi               54562  2 cxgb3i,cxgb4i     ib_iser                32692  0      rdma_cm                37085  1 ib_iser     ib_addr                13513  1 rdma_cm     iw_cm                  13753  1 rdma_cm     ib_cm                  36713  1 rdma_cm     ib_sa                  23966  2 rdma_cm,ib_cm     ib_mad                 37175  2 ib_cm,ib_sa     ib_core                61976  6 rdma_cm,ib_cm,ib_sa,iw_cm,ib_mad,ib_iser     iscsi_tcp              18016  0      libiscsi_tcp           19468  4 cxgb3i,cxgb4i,iscsi_tcp,libcxgbi        libiscsi               44825  8               libiscsi_tcp,bnx2i,cxgb3i,cxgb4i,be2iscsi,iscsi_tcp,ib_iser,libcxgbi     scsi_transport_iscsi    46616  8 bnx2i,be2iscsi,iscsi_tcp,ib_iser,libcxgbi,libiscsi     arc4                   12544  2      rtl8187                56256  0      eeprom_93cx6           12987  1 rtl8187     mac80211              471137  1 rtl8187     uvcvideo               71339  0      videobuf2_vmalloc      12840  1 uvcvideo     videobuf2_memops       13191  1 videobuf2_vmalloc     videobuf2_core         33259  1 uvcvideo     videodev               91347  2 uvcvideo,videobuf2_core     media                  19720  2 uvcvideo,videodev     cfg80211              170721  2 mac80211,rtl8187     snd_hda_codec_conexant    56642  1      snd_hda_intel          32539  2      snd_hda_codec         109374  2 snd_hda_codec_conexant,snd_hda_intel     toshiba_acpi           18335  0      sparse_keymap          13343  1 toshiba_acpi     snd_hwdep              13233  1 snd_hda_codec     snd_seq                54700  0      rfkill                 20452  5 cfg80211,toshiba_acpi,bluetooth     snd_seq_device         13825  1 snd_seq     snd_pcm                81512  2 snd_hda_codec,snd_hda_intel     snd_page_alloc         13710  2 snd_pcm,snd_hda_intel     snd_timer              23743  2 snd_pcm,snd_seq     snd                    63247  12                ### /var/log/messages               $ tail -f /var/log/messages     Jul 13 14:16:43 localhost ntfs-3g[1519]: Version 2012.1.15 integrated FUSE 27     Jul 13 14:16:43 localhost ntfs-3g[1519]: Mounted /dev/sda5 (Read-Write, label "", NTFS 3.1)     Jul 13 14:16:43 localhost ntfs-3g[1519]: Cmdline options: rw     Jul 13 14:16:43 localhost ntfs-3g[1519]: Mount options: rw,allow_other,nonempty,relatime,fsname=/dev/sda5,blkdev,blksize=4096     Jul 13 14:16:43 localhost ntfs-3g[1519]: Ownership and permissions disabled, configuration type 1     Jul 13 14:16:44 localhost systemd[1]: Starting Stop Read-Ahead Data Collection...     Jul 13 14:16:44 localhost systemd[1]: Started Stop Read-Ahead Data Collection.     Jul 13 14:17:17 localhost kernel: [  102.933110] usb 3-1: new full-speed USB device number 2 using uhci_hcd     Jul 13 14:17:17 localhost kernel: [  103.081203] usb 3-1: New USB device found, idVendor=05c6, idProduct=1000     Jul 13 14:17:17 localhost kernel: [  103.081214] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3     Jul 13 14:17:17 localhost kernel: [  103.081221] usb 3-1: Product: USB MMC Storage     Jul 13 14:17:17 localhost kernel: [  103.081228] usb 3-1: Manufacturer: Qualcomm, Incorporated     Jul 13 14:17:17 localhost kernel: [  103.081234] usb 3-1: SerialNumber: 000000000002     Jul 13 14:17:17 localhost mtp-probe: checking bus 3, device 2: "/sys/devices/pci0000:00/0000:00:1a.0/usb3/3-1"     Jul 13 14:17:17 localhost mtp-probe: bus: 3, device: 2 was not an MTP device     Jul 13 14:17:17 localhost kernel: [  103.132523] usbserial_generic 3-1:1.0: The "generic" usb-serial driver is only for testing and one-off prototypes.     Jul 13 14:17:17 localhost kernel: [  103.132531] usbserial_generic 3-1:1.0: Tell linux-usb@vger.kernel.org to add your device to a proper driver.     Jul 13 14:17:17 localhost kernel: [  103.132535] usbserial_generic 3-1:1.0: generic converter detected     Jul 13 14:17:17 localhost kernel: [  103.134761] usb 3-1: generic converter now attached to ttyUSB0     Jul 13 14:17:17 localhost kernel: [  103.159122] usbcore: registered new interface driver option     Jul 13 14:17:17 localhost kernel: [  103.160896] USB Serial support registered for GSM modem (1-port)     Jul 13 14:17:17 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) opening serial port...     Jul 13 14:17:17 localhost dbus-daemon[593]: modem-manager[720]: <warn>  (ttyUSB0): port attributes not fully set     Jul 13 14:17:17 localhost modem-manager[720]: <info>  (ttyUSB0) opening serial port...     Jul 13 14:17:17 localhost modem-manager[720]: <warn>  (ttyUSB0): port attributes not fully set     Jul 13 14:17:29 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) closing serial port...     Jul 13 14:17:29 localhost modem-manager[720]: <info>  (ttyUSB0) closing serial port...     Jul 13 14:17:59 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) serial port closed     Jul 13 14:17:59 localhost modem-manager[720]: <info>  (ttyUSB0) serial port closed     Jul 13 14:17:59 localhost modem-manager[720]: <info>  (ttyUSB0) opening serial port...     Jul 13 14:17:59 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) opening serial port...     Jul 13 14:18:05 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) closing serial port...     Jul 13 14:18:05 localhost modem-manager[720]: <info>  (ttyUSB0) closing serial port...     Jul 13 14:18:09 localhost dbus-daemon[593]: dbus[593]: [system] Activating service name='net.reactivated.Fprint' (using servicehelper)     Jul 13 14:18:09 localhost dbus[593]: [system] Activating service name='net.reactivated.Fprint' (using servicehelper)     Jul 13 14:18:09 localhost dbus-daemon[593]: dbus[593]: [system] Successfully activated service 'net.reactivated.Fprint'     Jul 13 14:18:09 localhost dbus[593]: [system] Successfully activated service 'net.reactivated.Fprint'     Jul 13 14:18:09 localhost dbus-daemon[593]: Launching FprintObject     Jul 13 14:18:09 localhost dbus-daemon[593]: ** Message: D-Bus service launched with name: net.reactivated.Fprint     Jul 13 14:18:09 localhost dbus-daemon[593]: ** Message: entering main loop     Jul 13 14:18:35 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) serial port closed     Jul 13 14:18:35 localhost modem-manager[720]: <info>  (ttyUSB0) serial port closed     Jul 13 14:18:35 localhost modem-manager[720]: <info>  (ttyUSB0) opening serial port...     Jul 13 14:18:35 localhost modem-manager[720]: <warn>  (ttyUSB0): port attributes not fully set     Jul 13 14:18:35 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) opening serial port...     Jul 13 14:18:35 localhost dbus-daemon[593]: modem-manager[720]: <warn>  (ttyUSB0): port attributes not fully set     Jul 13 14:18:40 localhost dbus-daemon[593]: ** Message: No devices in use, exit     Jul 13 14:18:47 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) closing serial port...     Jul 13 14:18:47 localhost modem-manager[720]: <info>  (ttyUSB0) closing serial port...     Jul 13 14:19:17 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) serial port closed     Jul 13 14:19:17 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) opening serial port...     Jul 13 14:19:17 localhost modem-manager[720]: <info>  (ttyUSB0) serial port closed     Jul 13 14:19:17 localhost modem-manager[720]: <info>  (ttyUSB0) opening serial port...     Jul 13 14:19:23 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) closing serial port...     Jul 13 14:19:23 localhost modem-manager[720]: <info>  (ttyUSB0) closing serial port...     Jul 13 14:19:53 localhost dbus-daemon[593]: modem-manager[720]: <info>  (ttyUSB0) serial port closed     Jul 13 14:19:53 localhost modem-manager[720]: <info>  (ttyUSB0) serial port closed     Jul 13 14:19:55 localhost dbus-daemon[593]: dbus[593]: [system] Activating service name='net.reactivated.Fprint' (using servicehelper)     Jul 13 14:19:55 localhost dbus[593]: [system] Activating service name='net.reactivated.Fprint' (using servicehelper)     Jul 13 14:19:55 localhost dbus-daemon[593]: dbus[593]: [system] Successfully activated service 'net.reactivated.Fprint'     Jul 13 14:19:55 localhost dbus[593]: [system] Successfully activated service 'net.reactivated.Fprint'     Jul 13 14:19:55 localhost dbus-daemon[593]: Launching FprintObject     Jul 13 14:19:55 localhost dbus-daemon[593]: ** Message: D-Bus service launched with name: net.reactivated.Fprint     Jul 13 14:19:55 localhost dbus-daemon[593]: ** Message: entering main loop     Jul 13 14:20:01 localhost modem-manager[1827]: <info>  ModemManager (version 0.6.0.0-2.fc18) starting...     Jul 13 14:20:01 localhost modem-manager[1827]: <warn>  Could not acquire the org.freedesktop.ModemManager service as it is already taken. Return: 3     //here logged because I ve just tried to manually start modem-manager from terminal but the log below says     Jul 13 14:20:25 localhost modem-manager[1833]: <info>  [1373700025.052722] ModemManager (version 0.6.0.0-2.fc18) starting...     Jul 13 14:20:25 localhost modem-manager[1833]: <warn>  [1373700025.057438] Could not acquire the org.freedesktop.ModemManager service as it is already taken. Return: 3     Jul 13 14:20:26 localhost dbus-daemon[593]: ** Message: No devices in use, exit


title: Understanding Arch Linux release cycle

text: I'm new to Arch and perhaps this question has been asked hunderd of times before but I culdn't find an answer even in the official Arch documentation like this: https://wiki.archlinux.org/index.php/Arch_Compared_to_Other_Distributions Arch it's a rolling release distro. Ths is clear to me. But, what does exaclty happens when a new version of a component is released? Let's use the kernel as an example:   A new stable kernel is available at www.kernel.org (e.g. 3.12.8). Is this kernel packaged as it is and pushed to Arch repos or:   1. is there any QA loop (testing) before pushing a package to repo?   2. are some patches applied? In arch if I type `uname -r`, I get `3.12.8-1`. So does `-1` means any customization / patches?


title: How can I add a script to embedded Linux

text: I have a script (let's say Hello World), that I want to include to my embedded Linux. I'm using Buildroot and want to start the script in Busybox. But because I'm cross-compiling for the target I'm not sure where to put that script, that in the end it's gonna be compiled and can be executed in Busybox.


title: Prevent libvirtd from modifying file attributes

text: I have a `.vdi` disk file that is shared between `libvirtd` and `VirtualBox`. Each time I start a program with `libvirtd`, the owner of the `.vdi` file is set to root. I'm wondering if it's configurable? I know it could be a security feature but I want it disabled. **EDIT** Running Arch Linux, up-to-date               libvirt 1.2.1-1     libvirt-glib 0.1.7-2     libvirt-python 1.2.1-1


title: Evdev Wheel Emulation on T431s

text: I have a Thinkpad T431s with trackpoint (the red stick in the middle of the keyboard) and clickpad (a touchpad that also acts as a button). This is the first model that does not provide any dedicated buttons for the trackpoint. I want to use the trackpoint only. So far I'm able to configure the clickpad such that it acts as buttons for the trackpoint while disabling motion via:               # Devide the clickpad into 3 areas for left/middle/right click     xinput set-prop 10 "Synaptics Soft Button Areas" 3477, 5112, 0, 0, 2659, 3476, 0, 0          # Disable mouse movements     xinput set-prop 10 "Device Accel Constant Deceleration" 9999999          # Disable tap events     xinput set-prop 10 "Synaptics Tap Action" 0, 0, 0, 0, 0, 0, 0      where 10 is the ID of the clickpad. However, I can't figure out how to configure the trackpoint to use the middle button for scroll emulation. The problem seems to be that the trackpoint device does not have any real buttons. Thus the following does not work:               xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation" 1     xinput set-prop "TPPS/2 IBM TrackPoint" "Evdev Wheel Emulation Button" 2      Is there any way configure the trackpoint to use the middle button of another device (the clickpad) for scroll emulation? Any other suggestions?