title: Local port forwarding automatically configured on boot?

text: I have software which needs to run as a non-root user, but needs to listen on port 80 and 443. With iptables, this isn't all that difficult:               sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080     sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 8080      Though this is simple, how should I persist it to take effect on boot? I tried `iptables-save`, but this didn't seem to work.


title: FreeBSD systat doesn't calculate upload speed/total on wlan0

text: When I call `systat -if` shows that `wlan0` out traffic/peak/total are 0 kb(/s). I'm using `wlan0` for networking, internet down/upload are working. The in traffic/peak/total are OK. The wifi chip is Atheros 9285, the module is `ath`. System is FreeBSD 10.0. How can I correct this? If you need some information, command output, etc. I'll share.


title: iptables: recent module

text: I am using the "recent" module to prevent port scanning, such as:               -A INPUT -i eth0 -m recent --name PORTSCAN --update --seconds 60 -j DROP     -A INPUT -i eth0 -p tcp -m tcp --dport 22 -j ACCEPT     -A INPUT         -m recent --name PORTSCAN --set -j DROP      The `\--update` option, contrary to its name (i.e., update old value with new one), does not update the last-seen entry, but rather adds another one. In my simple setup, I am only interested in the last entry. I don't need the whole history of packets seen (i.e., for statistics). Is there a way, I could only keep the last seen packet ? There used to be an option `\--reap`, but AFAIK has been removed. My concern is, that on a busy server, the PORTSCAN list could quickly grow pretty large. I don't know what the limit is, but I am sure there must be some limit. Could somebody please advise?


title: Difference between /etc/init.d/networking restart and invoke-rc.d networking restart

text: Is there any real difference between `/etc/init.d/networking restart` and `invoke-rc.d networking restart` (Debian)?


title: How to make Ctrl+PgUp and Ctrl+PgDn change window tabs

text: I am running GNOME 3.4 (Debian 7.0) and my laptop (Gigabyte Q2532), unlike all those I've used before, doesn't change application tabs with `Ctrl``Pg Up` and `Ctrl``Pg Dn`. This forces me to use `Alt``0...9`, which is not always convenient. Is there something wrong with my laptop? Is this normal? How to remedy? My layout is set to `English (US)`. Note that I tried this with a fresh user, and still get the same issue. I'm also using GNOME 3 fallback mode.


title: How to configure permissions to allow file access?

text: I'm running Wowza Media Server on my server as "root". The problem is that all files created (recorded) by Wowza are "root:root" and aren't writable, editable, or deletable by any other users. How can I make it so that Wowza records files that are writable by other users? I'd assume I'd use a group to facilitate this, but I'm not sure as to the recommended way to do this. Should I create a specific user to run Wowza as? How can I make this happen?


title: How to change dm_crypt aes/256 LVM password after install?

text: I installed Fedora 14 & Ubuntu 10.04 LTS on my PC. I used dm_crypt/LVM with aes256 in both installs (2 VolumeGroups, each encrypted, so there is 2 separated & encrypted linux distro on this machine). How can I change the passwords for the encrypted VGs?


title: sed command to replace a blank line with two lines of content

text: How do I replace the first blank line with two lines of content? I did see a question on replacing multiple blank lines with a single blank line in vim sed but don't quite see how to adapt that. So, for example, if my input file is:               % abd     % def          % jkl          % mno      I would like to have a sed command that replaces just the **first** blank line with these two lines (one containing `ghi` and the other containing `%`):               % abd     % def     % ghi     %     % jkl          % mno


title: CentOs Unable to load pages that are on server

text: I am having a little difficulty accessing pages that are on my server. Under /var/www/html/ I have an index.html page, and when I try to access it from chrome, it times out. The permissions on html/ are drwxr-xr-x and I am able to ping the IP just fine. Do any of you have any suggestions on what could be the possible culprit here?


title: What's the right way to display system sound volume in conky?

text: What's the right way of displaying system sound volume in conky ? I don't have `/dev/mixer` file, and without an external command, is it possible ? Conky 1.9.0


title: What does this Linux command do?

text: g++ -Wall -I/usr/local/include/thrift *.cpp -lthrift -o something      I am new to Linux and am trying to learn "as I go along"....This is from the Apache Thrift website. Also is the -I/usr supposed to be -I /usr? Thanks for your help!


title: Accessing a linux machine with a name (not ip address)

text: When I access a linux machine with sshfs, I take the following steps.   1. Get the ip address of the linux (the ip address is dynamically allocated to linux)   2. Run sshfs id@ip_address:/HOME_DIRECTORY Can I use a name, not ip address to access the linux machine? ## ADDED To me, avahi seems to be the best solution as it enables Mac understands the name without any configuration. With ubuntu, I could install avahi as follows :               sudo apt-get install avahi-daemon


title: How to introduce timeout for shell scripting?

text: I want to run a shell script that got a loop in it and it can go for ever which I do not want to happen. So I need to introduce a timeout for the whole script. How can I introduce a timeout for the whole shell script under SuSE?


title: Fedora firewall with UPnP?

text: I'm using Fedora 15 and Transmission BT client. Transmission can't open ports unless the firewall is disabled. I searched some posts that said add 1900 to the trusted ports, or via a iptable rule: `-A INPUT -m state --state NEW -m udp -p udp --sport 1900 -j ACCEPT"`. However, Transmission can't open ports anyway. I also tested with `upnp-inspector`, which is better than Transmission, it could detect my upnp router after add 1900 to the trusted ports, but the detection is slower than if the firewall is disabled. Any ideas on how to let Transmission UPnP works with the Firewall?


title: How do I edit the list of Window Managers that appear in Gnome Login?

text: Ever since I moved to Gnome3 (at least), the login environment has stopped offering some of my window managers as options. A key examples is that I now have to login using TWM first and then select AwesomeWM from the menu it provides in order to get to Awesome. It should be possible to edit the list of window manager (any subset of the ones I have installed). Could someone point me in the right direction? PS: This question was moved from stackoverflow.


On AIX 6100-05-02-1034 how can I create custom umask for a specific directory?


title: Got a black screen while booting archlinux installation program

text: While booting the installation program (via USB), the screen goes black, it looks just like the screen has been switched off. The laptop is a Lenovo Ideapad z475 and, as per the "Beginners' Guide", I've tried to use `i915.modeset=0` and `video=SVIDEO-1:d`, still the same black screen however. The graphics card is AMD(ATI) AMD Radeon HD 6470M & HD 6520G The installation media is `archlinux-2011.08.19-netinstall-x86_64"/"archlinux-2011.08.19-core-x86_64`


title: How do you properly fork a Linux distro?

text: I was wondering, how one would go about creating a Linux distro. LFS seems like overkill, I would rather fork an existing distro. I know there are several "respin" applications, but these only seem to allow you to add extra applications to be installed, they don't seem to allow you to modify repositories, configs, and etc etc. What I'm looking for is knowledge on how to take an existing distro, and modify it significantly, ideally by modifying Fedora or Mint, although I might need to use an older kernel. General advice is appreciated, how would you modify the files it ships with? What tools do you use? How would you wrap it into a liveCD? How do you host a repository?


title: How to easily build your own Linux Distro?

text: I wanted to have a go at creating my very own Linux Distribution. Could you suggest some nice and easy-to-follow tutorials (preferably text based and not videos). I have heard something about Arch Linux but I don't know how to go from there. What do I need?


title: How do I create a Linux Distro?

text: How do I make a Linux distro based off of my favorite Linux Distro? I am aware of Linux From Scratch, but there seems like there's so much involved just to create a distro based off of something that's already written for you. I read (most of) the PDF fil from Linux to Scratch and still had no idea where to start. I am proficient in C#, C++, Vala (A language used to write apps for Elementary OS). I also do pretty well in other languages like C, VB (I dislike VB).


title: How to create a Linux distribution for Raspberry Pi ?

text: > **Possible Duplicate:**   >  How do you properly fork a Linux distro? I'm currently working on a projet of my own which is creating a Linux distribution for the Raspberry Pi.   **The fact is :** It's the first time I'm creating a Linux distribution. So it's a bit complicated to get started. At first I wanted to use the LFS book (Linux from scratch) and then I realised that it would take an eternity...   **Here is my idea :** Why don't I fork Archlinux ARM and add my own layer for applications and such ? Here is my question then : Where should I start ? I don't even know how to create a custom distribution based on another one. Does anyone ever did this before ? Thanks in advance for your help :)


title: How to start a new Linux distro?

text: Some of my friends and I are interested in starting a new Linux distro. How do we do that? What do we need to plan? ### Backstory I represent a community of Linux sysadmins/implementors whose special needs include, among others:   * A specific 'lean' kernel config   * Package management that fits our 'field needs'   * Binary packages optimized for our 'use cases'   * X-less system To the point: We have need of a specially-configured production-quality Linux distribution to be run _exclusively_ as **Para-Virtualized Production Servers**. Rather than jumping through all the hoops and loops _every time_ we need a VM-ized Server, we would very much like a semi-prepared system, optimized for its environment. Since these VMs would be Production Servers, stability is a must, and honestly the available package management systems we're currently aware of just do not provide assurance. `Zypp` and `Conary` are the closest ones to our needs, but again still miss on some points.


title: how to force flash player to use XV output for video streams?

text: When watching a video on YouTube it is so slow. When I download the same video locally and watch with the default video player it plays smoothly. I'm 99% sure that it's video output API related becuase if I set the video player output to X11 it lags exactly like when I watch online with flash player. I read some docs that stated the flash plugin just can't use XV. Why? Is this still the case? The article is very old and may be things have changed since then. I tried to play with Enable/Disable hardware acceleration in flash settings - no results. My video card is not powerful (old hardware).


title: Bridge interfaces with Vlan on Linux based access point

text: I have a Linux based wireless access point. It has **eth0** interface for ethernet, **ath0** for wireless and **br-wan** as a bridge between the two.               bridge name     bridge id               STP enabled     interfaces     br-wan          8000.001567000041       no              eth0                                                             ath0      **Q:** How can I add vlan tagging on the wireless side so that all the outgoing traffic will be tagged, and only incoming tagged traffic will be accepted? I'v tried creating a new vlan using **vconfig**               vconfig add ath0 15     ip link set ath0.15 up      I then used a computer with a traffic generator software to send frames through the Ethernet port of the access point. Using **tcpdump** -e I can see them pass through both ath0 and ath0.15, however no tagging is added whatsoever.


title: Detect if running in a virtual terminal?

text: I'd like to autologin to `tty1` on login and then use `vlock` to lock it. How can I detect from Bash if the current terminal is a console virtual terminal (e.g. `tty1`), so that I can put the `vlock` line into `.bash_profile` and have it run only if logging in through `tty1`?


title: Change file created date from JPEG EXIF metadata

text: When uploading to an ftp site, the original file create date seems to be lost, and I get the upload date instead. However, the Exif data in the file is correct. Is there a tool to batch change the created date from the Exif date?


title: keyboard layout?

text: I just bought a new keyboard. I love it, but some of the keys don't map to the symbols they say they have. How can I find out what the layout of my keyboard is? Is there some sort of list of keyboards where I can find my keyboard? I'm using Xubuntu.


title: Why does the filename contains question marks when I run a script on my remote machine?

text: I have a tiny script that simply fetches the current date, runs a PHP script and redirect the output (and errors) to a filename containing the current date.               DATE=$(date +"%Y%m%d")     FILE="log/${DATE}.log"     php -q script.php >> $FILE 2>&1      When I run this script on my local machine (Windows 7, Aptana IDE), the PHP script works fine and the logfile has the expected filename, e.g. `20140502.log`. But when I push that script via SFTP to my remote machine and execute that script, the filename looks like this:               20140502?.log?      What might be the problem? Is this an enconding error (e.g. encoding for SFTP uploads is ANSII, where UTF-8 is expected)? Or do I have to change anything in the script itself? Information about system/shell:               [foo@bar path]$ sh --version     GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)      Funny fact: If that script is called by a cronjob, the question marks don't occur. Only if I manually run the script.


title: recording audio from web-based audio player using ALSA loop device

text: I am trying to save voicemail messages from Verizon Fios phone in best quality possible. The voicemail messages are available online, but for playing only (Java based player), no saving. Officially, there is no supported way how to save original digital voice messages as files from Fios Digital Voice service (no paid service, no anything, no reason why). My only idea was to record digital data from the player while on the way to the soundcard. I tried Linux ALSA configuration with loop device.               # cat /etc/asound.conf          # default device     pcm.!default {         type plug         slave.pcm "loop"     }          # output device     pcm.loopout {         type dmix         ipc_key 328211         slave.pcm "hw:Loopback,0,0"     }          # input device     pcm.loopin {         type dsnoop         ipc_key 686592         slave.pcm "hw:Loopback,1,0"     }          # duplex plug device     pcm.loop {         type plug         slave {           pcm {              type asym              playback.pcm "loopout"              capture.pcm "loopin"           }         }     }      This seems to be working and records audio, for example when playing something on Youtube the audio output goes to the loop device (default audio output) and I can capture it (not sure how it exactly works, I tested both 44.1kHz and 48 Khz)               arecord -f cd -D loop | aplay -f cd -D hw:0,0     arecord -f dat -D loop | aplay -f dat -D hw:0,0      But when I tried to capture Verizon Java audio player output, it is garbled and the length does not seem to match. I suspect it might be mono at 8 kHz and I tried different things, changing the frequency and formats, but nothing helped. Do you have any idea what is wrong here and how to record the messages? Is the problem in ALSA configuration? Or possibly kernel issue? (I am using 3.4.88). Any ideas would be very welcome.


title: Are these throughput numbers typical for an SSD?

text: Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s avgrq-sz avgqu-sz   await  svctm  %util     sdb           19722.20   170.80 7141.60   27.80 114246.40   788.80    32.09    52.25    7.19   0.14 100.00     sda               4.40     6.80  331.00   43.00  1950.40   199.20    11.50     0.42    1.12   0.14   5.36     sdc            3357.60   105.00 5181.80   51.80 35856.80   627.20    13.94    13.00    2.48   0.19  98.20     sdd              48.80    88.00  902.00  128.00  5916.80   864.00    13.17     0.95    0.93   0.10  10.56      Basically SSD utilization reach 100% for reading 114MB/s data. What's typical speed of SSD anyway?


title: OS X setting environment variables

text: I have OSX 10.8.2 with ZSH as my shell and iTerm as a terminal (don't know if the last thing is relevant). I have to mention that I'm relatively new to OSX. I'm trying to set up some environment variables and I can't seem to figure out how. I have two exports:               export GOBIN=$HOME/go/bin     export PATH=$PATH:$GOBIN      I tried changing: `.bashrc`, `.bash_profile`, `.profile`, `.zprofile`, `.zshrc`, `~/.MacOSX/environment.plist`. (The last one I modified with Property list editor from xcode). I don't understand WHY is this not working. What's the proper way to do this?


title: Overriding functionality of special keys on CM Storm Trigger keyboard

text: I have a CM Storm Trigger Keyboard. This has some special keys, which can be programmed to trigger certain macros. There are special "M" keys for macros on the left-hand side, and there are two "Trigger" keys instead of the Super Key. When I click this key plus a numbered key, the whole keyboard lights up (it's a gaming keyboard). However, I am not a gamer and do not care much about the lights. Rather, I want to use the "super key" functionality in its original format. Most importantly, I want to assign this as the "Mod1" modifier key in the i3 window manager. But currently, this is impossible to do. The key is not assigned any function, it appears. I used 'xev' and when I press this particular key, absolutely nothing happens. It shows no event, so I can not check out the name of the key. Xmodmap is not very useful either, I can not identify this key this way. Any idea how to 'activate' / identify this key?


title: Understanding /etc/aliases and what it does

text: These are the contents of '/etc/aliases' file on my Debian (Wheezy) server, as it is:               # /etc/aliases     mailer-daemon: postmaster     postmaster: root     nobody: root     hostmaster: root     usenet: root     news: root     webmaster: root     www: root     ftp: root     abuse: root     noc: root     security: root     root: t      **1.** I noticed that, by default, my server sends email from what looks like `root@hostname.domain.com`. So, which one of the rules above governs this? `postmaster: root;`? **2.** So, the rules in '/etc/aliases' are used to assign users to specific departments? That is, for example, all emails to be sent/received for 'abuse' will be delivered from/to root@hostname.domain.com (which'd be the default email for root, unless there's an alias). Correct? **3.** Can someone please explain what each of these really meant for -- mailer-daemon, postmaster, nobody, hostmaster, usenet, news, webmaster, www, ftp, abuse, noc, security, root? I mean, a description like _"`mailer-daemon` for sending email delivery errors, but not really meant for receiving emails. `security` for where people should contact your about security issues"_, or something like that. As obvious as it should be by now, this is a newbie question. So, please try to be as clear as possible.


title: Moving a file to a file that is being read

text: When a file is moved and the destination file already exists and is currently being read, will the operation succeed? Will it depend on how long the reading operation on the destination file lasts?


title: check internet speed from terminal?

text: How can I get the speed of my internet connection from the terminal? Is there any script or commandline application(s) available? I'm using CentOS 6.5 .


title: Work out the command line of a GUI operation?

text: I am trying to script one repetitive operation within an open-source software, FSLView to be specific. The operations are extremely straightforward in the GUI, I mean just several clicks. However, I do not know the corresponding commands with which I can script it. There is no documentation of the commands, because it seems that the developers do not expect anyone to automate this viewer software. Does every GUI operation have its corresponding command line? If so, how should I work it out?


title: How find the reason why .so library does not included in ZendServer CE

text: I've installed phalcon.so library. I compiled it (http://phalconphp.com/en/download) and moved to `/usr/local/zend/lib/php_extensions` It works perfect until I update Zend Server from 5 to 6. After that phalcon doesn't want to work. I installed again how I did it before. Wrote `extension=phalcon.so` to `/usr/local/zend/etc/conf.d`. Restart zend server and..nothing happens. At the same time phpinfo shows me:               Additional .ini files parsed         ...     /usr/local/zend/etc/conf.d/phalcon.ini,      ...      But the library was not loaded. How to fix that?


title: (Solved) Linux cdc_acm device - unexpected characters sent to USB device

text: I'm having trouble with unexpected characters being sent on a USB port with the cdc_acm driver. What makes this all the more perplexing is that the code runs fine on Ubuntu 12.04 (3.2 kernel) but fails (the subject of this question) on Centos 6 (3.6 kernel) The USB device is a Bluegiga BLED112 Bluetooth Smart dongle. Its embedded microcontroler will reset any time there in unexpected input on it's USB interface. The test code opens the port, writes 4 bytes (a hello message) and expects to read a response. The read never completes because the unexpected characters cause the device to reset which causes the hub to drop the device and re- enumerate. To troubleshoot, here's what I've done:   * Downloaded the source code for the cdc_acm driver. Added a bunch of printk debug messages and stack_dumps to follow what's going on.    * I rmmod'd the "stock" cdc_acm and insmod'd my instrumented module. All the device enumeration works, right driver attached, etc.   * Since the code works on Ubuntu 12.04/Linux 3.2, I grabbed the 3.2 cdc_acm code and compiled that module on the Centos 6 / Linux 3.6 platform. Using that 3.2 module instead of the 3.6 module did not make a difference. I reverted to the 3.6 module.   * Turned on the debug file system with usbmon and watched the USB traffic. I can see that there are extra characters being sent on the USB interface.    * To watch what's going on, on top of the printk's in the cdc_acm module, I've merged the output of usb mon (cat /sys/kernel/debug/usb/usbmon/3u | logger) and the output of the test application (scan_example /dev/ttyACM0 | logger -s) so I have a single stream of time correlated debug trail.   * The spurious characters sent on the USB endpoint are x5E x40 x5E x40 x5E x40 x5E x40 x41 (in ASCII its ^@^@^@^@A) which looks like some sort of probing or trying to get the attention of a modem These characters are sent immediately after the application's write() causes the 4 hello bytes to be sent to the end point.    * Since the cdc_acm device is supposed to be a modem, I tried to turn off the modem control by adding this to usb_device_id acm_ids[] in cdc_acm.c              /* bluegiga BLED112*/     { USB_DEVICE(0x2458, 0x0001),     .driver_info = NOT_A_MODEM,     },        * Recompiled and insmod'd and the syslog show that this was recognized (quirks is 8), but no change in function. Neither NetowrkManager nor modem-manager are running, but I still suspect that there is some sort of modem control function going on somewhere, I just don't know where. Here's a annotated debug log (MDV prefixes those printk's that I added to cdc_acm)               Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_write_bulk     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_write_done      Here are the 4 bytes sent by the application 00 00 00 01               Feb 13 18:14:32 localhost cpcenter: df046a80 3672670191 C Bi:3:006:4 0 4 = 00000001     Feb 13 18:14:32 localhost cpcenter: 1360797272.669690 write: data2: len=0 contains:      ... and these additonal characters show up unexpectedly 5e 40 5e 40 5e 40....               Feb 13 18:14:32 localhost cpcenter: df046a80 3672670232 S Bi:3:006:4 -115 128 <     Feb 13 18:14:32 localhost cpcenter: f3cc5740 3672670297 S Bo:3:006:4 -115 1 = 5e     Feb 13 18:14:32 localhost cpcenter: df2e1300 3672670332 S Bo:3:006:4 -115 1 = 40     Feb 13 18:14:32 localhost cpcenter: f3cc5740 3672670347 C Bo:3:006:4 0 1 >     Feb 13 18:14:32 localhost cpcenter: f3cc5740 3672670392 S Bo:3:006:4 -115 1 = 5e     Feb 13 18:14:32 localhost cpcenter: df2e1180 3672670426 S Bo:3:006:4 -115 1 = 40     Feb 13 18:14:32 localhost cpcenter: df2e1c00 3672670461 S Bo:3:006:4 -115 1 = 5e     Feb 13 18:14:32 localhost cpcenter: df2e1840 3672670496 S Bo:3:006:4 -115 1 = 40     Feb 13 18:14:32 localhost cpcenter: df2e1300 3672670591 C Bo:3:006:4 0 1 >      At this point we get a spontaneous disconnect.               Feb 13 18:14:32 localhost kernel: usb 3-1: USB disconnect, device number 6     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_write_bulk     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_write_done     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm read_bulk_callback     Feb 13 18:14:32 localhost kernel: MDV 1 acm_read_bulk_callback - urb 1, len 0     Feb 13 18:14:32 localhost kernel: MDV 3 acm_read_bulk_callback - non-zero urb status: -71     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_write_bulk     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_write_done     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm read_bulk_callback     Feb 13 18:14:32 localhost kernel: MDV 1 acm_read_bulk_callback - urb 1, len 0     Feb 13 18:14:32 localhost kernel: MDV 3 acm_read_bulk_callback - non-zero urb status: -71     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_write_bulk     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_write_done     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm read_bulk_callback     Feb 13 18:14:32 localhost kernel: MDV 1 acm_read_bulk_callback - urb 2, len 0     Feb 13 18:14:32 localhost cpcenter: df2e1d80 3672670629 S Bo:3:006:4 -115 1 = 5e     Feb 13 18:14:32 localhost kernel: MDV 3 acm_read_bulk_callback - non-zero urb status: -71     Feb 13 18:14:32 localhost cpcenter: df2e1300 3672670677 S Bo:3:006:4 -115 1 = 41     Feb 13 18:14:32 localhost cpcenter: f3cc5740 3672670802 C Bo:3:006:4 0 1 >     Feb 13 18:14:32 localhost cpcenter: df2e1180 3672671019 C Bo:3:006:4 0 1 >     Feb 13 18:14:32 localhost cpcenter: df2e1c00 3672671237 C Bo:3:006:4 0 1 >     Feb 13 18:14:32 localhost cpcenter: dfbf8c00 3672673193 C Ii:3:001:1 0:2048 1 = 02     Feb 13 18:14:32 localhost cpcenter: dfbf8c00 3672673207 S Ii:3:001:1 -115:2048 4 <     Feb 13 18:14:32 localhost cpcenter: f3c26c00 3672673221 S Ci:3:001:0 s a3 00 0000 0001 0004 4 <     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_disconnect     Feb 13 18:14:32 localhost kernel: Pid: 29, comm: khubd Tainted: G           O 3.5.3-1.el6.elrepo.i686 #1      Stack trace at the time of disconnect               Feb 13 18:14:32 localhost kernel: Call Trace:     Feb 13 18:14:32 localhost kernel: [<f82dabc5>] acm_disconnect+0x35/0x1f0 [cdc_acm]     Feb 13 18:14:32 localhost kernel: [<c13835db>] usb_unbind_interface+0x4b/0x180     Feb 13 18:14:32 localhost cpcenter: f3c26c00 3672673239 C Ci:3:001:0 0 4 = 00010100     Feb 13 18:14:32 localhost kernel: [<c1318bfb>] __device_release_driver+0x5b/0xb0     Feb 13 18:14:32 localhost kernel: [<c1318d05>] device_release_driver+0x25/0x40     Feb 13 18:14:32 localhost kernel: [<c1317f0c>] bus_remove_device+0xcc/0x130     Feb 13 18:14:32 localhost kernel: [<c131612f>] ? device_remove_attrs+0x2f/0x90     Feb 13 18:14:32 localhost kernel: [<c1316275>] device_del+0xe5/0x180     Feb 13 18:14:32 localhost kernel: [<c1380326>] usb_disable_device+0x96/0x240    Feb 13 18:14:32 localhost kernel: [<c1379f91>] usb_disconnect+0x91/0x130     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_write_bulk     Feb 13 18:14:32 localhost kernel: [<c137a2c0>] hub_port_connect_change+0xb0/0xa60     Feb 13 18:14:32 localhost kernel: [<c1380f4e>] ? usb_control_msg+0xce/0xe0     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm acm_write_done     Feb 13 18:14:32 localhost kernel: [<c137b296>] hub_events+0x536/0x810     Feb 13 18:14:32 localhost cpcenter: f3c26c00 3672673243 S Co:3:001:0 s 23 01 0010 0001 0000 0     Feb 13 18:14:32 localhost cpcenter: f3c26c00 3672673250 C Co:3:001:0 0 0     Feb 13 18:14:32 localhost kernel: [<c1065bdf>] ? finish_wait+0x4f/0x70     Feb 13 18:14:32 localhost kernel: [<c137b5aa>] hub_thread+0x3a/0x1d0     Feb 13 18:14:32 localhost cpcenter: df2e1840 3672673260 C Bo:3:006:4 -71 0     Feb 13 18:14:32 localhost kernel: [<c1065a70>] ? wake_up_bit+0x30/0x30     Feb 13 18:14:32 localhost kernel: [<c137b570>] ? hub_events+0x810/0x810     Feb 13 18:14:32 localhost kernel: [<c106564c>] kthread+0x7c/0x90     Feb 13 18:14:32 localhost cpcenter: f3c16c80 3672673292 C Bi:3:006:4 -71 0     Feb 13 18:14:32 localhost cpcenter: df2e1d80 3672673453 C Bo:3:006:4 -71 0     Feb 13 18:14:32 localhost cpcenter: f3c16d40 3672673553 C Bi:3:006:4 -71 0     Feb 13 18:14:32 localhost kernel: [<c10655d0>] ? kthread_freezable_should_stop+0x60/0x60     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm read_bulk_callback     Feb 13 18:14:32 localhost kernel: [<c14dedbe>] kernel_thread_helper+0x6/0x10     Feb 13 18:14:32 localhost kernel: MDV 1 acm_read_bulk_callback - urb 3, len 0     Feb 13 18:14:32 localhost kernel: MDV:cdc-acm stop_data_traffic     Feb 13 18:14:32 localhost cpcenter: f3d19500 3672674474 C Ii:3:006:2 -108:64 0     Feb 13 18:14:32 localhost kernel: MDV 2 acm_read_bulk_callback - disconnected     Feb 13 18:14:32 localhost cpcenter: df2e1300 3672674636 C Bo:3:006:4 -71 0     Feb 13 18:14:32 localhost cpcenter: f3c16140 3672674753 C Bi:3:006:4 -71 0


title: XEN Storage Repository has option type=lvm missing (XCP)

text: Several online documents on this subject talk about creating an SR with the option type= **lvm** but trying these:               # xe sr-create type=lvm device-config:device=/dev/server/sr_guest1            name-label=sr1          The SR could not be connected because the driver was not recognised.     driver: lvm      It seems I can't, tabcompletion attemps tell me that these are the ones I can use:               root@server:~# xe sr-probe type=[TAB]     dummy   ext     file    iso     nfs           And indeed _lvm_ isn't among them. I searched for hours trying to find similar problems but nothing helpful. Versions:               root@server:~# cat /etc/lsb-release      DISTRIB_ID=Ubuntu     DISTRIB_RELEASE=12.04     DISTRIB_CODENAME=precise     DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"          root@server:~# dpkg --list  | egrep 'xen|xapi|xcp'     ii  libxen-4.1                       4.1.2-2ubuntu2.4                      ii  libxenstore3.0                   4.1.2-2ubuntu2.4                     ii  python-xenapi                    1.3.2-5ubuntu0.1     ii  xen-hypervisor-4.1-amd64         4.1.2-2ubuntu2.4     ii  xen-utils-4.1                    4.1.2-2ubuntu2.4     ii  xen-utils-common                 4.1.2-1ubuntu1     ii  xenstore-utils                   4.1.2-2ubuntu2.4     ii  apt-xapian-index             0.44ubuntu5     ii  libxapian22                  1.2.8-1     ii  python-xapian                    1.2.8-1     ii  xcp-eliloader                    0.1-4     ii  xcp-fe                           0.5.2-3     ii  xcp-guest-templates          0.1-3     ii  xcp-networkd                     1.3.2-5ubuntu0.1     ii  xcp-squeezed                     1.3.2-5ubuntu0.1     ii  xcp-storage-managers             0.1.1-2ubuntu1     ii  xcp-v6d                          1.3.2-5ubuntu0.1     ii  xcp-vncterm                  0.1-2     ii  xcp-xapi                     1.3.2-5ubuntu0.1     ii  xcp-xe                           1.3.2-5ubuntu0.1      Is anyone willing to explain the reason to me? Stating the obvious: I'm using LVM from the initial install. I want to install VMs on their own logical volumes, not images, so I think I really need that option. So, is there a way to add LVM support to it? **update:** Maybe this might be a clue, don't know. Is it just that I don't have citrix...


title: How to install Metasploit Community on Debian?

text: After attempting to get Metasploit to work nice with my desktop box (with limited success), I've decided to instead set it up on on separate box. However, it seems like the Metasploit community installer requires a GUI to install it, which I of course don't have on a server box I'm SSHed into. I do not want access to Metasploit framework only and really want the web UI, how can I still make this work?


title: Customized XDM-based login screen

text: I am in the process of creating a lightweight yet full-featured Linux disto and don't want to include a whole bunch of unnecessary or bloated software. It is supposed to run off a USB flash drive. I want to have it be somewhat user- friendly, hence the necessity of a graphical login. I really hope it can be `xdm` (a 115 KB package) and not `kdm` (part of a 64 MB package). I realize that much of the user-friendliness comes from having a visually- pleasing graphical interface, and a lot of effort thus far has been put into art direction. Much of the user interface (fluxbox) has been heavily customized to reflect the art and themes of the disto. My questions are:   * How far can the look and feel of xdm(1) be customized?   * Have you tried or seen the work of others who have done it?   * Can you show me an example?   * If it's unfeasible to expect that much out of xdm, is there another graphical login client that is equally as lightweight?


title: How to create a password protected shell script

text: How can I create a password-protected shell script for read/write access. It should also be executable by all users without the password. I have sensitive information in the script.


title: Why does Subversion give a broken pipe error when piped into head?

text: If I do a               svn log | head      after the tenth line of output I get an error message:               svn: Write error: Broken pipe      What's going on here? I haven't seen any other command do this when used with `head`. Is Subversion unfriendly to the Unix filtering paradigm?


title: How to use Extended ACL's on AIX?

text: Using AIX (6.1) FTPD, a user needs to log in and it should only reach 2 directories (read/write) in the system, ex.:               /foo/sth1      and               /foo2/sth2      Besised the users home directory it shouldn't reach anything. These two directories are used by others too. How can we do this? We cannot do it with normal ACL's, because in that case IMHO we need to remove the "other" permission from all the files that are not in the mentioned two paths. I heard that we can do this with **Extended** ACL's. But how?


title: How do I Copy and Paste lines between a start and end keyword?

text: I have two text files, and I want to copy a bunch of lines from one to the other. File one has a list of packages, and I want to copy it to list two. This list of packages isn't at the start of file one, but have a tag %packages at the start of the list, and a tag %end at the end. I'm wondering how I can copy all lines between %packages and %end from file 1 into file 2?


title: Need commands to fetch Guest VM OS version from Xen and KVM

text: I m looking for the commands that can be executed to fetch the OS Version of the VMs running on the below Hypervisors.   1. Xen (Not the citrix Xen server, but the Xen Sever hosted on a ubuntu Machine)   2. KVM


title: Renaming public_html for main domain to subdomain which is development website

text: In CPanel I created a subdomain `test.mydomain.com` under my main domain `mydomain.com`. Both domains have magento websites. The contents of `mydomain.com` are stored in `public_html` and the contents of `test.mydomain.com` are stored in folder `test`, both in the same directory. I copied them to my local PC. Also they are very very large sites with 30.000 products. I would like to make the test environment live. Is it okay to change `public_html` to `public_html_old` and rename the folder `test` to `public_html` in FTP client (for example filezilla)? This will help me not to move large files and folders across.


title: Any way to provide a separate vimrc file just for 1 session

text: I would like to know, if there is a way in vim/vi to provide a different vimrc file. I am looking at managing 2 different vimrc files. For the contents I checkout/checkin in version control I want to use different set of commands and not the normal one in my `.vimrc` file For Example. My `.vimrc` file contains a command to automatically delete any trailing space while saving a file. But, I don't want this feature to be activated for specific files. So any way to provide a different vimrc file ( maybe at command line, giving it as parameter each time as vim --vimrc=somefile file-to-open) ?


title: configuration of apache on sunfire v880 runing solaris 10

text: I am runing SunOS 5.10 on Sunfire v880 for my project but I can't run the Apache which is already installed. I have tried `svcadm enable apache` but it says that apache is not a known service. How do I to start it?


title: Interfacing ds1337 RTC on LPC17xx

text: I am a newbie and I am trying to understand how to interface DS1337(RTC) on LPC17xx Board. This board uses uclinux 2.6.33. .CONFIG:               CONFIG_RTC_LIB=y     CONFIG_RTC_CLASS=y     CONFIG_RTC_HCTOSYS=y     CONFIG_RTC_HCTOSYS_DEVICE="rtc0"     CONFIG_RTC_DEBUG=y          #     # RTC interfaces     #     CONFIG_RTC_INTF_SYSFS=y     CONFIG_RTC_INTF_PROC=y     CONFIG_RTC_INTF_DEV=y     CONFIG_RTC_INTF_DEV_UIE_EMUL=y     CONFIG_RTC_DRV_TEST=y          #     # I2C RTC drivers     #     CONFIG_RTC_DRV_DS1307=y     # CONFIG_RTC_DRV_DS1374 is not set     # CONFIG_RTC_DRV_DS1672 is not set     # CONFIG_RTC_DRV_MAX6900 is not set     # CONFIG_RTC_DRV_RS5C372 is not set     # CONFIG_RTC_DRV_ISL1208 is not set     # CONFIG_RTC_DRV_X1205 is not set     # CONFIG_RTC_DRV_PCF8563 is not set     # CONFIG_RTC_DRV_PCF8583 is not set     # CONFIG_RTC_DRV_M41T80 is not set     # CONFIG_RTC_DRV_BQ32K is not set     # CONFIG_RTC_DRV_S35390A is not set     # CONFIG_RTC_DRV_FM3130 is not set     # CONFIG_RTC_DRV_RX8581 is not set     # CONFIG_RTC_DRV_RX8025 is not set          #     # SPI RTC drivers     #          #     # Platform RTC drivers     #     CONFIG_RTC_DRV_CMOS=y     # CONFIG_RTC_DRV_DS1286 is not set     # CONFIG_RTC_DRV_DS1511 is not set     # CONFIG_RTC_DRV_DS1553 is not set     # CONFIG_RTC_DRV_DS1742 is not set     # CONFIG_RTC_DRV_STK17TA8 is not set     # CONFIG_RTC_DRV_M48T86 is not set     # CONFIG_RTC_DRV_M48T35 is not set     # CONFIG_RTC_DRV_M48T59 is not set     # CONFIG_RTC_DRV_MSM6242 is not set     # CONFIG_RTC_DRV_BQ4802 is not set     # CONFIG_RTC_DRV_RP5C01 is not set     # CONFIG_RTC_DRV_V3020 is not set          #     # on-CPU RTC drivers     #     # CONFIG_RTC_DRV_PL030 is not set     # CONFIG_RTC_DRV_PL031 is not set     # CONFIG_RTC_DRV_LPC178X is not set     # CONFIG_DMADEVICES is not set     # CONFIG_AUXDISPLAY is not set     # CONFIG_UIO is not set      **Kernel Logs:**               ## Booting kernel from Legacy Image at a0000000 ...        Image Name:   Linux-2.6.33-arm1        Image Type:   ARM Linux Kernel Image (uncompressed)        Data Size:    1384128 Bytes =  1.3 MB        Load Address: a0008000        Entry Point:  a0008001        Verifying Checksum ... OK        Loading Kernel Image ... OK     OK          Starting kernel ...          �Linux version 2.6.33-arm1 (vk18434@vk18434-OptiPlex-9010) (gcc version 4.4.1 (Sourcery G++ Lite 2010q1-189) 4     CPU: ARMv7-M Processor [412fc230] revision 0 (ARMv7M)     CPU: NO data cache, NO instruction cache     Machine: NXP LPC178x/7x     Built 1 zonelists in Zone order, mobility grouping off.  Total pages: 8128     Kernel command line: lpc178x_platform=ea-lpc1788 console=ttyS0,115200 panic=10 ethaddr=C0:B1:3C:88:88:88     PID hash table entries: 128 (order: -3, 512 bytes)     Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)     Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)     Memory: 32MB = 32MB total     Memory: 31076k/31076k available, 1692k reserved, 0K highmem     Virtual kernel memory layout:         vector  : 0x00000000 - 0x00001000   (   4 kB)         fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)         vmalloc : 0x00000000 - 0xffffffff   (4095 MB)         lowmem  : 0xa0000000 - 0xa2000000   (  32 MB)         modules : 0xa0000000 - 0x01000000   (1552 MB)           .init : 0xa0008000 - 0xa0058000   ( 320 kB)           .text : 0xa0058000 - 0xa014b000   ( 972 kB)           .data : 0xa014c000 - 0xa0159ec0   (  56 kB)     Hierarchical RCU implementation.     NR_IRQS:41     Calibrating delay loop... 31.23 BogoMIPS (lpj=156160)     Mount-cache hash table entries: 512     NET: Registered protocol family 16     I2C: i2c-0: LPC2K I2C adapter     I2C: i2c-1: LPC2K I2C adapter     I2C: i2c-2: LPC2K I2C adapter     Switching to clocksource cm3-systick     NET: Registered protocol family 2     IP route cache hash table entries: 1024 (order: 0, 4096 bytes)     TCP established hash table entries: 1024 (order: 1, 8192 bytes)     TCP bind hash table entries: 1024 (order: 0, 4096 bytes)     TCP: Hash tables configured (established 1024 bind 1024)     TCP reno registered     RPC: Registered udp transport module.     RPC: Registered tcp transport module.     RPC: Registered tcp NFSv4.1 backchannel transport module.     Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled     serial8250.0: ttyS0 at MMIO 0x4000c000 (irq = 5) is a 16550A     console [ttyS0] enabled     serial8250.2: ttyS1 at MMIO 0x40098000 (irq = 7) is a 16550A     lpc_mii_bus: probed     eth0: using RMII interface     eth0: LPC mac at 0x20084000 irq 28     eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=0:01, irq=-1)     In DS1337 Probe function     ~~~~~~~~~~~~~~~~~~~~~~~~     ds1307->type=1     RTC_DS1337 0-0068: rtc core: registered RTC_DS1337 as rtc0     rtc_device_register successfull     End of Probe function     i2c /dev entries driver     TCP cubic registered     NET: Registered protocol family 17     Inside rtc_read_time function in (driver/rtc/interface.c)     err=0     -----------------------------In ds1307_get_time---------------------------     read secs=16, mins=8,hours=0, mday=1, mon=0, year=100, wday=0     tm->tm_year=100     tm->tm_year=100     ~~~~~~~~~~Inside rtc_tm_to_time~~~~~~~~~~~~~     time=-1608777816     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     Inside do_settimeofday function in Timekeeping.c (linux/kernel/time     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~     Inside Hctosys.c (drivers/rtc)     RTC_DS1337 0-0068: setting system clock to 2000-01-01 00:08:16 UTC (946685296)     Freeing init memory: 320K     init started: BusyBox v1.17.0 (2014-03-25 15:47:56 IST)      Now I am able to set the date, but after resetting my LPC17xx, I am unable to read the present date. I still see the below line:               RTC_DS1337 0-0068: setting system clock to 2000-01-01 01:02:45 UTC (946688565)      Any help would be appreciated.               ~ # date -u "2014-03-26 16:29:00"     Wed Mar 26 16:29:00 UTC 2014          ~ # hwclock -u -w     hush: can't execute 'hwclock': No such file or directory      I am following ridgerun's wiki article How to use RTC Real Time Clock hardware. My basic idea is to set the clock and read from it. But everytime I am getting the value as setting system clock to 2000-01-01. Also under `/dev/` the rtc entry is not shown.


title: Why bash encapsulates syntax error both with grave accent and with an apostrophe?

text: When bash is reporting a syntax error, it encapsulates the text which has raised the syntax error both with grave accent and with an apostrophe, like this: ``...'`. Any idea why? Here's an example:               $ bash -c "echo error()"     bash: -c: line 0: syntax error near unexpected token `('     bash: -c: line 0: `echo error()'      This is not very common; however, I am just curious, this is not a real problem. **Edit:** this gets weirder with obscure messages like this one:               -bash: unexpected EOF while looking for matching ``'


title: Using sed output in another script or command

text: How can I use the output of `sed` in another script? For example (this doesn't work):               sed -n "$COUNTER",1p /domains.csv | wget      or               sed -n "$COUNTER",1p /domains.csv > /myScript.sh      As far as I know `>` lets me take the output and put it in a file, I'm just unsure of how to use this output as an argument in another script. (I am aware I can declare the output as a variable, and then use it on the next line. I'm interested in how to do this as one "command")


title: putty connection works but ssh command line refuses password authentication

text: I'm struggling quite a lot around ssh tunnels today. First, here is my configuration:   * My local machine, a PC with windows XP (ip=l.l.l.l)   * My remote server, with a CentOs 5 installed (ip=x.x.x.x) I'm very well able to connect to the remote using the putty interface with the root user: the terminal is asking for my credentials, which work. However, while using the ssh command line (`ssh -v root@x.x.x.x`), my credentials are also wanted but they simply don't work. I'm copy-pasting the password in both cases from the same source, so I'm sure I entered it correctly. Here is the debug output for ssh command line:               OpenSSH_3.8.1p1, OpenSSL 0.9.7d 17 Mar 2004      debug1: Reading configuration data /etc/ssh_config      debug1: Connecting to x.x.x.x:22 [x.x.x.x] port 22.      debug1: Connection established.      debug1: identity file /home/Seb/.ssh/identity type -1      debug1: identity file /home/Seb/.ssh/id_rsa type -1      debug1: identity file /home/Seb/.ssh/id_dsa type -1      debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3      debug1: match: OpenSSH_5.3 pat OpenSSH*      debug1: Enabling compatibility mode for protocol 2.0      debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1      debug1: SSH2_MSG_KEXINIT sent      debug1: SSH2_MSG_KEXINIT received      debug1: kex: server->client aes128-cbc hmac-md5 none      debug1: kex: client->server aes128-cbc hmac-md5 none      debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent      debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP      debug1: SSH2_MSG_KEX_DH_GEX_INIT sent      debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY      debug1: Host 'x.x.x.x:22' is known and matches the RSA host key.      debug1: Found key in /home/Seb/.ssh/known_hosts:4      debug1: ssh_rsa_verify: signature correct      debug1: SSH2_MSG_NEWKEYS sent      debug1: expecting SSH2_MSG_NEWKEYS      debug1: SSH2_MSG_NEWKEYS received      debug1: SSH2_MSG_SERVICE_REQUEST sent      debug1: SSH2_MSG_SERVICE_ACCEPT received      debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mi c,password debug1: Next authentication method: publickey      debug1: Trying private key: /home/Seb/.ssh/identity      debug1: Trying private key: /home/Seb/.ssh/id_rsa      debug1: Trying private key: /home/Seb/.ssh/id_dsa      debug1: Next authentication method: password root@x.x.x.x:22's password:      debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mi c,password      Permission denied, please try again.      Here is the /var/log/secure extract:               Jul 10 02:26:50 sds-158 sshd[11549]: reverse mapping checking getaddrinfo for l.l.l.l.fibertel.com.ar [l.l.l.l] failed - POSSIBLE BREAK-IN ATTEMPT!     Jul 10 02:27:12 sds-158 sshd[11549]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=l.l.l.l  user=root     Jul 10 02:27:14 sds-158 sshd[11549]: Failed password for root from l.l.l.l port 3589 ssh2      Here is my sshd_config:               #       $OpenBSD: sshd_config,v 1.80 2008/07/02 02:24:18 djm Exp $          # This is the sshd server system-wide configuration file.  See     # sshd_config(5) for more information.          # This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin          # The strategy used for options in the default sshd_config shipped with     # OpenSSH is to specify options with their default value where     # possible, but leave them commented.  Uncommented options change a     # default value.          Port 22     #AddressFamily any     #ListenAddress 0.0.0.0     #ListenAddress ::          # Disable legacy (protocol version 1) support in the server for new     # installations. In future the default will change to require explicit     # activation of protocol 1     Protocol 2          # HostKey for protocol version 1     #HostKey /etc/ssh/ssh_host_key     # HostKeys for protocol version 2     #HostKey /etc/ssh/ssh_host_rsa_key     #HostKey /etc/ssh/ssh_host_dsa_key          # Lifetime and size of ephemeral version 1 server key     #KeyRegenerationInterval 1h     #ServerKeyBits 1024          # Logging     # obsoletes QuietMode and FascistLogging     #SyslogFacility AUTH     SyslogFacility AUTHPRIV     #LogLevel INFO          # Authentication:          #LoginGraceTime 2m     PermitRootLogin yes     #StrictModes yes     #MaxAuthTries 6     #MaxSessions 10          #RSAAuthentication yes     #PubkeyAuthentication yes     #AuthorizedKeysFile     .ssh/authorized_keys     #AuthorizedKeysCommand none     #AuthorizedKeysCommandRunAs nobody          # For this to work you will also need host keys in /etc/ssh/ssh_known_hosts     #RhostsRSAAuthentication no     # similar for protocol version 2     #HostbasedAuthentication no     # Change to yes if you don't trust ~/.ssh/known_hosts for     # RhostsRSAAuthentication and HostbasedAuthentication     #IgnoreUserKnownHosts no     # Don't read the user's ~/.rhosts and ~/.shosts files     #IgnoreRhosts yes          # To disable tunneled clear text passwords, change to no here!     #PasswordAuthentication yes     #PermitEmptyPasswords no     PasswordAuthentication yes          # Change to no to disable s/key passwords     #ChallengeResponseAuthentication yes     ChallengeResponseAuthentication no          # Kerberos options     #KerberosAuthentication no     #KerberosOrLocalPasswd yes     #KerberosTicketCleanup yes     #KerberosGetAFSToken no     #KerberosUseKuserok yes          # GSSAPI options     #GSSAPIAuthentication no     GSSAPIAuthentication yes     #GSSAPICleanupCredentials yes     GSSAPICleanupCredentials yes     #GSSAPIStrictAcceptorCheck yes     #GSSAPIKeyExchange no          # Set this to 'yes' to enable PAM authentication, account processing,     # and session processing. If this is enabled, PAM authentication will     # be allowed through the ChallengeResponseAuthentication and     # PasswordAuthentication.  Depending on your PAM configuration,     # PAM authentication via ChallengeResponseAuthentication may bypass     # the setting of "PermitRootLogin without-password".     # If you just want the PAM account and session checks to run without     # PAM authentication, then enable this but set PasswordAuthentication     # and ChallengeResponseAuthentication to 'no'.     #UsePAM no     UsePAM yes          # Accept locale-related environment variables     AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES     AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT     AcceptEnv LC_IDENTIFICATION LC_ALL LANGUAGE     AcceptEnv XMODIFIERS          #AllowAgentForwarding yes     #AllowTcpForwarding yes     #GatewayPorts no     #X11Forwarding no     X11Forwarding yes     #X11DisplayOffset 10     #X11UseLocalhost yes     #PrintMotd yes     #PrintLastLog yes     #TCPKeepAlive yes     #UseLogin no     #UsePrivilegeSeparation yes     #PermitUserEnvironment no     #Compression delayed     #ClientAliveInterval 0     #ClientAliveCountMax 3     #ShowPatchLevel no     #UseDNS yes     #PidFile /var/run/sshd.pid     #MaxStartups 10     #PermitTunnel no     #ChrootDirectory none          # no default banner path     #Banner none          # override default of no subsystems     Subsystem       sftp    /usr/libexec/openssh/sftp-server          # Example of overriding settings on a per-user basis     #Match User anoncvs     #       X11Forwarding no     #       AllowTcpForwarding no     #       ForceCommand cvs server      Thank you for your help... pd: I'm not sure where to post this. Superuser or here? EDIT: Out of curiosity I tried plink and it works fine!! first shot! I'm confused now. Is it openssh command line that has a bug? For eventually interested fellow readers, here is the command line: `plink -v -C -ssh -L 127.0.0.1:8600:x.x.x.x:3306 root@x.x.x.x`


title: Linux Mint 15 Ethernet Problems

text: I have a problem with my ethernet connection on my mint 15 (my WiFi works fine). Right after install, it didn't work at all, I followed some solutions I found (including this one) and no luck. I had some progress, while at first it didn't even respond and no drivers were installed now it recognizes the `alx` driver and the green LED is on when I plug the cable in. The problem is that the OS still reports "cable unplugged". As I mentioned I have already installed the `alx` driver and even upgraded my kernel to 3.9                   System:    Host: Host Kernel: 3.9.0-030900-generic x86_64 (64 bit, gcc: 4.6.3)                Desktop: Gnome Distro: Linux Mint 15 Olivia     Machine:   System: LENOVO product: Lenovo IdeaPad P580 version: Lenovo IdeaPad P580                Mobo: LENOVO model: Product Name version: Mainboard version Bios: LENOVO version: 5ECN32WW(V2.02) date: 04/24/2012     CPU:       Dual core Intel Core i5-3210M CPU (-HT-MCP-) cache: 3072 KB flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9977.02                Clock Speeds: 1: 1200.00 MHz 2: 1200.00 MHz 3: 1200.00 MHz 4: 1200.00 MHz     Graphics:  Card: Intel 3rd Gen Core processor Graphics Controller bus-ID: 00:02.0                X.Org: 1.13.3 drivers: intel (unloaded: fbdev,vesa) Resolution: 1280x1024@60.0hz                GLX Renderer: Mesa DRI Intel Ivybridge Mobile GLX Version: 3.0 Mesa 9.1.3 Direct Rendering: Yes     Audio:     Card: Intel 7 Series/C210 Series Chipset Family High Definition Audio Controller driver: snd_hda_intel bus-ID: 00:1b.0                Sound: Advanced Linux Sound Architecture ver: k3.9.0-030900-generic     Network:   Card-1: Intel Centrino Wireless-N 2200 driver: iwlwifi ver: in-tree: bus-ID: 02:00.0                IF: wlan0 state: up mac: 9c:4e:36:13:d6:44                Card-2: Qualcomm Atheros AR8161 Gigabit Ethernet driver: alx ver: 1.2.2 port: 2000 bus-ID: 01:00.0                IF: eth0 state: down mac: dc:0e:a1:ea:d1:1c     Drives:    HDD Total Size: 750.2GB (39.0% used) 1: id: /dev/sda model: TOSHIBA_MK7575GS size: 750.2GB temp: 51C     Partition: ID: / size: 50G used: 5.6G (12%) fs: ext3 ID: swap-1 size: 5.19GB used: 0.00GB (0%) fs: swap     RAID:      No RAID devices detected - /proc/mdstat and md_mod kernel raid module present     Sensors:   System Temperatures: cpu: 50.0C mobo: N/A                Fan Speeds (in rpm): cpu: N/A     Info:      Processes: 172 Uptime: 29 min Memory: 695.7/5872.2MB Runlevel: 2 Gcc sys: 4.7.3 Client: Shell inxi: 1.8.4


title: Gnome + Linux: GUI apps don't inherit PATH from parent console apps

text: In Gnome, don't GUI applications inherit the `PATH` of the shell process that launches them? Apparently, GUI applications see only the `PATH` specified in `~/.profile`. No issues with console applications, though. If I launch GUI applications available in the current `PATH` from my Bash sessions, then they fail to start. For example:   * Thunderbird can't find the `libxpcom.so` library (it is in its folder). However, the `which` command finds that library (because the folder is in `PATH`).   * Firefox fails with _"Could not find the Mozilla runtime."_ Adding `PATH` to `LD_LIBRARY_PATH` doesn't fix the issue. However, if I either:   1. set the `PATH` in `~/.profile` and restart the Gnome session;   2. or switch to an application's folder before launching it; then I can run any GUI application from my Bash session with no problem. Indeed, at the moment I have resorted to using a script that emulates the second procedure. What's the problem? Should I use a launcher for GUI applications, maybe? I don't want to put my custom `PATH` in `~/.profile`, hence this question. Thanks for your attention. Environment:   * Debian GNU/Linux: 6.0.7   * Gnome Version: 2.30.2 **Edit** : I don't know how Gnome is started: I installed Debian with GUI and it launches Gnome by default after a graphical login screen. Bash is started from the Gnome Panel with the command "gnome-terminal --full- screen". **Edit 2:** Thanks to Bob's suggestion, I have tried running `bash --norc` - that is: Bash with the default configuration - and then adding the path to both Thunderbird and Firefox by hand and - gasp! - now both applications launch fine. How can I troubleshoot this problem? My `~/.bashrc` is just a bunch of addition to `PATH`. Furthermore, the `which` command resolves both `firefox` and `thunderbird` fine. Maybe there are libraries that hide each other in my `PATH`? In any case, `LD_LIBRARY_PATH` is always empty. I think that a solution could be to have a launcher script for each GUI application, like a commenter has suggested.


title: Recommended app for elaborating "System Charts" out of a Makefile in Ubuntu?

text: I'm looking for an application that is capable of plotting graphically as boxes on a chart (System Chart) all the components and operations of a `Makefile` so that the chart be taped prominently to the wall for easy reference during the development process. I'm a Ubuntu user by the way.


title: Why is root login via SSH so bad that everyone advises to disable it?

text: Everybody on the Internet advises to disable root login via SSH as it is a bad practice and a security hole in the system, but nobody explains why it is so. What is so dangerous in enabling root login (especially with disabled password login)? And what is the difference between X symbol username and Y symbol password or root username and X+Y symbol password from security point of view in case password authentication is allowed?


title: calling script from perl/python/ruby and retrieving output

text: I inherited a tcsh "master" script that works and extracts lines from files with data with using 'zcat' piped to 'grep' and some other commands/scripts. The extracted lines contain numbers . It is getting difficult to do the calculations that I need to do on the numbers in the tcsh script , thus I am looking for an alternative that reuses the working `grep` and other commands . I could easily do the calculations in C . Getting the numbers in the program without creating lots of intermediate files is the challenge , as is doing pipes from the output of one command into another . How can I transform the "master" script to a perl , ruby or python script ? I did not really find the examples in perl and ruby that much more readable than the original tcsh script . In python the os.system calls do not give the contents back , just an exit status , the same problem I would have with using C . Is there a better way than using os.system in python to get information from programs, scripts or program combinations? Or should I take a closer look at perl or ruby?


title: Centos freeing up disk space

text: I have a CentOS server running Plesk and it's run out of space on the plesk partition. I have narrowed down where a lot of the disk space is being used, but I'm not sure how to move forward. Can I redirect the folder elsewhere or is it reasonably safe to resize the partition? ### Output of df -l               Filesystem           1K-blocks      Used Available Use% Mounted on     /dev/sda5              4956284   4803960         0 100% /     /dev/sda3              4956316   2861496   1838988  61% /var     /dev/sda2            461065932  97508992 339758252  23% /home     /dev/sda1                77749     17882     55853  25% /boot     tmpfs                   978504         0    978504   0% /dev/shm     tmpfs                   978504         0    978504   0% /usr/local/psa/handlers/before-local     tmpfs                   978504         0    978504   0% /usr/local/psa/handlers/before-queue     tmpfs                   978504         0    978504   0% /usr/local/psa/handlers/before-remote     tmpfs                   978504      1900    976604   1% /usr/local/psa/handlers/info     tmpfs                   978504         0    978504   0% /usr/local/psa/handlers/spool      ### Output of du -sh * on the root               12K     aquota.user     7.8M    bin     12M     boot     168K    dev     49M     etc     93G     home     222M    lib     27M     lib64     16K     lost+found     8.0K    media     0       misc     8.0K    mnt     0       net     99M     opt     0       proc     96M     root     35M     sbin     8.0K    selinux     8.0K    srv     0       sys     44K     tmp     4.6G    usr     2.7G    var


title: Does /var/log/secure log successes?

text: Short one that I've been unable to find a decent answer for. Centos 5.10 server, trying to trawl through all the logs I can to see what IPs successfully accessed the server. I've been mucking about with /var/log/secure and /var/log/audit/audit.log. Most interesting thing I found was from the /root/.bash_history, grepping through a few suspect directories and files for a specific IP but I want to be sure exactly what IPs have accessed the server via ssh. TL;DR: Does /var/log/secure log ssh successes or is there some other file on centos systems that do?


title: Identify the outgoing connection (ssh) with the who command

text: After a ssh connection, if I run the `who command` on the server : I have this response :               olivia@olivia-pc:~$ who     olivia   :0           2014-09-08 11:40 (:0)     olivia   pts/0        2014-09-08 11:43 (:0)     olivia   pts/10       2014-09-08 13:54 (sim.local)      So it's easy to identify the incoming connection (third line). If I run the `who command` on the client : I have this response :               who     sim      :0           2014-09-04 16:30 (:0)     sim      pts/10       2014-09-08 13:49 (:0)     sim      pts/0        2014-09-08 13:46 (:0)      So I think that the outgoing connection is the second line because it appears after that I connect to the server with `ssh`, but I don't understand why is it still there when I run `who` after that I have closed the connection (and until I leave the terminal). So my questions are : 1) Is it really the second line that represents the outgoing connection and why? 2) Why is it still visible until I leave the terminal, even if I close the connection? 3) If the outgoing connection is the line two, as I except it to be, is there a reason that server and client use the same pseudo terminal number?


title: Merging multiple lines based on column 1

text: I have a file like below..               abc, 12345          def, text and nos          ghi, something else          jkl, words and numbers               abc, 56345          def, text and nos          ghi, something else          jkl, words and numbers               abc, 15475          def, text and nos          ghi, something else          jkl, words and numbers               abc, 123345          def, text and nos          ghi, something else          jkl, words and numbers      I want to convert it as:               abc, 12345, 56345, 15475, 123345          def, text and nos, text and nos,text and nos,text and nos          ghi, something else, something else, something else, something else          jkl, words and numbers, words and numbers, words and numbers, words and numbers,      Any help ?


title: Telnet IAC commands

text: I want to turn off character echoing in Telnet via linux command line by sending "IAC DON'T ECHO" command. I have been searching everywhere, and I couldn't find how to to do. Basically, I don't know how to send IAC commands in Telnet linux command line interface. Thanks in advance


title: How to use Debian in USB boot-able process

text: I am totally new to the Debian universe and want to use a USB stick so as to download, burn and then install Debian on a PC I got. I read the documentation of Debian online (https://www.debian.org/CD/) although I would be grateful for some pointers. First of all as advised I went to the download page and choose               Downloading Debian CD/DVD images via HTTP/FTP      I choose the most common distribution of amd64 DVD and got re-directed               http://cdimage.debian.org/debian-cd/7.6.0/amd64/iso-dvd/      At this point I can see that there are three `.iso` Debian DVD's, my first question is which one should I use, from instinct I would say the 4.4Gb release? I download the iso file, and here is where my lack of Linux knowledge kicks in, I insert the empty USB stick and open a Terminal there. If I copy and paste the iso file in my USB stick, will it operate, probably not. Continuing the exploration of the Debian website (https://www.debian.org/releases/stable/amd64/ch02s04.html.en#idp5731200) I went to the USB section, although even through other Google searches, I don't understand how can I perform the creation of the Debian USB bootable. the workstation I use now, is a cluster UNIX based, with scientific Linux 6, I tried to do it from my personal Windows laptop but the malware in some programs were annoying.


title: How to remap a key combination to a key?

text: Is it possible to remap a key combination to a key in X server based system, so that for example if I press `End` + `Arrow_up`, keycode for `Home` is generated? Google seems to be silent on this issue. It would be great if there was a solution, since it would open up many possibilities for more convenient keyboard mapping.


title: A distro with Ubuntu 11.04 and Gnome 3 installed by default

text: I remember reading a comment ages ago about a distro that was created with Gnome 3 on top of Ubuntu 11.04. What was that distribution named/where can I find it?


title: Open Sakura in home directory

text: > **Possible Duplicate:**   >  Open Sakura in home directory I love XTerm but I would like to enable tabbing (multiple terminals in one window separated by tabs). The terminal Sakura is based on XTerm and tabbing is enabled. I can open XTerm in my home directory by executing **xterm -e 'cd ~/ && /bin/bash'**. However, this doesn't work with Sakura (I replaced **xterm** by **sakura** ). I also tried **sakura -e 'cd ~/'** but it doesn't work either. Any ideas would be very much appreciated. Thanks!


title: How to permanently remove obsolete icon from Ubuntu Xfce notification tray?

text: Since I uninstalled _blueman_ , the obsolete icon persists in my Xfce (Ubuntu 11.04 64 bit) notification tray with a placeholder. There is a way to hide but not to remove it. Can you show me how to remove it for good? ![enter image description here](http://i.stack.imgur.com/zoAHW.png)


title: Group information reported wrong for a specific user

text: I have a problem on a server I manage. An account (specifically, my account) does not seem to have the correct groups. I think the problem is most easily demonstrated by looking at the following command sequence:               Last login: sometime from somewhere     user.x@srv:~$ groups     user.x     user.x@srv:~$ groups user.x     user.x : user.x grp1 grp2     user.x@srv:~$ su - user.x     Password:     user.x@srv:~$ groups     user.x grp1 grp2     user.x@srv:~$ exit     user.x@srv:~$ groups     user.x      So the problem is that the groups for user.x are incorrectly reported after logging in (through SSH). If logging in is simulated again (`su -`) or the username is supplied with the `groups` or `id` command it works fine. The incorrect groups cause all sorts of problems, like not being able to sudo. How can I fix this? Further information that might be relevant:   * The server is a NIS client which synchronises every 15 minutes   * The problem is rare, but not unique, at the moment 2 users have acquired it in the last half-year   * The problem seems to only happen to users that SSH into the machine often


title: Keyboard shortcut to switch files in one Emacs instance?

text: I've multiple files opened in an Emacs client. Right now, to toggle between files, I've to click on the file name at the bar below in the editor. Any keyboard shortcuts for switching between files?


title: Weird problem. My left arrow key is not working and sometimes muting sound

text: My left arrow key is not working as intended. In KDE, it mutes the sound. In Awesome Window manager, it does nothing. Here's my `00-keyboard.conf` file : I have tired to comment out `XkbModel`, `XkbLayout` and `XkbVariant` options too but no good               #This file was generated by the Anaconda installer     Section "InputClass"             Identifier  "keyboard"             MatchIsKeyboard "on"             Option         "XkbModel"   "evdev"             Option         "XkbLayout"     "us,ara"             Option         "XkbVariant"    ",qwerty_digits"             Option          "XkbOptions"    "grp:alt_shift_toggle,terminate:ctrl_alt_bksp,"     EndSection          Section "ServerFlags"             Option  "DontZap" "false"     EndSection      Here's my `.Xmodmap` file (notice that the left arrow is not working with or without the xmodmap :               keycode 113 = 0x1008FF12 (the actual mute button)     keycode 224 = 0x1008FF03 (lowering brightness button - not working too)      Any help would be appreciated. this is really strange. I'm using Fedora 18.


title: GNU screen - kill outer nested session

text: I use screen on a daily basis. My caption line in ~/.screenrc looks like this:               caption always '%{= dg} %H %{G}| %{B}%l %{G}|%=%?%{d}%-w%?%{r}(%{d}%n %t%? {%u} %?%{r})%{d}%?%+w%?%=%{G}| %{B}%M %d %C:%s '      I like but when I connect via ssh to a remote host and reattach a screen session on it I get this - 2 caption lines (this image turned not to be quite good, press it and open in a new tab to make it bigger and see what's the problem): ![enter image description here](http://i.stack.imgur.com/Yo0qr.png) How can I kill an _outer_ session or at least hide the caption line on outer session?


title: Linux fan control?

text: For some unknown reason, my laptop fan stays on consistently. Even when I'm using less than 2% CPU and the air coming out of the vent is seemingly cooler than the air in the room, the fan always stays on the highest setting, which is both loud and presumably bad for the fan. Is there some configuration file that can be edited to make the fan only run at a certain CPU usage, internal temperature, or something else?


title: Cron to delete particular file(s) from a specific directory

text: I am new to shell scripting. I am trying to write a cron for unix shell that will delete some files, say after 2 weeks or after 1 month from a specific directory. /somedir1/somedir2/               if(somedir2) contains file with extension .txt or .log      then     check timestamp     if two weeks old delete it     otherwise don't delete.      Any help in this regard will be appreciated.


title: How to set downloaded Firefox to default web browser in Debian?

text: How do I set a manually downloaded Firefox as my default web browser so that clicking a link in another application will open the link in this Firefox? I tried these commands, but they didn't seem to work:               update-alternatives --install /usr/bin/x-www-browser x-www-browser /home/user/firefox/firefox 100     update-alternatives --set x-www-browser /home/user/firefox/firefox      What do I have to do?


title: Cannot FTP more than 5791 bytes

text: On my home Kubuntu 11.10 machine I have discovered that I cannot upload via FTP any single files that is larger than 5791 bytes. I have tried to two different FTP servers (not anonymous rather my employer's FTP servers) using Konqueror, GFTP, and Krusader. Also, to both of those servers other people can upload larger files just fine. I do not know if the issue is my Kubuntu desktop or possibly my router / ISP blocking. I tried changing the MTU as per this question however it did not resolve the issue. How might I troubleshoot that? I don't have any other computers here at home to FTP to / from. I have no problem uploading larger files via SSH from this same machine, the problem only manifests with FTP. Note also that I can only connect with passive mode (-p on the CLI). Here is example output:               ftp> put smallFile.txt      local: smallFile.txt remote: smallFile.txt     227 Entering Passive Mode (50,63,78,1,198,219)     150 Accepted data connection     226-File successfully transferred     226 0.837 seconds (measured here), 48.98 bytes per second     41 bytes sent in 0.00 secs (494.3 kB/s)     ftp> put largeFile.txt      local: largeFile.txt remote: largeFile.txt     227 Entering Passive Mode (50,63,78,1,198,224)     150 Accepted data connection     421 Service not available, remote server has closed connection     7785 bytes sent in 0.00 secs (62315.9 kB/s)     ftp>      At the line `150 Accepted data connection` I will wait for quite some time before the `421 Service not available` message appears.


title: how to use avconv to record streaming audio (how to define sources)?

text: I have never used `avconv` before. I've been reading the manual and asking questions on various forums and IRC for the last couple weeks but I have not found an answer yet. (This question is one part of a larger question I asked here. I am breaking it down because this key part is where I need help first. I may delete the other question because it may be too broad or ill-defined.) I used `pacmd list-cards` to list my streaming audio sources. Below are the two that I need to define as inputs to `avconv`.   1. alsa_output.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo.monitor/#2: Monitor of Scarlett 2i2 USB Analog Stereo   2. alsa_input.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo/#3: Scarlett 2i2 USB Analog Stereo So my question is simply, How do I define those sources as inputs to `avconv`? More info/background follows: Once I know how to define the audio inputs I plan to use them similarly to this:               #!/bin/bash     OUTPUT="audio_`date +%Y-%m-%d_%H%M`"     avconv \     -f alsa -ac 2 -i <alsa_output.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo.monitor> \     -f alsa -ac 1 -i <alsa_input.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo> \     -map 0:0 -map 1:0 \     -acodec flac \     -threads 0 \     -y $OUTPUT      I assume I need to replace what is in angle brackets with the correct notation. And I have no idea if the rest of the above script is even close... Here's my hardware info:               $ pacmd list-cards       Welcome to PulseAudio! Use "help" for usage information.       >>> 3 card(s) available.       [snip other cards]     index: 2     name: <alsa_card.usb-Focusrite_Scarlett_2i2_USB-00-USB>     driver: <module-alsa-card.c>     owner module: 6     properties:             alsa.card = "1"             alsa.card_name = "Scarlett 2i2 USB"             alsa.long_card_name = "Focusrite Scarlett 2i2 USB at usb-0000:04:00.0-2, high speed"             alsa.driver_name = "snd_usb_audio"             device.bus_path = "pci-0000:04:00.0-usb-0:2:1.0"             sysfs.path = "/devices/pci0000:00/0000:00:1c.4/0000:04:00.0/usb3/3-2/3-2:1.0/sound/card1"             udev.id = "usb-Focusrite_Scarlett_2i2_USB-00-USB"             device.bus = "usb"             device.vendor.id = "1235"             device.vendor.name = "Novation EMS"             device.product.id = "8006"             device.product.name = "Scarlett 2i2 USB"             device.serial = "Focusrite_Scarlett_2i2_USB"             device.string = "1"             device.description = "Scarlett 2i2 USB"             module-udev-detect.discovered = "1"             device.icon_name = "audio-card-usb"     profiles:             output:analog-stereo: Analog Stereo Output (priority 6000)             output:analog-stereo+input:analog-stereo: Analog Stereo Duplex (priority 6060)             output:analog-stereo+input:iec958-stereo: Analog Stereo Output + Digital Stereo (IEC958) Input (priority 6055)             output:iec958-stereo: Digital Stereo (IEC958) Output (priority 5500)             output:iec958-stereo+input:analog-stereo: Digital Stereo (IEC958) Output + Analog Stereo Input (priority 5560)             output:iec958-stereo+input:iec958-stereo: Digital Stereo Duplex (IEC958) (priority 5555)             input:analog-stereo: Analog Stereo Input (priority 60)             input:iec958-stereo: Digital Stereo (IEC958) Input (priority 55)             off: Off (priority 0)     active profile: <output:analog-stereo+input:analog-stereo>     sinks:             alsa_output.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo/#1: Scarlett 2i2 USB Analog Stereo     sources:             alsa_output.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo.monitor/#2: Monitor of Scarlett 2i2 USB Analog Stereo             alsa_input.usb-Focusrite_Scarlett_2i2_USB-00-USB.analog-stereo/#3: Scarlett 2i2 USB Analog Stereo     ports:             analog-output: Analog Output (priority 9900, available: unknown)                     properties:                  analog-input: Analog Input (priority 10000, available: unknown)                     properties:                  iec958-stereo-input: iec958-stereo-input (priority 0, available: unknown)                     properties:                  iec958-stereo-output: Digital Output (S/PDIF) (priority 0, available: unknown)                     properties:


title: Linux ssh shell prompt

text: While trying to type `~/Code`, I somehow got myself to some sort of ssh shell:               ┌─[jpearson@cominor] - [~/code] - [Fri Aug 05, 06:08]     └─[$]>      ssh> ^D      As you can see, ctrl+d exited me out of it, but I'm rather curious to know what I found, and how I got there. Attempting to Google around got me nowhere. I'm using zsh, but I don't know if that's relevant. CentOS 5.


title: Alternative to ethtool on MontaVista embedded Linux

text: I am running MontaVista Linux Professional Edition 3.1 on an embedded system. My version of this distribution doesn't seem to have `ethtool` available, and using `mii-tool` gives the following error:               SIOCGMIIPHY on 'eth0' failed: Operation not supported      Is there another alternative way to access the configuration options that `ethtool` provides?


title: How to get execution time of a script effectively?

text: I would like to display the completion time of a script. What I currently do is -               #!/bin/bash     date  ## echo the date at start     # the script contents     date  ## echo the date at end      This just show's the time of start and end of the script. Would it be possible to display a fine grained output like processor time/ io time , etc?


title: Parameretrize file descriptor number to open a tcp socket in shell script

text: I'm tried to parameretrize in a variable the file descriptor number to open a tcp socket using exec command but it failed. Only work correctly when file descriptor number is a constant. In the next example code only success the first retry (RC=0). Code:               echo -e "\nRetry 1: "     socket="/dev/tcp/$ip/$port"     exec 3<>$socket     echo "RC: $?"               echo -e "\nRetry 2: "     descriptor=3     socket="/dev/tcp/$ip/$port"     exec $descriptor<>$socket     echo "RC: $?"               echo -e "\nRetry 3: "     descriptor="3"     socket="/dev/tcp/$ip/$port"     exec $descriptor<>$socket     echo "RC: $?"          echo -e "\nRetry 4: "     descriptor=3     socket="/dev/tcp/$ip/$port"     exec "$descriptor"<>$socket     echo "RC: $?"          echo -e "\nRetry 5: "     descriptor=3     socket="/dev/tcp/$ip/$port"     `exec $descriptor<>$socket`     echo "RC: $?"      The output is:               Retry 1:     RC: 0          Retry 5:     socket.sh: line 46: exec: 3: not found     RC: 127      or, in other cases:               Retry 1:     RC: 0          Retry X:     socket.sh: line 27: exec: 3: not found


title: Package repository for which Fedora version would be best match for RHEL / CentOS / Scientific Linux 6.0?

text: I am using Scientific Linux 6.0, which is based on RHEL (RedHat) 6.0. I want to install some package (LXDE), which is present in repositories for Fedora, but which I didn't found either in Scientific Linux repositories, or in any "extras" repositories (like e.g. FreshRPMS). Fedora package repository corresponding to which version of Fedora (12, 13, 14, 15?) would be best fit for Scientific Linux 6.0? I mean here which would require least upgrading of other packages. How to add Fedora repository to Scientific Linux (yum)? BTW. if I LXDE can be found as RPM package in some "extras" repository, please tell me in which one.


title: How to enable on screen keyboard with lxdm?

text: I use a touch screen PC (archlinux + lxde). I want to login with lxdm and enter password with florence. I tried to add `/usr/bin/florence` in `/etc/lxdm/LoginReady` but it didn't work. Any suggestions?


title: Is there a way to adjust the formatting of the date/time in the GNOME 3 login screen and desktop?

text: I'm specifically looking to change the formatting in two places: On the desktop, the date/time reads "Sat 21:05". I would like it to read "23-Jul-11 21:05" or "23 Jul 11 21:05". In other words, I want to change the display of the day of week to display the day, short month name, and short year. On the login screen, the date/time reads "Sat 9:06 PM". I would like to change it to either the same as the desktop ("23-Jul-11 21:05" or "23 Jul 11 21:05") or the preferred display of the full date in the format ("Saturday, 23 July 2011 21:05") where the full day, date, full month, full year, and time (in 24-hour format) is displayed. I don't see any options to adjust this. I would suspect it's possible, but I'm not sure what config file it would be in or what options I would adjust.


title: How to tell if a video has metatags injected

text: I've started streaming videos and it turns out that users can't seek into my videos if they don't have metatags injected. I use the flv format. I have installed yamdi and but it doesn't really seem to come with a good manual. I'm trying to write some sort of script that will inject these tags into my whole video library ( about 300 videos) but I would like to know if there is a way of determining if a video has already been injected


title: Escape hash mark (#) in /etc/environment

text: I am adding an env variable to `/etc/environment` but because the variable value contains # sign, string is striped.               MYSQL_PWD="something#no"      Now if I do `env` above code yields `MYSQL_PWD=something`. How can I escape hash? I've already tried `\` character.


title: Start up commads in Lubuntu 2

text: After posting my question here, Start up commads in LUBUNTU I got no answer so here it is. I have these 2 commands:               xinput --set-prop "Razer Razer DeathAdder" "Device Accel Constant Deceleration" 4                                      xinput --set-prop "Razer Razer DeathAdder" "Device Accel Velocity Scaling" 1        Which I want to run on start up. I am using zsh shell. I tried putting these 2 commands `/etc/rc.local`, `.zshrc`, `.zlogin`, also in `/etc/xdg/lxsession/Lubuntu/autostart` , also in `/.xinitrc` and `/etc/X11/xinit/xinitrc` but nothing seems to happen. Could somebody let me know what is going on please, and why none of these is working? Here is my current `/etc/X11/xinit/xinitrc` file (ignore the numbers (vim)):                 1 #!/bin/sh                                                                                2                                                                                3 # /etc/X11/xinit/xinitrc                                                                                4 #                                                                                5 # global xinitrc file, used by all X sessions started by xinit (startx)                                                                                6                                                                                7 # invoke global X session script                                                                                8 . /etc/X11/Xsession                                                                                9                                                                                10 /usr/bin/xinput --set-prop "Razer Razer DeathAdder" "Device Accel Constant Deceleration" 4                 11 /usr/bin/xinput --set-prop "Razer Razer DeathAdder" "Device Accel Velocity Scaling" 1        Could somebody explain to me what is goign on ? Why nothing is happening? I tried everything, rebooted, and the $%^&* commands will just not run. Any help please?


title: Command for creating a directory and navigating into it directly?

text: Quite often I need to perform this two commands:               mkdir abc     cd abc      I am curious whether there is a simple command ( **or an alias that I can create and use** ) to do it in one go, like               user@GROUP:~$ mdcd abc     user@GROUP:~/abc$      Is this possible?


title: Combined `mkdir` and `cd`?

text: is there any way (what is the easiest way in bash) to combine the following:               mkdir foo     cd foo      The manpage for `mkdir` does not describe anything like that, maybe there is a fancy version of `mkdir`? I know that `cd` has to be shell builtin, so the same would be true for the fancy `mkdir`... Aliasing?


title: Create and move to a directory in one command - unix

text: > **Possible Duplicate:**   >  Is there a one-liner that allows me to create a directory and move into it > at the same time? I know this is a very basic question but I can't seem to figure out what to search for to get the answer. In linux/unix/ssh I know you can create a folder like this: > `mkdir path/to/myfolder` And you can move to that folder like this: > `cd path/to/myfolder` But is it possible to create it and move to it in one command, to prevent having to type the path twice?


title: Finding files containing certain strings under a directory

text: > **Possible Duplicate:**   >  How do I find text within a file and have it search multiple subfolders? I would like to find out all the files under `mydir/` directory whose content contains the string " **apple** ". How can I do this?


title: Kile freezes running pdflatex

text: When I run kile I get the message: > QStatusBar::insertWidget: Index out of range (4), appending widget and I am not able to compile from Kile. While I press `pdfLatex` inside Kile, it freezes. What can I do to debug/fix this? I am using SuSE Linux 11.4


title: send mail using external mail server

text: I'd like to send mails using a PHP script that has been deployed on a CentOS machine. Problem is there is no mail server configured. There is, however, another linux machine that has a mail server configured. How can I use the "good" machine to send an email? P.S. I have the credentials of the "good" mail server.


title: Periodically download attachments from mail box

text: Is there a preferably CLI based program I can use to regularly (through cron for example) use to check a mailbox, and download the attachments into a folder? I have a mailbox called photos@doamin.com, I would like to periodically poll the inbox for new emails via POP or IMAP, and grab the attachments to any new emails (they will be photos) and download them to a local folder. What CLI email utils can do this?


title: I'm moving up from managed hosting to a VPS. What do I need to know?

text: I'll be starting to use a VPS for my web hosting this week, which is a big step-up for me since I've only used managed/shared services before. I've a bit of experience with Linux and I'm not afraid of the terminal, but this is a completely different environment from the one I'm used to operating in. I'm mainly concerned about security... while there's not going to be anything critical there for a while, I do intend to make this a learning exercise. From what I know, I want to:   * Configure user accounts with appropriate permissions,   * Only allow certain ports to be opened (HTTP, HTTPS, FTP and/or FTPS and SSH),   * Pay attention to directory/file permissions in the webroot of applications for the HTTP user I haven't done much SSH/VNC so I intend to read up on that too. What advice could you offer me in my case? While I'd like this to be fairly generic, I'll be using Ubuntu Server 10.04, although I have the choice between CentOS and Debian (or Windows) as alternatives. Apache will be used for the serving websites.


title: Changes made to ifcfg-wlan0 doesn't seem to make a difference

text: I am running RHEL6 on my laptop. The wireless adapter configuration file `ifcfg-wlan0` didn't come by default under /etc/sysconfig/network-scripts. So I created it myself. The problem is, whatever changes I made to that file, it just won't make a difference. The wireless connection only drops immediately after I issue the command `/etc/init.d/network restart`, but will resume working fine after I manually choose a wireless network, and the changes I made won't apply(see the picture bellow). How could this happen? ![enter image description here](http://i.stack.imgur.com/8Znj9.jpg)


title: Missing dependency during rpm install

text: When I install CodeAnalsyt, i get a failed dependency on `libbfd-2.20.51` on Centos 6.3. Binutils is installed on my system and the failed dependency does exists at `/usr/lib64/libbfd-2.20.51.0.2-5.34.el6.so` Can someone please help with the install?


title: Preserve evidence of intrusion / deleted executable?

text: If you are faced with a non-root remote command execution vulnerability, and there is a foreign executable that's running on your Linux system from a user with only non-administrator privileges, what's the best way to preserve the executable and its state, and terminate the access? The executable file itself is marked as deleted, so, it's not possible to simply make a copy of it. Additionally, since it appears that the `exe` file within the respective `/proc/%d` directory is merely a symlink, and the executable itself is not one of the files open within `/proc/%d/fd`, it seems like even saving the executable file itself might be a bit tricky. **How do you save all states associated with the executable for future analysis, as well as the executable itself?**


title: A short tutorial on how a linux distro is organized and supposed to work

text: I need a tutorial , preferably with pics/diagrams to get oriented to how a typical Linux distro. is organized and used (including the basic software installation work flow). It shouldn't be a 500 pages book. A concise 20-30 pages tutorial is what I am looking for , so that I read it over the weekend and just dive into Ubuntu/Fedora etc and figure my way around on my own.


title: Why does dladm rename-link fail with "invalid argument"?

text: I am running Solaris 11.1 (in a VM) and have two NICs installed. At a root console, if I type `dladm show-phys`, it lists `net0` and `net1` and some info for each. I want to name the links more descriptively, as the networking setup in this VM will likely be changed later. So, at the root console I enter:               dladm rename-link net1 sandirect      This yields the error:               dladm: rename operation failed: invalid argument      Why can't I rename the link?


title: su vs su - (on Debian): why is PATH the same?

text: I know what should be the difference between `su` and `su -`, but in my system (debian testing) for example `PATH` is the same:               [root]# su     [root]# echo $PATH     /user_path/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin     [root]# exit     [root]$ su -     [root@debian ~]# echo $PATH     /user_path/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin      So I'm starting to thinki that the difference can be changed in configuration files.


title: Connect Unix and Windows using shell script

text: SRCDIR="source/directory"     TMPDIR="temp/directory"     [ ! -d "$TMPDIR" ] && mkdir -p "$TMPDIR"     for file in `find "$SRCDIR" -ctime -1 -type f -name "abc*pdf*"`; do         cp $file $TMPDIR     done     cd $TMPDIR     ext=`echo $file1|awk -F. '{if (NF>1) {print $NF}}'`     if [ $ext == "Z" ]; then     uncompress $file1     fi     done      I want to transfer file from Unix to Windows which are in `$TMPDIR`. But I don't know how to connect Unix to Windows in the script. I am using `psftp` to transfer files from Unix to Windows manually. I want to automate this process using script.Can I use `psftp` in script or can it be done using `batch` script? Could someone help me how can I connect Unix to Windows.


title: sticking stickies to windows

text: I'm looking for a sticky notes/knotes/etc type program with one difference: I can stick a note on a window, rather than the desk top, and it will remain attached to the window. Basically, I want to be able to annotate windows. I want to be able to say "this xterm is the one where I'm doing project X" "This application is running test Y" "this emacs is working on this bug" etc. I'm not even sure how to search for that, but my google-fu is weak to begin with... thanks.


title: How can I find out what my domain is for connecting with samba?

text: I am attempting to mount a password protected network share from a NAS unit that works by appearing as a windows share. On Windows, I just Map Network Drive, and enter in `\\\x.x.x.x\ShareName`, then enter a password at the prompt. On my Linux system, when I attempt to open `smb://x.x.x.x/ServerName`, I get a prompt for password **and domain**. As far as I know, since my share is set up as a workgroup, I do not have a domain. What should I enter here or do to mount this share?


title: netatalk use system users on Debian

text: I have Debian 7.3 (wheezy) installed on a VM with Mac OS X host. I didn't install UI like GNOME. Now I installed netatalk (via apt-get) to use AFP to connect my Mac to the VM. It essentially works but I want netatalk to use the default system users (passwd / shadow files) for authentication. I didn't configure anything except this try in the `/etc/netatalk/afpd.conf`:               - -passwdfile=/etc/passwd/


Can I enable framebuffer support in xterm? If yes, how can I do it? If no, what terminal emulator have a framebuffer support?


title: InitDevice::CreateDevice problems with wine

text: I have a game on my Sony Vaio (Pirates of the Caribbean). Whenever I try to run it under Wine, I get the following error message: > InitDevice::CreateDevice The device does not support the queried technique. What does this mean and if so how may I fix it?


title: Debian preseed.cfg/automatic install setup not detecting hard disks

text: I'm trying to build a Debian automatic install set up using a `preseed.cfg` file loaded into a client by PXE. The host and client are both Virtual Box VM's. Everything goes smoothly on the client machine until partitioning starts. I found out the hard disk is not detected on the client (`ls /dev/`: no sdx's or hdx's). Debian installation on the client using a DVD succeeds. Using a DVD, right before partitioning, the hard disk on the client is already detected. I unpacked the `initrd.gz` I was using and found out that it doesn't have any ata drivers-there's no `.../kernel/drivers/ata` directory. This image came from a plain `/usr/lib/debian-installer/images/i386/text/initrd.gz` installation. I tried the following:   1. Used an `initrd.gz` from a plain vanilla Debian install DVD: the hard disk is detected but asks for a CD. I tried to add `cdrom-detect/load_media=false` to the kernel command line but a CD is required for this to go on.    2. Copied an ata subdirectory to the original `initrd.gz`: resulted in kernel panic, VFS block not recognised error. I don't want to hack this any further. I'd like to find out if a proper solution is available. How do I get the disks to be detected? What `initrd.gz` should I use? Or is the cause of the problem somewhere else?


title: Where can I find a list of all yum repositories?

text: Now that I know more about `yum` from my previous question Where is the best location for finding information on /yum? I need to start playing with some new repositories. Where can I find a list of global repositories and what they do? If you don't know of this complete list, just let me know of the repositories that you do know of and what they are good for. For centos 6


I was under the impression that any sort of call to `mount` requires root privileges. But recently I was told "You should instead create appropriate entries in `/etc/fstab` so that the filesystems can be mounted by unprivileged users"... which is counter to my experience using `mount`. Anytime I have used `mount` I have needed to `sudo` it. (I have only used `mount` for mounting network drives. Specifically cifs type network drives.) Does mount always require root privileges? If not:   * What kind of mount does and what kind of mount doesn't require `sudo` IN GENERAL?   * **In my specific case I am doing`mount -t cifs`, how does one go about making this mount not require require `sudo`?**