title: Use PSF font in X11 terminal emulator

text: I want to use a specific console font (`/usr/share/consolefonts/Uni3-Fixed16.psf.gz`) in a X11 terminal emulator (for example Terminator or gnome-terminal).   * I've stumbled over similar questions, but nothing about PSF, just PCF. How can I install a PSF font, or convert it to something that can be used?   * If this does not work for whatever reason, is there a font that comes close to the font mentioned? I've tried out many and this is the best I've found.   * Of course I have also scanned with Google, finding some good compilations. For me Unifont looks closest.


title: How to prohibit from changing an owner of modifiable files?

text: I sometimes need to run a Qt Creator from root. After that, some config files of Qt Creator suddenly have a root as an owner. Therefore when running Qt Creator as user, I am getting nag warnings about impossibility of writing to those files. Is it possible to prohibit from changing owner of those files?


title: GPT or MBR: How do I know?

text: How can I tell whether my harddrive is laid out using an MBR or GPT format?


title: How to group grep results?

text: I have a file that contains results grouped into categories. For example:               checking results for $var     here are some results1 for $var status ok     here are some results2 for $var status ok     here are some results3 for $var status ok          checking results for $var2     here are some results1 for $var2 status ok          checking results for $var3     here are some results1 for $var3 status ok     here are some results2 for $var3 status ok     here are some results3 for $var3 status critical     here are some results4 for $var3 status ok      I need to check if any of the lines in a given category had status "critical", and display it if so. For example:               Status $var -- OK     Status $var2 -- OK     Status $var3 -- Critical          Note : Critial at $result3 for $var3      Using `grep -A` would not help much because the number of results under a particular variable varies.


title: Permission Advice for Webserver

text: The Linux box I'm managing is used mainly as a web server. The owner of a site wants to give a new user access to the site so that they can do some work on it. I've created the user account (`vinod`) and added him to a new group called `developers`. The site name is mobplay, so I need to give the `developer` group (or `vinod`) read/write access, but I'm concerned about adding or removing the current permissions in which the `mobplay` user and `nobody` group have access. What is the best solution to ensure `vinod` gets access and the site continues to run as normal?


title: UTF8 math symbols & keyboard layout / input

text: I'd like to use UTF8 math symbols, when typing one list, another list. I've found sth called ComposeKey. Unfortunately it's not covering omega, theta, rightarrow etc. I am using KDE, I've tried global shortcuts, but does not seem to work. How to setup typing utf8 symbols (like: Θ, Ω,∃, ∀,⇒,→) with keyboard combinations (like Meta+S) ?


title: Ubuntu installed from mini-ISO under VirtualBox doesn't boot

text: I installed the mini ISO of Ubuntu 11.04 in VirtualBox. After unmounting the ISO image and booting, I can see only black screen for about two hours? Is it normal? What can I do with it in virtual box and proceed with running the system successfully? thank you


title: Randomly logging out

text: My Xubuntu 10.04 system logs me out seemingly at random. How can I diagnose why this is happening and correct it?


title: run file from different directory

text: I have a directory `mainfolder` with a subdirectory `execution` which contains a `configure` script. I can switch to the `execution` directory and run `./configure` and it works fine. Now I'm trying to figure out how to run the `configure` script when I'm in `mainfolder`. I tried:               ./configure /execution      and:               ./configure execution      but neither worked. I also tried the same thing using the full path either starting from root directory or from user directory like this:               ./configure /home/etc/user/mainfolder/execution     ./configure user/mainfolder/execution      I always got the message: > bash: ./configure: No such file or directory Finally, I tried:               /home/etc/user/mainfolder/execution/configure      . /home/etc/user/mainfolder/execution/configure      Both gave me the error: > sed: can't read makefile.in: No such file or directory How can I do this?


title: Unable to boot into archlinux -> try hd0 skip ms

text: I was using Archlinux and Windows 7 together for more than 6 months. But today after I rebooted Archlinux it stuck in the boot screen. When I choose archlinux it will hang and display               try hd0 skip ms     try hd1 EXT2      I was using http://neosmart.net/EasyBCD/ to create the bootloader. I am still able to boot to Windows7.


title: How to tell where recent ssh sessions originated from?

text: I know that sometimes when I login to systems they print out where the most recent ssh session originated from (usually an ip address or hostname). How can I lookup where some of the most recent ssh logins from my username originated from?


title: convert date format in log

text: I have a log with following date format:               2013-12-14 18:53:33 aaaaaaaaaaaaaaaa     2013-12-14 18:53:33 bbbbbbbbb     2013-12-14 18:53:33 ccccccccccccccccccccc      What would be the simplest solution to convert it to               Dec 14 18:53:33 aaaaaaaaaaaaaaaa     Dec 14 18:53:33 bbbbbbbbb     Dec 14 18:53:33 ccccccccccccccccccccc      preferably in bash (or python)


title: Shell Script to search for pattern and sending the mail

text: I want to generate the shellscript. In this i have to search the pattern from the log file which is in another directory and mail if the pattern was found and mail to other address if the pattern was not found.


title: Make vimdiff display different lines as different lines (not partially different)

text: vimdiff has an annoying habit of displaying two almost-completely-different lines as the same partially-different line just because they share a character in common at the beginning or end. For example: `foo.txt` contains: `The quick brown fox jumps over the lazy dog`. `bar.txt` contains: `This is a completely different line`. `vimdiff foo.txt bar.txt` displays these two lines side-by-side with everything but the `Th` at the beginning highlighted. Is there a way to disable this behaviour and just display different lines as being different lines?


title: VIM: folding bullet points

text: I'm quite new to VIM, but have been trying to teach myself over the past week, yet I'm encountering a problem which has proven to be quite frustrating: Currently I'm mostly using VIM to take notes, and use the folding capabilty of VIM to make my work less cluttered. Yet I've encountered a problem, where every bullet point, which goes beyond my set linebreak, folds in itself. To be more clear: ![VIM I](http://i.stack.imgur.com/Hy1j3.jpg) ![enter image description here](http://i.stack.imgur.com/27a97.jpg) I would like to not have single bullet points fold. I seem to have traced the problem to the way my text is indented: since folding seems to happen on an indent-level by default, my bullet points fold due to the second line being 'indented' more. So I gather there are probably to vague ways of solving this issue: telling VIM to fold if the indent on the next line is greater 1, or handle the way bullet points are wrapped completely differently. How can these solutions be implemented? * * * I use a plugin called Workflowish, so here is my vimrc:               set tw=100     set formatoptions=tcq     set com=fb:*     set spell     set spelllang=de     colorscheme synic     set fileencoding=utf8     execute pathogen#infect()     syntax on     filetype plugin indent on      And here is what the plugin itsself sets:               setlocal foldlevel=1     setlocal foldenable     setlocal sw=2 sts=2     setlocal expandtab     setlocal foldtext=WorkflowishFoldText()     setlocal foldmethod=expr     setlocal foldexpr=WorkflowishCompactFoldLevel(v:lnum)     setlocal autoindent


title: Is there an online/web interface to search and list apt-get packages and see summaries and recommendations?

text: I'm looking for sort of an 'app-store' or Google Play store type functionality for apt-get packages. What I'd really like to do is select a category, like 'Music' or 'Internet' and see the list of available packages in that category with their summaries. It'd be even better if the packages had ratings or reviews. Does anything like this exist?


title: Combining Centos 6 ISO images

text: I was wondering if I can create a single ISO image by `cat`ing two DVD ISO images together. I have heard that this only works if the ISO is split into different parts and not two distinct ISO images, is this true? I'm looking to combine both DVD 1 and 2 for the CentOS 6 install since they don't provide a single file


title: Using shell script to select static IPv4 configuration according to router address

text: I have Linux Mint 15, I live in a university where the hostel and lab have separate static IP settings. Is there a way to set up the connection mechanism so that my laptop will automatically select the correct configuration according to which router is serving it? EDIT: My question is actually case specific to wired connection, but would be interested to know about both.


title: Can not change to a static IP in Fedora 19

text: I'm having a bit of a weird situation. I've installed Fedora Linux 19 onto a virtual machine with no GUI. Initially eth0 does not show up when I perform `ifconfig`.   When I run `dmesg | grep eth`, I see the adapter but it says it changed names to p2p1. Once I perform the `ifconfig p2p1 up` command it shows up. Now when I try to edit the `/etc/sysconfig/network-scripts/ifcfg-p2p1`, it does not exist. The only scripts that are there lo and enp0s3. If I try to create the `ifcfg-p2p1` file with the correct settings, I cannot restart the network service. I tried editing the `enp0s3` file, but that did not work. I'm fairly new to linux and not sure what else to put in here. So if you need any more information just let me know and I'll put it in here.


title: Terminate/skip SysV service during boot

text: I seem to remember that since SysV init runs services in a serial (not parallel) fashion, you can kill whatever's currently in the foreground with some key combination -- apparently not ctrl-c/z/d though. Searching online has not been fruitful. Does anyone know whether such a key combo really exists (and if so, what is it)?


title: sending & receiving files with windows

text: I have some movie files on my Ubuntu computer that I would like to send to my XP laptop. Using a USB is too much hassle. Is there any other way of achieving this? Something like the `scp` command would great.


title: How to check which GPU is active

text: I have 2 GPU's in my netbook. How do I know which one I'm actually using at any given moment?


title: Backing up hard links (rsync)?

text: My question begins with: Do I actually have hard links on my disk at all (except for "." and ".." of course)? I'm not sure how I would find that out? If no, the question is already answered. If yes, I'd like to adjust my backup routine (currently using `rsync -a`) to preserve my hard links. I've seen the option `-H`, but the man page worries me with a few statements, e.g.:               -a, --archive         ...         Note that  -a  does not preserve hardlinks, because finding          multiply-linked files is expensive...          -H, --hard-links          ...         It does NOT currently endeavor to break already existing hard links          on the destination that do not exist between the source files. ...              Note that rsync can only detect hard links between files that are          inside the transfer set...      So what should I do, if I have hard links on my disk?


title: Forcing GNU make to run commands in order

text: With the following Makefile, GNU make runs the two commands in parallel. Since the first one takes time to finish, `rm *.log` is run before the `log` file is created, and fails.               dummy.pdf: dummy.tex         tex dummy.tex &> /dev/null;         rm *.log      The file `dummy.tex` one line: `\bye` (a short empty file for TeX). Replacing `tex dummy.tex` by any other command shows the same behaviour. Removing `&> /dev/null` would of course solve the problem, but it is not a very good option in my case, since the Makefile is provided by a third party. Is it possible to prevent GNU make from doing anything in parallel? (the flag `-j 1` does not help). EDIT: output to the terminal:               bruno@bruno-laptop:~/LaTeX/make-experiment$ make     tex dummy.tex &> /dev/null;     rm *.log     rm: cannot remove `*.log': No such file or directory     make: *** [dummy.pdf] Error 1     bruno@bruno-laptop:~/LaTeX/make-experiment$ This is TeX, Version 3.1415926 (TeX Live 2009/Debian)     (./dummy.tex )     No pages of output.     Transcript written on dummy.log.


title: How to suspend and resume processes like bash does

text: this question is a follow-up to: How to suspend and resume processes I have started firefox from a bash session in gnome-terminal. The process tree looks like this:               $ ps -e -o pid,ppid,cmd -H      1828     1   gnome-terminal     26677  1828     bash     27980 26677       /bin/sh /usr/lib/firefox-3.6.15/firefox     27985 27980         /bin/sh /usr/lib/firefox-3.6.15/run-mozilla.sh /usr/lib/firefox-3.6.15/firefox-bin     27989 27985           /usr/lib/firefox-3.6.15/firefox-bin     28012 27989             /usr/lib/firefox-3.6.15/plugin-container /usr/lib/adobe-flashplugin/libflashplayer.so 27989 plugin true      When I hit `CTRL+Z` in bash, it will suspend firefox. When I issue the command `bg` (or `fg`) it will resume firefox. This is as expected. When I issue the command `kill -s SIGTSTP 27980` in another terminal, it will print the line `[1]+ Stopped firefox` in the first terminal (just like when i hit `CTRL+Z`), but it does not suspend firefox. I asume it only suspends the shell script. When I issue the command `kill -s SIGTSTP 27989` (note the PID) in another terminal, it will suspend firefox. The first terminal does not take note of this. How does bash suspend the entire process tree? does it just traverse the tree and SIGTSTP all of the children?


title: Do I Need Nullmailer-send running?

text: Further to my posting here: Why does my CMS run extremely slow in my workstation (Ubuntu) I now ask "Do I need Nullmailer-Send" running? The reason I ask, is that earlier this year (2013) I had issues regarding large .log files being created in /var/log which result in some .logs being some 1GB and I had to manually delete them. My machine (a Ubuntu 12.10 and very nice it is too!) is only a home office 'desktop' work-station and used for the normal daily things (inc LAMP WebDev) but mainly Office, Web-browsing, FTP and I don't use it as a server, as my email is collected either by Evolution Client or via GoogleMail.com. I would like to reduce any system 'bloat' and hence my OP here about Nullmailer.


title: Proper menu.lst entry for custum install CD?

text: Trying to generate a custom boot CD, I find these proposed changes for `menu.lst` file               timeout 8     default 0     gfxmenu (cd)/boot/message     title Linux         root (cd)                  kernel /boot/vmlinuz root=/dev/sda5 vga=794 resume=/dev/sda1 \             splash=verbose showopts             initrd /boot/initrd      So, what about the line in kernel indicating **`root=/dev/sda5`** and **`resume=/dev/sda1`**. I think this won't work for all cases, as long as I know, it's a mapping of devices. Will it really work this way? Is there any _generic_ way to set it?


title: Ubuntu online installer?

text: Is it possible to install ubuntu (or preferably mint 9) on my toshiba notebook, using an online installer like the one on mintPPC? The one I am referring to is found here, but many can not access it. http://mintppc.org/content/installation-mintppc-92#4 So I have copied it below I am most interested in number 4 where it says               wget http://mintppc.org/files/mintppc9/mint-installer         chmod +x mint-installer         sudo passwd      But this is for mintPPC?!?! I want this for mint on PC **1\. USB base system installation** Download the official Debian Squeeze netinstaller iso here (around 180 Mb). You can also opt for the smaller businesscard iso (around 40Mb). If prefer the business card iso as it faster to copy onto a USB stick. Both installation methods require a working internet connection, preferably a wired connection. If you don't have a working internet connection you cannot install MintPPC as the MintPPC specific packages are downloaded over the internet. If you are running a Classic MacOS partition you should read the Release Notes. In Gparted make the USB stick empty. Find also out here what the device name is for your stick (in my case /dev/sda but it could be different). Then copy the content of the iso to the stick. It's important to do this from a PowerPC based Mac as otherwise the dd process goes too fast and your PPC based Mac won't be able to boot from it:               `sudo dd if=/path/to/mini.iso of=/dev/sda`      Then boot from the USB if your Mac is capable of doing this. One of my Pismo is, the other not, don't ask me why. They are both the same. Boot in open firmware by holding option+command+o+f. Then find out which is the device:               dev / ls      You should see somewhere usb with an extra entry disk, write that number down usb19 or something in my case. Then have a look at the devalias:               devalias      Now it's either usb0 or usb1 which is associated with usb19. This is your boot device, in my case usb1. Then boot:               boot usb1/disk@1:2,\\yaboot      (or)         boot usb0/disk@1:2,\\yaboot      Continue with Debian Squeeze base system installation. **3\. Debian Squeeze base system installation** Install a Debian Squeeze base system without a GUI. It's important not to install a GUI as we will be installing one of our own and we don't want to end up with a real Debian GUI. Somewhere during the installatiion process you will be asked which predefined collections of software you want to install. Untick the graphical desktop environment (there should be no asterisk in front of the Graphical desktop environent, you can untick with the space bar). We will only install "Standard system utilities" and "Laptop", in case you are installing MintPPC on a laptop. If you feel like you need more help, you can have a look at the old instructions (which does not completely apply to this type of installation as those instructions were written for an expert installation). You can alo have a look at the official instructions from Debian. **4\. MintPPC installation**               wget http://mintppc.org/files/mintppc9/mint-installer         chmod +x mint-installer         sudo passwd      'Sudo passwd' we use to create a password for the root account. Login as root (su) with your root password: su hit enter and give your newly created root password. First we need to install sudo as it's not in the base install:               apt-get install sudo      Then add yourself to the sudoers list.               nano /etc/sudoers      then add your own username under root and copy it like it is:               root   ALL=(ALL) ALL         jeroen ALL=(ALL) ALL      CTRL-x and y to save. You can now logout of the root shell (CTRL-d). Start the installer as sudo.               sudo ./mint-installer      This will install all the required packages for Linux MintPPC using a prompt. In this way you have some control over what you install. If you just accept the default MintPPC settings (which are good of course!) you might want to do the following: sudo ./mint-installer -y The latter -y will take care that no questions are asked. If something freezes, during installation using the script you can always reboot and run the installer again. Just make sure that the system is 'clean', by doing:               sudo dpkg --configure -a      Make sure that everything is installed. You might break the installer with CTRL-C before the MintPPC specific programs are going to be installed. Just run the installer again from the start. It might add other programs. If nothing changes anymore, continue with installation of the MintPPC specific programs. When everything is installed, just before rebooting, you could stop the installation here to adjust the X settings, if you know of a working xorg.conf file for your type of Mac. There are a few examples here. If you don't know what to do, type "y" for reboot. After this: reboot...


title: NFS sharing is read only

text: I have problem with NFS sharing. See my exports:               /export 192.168.1.11(rw,fsid=0,insecure,no_subtree_check,sync)     /export/share 192.168.1.12(rw,nohide,insecure,no_subtree_check,sync)      From a client (192.168.1.12) I'm trying to connect server with this command in terminal:               mount -t nfs -o rw 192.168.1.11:/export/share /mnt      When mounting `/export` from `192.168.1.11` (server) everything works fine, but whatever am I mounting from a client, it works but it's read only. Does anybody know where can be the problem? Please help. NOTE: rights are on `rwxrwxrwx`


title: Can e2fsck be suspended?

text: I have a large hard disk partition. I would like to launch e2fsck on it so that i shall suspend its progress, be able to reboot and resume e2fsck from where it was suspended.


title: How to prevent a mistaken rm -rf for specific folders?

text: I think pretty much people here mistakenly '`rm -rf`'ed the wrong directory, and hopefully it did not cause a huge damage.. Is there any way to prevent users from doing a similar unix horror story?? Someone mentioned (in the comments section of the previous link) that > ... I am pretty sure now every unix course or company using unix sets rm -fr > to disable accounts of people trying to run it or stop them from running it > ... Is there any implementation of that in any current Unix or Linux distro? And what is the common practice to prevent that error even from a sysadmin (with root access)? **EDIT:** It seems that there was some protection for the root directory (`/`) in Solaris (since 2005) and GNU (since 2006). Is there anyway to implement the same protection way to some other folders as well?? **EDIT** : To give it more clarity, I was not asking about general advice about `rm` usage (and I've updated the title to indicate that more), I want something more like the root folder protection: in order to `rm -rf /` you have to pass a specific parameter: `rm -rf --no-preserve-root /`.. Is there similar implementations for customized set of directories? Or can I specify files in addition to `/` to be protected by the **preserve-root** option?


title: How can I show the number of positions lines have moved in diff output?

text: ## top1               1,facebook.com     2,google.com     3,youtube.com     4,yahoo.com     5,wikipedia.org     6,baidu.com     7,live.com     8,amazon.com     9,qq.com     10,twitter.com      ## top2               1,facebook.com     2,google.com     3,youtube.com     4,yahoo.com     5,baidu.com     6,wikipedia.org     7,live.com     8,qq.com     9,amazon.com     10,twitter.com          diff -u  /Users/stofke/Desktop/top2a.csv /Users/stofke/Desktop/top1a.csv |       sed -n '1,2d;/^[-+]/p' |       sort --field-separator=',' --key=2           +9,amazon.com     -8,amazon.com     +5,baidu.com     -6,baidu.com     +8,qq.com     -9,qq.com     +6,wikipedia.org     -5,wikipedia.org      But I actually need this:                +1, amazon.com      -1  baidu.com      -1  qq.com      +1  wikipedia.org      I don't know how to do that last step (I would also need to calculate the % wise decline or raise) Adding `| paste -d, - -` gets me this               +9,amazon.com,-8,amazon.com     +5,baidu.com,-6,baidu.com     +8,qq.com,-9,qq.com     +6,wikipedia.org,-5,wikipedia.org


title: Unable to mount usb drive, but computer sees that it's there.. PNY (MIPS Lemote)

text: The computer being used is a Lemote Yeeloong, and the OS is currently Debian Wheezy (mipsel) with no X windows system. So the computer can only be operated with unix commands right now (until I configure an X system).   I plug in the USB, which is formatted with a FAT32 filesystem, and the syslog says to after a few nanoseconds:               [sdc] No caching page mode present     [sdc] Assuming drive cache: write through      Then I type `mount /dev/sdc` and press ENTER but the computer tells me that it cannot find such a `/dev/sdc` in `/etc/fstab` or `/etc/mtab`.   After which I type `df` to see if the drive shows up anywhere mounted already or represented in /dev somewhere. But I see nothing. What should I do? Ultimately I am going to put a new filesystem on this thing so that I can use it to netboot. But I am stuck in this place where I am unable to even mount the device.


title: Equivalent for netsh start network on linux

text: I recenty read about the Windows option for creating an access point, that will run on the same physical device, as the machine. So that I can connect my other devices to that network, and have access to internet as well. I know that I can use 2 wifi cards to do the trick, by configuring dhcp and creating a bridge, but how can I accomplish this with one card?


title: Cannot get ccache to work with ports in FreeBSD

text: I'm new to FreeBSD (9.1) and I'm just setting up the system. One problem that I could not solve yet is to get `ccache` working. I installed it from ports and followed the guidelines in the documentation (modify `/etc/make.conf`). Compile new packages from ports works without errors but the cache is never filled, so it seems that `ccache` is simply not used. Here is the content of my `/etc/make.conf` file:               WITH_PKGNG= yes     # added by use.perl 2013-01-20 01:08:34     PERL_VERSION=5.14.2          # the rest here is copied from /usr/local/share/doc/ccache/ccache-howto-freebsd.txt     .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*))     .if !defined(NOCCACHE)     CC:=${CC:C,^cc,/usr/local/libexec/ccache/world/cc,1}     CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/c++,1}     .endif     .endif      I also tried to follow the other guidelines in `ccache-howto-freebsd.txt` and added the following lines to `/etc/csh.cshrc`, which is the default shell used by root:               setenv PATH /usr/local/libexec/ccache:$PATH     setenv CCACHE_PATH /usr/bin:/usr/local/bin      Still no difference. `ccache -s` shows that the cache is still not filled during compilation. Do you have any ideas?


title: Can you use LXC through C?

text: I want to use LXC to 'container' plugins my application is loading. Am I able to do this through C? I have been Googling a lot about it, but there don't seem to be any headers, only scripts that can be called through the terminal. I know I can execute the scripts inside C, but I'd rather use the headers if there are any.


title: Applications running under SELinux that access NonPosix drives

text: I am looking to use either AppArmor or SELinux. Of what I've seen so far I think I prefer SELinux, but there is one thing that does concern me, that is accessing NonPosix partitions. Let us look at a specific exmple: Suppose I want okular to read and write ( and only to read and write ) from an sdcard which is likely formatted in FAT32. Is there some work around or some policy that will allow me to do that?


title: FTP 550 error when trying to copy file

text: For just a few seconds I had a strange experience on my simple home server (QNAP TS-210). I was copying many files and when I wanted to copy just another one (text file with `.srt` extension), I got an error `550 Function not implemented`. First, what I would like to ask is _what exactly does this error message mean_ , because as I searched the Internet, I found two different error messages bound to one _FTP 550 Error Code_ :   1. Given by my server and for example here says " _550 Function not implemented_ ".   2. Second (for example here) is " _550 Requested action not taken. File unavailable (e.g., file not found, no access)_ ". That's quite two different meanings. How two error descriptions can be bound to one error code? I have _NASFTPD Turbo station 1.3.2e Server (ProFTPD)_ on server side and _Total Commander_ on Windows 7, on client side. I wasn't able to copy / download this file neither in Total Commander nor directly in Windows. I SSHed to my server using PuTTy, located this file, copied it to another directory, deleted it and then copied back to original place. After that I was able to copy this file to my local computer, without any problems, even using the same FTP session I left open in Total Commander. So, second question is, what actually happend?


title: zsh history - full path

text: Suppose I do the following in zsh               cd ~     cd dir1     cd dir2     cd dir3     evince foo.pdf      zsh writes exactly the same in its history file. Now my question is whether it is possible to have               cd ~     cd ~/dir1     cd ~/dir1/dir2     cd ~/dir1/dir2/dir3     evince ~/dir1/dir2/dir3/foo.pdf      in zsh history instead. I.e. that zsh remembers only full paths.


title: liferea: change default link color

text: Liferea (Linux Feed Reader) uses per default a dark blue color for hyperlinks. I am using a dark desktop theme (white text on dark background) and these default colors are very difficult to read. I am wondering whether there is a way to change the default color to something else, presumably by editing some `.css` file as can be done in Thunderbird.


title: Privoxy redirect rule for Wikipedia

text: I have a few Privoxy rules, that can redirect HTTP Wikipedia [en,de] traffic to HTTPS: (a little part from the "user.action" file)               { +redirect{s@http://en.wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/en/wiki/@} }     .en.wikipedia.org          { +redirect{s@http://de.wikipedia.org/wiki/@https://secure.wikimedia.org/wikipedia/de/wiki/@} }     .de.wikipedia.org      So you get the problem: is there any way to put a "regexp" or something to: "en", "de"? There are hundreds of other languages, i think it's a bad solution to write down them all.< There is another question: is my solution good so far? I'm asking that because if i visit https://secure.wikimedia.org/wikipedia/en/wiki/File:Nokota_Horses_cropped.jpg that's ok, it's using HTTPS. BUT if i click on the picture: http://upload.wikimedia.org/wikipedia/commons/d/de/Nokota_Horses_cropped.jpg it's using HTTP! So this is not good. Are the pictures on a HTTP-only server, or i can write another redirect rule to view the pictures in HTTPS?


title: Shell script to list locked packages in FreeBSD

text: I'm trying to make a oneliner to be able to list all locked (forbidden to upgrade) packages in FreeBSD. Normally, you issue this command:               pkg info -ak      It outputs list of all packages in system including locked and unlocked which isn't working for me as I only want locked ones. If I grep 'yes' it does exactly what I want:               pkg info -ak | grep yes      It outputs following:               nginx-devel-1.5.10             yes     php5-extensions-1.7            yes     php55-5.5.8                    yes      Now, what I want is to be able to edit that output a little bit by changing string 'yes' for following ( _adding package name w/ version omitted_ ):               nginx-devel-1.5.10             locked, run: sudo pkg unlock nginx-devel     php5-extensions-1.7            locked, run: sudo pkg unlock php5-extensions     php55-5.5.8                    locked, run: sudo pkg unlock php55      I tried following unsuccessfully ( _newb here_ ):               pkg info -ak | grep yes | sed s/yes/"locked - run: sudo pkg unlock $(pkg info -ak | grep yes | cut -d - f1-2)"/      While what I've tried isn't working I posted it just for you to get the idea what I'm trying to achieve.


title: Is there a user interface in Emacs allowing one to "grab" the buffer's filename conveniently?

text: It happens quite often that I want to use the path of the file opened in a certain buffer in Emacs (either the full path or the basename) in another place (a buffer or a different X program, say, a terminal). I wonder whether there is some pre-defined subsystem in the Emacs "user interface" that would copy the filename of the current buffer (`(buffer-file-name)`) to the kill- ring. Related things: There is a simple command in emacs-w3m that does an analoguos thing (`y` \-- `w3m-print-current-url`): it prints the URL and copies it to the kill-ring. Of course, I could simply define the command I want, but I'm asking this question because I hope to learn some user interface subsystem of Emacs that includes such a possibility among other features. (Perhaps, some buffer and path manipulation interfaces.) So that I will know more useful features of Emacs.


title: How do I explain to this website team that they need to support Linux?

text: A Linux advocacy question. Here is my draft reply to someone from the UK Government's Driving Standards Agency (DSA) website who says they don't test their website on Linux. Can you improve on it, make it more persuasive for this team which "does not have any equipment which has Linux installed" ? > Dear XXXXXXXX, > > Thank you for your reply. > > I'm surprised to hear that you do not test the website on Linux. Roughly 70 > million people use Linux, and it accounts for 5% of web traffic. How many > users does your website have? Take 5% of that, I bet it's still a lot. All > those people may be encountering bugs, errors and frustration with the > website, generating untold amounts of bad will. As you stated you have not > tested the website using Linux, you don't know whether it works as desired > or not on Linux. > > When you say the problem might be unique to my system setup you may well be > correct, however you don't know how many other users of your website use the > same or similar enough system setup to encounter the same problem. The > answer may surprise you. Check your website logs. > > The fact that no-one else has reported the problem does not mean it does not > exist. I'm sure you would feel happier and more confident in your website if > you attempted to reproduce the problem using Ubuntu Linux and Chrome, two > pieces of software which are freely available and in use daily by millions > of people across the country. > > Thank you > > \- XXXXXXXXXXXX > > Sources: > > http://hothardware.com/cs/forums/p/54435/390170.aspx > > http://www.w3schools.com/browsers/browsers_os.asp > > http://linuxcounter.net/ > > On 05/02/14 15:51, XXXXXXXXXXX wrote: > > >> Dear XXXXXXXXX >> >> Thank you for your email of 23 January about the internet booking system. >> >> I should explain that the operating system and browser that you are using is not a combination that is supported as we do not have any equipment which has Linux installed. >> >> We will however run test against the equipment that we do have to see if this problem occurs. >> >> Might I also explain that we have received no other reports from customers who have stated that pages do not load after clicking continue. It therefore maybe a fault that is unique to your system setup. >> >> Yours sincerely >> >> XXXXXXXXXXXX >> >> Customer Support Correspondence >> >> Customer Operations >> >> XXXXXXXXXXX@dsa.gsi.gov.uk >> >>> Date: 23 January 2014 15:46 >>> >>> Subject: Website buttons do not work 100% correctly >>> >>> To: XXXXXXXXXXX@dsa.gsi.gov.uk >>> >>> Please forward this onto the technical website team who can try to reproduce it on Linux. >>> >>> I tried to book a practical test today and the big green "continue" buttons did not work correctly. Half the time I clicked one with the mouse, nothing would happen. And by that I mean that no new page would load. Even after I clicked it, waited several seconds to see if a page was loading (the browser said it wasn't), and tried again. I can tell in my web browser whether or not a new page is loading, because when a page is loading, the status bar tells me it's waiting for the page to load, and the page icon at the top change to a rotating circle, and then the page loads. None of that happened. >>> >>> Then I clicked it one more time, and the next page did load. >>> >>> This happened many times on different pages. Eventually I got through to the end of the process and booked the driving test successfully. >>> >>> Operating System: Ubuntu 12.04.04 (Linux) Browser: Chrome, version 31.0.1650.63 Ubuntu 12.04 (31.0.1650.63-0ubuntu0.12.04.1~20131204.1) >>> >>> I'm a software developer by profession and I would be happy to provide any more detailed technical information you require to investigate this problem. >>> >>> Thank you.


title: LVM with SSD and SATA hard disks

text: Is it possible to create LVM partitions for both SSD and SATA hard disks? I mean if there isn't any conflicts.


title: Why CentOS 6 adjusts console width when running screen?

text: I run a console window through my PuTTY session. That console windows has a column width of 140. When I start the screen session, the console shrinks to 80 columns. I do not see this behavior on CentOS 5, only on CentOS 6. Does anybody know what has to be tweaked?


title: Why kernel 3.6.2 is so much less energy efficient than 3.6.1 on Mint 13?

text: I noticed, that the power consumption in my ASUS P53E notebook is doubled (from 10W to 20W) when I change from kernel 3.6.1 to 3.6.2 (or later). I use Ubuntu Quantal mainline kernel from kernel-ppa/mainline - Kernel Ubuntu on Mint 13 Maya (which is based on Ubuntu Precise 12.04). Please advise me, what additional information I should post, to help you answer. The power measurements agree with the significant difference in processor temperature (ca. 45 C on 10W and ca. 65 C on 20W), so it is not a glitch of the power meter.


title: Seeking alternative GUI File editor with large file support

text: Can anyone recommend a file editor, preferably free, that handles large files as well as EmEditor on Windows? I'm on Ubuntu, but other people reading this might not be, so suggestions for other Unix operating systems are welcome, too.


title: How do I customize the bash prompt on centos?

text: I've altered the `/etc/bashrc` file. I commented out the previous definition and inserted my own:               PS1="--bash: (\u@\h:\w) $"      This is not having any affect. When I make this change at the command prompt, it works great, but then it's not permanent.


title: How do I leave a message for another (local) user?

text: I know you can use `write` to send a message to a currently logged in user, but how do you leave a message for a user who is not logged in? The solution I have seen is modify the motd, but that will be displayed to all users. How can I leave a message for individual users to read when they login?


title: How do I cause a watchdog reset of my embedded Linux device

text: Is there a command like               vi > out     vi | out      That I could use to cause a watchdog reset of my embedded linux device?


title: Quickly check whether many network hosts are up-and-running

text: Objective: check if a host is up-and-running on the network,   with a method that can be efficiently parallelized over many hosts. Emphasis on a QUICK turnaround of the check. Reason to emphasise speed: multiple checks (in the hundreds) need to be performed in rapid succession and return results reasonably quickly. * * * ### Current method The current script uses a simple `ping` command. The choice is not obligatory, on the contrary _any_ suitable tool with equal or better reliability and speed may be used as replacement. ### Current script Something along these lines:               ping -c 1 -W 100 -q "$NETWORK_HOST" &> /dev/null      Obvious deficiency of this approach: responses are needed with a sub-second turn-around and this can wait up to a second, from experience. ### Alternative considered Forget about speed of sequential execution, run many `ping` commands in parallel using GNU `parallel` and collate the results at the end. This has been experimented with but seems even worse in practice. ### Intuition about a better solution It seems like `ping` _may_ work just fine as a "polling health check", all it needs to be tweaked to do is to wait very little time and time-out in case of no response. Assumption: the network is considered reliable and FAST, the hosts don't have either of the qualities necessarily. * * * ### Question How would you solve this? Which tool(s) would you use? Is this the right approach? Could you provide a code snippet? * * *   * Environment: OS X + Ubuntu hosts   * Scripting shell: Bash   * Can install additional software if needed.   * Can compile/install new code for an application not in the repository and use that.


title: live bootable tiny distro for burn-in testing of LCDs?

text: I'd like to stress test used LCD monitors for problems that may become apparent after they've been in use for a while. I'm looking for those with components that fail because of heat. To those ends I'd like to set up a workstation that has a live bootable CD that will do something that's someone intensive as far as the screen is concerned. I've found distros that have LCD test patterns, but those are static images. I want something that will show me that a monitor will flake out after an hour of use. Also, it would be nice if this could be a simple command. This workstation will be used by people who aren't linux savvy.


title: How to convert tar file from gnu format to pax format

text: On the one hand I have a lot of tar files created with _gnu_ format, and on the other hand I have a tool that only supports _pax_ (aka _posix_ ) format. I am looking for an easy way to convert the existing tar files to pax format - without extracting them to the file system and re-create the archives. GNU tar supports both formats. However, I haven't found an easy way to the conversion. How can I convert the existing _gnu_ tar files to _pax_? [I asked the same question on superuser.com, and a commenter recommended to migrate the question to unix.stackexchange.com.]


title: Convert pdf file to epub

text: Is to possible to convert pdf file to epub format without errors? Is there some application in Linux that can do it? I found only Ecub and Calibre which give bad results or fail. A command-line application is sufficient. It's an ordinary pdf (not scanned), so OCR is not needed.


title: List mount points owner and group

text: I'm running HPUX 11.x and I was wondering if there's a command that would list all the mount point owner and group. I want a listing like `df` or `bdf` but with ownership information.


title: Installing Ruby on Mac OS X

text: I had _ruby_ installed in `/usr/local/bin/` but it was outdated, so I installed newer version using `brew`. Now I have two installations of _ruby_ in different dirs. Should I remove one? And how do I update pre-shipped ruby to the latest version?


title: Application for Facebook Chat

text: Is there a native Linux application which allows chatting on Facebook Chat? A feature which I particularly require is being able to chat in conversations which include multiple people.


title: Highlight the three last updated files in ls output

text: Is there any way to overload or wrap the `ls` command so that it will highlight / underline / otherwise make obvious the last three modified files? I know that I can simply `ls -rtl` to order by reverse modification time, but I usually do need an _alphabetical_ list of files despite the fact that I would like to quickly identify the last file that myself or another dev modified.


title: is there a way to list all 'indexes IDs' (keys) on a bash associative array variable?

text: I have this array:               declare -A astr      I add elements to it:               astr[elemA]=123     astr[elemB]=199      But later on I need to know what are the indexes IDs (elemA and elemB) and list them.               echo "${astr[@]}" #this only get me the values...


title: Will autologin create remote security problems?

text: In Debian, I setup `nodm`, such that my computer logs in automatically when it is turned on. I am not concerned about thieves accessing the computer directly, but compared to a setup using GDM, can such a setup make the system less secure through the Internet?


title: How to shutdown the computer from Openbox as a menu item?

text: How can I add a menu item to Openbox which launches a prompt to cancel or provide a root password, then shuts down X and the computer if the correct password was given? The question Shutting the computer down from Openbox is related, but the answer involved typing, not clicking through them menus. The documentation suggests that one add a `systemctl poweroff` menu like this, but the menus do not appear to work:               <item label="Shutdown">         <action name="Execute">             <command>systemctl poweroff</command>         </action>     </item>      I am using Debian 7.0.


title: path_helper and zsh

text: I read that Apple, instead of jamming more and more `PATH` variable variations to the end of shell profile file, created `path_helper` binary so that it could expand `PATH` variable automatically by reading path lists from `/etc/paths.d/` directory. Also - this file generates output only for csh and bash (`-c` and `-s` flags accordingly). There is no output for `zsh` (although zsh being somewhat bash compatible - I understand that). I am using zsh. I have `/etc/zshenv` file which contains following lines:               # system-wide environment settings for zsh(1)     if [ -x /usr/libexec/path_helper ]; then         eval `/usr/libexec/path_helper -s`     fi      It takes about half a second when I open terminal or its new tab for that process to complete. There is only one file with single path (`/usr/X11/bin`). How much am I risking if I remove `/etc/zshenv` at all? Would it be enough to put aforementioned path to my `.zshrc` or `.zshenv` files?


title: What should I expect if I switch from Ubuntu to openSuse

text: As probably most of you I have been long using Ubuntu. I'm not an expert, but I have been using different distros until I settled with Ubuntu. I started using SuSE 5.x, Conectiva (that later became Mandriva, so it seems), RedHat, Mac OS X (yeah, I know, not Linux) and Ubuntu running mostly as a VM in the last couple of years. But ever since SUSE released the SUSE Studio I was tempted to switch back to it. It is way too convenient to keep your installation in the cloud and download your system ready to go. Here is my question. What to expect from the switch. I know that SUSE uses RPM as its package manager, and I have no idea of the completeness of its repository compared to Ubuntu. When trying openSUSE on a VM I also miss the _sudo_ command, but I am sure that it must have been some lack of configuration on my part. So, what else would be different? My main use for Linux is as a desktop and a bit of Java and Ruby programming.


title: Find duplicate file names with specific matching pattern

text: I have a folder with some files (snippet of the contents of the folder)               PAT1.URGRSVP.50.WR786842JOB11632.WRS20140.FILE0005.DAT     PAT1.URGRSVP.50.WR786842JOB11643.WRS20140.FILE0003.DAT     PAT1.URGRSVP.51.WR786842JOB11643.WRS29232.FILE0003.DAT     PAT1.URGRSVP.50.WR786842JOB11694.WRS20140.FILE0002.DAT     ...     ...     ...      My focus is on the 3rd (50,50,51,50) and the 5th (WRS20140,WRS20140,WRS29232,WRS20140) blocks. How can I write a script that displays the duplicate filenames with the same 3rd block AND 5th block (The duplicates of the combination of the 3rd and the 5th block strings)? So the output should list the following in the above example               PAT1.URGRSVP.50.WR786842JOB11643.WRS20140.FILE0003.DAT     PAT1.URGRSVP.50.WR786842JOB11694.WRS20140.FILE0002.DAT


title: Symlink to part of the file?

text: Is there possible to create file that is just a sub-sequence of bytes from another file, like a symlink, but referencing only part of the file?


title: yum no longer able to detect/access repository

text: Yum was working fine until I tried to install google chrome and used the `--add-repo` command with which I added chrome's repository. Ever since then, whenever I do a `sudo yum install`, yum only searched on chrome's repository. So I removed the repo file of chrome. But even after restarting the system, yum is not accessing any repository. A `sudo yum search gtk+` turned up results for gtk+, but trying to install it with `sudo yum install gtk2.x86_64` didn't work. It gave the output:               Loaded plugins: langpacks     Nothing to do      How can I fix this? I'm using Fedora 20, 64 bit version. `ls -l /etc/yum.repos.d` shows me the following output: > -rw-r--r--. 1 root root 183 Jan 26 19:03 adobe-linux-x86_64.repo   >  -rw-r--r--. 1 root root 0 Feb 2 09:34 fedora.repo   >  -rw-r--r--. 1 root root 0 Feb 2 09:34 fedora-updates.repo   >  -rw-r--r--. 1 root root 0 Feb 2 09:34 fedora-updates-testing.repo   >  -rw-r--r--. 1 root root 75 Jan 26 11:52 jenkins.repo   >  -rw-r--r--. 1 root root 76 Jan 26 11:51 jenkins.repo.rpmnew   >  -rw-r--r--. 1 root root 1241 Mar 14 2013 rpmfusion-free-rawhide.repo   >  -rw-r--r--. 1 root root 1172 Jan 26 19:04 rpmfusion-free.repo   >  -rw-r--r--. 1 root root 1170 Jan 26 19:03 rpmfusion-free-updates.repo   >  -rw-r--r--. 1 root root 1230 Jun 29 2013 rpmfusion-free-updates- > testing.repo


title: Combine unallocated space using KDE partition manager?

text: See below screenshot and see that there are 2 unknown unallocated blocks. How to combine the unallocated space using KDE partition manager? ![enter image description here](http://i.stack.imgur.com/sUzAE.png) @ktf, as requested:               Disk /dev/sda: 1000.2 GB, 1000204886016 bytes     255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x823df1e4             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT     /dev/sda2          206848  1186215955   593004554    7  HPFS/NTFS/exFAT     /dev/sda3      1195208704  1945712639   375251968   83  Linux


title: smbpasswd failed for new Samba install on fresh Ubuntu 11.04

text: I've installed Samba on a fresh Ubuntu install. I run the command               sudo smbpasswd -a someuser     New SMB password:     Retype new SMB password:     Failed to add entry for user someuser.      I've read that you need to setup a system user, or setup a normal user for `someuser` first. I have two questions. What is a system user? What the correct way to setup a vanilla smb only user with either a system user, or for someuser?


title: How can I find where LANG, LANGUAGE and MAIL environmental variables are set?

text: I've had a few issues with environmental variables not set correctly in my Raspbmc Raspberry Pi. Specifically, I've had to manually specify the following in `~/.bashrc`.               export LANG='en_AU.UTF-8"     export LANGUAGE='en_AU:en'     export MAIL='/var/mail/pi'      However, in another Pi running vanilla Raspbian, these environmental variables _are_ set correctly. I wanted to see what file specified these, but couldn't find it. I tested the files that I know of that run when logging in to a terminal. These gave no hits.               grep LANG -r /etc/profile /etc/profile.d/ /etc/bash.bashrc ~/.profile ~/.bashrc /etc/environment     grep MAIL -r /etc/profile /etc/profile.d/ /etc/bash.bashrc ~/.profile ~/.bashrc /etc/environment      Conversely, on my laptop running Arch, `/etc/profile.d/locale.sh` appears to set `LANG`, and `~/.profile` specifies `LANGUAGE`. However, I could find no mention of `MAIL`. How can I find where these environmental variables are set? * * * ## EDIT I searched the whole of `/etc` and `~` for these strings in the working system (Raspbian).               grep "\bMAIL=" -r /etc 2>/dev/null     grep "\bMAIL=" -r ~ 2>/dev/null      Searching for MAIL gave no hits.               grep "\bLANG=" -r /etc 2>/dev/null     grep "\bLANG=" -r ~ 2>/dev/null      This strategy gave only a few hits for LANG in `/etc`, and none for LANGUAGE. There were a few false hits in `/etc` with `LANG=C`, and one true hit (as mentioned by vinc17) at `/etc/default/locale:LANG=en_AU.UTF-8`. However (as per a previous question by me), this file at `/etc/default/locale` is not sourced on my Raspbmc machine, so I presume that the situation is a bit more complicated than the mere presence of this file.


title: Write lines to a file from less

text: While in `vim` I can write a range of lines from the file I'm viewing to another file. For example,               :1,10 w outfile.txt      will write lines 1 through 10 to outfile.txt. Can I do the same while I'm viewing a file using `less`?


title: undefined symbol in /usr/lib64/libGL.so.1 when using ssh

text: I frequently use ssh to a computer with redhat using the Y option so I can forward the windows. I always saw errors like this one               /usr/lib64/firefox/firefox: symbol lookup error: /usr/lib64/libGL.so.1: undefined symbol: _XGetRequest      This wasn't a problem since everything was working anyway. Now I'm trying to solve it since it's causing troubles with some other program called abaqus. this is the error message.               /usr/local/Abaqus/6.11-1/exec/ABQcaeK.exe: symbol lookup error: /usr/lib64/libGL.so.1: undefined symbol: _XGetRequest     terminate called after throwing an instance of 'nex_PrimException<ipc_IPCMsgErrorTypeEnm, 1>'      My knowledge of linux is just basic so I know how to use the terminal and the basic commands, but I have no clue about this kind of things. Is it possible to solve this problem?


title: PulseAudio server on Android

text: I want to stream audio from my Linux box to an Android device, with smallest delay possible, so I thought about using PulseAudio with `module-opensl-sink` (found here). I _don't want to_ replace AudioFlinger with PA, because I want to use it's effects API. I've managed to compile PulseAudio using Google's Android NDK somehow, but everytime I try to start it, it throws an error, no matter which module I try to load.               $ ./pulseaudio -C --loglevel=4     W: [pulseaudio] caps.c: Normally all extra capabilities would be dropped now, but that's impossible because PulseAudio was built without capabilities support.     I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted     D: [pulseaudio] core-util.c: setpriority() worked.     I: [pulseaudio] core-util.c: Successfully gained nice level -11.     I: [pulseaudio] main.c: This is PulseAudio 5.0-121-g38c5d-dirty     D: [pulseaudio] main.c: Compilation host: arm-unknown-linux-androideabi     D: [pulseaudio] main.c: Compilation CFLAGS: -mfpu=neon -mfloat-abi=softfp -Wall -W -Wextra -pipe -Wno-long-long -Wno-overlength-strings -Wunsafe-loop-optimizations -Wundef -Wformat=2 -Wlogical-op -Wsign-compare -Wformat-security -Wmissing-include-dirs -Wformat-nonliteral -Wpointer-arith -Winit-self -Wdeclaration-after-statement -Wfloat-equal -Wmissing-prototypes -Wredundant-decls -Wmissing-declarations -Wmissing-noreturn -Wshadow -Wendif-labels -Wcast-align -Wstrict-aliasing -Wwrite-strings -Wno-unused-parameter -ffast-math -fno-common -fdiagnostics-show-option     D: [pulseaudio] main.c: Running on host: Linux armv7l 3.4.0-cyanogenmod-g8a32cd7 #1 SMP PREEMPT Sun Jun 8 19:40:15 PDT 2014     D: [pulseaudio] main.c: Found 4 CPUs.     I: [pulseaudio] main.c: Page size is 4096 bytes     D: [pulseaudio] main.c: Compiled with Valgrind support: no     D: [pulseaudio] main.c: Running in valgrind mode: no     D: [pulseaudio] main.c: Running in VM: no     D: [pulseaudio] main.c: Optimized build: no     D: [pulseaudio] main.c: FASTPATH defined, only fast path asserts disabled.     I: [pulseaudio] main.c: Machine ID is localhost.     I: [pulseaudio] main.c: Using runtime directory /data/data/jackpal.androidterm/app_HOME/.config/pulse/localhost-runtime.     I: [pulseaudio] main.c: Using state directory /data/data/jackpal.androidterm/app_HOME/.config/pulse.     I: [pulseaudio] main.c: Using modules directory /data/local/pa/lib/pulse-5.0/modules.     I: [pulseaudio] main.c: Running in system mode: no     I: [pulseaudio] main.c: Fresh high-resolution timers available! Bon appetit!     W: [pulseaudio] core.c: failed to allocate shared memory pool. Falling back to a normal memory pool.     D: [pulseaudio] memblock.c: Using private memory pool with 1024 slots of size 64.0 KiB each, total size is 64.0 MiB, maximum usable slot size is 65496     I: [pulseaudio] cpu-arm.c: CPU flags: V6 V7 VFP EDSP NEON VFPV3      I: [pulseaudio] sconv_neon.c: Initialising ARM NEON optimized conversions.     I: [pulseaudio] mix_neon.c: Initialising ARM NEON optimized mixing functions.     I: [pulseaudio] remap_neon.c: Initialising ARM NEON optimized remappers.     E: [pulseaudio] module.c: Failed to open module "module-cli".     E: [pulseaudio] main.c: Module load failed.     E: [pulseaudio] main.c: Failed to initialize daemon.     I: [pulseaudio] main.c: Daemon terminated.      I configured PA with these arguments:               ./configure --prefix="/data/local/pa" --host arm-linux-androideabi --enable-neon-opt --with-sysroot='/data/local/pa' --without-caps --disable-shared --enable-static --disable-avahi --disable-alsa --disable-jack --disable-gconf --disable-esound --disable-openssl --disable-dbus --disable-glib2 --disable-orc --disable-adrian-aec --disable-rpath --enable-static-bins --disable-ipv6 --enable-force-preopen      Why does it fail to find these modules, even if it reports correct modules directory?


title: I want to expose "easy" URL's for machines on a home network. Is custom DNS/BIND the answer?

text: I recently convinced my room mates to cut the cord and go cable free, and they've found it pretty great so far. I'm in the process of setting up a pretty sweet, mostly automated home theater setup that revolves around an Apple TV, and part of this automation uses stuff like Sick Beard, Couch Potato, and the Transmission daemon. I've got everything mostly working, including the web interfaces for all of the above services, but I'd like to make the URL's more friendly than `<ip address>:<port number>` so that my room mates, who are _not_ technical in the slightest, can access these services (especially Couch Potato and Sick Beard). I'd like for them to be able to go to a url like `movies.home` or `tv.home` (I know that collides with a proposed TLD, if you have suggestions on this front as well I'm open) and be able to add shows to Sick Beard or put a movie on Couch Potato's watch list since those UI's are fairly straight forward to use. I'd like for this name resolution to be done at a network wide level, so that all of our phones and laptops and whatnot can get to the web interfaces without much work or me having to go around and editing everybody's hosts file. I don't care about accessing the stuff from outside of the home network, I only want it usable from our internal network. I'm not completely sure where to start, and I wanted to make sure I wasn't missing a simpler solution before pursuing a custom DNS server with `BIND` since I've never used it before and I wasn't sure if it would do what I want it to do; I was thinking that I'd set up BIND on a box somewhere in the house and then have my wireless router point to that local box as its DNS server then figure out some way to have the BIND box forward all non-home-media related requests to OpenDNS or something. Can BIND even do resolution based on different ports instead of different logical addresses? Anyway. Help is greatly appreciated.


title: Killing tcp connection in linux

text: I have some dead connection in one application which is in hanged state if client machine is dead.               ->192.168.1.214:49029 (ESTABLISHED)      Is there a way to terminate these option from linux command line without restarting the server? After search I found solution called as tcpkill. But it will not work for me. As it permanently blocks that ip.


title: is free command displaying all physical memory or there is some RAM reserved and hidden?

text: I am supposed to have 512MB of ram on my VM, however I see 495mb of total ram when I do free command. I would like to know if in case my system really had "precisely" 512MB of physical ram, if in free I would see 512MB as well, or if kernel takes some ram and reserves it for itself, therefore it looks like the system has less actual memory. I am aware that if my memory was over ~3.5 GB I would need to use PAE on 32bit kernel, but this is not the case. The reason why I am asking is that I am paying for this VM to have 512MB and even if 17MB of ram doesn't seem to be much, I would like to get what I pay for... (it shouldn't be problem to increase ram of virtual machine by 17mb even if it require reboot).


title: what are the techniques to extract files safely?

text: Yesterday I was making some experiments on Slitaz. It uses multiple initrd.img's to store files/changes. I wanted to extract one of its initrd.gz images (which is a cpio archive) to a folder, edit/remove them, repack again. I used this code:               cat rootfs.img | cpio -idvm      Then all files are extracted to my root filesystem. My whole OS is corrupted. (What an emberrasing situation...) What should I do to make such operations safely but in an easy way? Chroot? LXC? (VirtualBox is the last resort)


title: Execution order with multiple commands

text: I'm relatively new to Linux and I'm working on a CronTab for scheduled backups. I figured out how to do multiple sequential jobs with `;` and `&&`, but I'm unsure how the dependency affects the sequence. My cron job looks like this:               # Every day at 0:00 (reboot server and do the hourly backup procedure).     0 0 * * * sh shutdown.sh && sh backup.sh ; sh nas.sh ; sh ftp.sh ; sh startup.sh              What I want to happen is to run shutdown.sh and continue the sequence if it's successful, but cancel it if it fails. My fear is it will only skip `sh backup.sh` but then continue the sequence. Will it work as intended? If not, would something like `shutdown && (backup ; nas ; ftp ; startup)` be possible?


title: Installing as 'root' is not currently supported - what should I do?

text: I finally got root access to one of the nodes which incredibly helped me to get most of my software installed. But now, for the first time, I got into issues for actually being root :-))               We recommend running this script as a designated SMRT Analysis user     (e.g. smrtanalysis) who will own all smrtpipe jobs and daemon      processes.            Current user is 'root' (primary group: root)          Installing as 'root' is not currently supported     Switch to the desired user and restart the install.     Aborting installation...      I therefore tried to create new user, but I don't have enough privileges to do that:               /usr/local/bin$ sudo adduser smrtanalysis     Adding user `smrtanalysis' ...     Adding new group `smrtanalysis' (1001) ...     Adding new user `smrtanalysis' (1001) with group `smrtanalysis' ...     Creating home directory `/home/smrtanalysis' ...     Stopped: Couldn't create home directory `/home/smrtanalysis': Permission denied.          Removing directory `/home/smrtanalysis' ...     Removing user `smrtanalysis' ...     Removing group `smrtanalysis' ...     groupdel: group 'smrtanalysis' does not exist     adduser: `groupdel smrtanalysis' returned error code 6. Exiting.      Can I somehow use my own user - which is root - to install this software? How?


title: Permissions changing on few files under /etc/

text: It appears that new permissions on `/etc/issue` and `/etc/motd` are reverting back to the original even if we change them. This is on systems running RHEL 5 and RHEL 6. Is there any rc script which controls the permissions on `/etc` files?


title: If I have X11 forwarding turned on. How do I run a program without it in the same terminal?

text: Obviously I'm not looking to open another terminal and `ssh` without `-X`. I'm actually doing this with running Matlab on another server. So after ssh'ing into my remote server with the `-X` option, I type `matlab` and the graphics forward in as expected. How do I run `matlab` with X11 forwarding enabled but without graphics?


title: Can't push data to some websites / Older Linux do fine

text: **UPDATE:** _Another possible cause is that all the browser fail at POSTing data. Most of Google's stuff is Ajax over GET; Just an approach, I'm not sure about that..._ **UPDATE 2** Here's an overview of what works: **openSUSE 12.2** , _Kernel 3.4.63-2.44-desktop_ , Firefox 26, Chrome, Opera **Windows 7** , Firefox 26, Chrome, Opera And this does _not_ work (What I tried): **Linux Mint 16** , _Kernel 3.11_ , Firefox 26 **openSUSE 13.1** , _Kernel 3.11.6_ , Firefox 26 **Fedora 20** , _Kernel 3.12.9_ , Firefox 26 and Firefox 27, Opera and Chrome I recently installed Fedora 20 KDE on my XPS17, I have an openSUSE 12.2 KDE, a Debian Lenny KDE, Windows 7 (not KDE :D), parallel to the Fedora installation. (All operating systems are of the amd64 architecture.) _My problem also exists in Linux Mint 16 and openSUSE 13.1_ , but I finally installed and wanted to work it in Fedora, because I wanted this to be my "real" Linux distribution. However, after installing, I successfully connected to the wireless network here, and I started surfing the internet. Most of the pages loaded fast and appeared in Firefox, but when I tried to login to Gmail, it failed after I entered my username/password and had to enter my phone code. (I enabled 2-factor-authentication). Gmail doesn't load in Konqueror or Chrome, but it **does** load in Opera, after several hours, (I already forgot that Opera was running somewhere), the loading screen appeared. All other browser try to load the new page (screenshot below), and a response never comes back, so the browsers stop loading there. (See the answer in the network console of Firefox, screenshot 2) Screenshot 1: ![screenshot 1](http://img1.picload.org/image/lriapld/ff.png) Screenshot 2: ![screenshot 2](http://img1.picload.org/image/lriaplo/ff1.png) The same happens after pushing the download button, if I try to download the latest Adobe Flash Player for Fedora on the Abobe Download site. The browser stop loading something after some minutes, only opera tries and tries and tries... However, **I don't expect this to be a problem of the Gmail/Adobe Website or a network problem** , since the problem doesn't exist in the exactly same version of Firefox/Chrome in openSUSE 12.2 or Windows. I found some entries in forums, where a similar problem could be fixed, but this doesn't work for me. This is what I tried so far: **1\. Installed Fedora and installed Firefox 26 with yum.** 1.1 Tried to load Gmail in private mode [FAIL] 1.2 Resetted Firefox and tried to load Gmail [FAIL] 1.3 Created some new profiles and tried it there [FAIL] 1.4 Started Firefox in safe mode and tried it again [FAIL] **2\. ReInstalled Fedora and downloaded Firefox 26 / Firefox 27 beta (without yum)** 2.1 I did steps 1.1 to 1.4 again [4x FAIL] **3\. Installed Linux Mint 16 KDE** 3.1 Repeated 1.1 to 1.4 [4x FAIL] **4\. Installed openSUSE 13.1 KDE** 4.1 Repeated 1.1 to 1.4 [4x FAIL] **5\. Reinstalled Fedora and downloaded Firefox again from the Mozilla site.** 5.1. Pings to website are very successfull (as expected) 5.2. Tried surfing the internet again, (I write this in Firefox under Fedora it works very well BUT I had to save this text and post it in openSUSE... Gmail/Adobe also don't work) 5.3 Disabled spdy in about::config [FAIL] 5.4 Disabled DNS prefetch in about::config [FAIL] 5.5 Disabled ipv6 in about::config [FAIL] Did anybody experienced this problem, too? I would be very, very glad if someone could give me a hint, or even a solution to this problem.


title: Are there any utilities to quickly add, list and remove command aliases?

text: I'd like to be able to quickly, on-the-fly add (and list/remove) command aliases so that they persist between shell restarts (as if they were added to `.bashrc`). Are there any ready utilities/scripts/whatever that can help me with that? Ideally the uses case would look like:               aliasutil add "gcm" "git checkout master"     aliasutil add "gfp %1" "git push --force %1"     aliasutil list     aliasutil remove "gcm"


title: Command to re-enable decoration on windows

text: I'm running openbox, I have accidentally undecorated a window (By clicking on `Un/Decorate`) Now is it possible to restore the decoration? Since the title is "invisible" now, I have no where to click on. Perhaps there's a Xorg command to do so?


title: Allow all users can write files/folders of user "apache"?

text: I run Apache 2.2.15 on CentOS 6.4 When a web local run a function and it created files/folders owned by user "apache". I can read these files/folders via samba but i can't write/delete them. I've tried using chmod, but it only works for that case, when this web local run again, i can't do anything with these files. **My question is :** How can i change permission for user "apache" that all users can access, write, detele.. files/folder that owned by "apache" ?


title: What is the best way to learn SELinux?

text: I want to learn SELinux to a high level, being able to understand the intricacies of domains, types and switching. What is the best way to go about this? I considered starting with Fedora and a good manual, although as Fedora ships with so many pre-written policies I found it somewhat overwhelming. Is there a good tutorial or learning distro suited to this purpose?


title: Bash: append columns to table

text: If you want to append a column (not a line) to a table, and the column has the same number of elements for sure, how can you do it? Given a set of files, which keeps changing each day, you want to keep track of it. An example would be:               file1 3443 words 11-20-13 44 4788 words 11-23-13      file2 4457 words ...


title: How do I control the cycle length of "top" command

text: I have been told that "top" command only cycles once per second (I don't know if that's true) and I need it to show changes in processes way shorter than a second, how do I do that? What I need to "watch" exactly is the following From gnome terminal I want to execute the command               exec firefox      I want to observe how gnome terminal will spawn a sub-process/shell/bash and how "exec" command will swap that with Firefox Of course I'll be doing that by sshing into the machine from an other machine and running top command or any other alternative but it has to be fast enough to catch that


title: date doesn't accept its own output

text: What is the option for `date` to give output in a format acceptable to `date --set` ? I'm trying to remotely set the date, using the current computer clock of my workstation.               ssh user@host sudo date --set="`date`"      and               ssh user@host sudo date --set="`date -R`"      both give "extra operand" and "invalid option" errors. Yes, I know I can type `--set="YYYY-MM-DD HH:mm:ss"`, but the computer should be able to do that for me.


title: Parsing protocol and url from packet payload

text: We are using pf_ring to capture packets. We are able to decipher information like source and destination ip, mac etc from the header information. Now we are moving into payload to decide the type of protocol, url and other information. We see that tcpdump and wireshark have done good parsing. Are those source code just for parsing is available given that we can provide each byte by byte into the function?


title: How to login as root from Bash and do stuff

text: This is my simple bash:               cat test.sh          #!/bin/bash      echo "hello"     su - root -c /path/to/script.sh <<EOF     password                                   EOF     whoami     echo "good bye"      But I get this error:               ./test.sh     hello     su: must be run from a terminal     <current-user>     good bye      (OR)               cat test2.sh     #!/bin/bash      echo "hello"     sudo su <<EOF     password                                   EOF     whoami     echo "good bye"      Again another error (OR)               cat test3.sh     #!/bin/bash      echo "hello"     su root <<EOF     password                                   EOF     whoami     echo "good bye"      again error... when I try:               #!/bin/bash     echo "hello"     sudo -s <<EOF     <password>     echo Now I am root     id                                                                           echo "yes!"     EOF     whoami     echo "good bye"      Then the output is:               ./script.sh     hello     [sudo] password for <user>:      I also changed my script to:               #!/usr/bin/expect -f     spawn sudo -s <<EOF     expect "assword for user:"     send -- "password\r"     expect eof      and output is:               spawn sudo -s <<EOF     [sudo] password for user:     /bin/bash: <<EOF: command not found      Also `which sh` output is `/bin/sh` How can I resolve the error in these three scripts?


title: How to alias cp with cp -i by default

text: Is there a good way to alias the command `cp file1 file2` to `cp -i file1 file2`? Apologies if this is a dumb question, I'm a Unix novice.


title: How to measure PCI-Express bus usage?

text: I'm looking for a way to find out if PCIe bus is the bottleneck or not. It's not a problem to measure how much bytes was transferred through any particular NIC: ![enter image description here](http://i.stack.imgur.com/MuLjp.png) Is there a way to find how much data was transferred to all the other PCIe devices (hard drives, video cards, etc.)?


title: How do I run a command as the system administrator (root)

text: I need to run a command with administrative privileges. Someone said I should run a command as root. How do I do this?


title: Why does sed globally substitute only the first occurence in multiple substiutions?

text: I want to globally substitute all `\n` new line characters with their `\n` escape sequence and all `'` single quote characters with two `''` of them like so:               function esc_foobar {         # Escapes any "'" single quotation character.         local -r esc_quot="s:':'':g"         # Escapes any "\n" new line character.         local -r esc_nl=':a;N;$!ba;s:\n:\\n:g'         # Escape everything in one sed run.         sed -- "$esc_quot;$esc_nl" foobar.txt     }      Given that the `foobar.txt` file contains:               Foo's bar     Bar's foo      Only the first `'` single quote character gets doubled. Reversing the order of the `esc_quot` and `esc_nl` substitutions in the `sed` command to `$esc_nl;$esc_quot` works, i.e. all `'` single quote characters get doubled as expected. Why is this so?


title: How do I fix Global Shortcuts when they stop working in KDE?

text: I recently had Global Shortcuts stop working in KDE 4. I asked around on forums and chat rooms for solutions. Some people mentioned kded. I tried reinstalling. After about a week I upgraded all my packages were back to normal. However, I still don't know what runs and causes Global Shortcuts to work and would like this to be clarified if anyone knows. Thanks.


title: How to "reencode" mp3 files

text: I have a fair number of mp3 files which I created using audiohijack pro on a mac. Now I no longer have a mac and am using them on my linux systems. Unfortunately the program I use (rhythmbox) to listen to these files cannot figure out how long the files are. These files are up to 5 hours long, and when the program cannot figure out how long it is I can't scroll through the file. Any unix/linux programs that can reencode these files? I do not know enough about either audio on linux or the mp3 file format to know what would be involved in this. Best, Bart


title: Shell syntax question with difficult parameter expansion

text: I am scratching my head to understand this script and can certainly use some expert advice.               getopt_simple()     {         echo "getopt_simple()"         echo "Parameters are '$*'"         until [ -z "$1" ]         do             echo "Processing parameter of: '$1'"             if [ ${1:0:1} = '/' ]             then                 tmp=${1:1} # Strip off leading '/' . . .                 parameter=${tmp%%=*} # Extract name.                 value=${tmp##*=} # Extract value.                 echo "Parameter: '$parameter', value: '$value'"                 eval $parameter=$value              fi              shift         done     }      I need some help after `if [ ${1:0:1} = '/' ]` in the code written above and my questions are:   1. What is happening in the if statement?   2. What does ":" symbolises here?


title: Non root user performing root actions without sudo/ SetUID in shell script limitation

text: If I have a script that does some root actions called /sbin/root_stuff and I wanted user bob to have this script run as his shell when he logs in via SSH, I know I can set his shell to a script that runs `sudo /sbin/root_stuff` and then edit sudoers to allow this without a password for user bob. Shell scripts don't support SetUID root as far as I know, are there any other supported methods and/or best practices to accomplish this type of thing without using sudo? Linux kernel 2.6 or higher with Bash 4.x.


title: Setting readline variables in the shell

text: I read in the `man` page, that you set readline parameters on an off or to a value by using               set var value Is this the same as the `set` builtin, and how do you set the variables once `inputrc` has already been read and the shell is running?


title: What happens when you background a function which calls another function?

text: Question says it all on the tin. Can someone explain to me what goes on here ? I'm trying to find out how to background a process in a script that calls another function and reliably terminate it when ready. Wondering whether I will have to move it all into one function ?               function dosomething {         while :         do         printsomething "doing something"         done     }          function printsomething {         echo $@     }          function otherfunction {         dosomething &         TMP_PID=$!     }          function killsomething {         quit_test=`ps -p "$TMP_PID" | sed '1d' | awk '{print $1}'`         if [ "$quit_test" != "" ] ; then             (kill $TMP_PID >/dev/null)         fi     }          ## MAIN              TMP_PID=""         echo "starting program"         otherfunction         sleep 5s         killsomething


title: How to demux audio and know what type it is?

text: How to demuxed audio and know what type it is? When muxing an audio into a video, ffmpeg, mencoder, etc require to know what the audio's encoding is. The encoder typically uses the file name's extension as the "parameter". eg. .aac However, when the audio to be muxed is being demuxed from another video, how can I determine the encoding type in a script?   The closest I've come to find this magic piece of info is to get the codec's 4CC string (four character code), but that is not suitable. *(UPDATE: It seems that this is not the 4CC code, and is actually mplayer's designation of _"family of codec"_ .. listed via: `mplayer -afm help`               /usr/share/mplayer/midentify.sh $audio |sed -nr 's/^ID_AUDIO_CODEC=(.*)/\1/p')"      My output video uses an MP4 container, so I need to know which format the input audio is, and transcode if need be... and in any case it requres the audio encoder _type_ , not the code output by the above command. Even demuxing seems to require foreknowledge or the codec type! I've tried a generic dump, using `mplayer -dumpaudio $audio`, but the output doesn't play even if I manually add the appropriate suffix.


title: Mac Terminal: Scroll up and down in screen mode

text: I am in `screen` mode and I am outputing results that are too long to read through even using `Ctrl+a` \+ `[` \+ `Up / Down Arrow Key`. Is there a way that I can scroll up and down using the mouse in `screen` mode ? What should I put into the `.screenrc` ?


title: Tab and complete

text: Is the key binding for tab to complete in the readline settings set implicitly. Because when I outputted               bind -q complete      I got this in return               complete can be invoked via "\C-i", "\e\e".      Thanks in advance :-) Interestingly when I typed               bind -u complete      tab stopped working


title: Installing centos and freebsd with serial console

text: I am trying to install Centos 5.7 and FreeBSD 8.2 on KVM with serial console access. This is what I used:               sudo virt-install -n freebsd -r 1024 --vcpus=2      --os-type unix --accelerate -v      --disk /var/kvm/installation-disks/freebsd8.2.img,size=10      --nographics --network user      --cdrom=/var/kvm/cd-images/FreeBSD-8.2-RELEASE-amd64-disc1.iso      -x console=ttyS0,115200      In both cases I get stuck once the serial console is loaded, which becomes non-interactive and this is what I get:               Creating domain...                                                 0 B 00:00      Connected to domain freebsd     Escape character is ^]      Centos fails to provide a serial console because its bootloader loads an image (which serial console cannot display) and freebsd fails for some other reason. The method specified here failed as well. So, do these OS's have pure text vm-friendly installers? Or is there any other way to install them with normal installation ISO's? **EDIT 1:** I was able to install centos with this `-l http://mirrors.ecvps.com/centos/6/os/x86_64/` The mirror directory should have a `.treeinfo` file and only then a pure text based installation can be done. Are there such mirrors for freebsd? Googling didn't help me. P.S. Centos installation was successfull, but post-installation reboot failed to get the serial console back.


title: Does Debian guest need linux headers to install Virtualbox guest additions?

text: **Disclaimer, I'm fairly new to Linux ~2 years at home and, mostly, have only used ubuntu. I have salix (14.0) installed as host and would like to setup a debian(Squeeze) guest. In the process of installing Virtualbox on the host, it turned out I needed to compile the linux headers. In the process of that I needed to download the source from salix's repostory as it doesn't come with the iso, I noticed this was downloaded to /usr/src/. The debian vm is up and I can interact within it fine but I've been unable to network it to the salix host (I've tried bridged and some other options after looking for more info online). Its resolution is also much smaller than I would expect having edited its xml config file. These issues make me suspect that the guest additions are not installed, trying to install them gives me no feedback (probably something in /var/logs but I can't check atm). I noticed that it does not contain the source code in /usr/src Do I need to compile debian source on the guest? Would I actually need the linux source instead, I'm a little confused on that point? How do I get the source to the guest (can't mount folders on guest without additions or ssh into it without internet to install ssh server) Where would I download the debian source from, I can't find it on the website, and don't have another debian instance to run aptitude install linux- source-3.2 Really it seems like I'm overcomplicating this and perhaps missed some simple step. Is there a good guide for setting up Virtualbox or similar managers with non-ubuntu guests? Information on this seems to get sparse quickly.


title: How to install a thermal printer on ARM embedded linux using CUPS

text: I need to install a thermal printer (MY PRINTER) on my ARM linux embedded system. I have a board with an ARM Cortex A5 Atmel SAMA5D34 processor and linux kernel 3.10. With the buildroot I have included CUPS for the printing. Unfortunately I have noticed that some producers of thermal printers only release Intel 32/x64 CUPS drivers for Linux. Where can I get drivers for embedded ARM linux?   Is CUPS alone enough for printing or do I need a driver specific to the printer model?


title: xpra attach failure

text: After entering the command to attach to an xpra session:               xpra attach ssh:SERVERNAME:100      we get this response:               connection lost: empty marker in read queue     Connection lost      What does it mean? We can see the xpra session running on the server.


title: Cannot cat or grep contents of file

text: I'm on Debian Jessie. When I open a new textfile with `mousepad` and save it, then modify it with `vim` and save it again, I cannot print or `grep` the contents of it anymore. If I do `cat file`, nothing is shown in the terminal. If I open `file` with `vim` or `mousepad`, I see the contents. If I write the file with `vim`, the following is shown in the status line:               "file" [mac] 2L, 5C written      While for a "normal" file, I only get               "file" 2L, 5C written      I thought the `[mac]` had something to do with the formatting of the new lines, so I tried to run:               dos2unix file      but the problem persists. Does anyone know what exactly is wrong with the file?


title: How to make a portable Linux app?

text: I'd like to make a "portable" version of Emacs 24.3. I am using some Debian 7 systems, where I don't have root access. Since Debian 7 is missing Emacs 24, I'd like to build a portable version of it, which I can carry with me on a USB thumb drive. My specific questions are:   1. Can I make the install prefix flexible, or is it hardwired by `configure --prefix=...`?   2. How can I bundle all neccessary `.so`-files with the installation?


title: Find hostapd's access point SSID

text: I have a Linux machine operating as an access point using hostapd and dnsmasq. The AP is working fine (the device is `wlan0`), but I am having difficulty finding the SSID of the AP for monitoring purposes. I am really using the nl80211 Netlink interface, but `iw` is a useful proxy here. The output of `iw dev wlan0 link` is:               Interface wlan0         ifindex 2         type AP         wiphy 3      And `iw dev wlan0 link` is:               Not connected.      However, I'd like to find out the SSID of the running AP on this device (without having to ask the program that set it up in the first place).


title: Problem installing input-wacom-0.20.0

text: I run Linux Mint 14. I bought a wacom intuos pen&touch small tablet and my old driver (don't know which one, someone installed it for me...) does not support it.   I did a little research and found input-wacom which I tried to install (I'm pretty new to linux but I found some clear instructions on http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Input-wacom . Everything went right, but when I tried to copy the `.ko` files with the following commands               sudo cp ./<kernel version>/wacom.ko /lib/modules/`uname -r`/kernel/drivers/input/tablet     sudo cp ./<kernel version>/wacom_w8001.ko /lib/modules/`uname -r`/kernel/drivers/input/touchscreen      the terminal returned nothing. I went to my `/lib/modules/2.5.0-17-generic/kernel/drivers/input/tablet` directory and noticed that there already was a wacom.ko file, but it's older than the wacom.ko file in the input-wacom(...) folder. So I have the old driver installed, but I can't find a way to uninstall it nor replace the `wacom.ko` files--when I use the command, nothing happens, and when I try to replace it using the explorer, I don't have the right permissions to do it. So here I am, stuck with two drivers, and of course my tablet is not working. How can I solve the problem?


title: How can I track changes in man pages?

text: I want to know about changes of `man` pages after updating software or a operating system completely. Or get a list of revisions for a specified `man` page. This will not reread the full `man` page again and read only the changes. I would place the directory `/usr/share/man` under VCS, but there are archive files. However, archives are not a big problem, I extract to a temporary directory. Is there a more elegant ready solution?


title: How do I profile the kernel?

text: I'm having issues with a kworker process during system boot and I'd like to get such a nice call graph like Linus Torvalds posted here. How would I do this?


title: The most *robust* remote file copy?

text: How would I go about to copy files over a very unstable internet connection? Sometimes, the connection is lost, other times the IP of one machine or the other machine is changed, sometimes both, though dynamic DNS will catch it. Which tool or command would you suggest? I've heard that `rsync` is pretty nifty in copying only the diff, but that means a lot of work either restarting it again and again or putting it into a while or cronjob. I was hoping for something easier and foolproof. # Addendum: It's about copying every now and then a couple of directories with a few very large files >5GB in them from one site to the other. After the copy, both are moved locally to different locations. I can't do anything on the networking level, I wouldn't have the knowledge to do so. I'd rather not set up a web server in order to use wget. That is not secure and seems like a circuitous route. I have already established an SSH connection and could now rsync, as rsync is already installed on both machines (I wouldn't be able to get an rsync daemon up and running). Any hints on how I could make an **intelligent rsync over ssh** so that it tries to continue when the line is temporarily cut? But rsync won't be the problem when the ssh connection dies. So something like this (http://serverfault.com/questions/98745/) probably won't work:               while ! rsync -a .... ; do sleep 5 ; done      Any ideas? Thanks a lot! Gary


title: Graphically ask for password in a bash script and retain default sudo timeout setting

text: The `sudo -A` (SUDO_ASKPASS) option apparently causes sudo to lose the timeout (e.g., timestamp_timeout) setting. I want to use the sudo -A option but I want to retain the default timeout (e.g., 15 minutes on Ubuntu) in a bash script. I want to ask for the user's password securely and in a GUI dialog, but I only want to prompt once for my script (not 50+ times). Furthermore, I do not want to run my entire script as the root user because I just think that is a bad idea. Furthermore, files created by my script have the wrong ownership in this case. The sudo -A option would work for me if it retained the default timeout. From the sudo manual: Option: ‑A Normally, if sudo requires a password, it will read it from the user's terminal. If the ‑A (askpass) option is specified, a (possibly graphical) helper program is executed to read the user's password and output the password to the standard output. If the SUDO_ASKPASS environment variable is set, it specifies the path to the helper program. Otherwise, if /etc/sudo.conf contains a line specifying the askpass program, that value will be used. For example:               # Path to askpass helper program     Path askpass /usr/X11R6/bin/ssh-askpass      BTW, kdesudo has this same problem -- it requires the password every time it is called, even if just a second later in the same script. I'm using Kubuntu 12.04 64 bit. Here are full working example of all parts of the solution. It consists of a bash script, a "myaskpass" script as suggested here, and a ".desktop" file. The whole things should be 100% GUI (no terminal interaction at all), so the .desktop file is essential (afaik).               $ cat myaskpass.sh      #!/bin/bash     kdialog --password "Please enter your password: "     exit 0               $ cat askpasstest1.desktop      #!/usr/bin/env xdg-open     [Desktop Entry]     Comment=SUDO_ASKPASS tester1     Exec=bash /home/user/test/askpasstest1.sh     GenericName=SUDO_ASKPASS tester1     Name=SUDO_ASKPASS tester1     NoDisplay=false     Path[$e]=     StartupNotify=true     Terminal=false     TerminalOptions=     Type=Application     Categories=Application;Utility;     X-KDE-SubstituteUID=false     X-KDE-Username=      And a test script itself. This one will ask for your password twice when using this solution.               #!/bin/bash          sudo -k     SUDO_ASKPASS="/home/user/test/myaskpass.sh" sudo -A touch filemadeas_askpass1     touch filemadeas_regularuser1     SUDO_ASKPASS="/home/user/test/myaskpass.sh" sudo -A touch filemadeas_askpass2     touch filemadeas_regularuser2     ls -la filemadeas* > /home/user/test/fma.log     kdialog --title "Files Created" --textbox /home/user/test/fma.log 640 480     sudo rm filemadeas_*     rm fma.log          exit 0


title: Xeon Phi swap from host's tmpfs

text: I want to use swap on Xeon Phi (mic0) using RAM from the host On the host:               # free -m                  total       used       free     shared    buffers     cached     Mem:        129022      60312      68710          0       1092      50078     -/+ buffers/cache:       9141     119880     Swap:            0          0          0      Running this command on the host:               # mount -t ramfs ramfs /mnt/ramfs/     # dd bs=512M if=/dev/zero of=/mnt/ramfs/ram1 count=48     # echo /mnt/ramfs/ram1 >/sys/class/mic/mic0/virtblk_file     # df -a | grep ramfs     /mnt/ramfs              0          0          0    - /mnt/ramfs     # vim  /etc/mpss/default.conf # add:     ExtraCommandLine "vfs_read_optimization=on"      ExtraCommandLine "vfs_write_optimization=on"     # service mpss stop     # micctrl --resetconfig     # service mpss start      Then run on the mic0:               # modprobe mic_virtblk      # mkswap /dev/vda     # swapon /dev/vda     # free -m                  total       used       free     shared    buffers     cached     Mem:          7697        574       7123          0          0        145     -/+ buffers/cache:        428       7268     Swap:        24575          0      24575      How can i ensure that the swap already connected on the host's RAM? And if it's already connected to host's RAM, why it's become so slow when using swap on the Xeon Phi? the testing code:               #include <stdlib.h>        #include <stdio.h>     #include <string.h>     #include <time.h>          long timediff(clock_t t1, clock_t t2) {         long elapsed;         elapsed = ((double)t2 - t1) / CLOCKS_PER_SEC * 1000;         return elapsed;     }          int main(int argc, char** argv) {         clock_t t1, t2;         int max = 100;         int mb = 0;         int size = 256;         char* buffer;              if(argc > 1)             max = atoi(argv[1]);              t1 = clock();         while((buffer=malloc(size*1024*1024)) != NULL && mb != max) {             memset(buffer, 0, size*1024*1024);             ++mb;             t2 = clock();             printf("Allocated %.2f GB in %ld ms\n", mb * size / 1024.0, timediff(t1, t2) );             t1 = t2;         }           return 0;     }      compile using: `icc swaptest.c -o swaptest -mmic` the result:               # ./swaptest      Allocated 0.25 GB in 260 ms     Allocated 0.50 GB in 269 ms     ...     Allocated 6.75 GB in 269 ms     Allocated 7.00 GB in 260 ms     Allocated 7.25 GB in 470 ms     Allocated 7.50 GB in 1819 ms     Allocated 7.75 GB in 2060 ms     Allocated 8.00 GB in 2420 ms     Allocated 8.25 GB in 2820 ms     Allocated 8.50 GB in 2750 ms     Allocated 8.75 GB in 2300 ms     Allocated 9.00 GB in 1380 ms     Allocated 9.25 GB in 1530 ms     Allocated 9.50 GB in 3400 ms     Allocated 9.75 GB in 3800 ms     Allocated 10.00 GB in 3940 ms     Allocated 10.25 GB in 3579 ms     Allocated 10.50 GB in 5050 ms     Allocated 10.75 GB in 5029 ms     Allocated 11.00 GB in 5130 ms     Allocated 11.25 GB in 4770 ms     Allocated 11.50 GB in 3719 ms     Allocated 11.75 GB in 2300 ms     Allocated 12.00 GB in 3619 ms      and so on.. compared to on Host system:               $ ./a.out      Allocated 0.25 GB in 140 ms     Allocated 0.50 GB in 170 ms     Allocated 0.75 GB in 160 ms     Allocated 1.00 GB in 160 ms     ...     Allocated 23.75 GB in 130 ms     Allocated 24.00 GB in 130 ms     Allocated 24.25 GB in 130 ms     Allocated 24.50 GB in 130 ms     Allocated 24.75 GB in 130 ms     Allocated 25.00 GB in 120 ms      when below swap: 256MB in 269 ms is about 951MB/s when using swap: 256MB in 5.13 seconds is about 48.7MB/s, its much slower than benchmark that shown on https://software.intel.com/en- us/blogs/2014/01/07/improving-file-io-performance-on-intel-xeon-phi (at least ~360MB/s), is this behavior intended? I'm using `icc (ICC) 14.0.2 20140120` (parallel_studio_xe_2013_sp1_update2) and `mpss-3.2.1` for Xeon Phi 5110P series (rev 11)


title: Create WiFi AP with LXDE

text: Using the network manager that comes with LXDE, is it possible to create a Wireless Access Point/Hotspot? That is, instead of the laptop connecting to an AP, it creates the AP so other devices can connect to it? I tried with "Create new wireless network...", I create one and then "connect" to it from the laptop, but my phone doesn't detect it as an AP, even though it's very close to the laptop. What is the correct way to do it? My OS is Debian Wheezy.


title: Headlessly Compiling and Uploading Arduino Programs on an armhf Platform

text: I'm currently running my Hardkernel ODROID U2 with the ODUINO One (Arduino Uno R3 & additions) in a headless setup and connect to the ODROID U2 via SSH over LAN. It is running Debian 7.1 armhf and got all major libraries that are needed to compile software, but no X-Server is installed. When I try to start the Arduino work environment via the console command `arduino`, it spits out a Java exception telling me that I don't have an X-Display. How would I headlessly compile and upload Arduino programs if not through the `arduino` command?


title: How to print top five highest numbers from a column?

text: I have a text file with four columns. I need to read till end of file and print the highest number from column3 (top 5 values) along with column 1. **input.txt**               xm|340034177|ref|RT_235820.1|   139697  192 0     xm|161622288|ref|RT_340093.1|   153819  2607    0     xm|75755638|ref|RT_557407.1|    153821  1937    0     xm|108773031|ref|RT_678101.1|   161452  1688    0     xm|30352011|ref|RT_784766.1|    150568  105 0      **output.txt**               xm|161622288|ref|RT_340093.1|   2607     xm|75755638|ref|RT_557407.1|    1937     xm|108773031|ref|RT_678101.1|   1688     xm|340034177|ref|RT_235820.1|   192     xm|30352011|ref|RT_784766.1|    105