title: What is the sequence loading linux kernel module on startup? How priority is set to them?

text: I have a Linux kernel module which I compiled dynamically. How is it added to startup? There are lot of `.ko` files in `/lib/modules`. How is priority set for loading these modules?


title: Add blinking network-monitor icon to GNOME / XFCE

text: I'd like to see if I have incoming or outgoing network traffic via a little blinking network-monitor icon in my system tray, similar to the network system tray icon in Windows XP and Android. I would like to replace that static icon that is used by default. Is there a software package that can do this?


title: Automate file transfer from Windows to Unix

text: I have the following situation: users update `csv`/`txt` files on daily basis on Windows. I use those flat files as input for my Oracle scripts which is on Unix. I need help on script/method of transferring those flat files from Windows to Unix. My Unix shell scripting and Window batch coding is ok.


title: Xdebug not working over a reverse shell

text: I've opened a reverse shell to my remote server to tunnel port 9000 to my local machine like this `ssh -R 9000:localhost:9000 you@remote-php-web- server.com` but but it doesn't work. The reverse shell seems to work because I can access my remote machine but `netstat -an` on my virtual machine list this line:                tcp        0      0 0.0.0.0:9000            0.0.0.0:*               LISTEN           What does this mean? For `xdebug` to run I need `127.0.0.1:9000 LISTEN`? Why doesn't it work in my VMware? When I use Linux it works? In VMware I've forwarded port 9000 to my host because I wanted to debug from my host, too?


title: How to get a list all the "aliases" of a file (including of type directory) efficiently?

text: How can one get the list of all the aliases of a file (including of type directory) efficiently, given that a file:   1. may have multiple hard links, multipe soft links, multi-level soft links    2. may be present under a directory which is mounted at another location in the same filesystem   3. may be present under a directory that has link(s) pointing to it; again the links having features mentioned in 1 Could a possible solution be using inodes?


title: Where can I find storage integrity (write/read) test tools?

text: I am in need of tools to verify data integrity of local harddrives, usb- drives, etc. I am looking for a solution like the famous www.heise.de/download/h2testw or something that is at least common within repositories. _(h2testw writes a specific datastring over and over onto the medium, then reads it again to verify if it was written correctly and displays write/read time/speed.)_ I am not looking for               dd if=/dev/random of=/dev/sdx bs=1k && dd if=/dev/sdx of=/dev/null bs=1k      since it won't verify if everything was written correctly. It is only a test if read/write is successful to the device. So far, I'm not too happy with               badblocks -w -v /dev/sdx1      either, since it seems very slow, and I don't know what it exactly writes, and if it considers wear-leveling on flash media. There is a program named F3 http://oss.digirati.com.br/f3/ that needs to be compiled. Designed after h2testw, the concept sounds interesting, I'd just rather have it a pre-packaged binary.


title: AWK - change the file name (special characters)

text: I have two files:               ~/Pulpit/kot$ find . -name "*jpg" -printf "%f\n"     1.jpg     `[~!($%^_&*){.}\___"`]`1.jpg      I want to change their name to:               _home_pic_Pulpit_kot_1.jpg          _home_pic_Pulpit_kot_`[~!($%^_&*){.}\___"`]`1.jpg      I use this command:               ~/Pulpit/kot$ find $PWD -name "*.jpg" | mawk '{c=$0; gsub("/", "_", c)}{system("echo mv -v " $0 " " c)}'     mv -v /home/pic/Pulpit/kot/1.jpg _home_pic_Pulpit_kot_1.jpg     /bin/sh: Syntax error: word unexpected (expecting ")")      Thank you for your help. **EDIT:** This command works.               find $PWD -name "*.jpg" -exec bash -c 'mv "$0" "${0//\//_}"' {} \;      How to do the same with mawk? **EDIT- 1:** This solution works:               find $PWD -name "*.jpg" | mawk 'a=$0{gsub("/", "_")}{system("mv -v '"'"'" a "'"'"'  '"'"'" $0 "'"'"'")}'      * * *               find $PWD -name "*.jpg" | mawk 'a=$0{gsub("/", "_")}{system("mv -v '\''" a "'\'' '\''" $0 "'\'' ")}'      * * *               find $PWD -name "*.jpg" | mawk 'a=$0{gsub("/", "_")}{system("mv -v \047" a "\047 \047" $0 "\047 ")}'      Thank you all for your help.


title: Not able to set password in ArchLinux

text: I logged in as root and created a new account:               # useradd -d /home/onie -m onie     # su onie      Now I try to set the password for `onie` myself using the `passwd` command, but it's asking for my current password when I don't have one!


title: How to find out which devices require manually installing a specific driver?

text: Most of time, you don't need to install drivers in Linux manually, since it already has it installed. But there must be some times when Linux does not have the right driver for a device. How can I find out which device needs to have a driver installed manually? In Linux, is there some mechanism which, like on Windows, works to make the device function in a compatible mode? If so, how can I know which device works all right, and which device works in a compatible mode?


title: How can I tune Ubuntu for running from a flash drive?

text: I feel like this is a bit of a duplicate of this other question about making caching more aggressive, but I tried a lot of the suggestions there and I just can't figure out why I'm having trouble. My scenario is that I've got Ubuntu 12.10 on a little USB flash drive I keep on my keychain. (I use it for times when I need to rescue someone's PC or when I want to have my own desktop with my own settings and bookmarks, etc. no matter what PC I find myself in front of). The problem is that the system is horribly slow. Now, the USB flash drive is fairly slow, so I know I have to make some concessions. However, I'm currently trying to run it on an i7 machine with **8GB** of RAM. "free" and "top" both report that the system is using less than **2.7GB**...                         total     used     free   shared    buffers   cached     Mem:       7712     2742     4969        0        164     1838     -/+ buffers/cache:   740     6972      Swap:         0        0        0      ... and "df" is telling me that the filesystem is using **4.4GB**. So, there _should be enough remaining RAM to cache the entire filesystem_. Based upon that, I would think that the only I/O latency I experience should be limited to the time it would take to read the files into the cache the first time. After that, I wouldn't think it would need to fetch them again, and all writes could just be cached in the background, so I shouldn't have to wait for those at all. (Of course, the big wait would probably be when I wanted to shut down, and 4GB of dirty cache needed to be written to the flash). But, that's not what I'm experiencing at all. Instead, everything is agonizingly slow. Switching the focus to other windows results in the all of the windows going "dim" for about 10 seconds (what does the window-manager need, for this task, from the disk, that it didn't surely write there? And if it wrote it earlier in the windowing session, why isn't in the cache?), and doing something like using apt-get to install something takes several minutes _after_ the .deb file gets downloaded (how is that .deb not already in the cache? How are the new files from the package not being written _to_ the cache? And it's not that the installer is having to go read /var/lib/dpkg/available or /var/lib/dpkg/status because this happens to _each_ package even when I try to install a bunch at once). I've tinkered with `/proc/sys/vm/vfs_cache_pressure`, `/proc/sys/vm/swappiness, /proc/sys/vm/dirty_writeback_centisecs`, `/proc/sys/vm/dirty_ratio...` all without any significant effect. I'm clearly unclear on how Linux disk caching works. So, fill me in. _Can_ the kernel be configured to (provided it's got enough RAM for it):   1. Read files from disk _once_ and then keep them cached, and   2. Cache all writes and just get them written to the disk during idles (and if that's 20 minutes from now, fine)? And, if it _can_ do this, what am I missing?


title: opkg can't find apache

text: I'm trying to get a LAMP stack running on my BeagleBone Black, but I'm getting foiled early: opkg can't seem to find the apache2 package. According to the Angstrom page, it should exist: http://www.angstrom- distribution.org/repo/ (search "apache" for confirmation) ...but when I run opkg, it can't find it. This is what I see:               root@beaglebone:~# opkg install apache2     Unknown package 'apache2'.     Collected errors:      * opkg_install_cmd: Cannot install package apache2.     root@beaglebone:~# opkg list | grep apache2     php-fpm-apache2 - 5.3.19-r4.0.1 - php version 5.3.19-r4.0      ...and naturally, that's after running opkg update.


title: UEFI bootable iso of own Linux distribution

text: I have a Linux distribution that I want to create an ISO of, so I can put it onto a CD or USB. I have earlier used Remastersys and Relinux to create my own linux distributions, but the ISO they make are only bootable with legacy. Are there any software (payed or free) that's able to create an EFI bootable iso? Or how else can I make this ISO?


title: Small update.. Now cannot download/update

text: Earlier today I was ssh'ing into my box and discovered that the internal IP had changed from what it was, I decided I wanted to make this static and found a tutorial (kind of) how to: > >     nano /etc/network/interfaces >   And then changed the contents to this:               auto lo eth0     iface lo inet loopback     iface eth0 inet static        address 192.168.0.11        netmask 255.255.255.0        gateway 192.168.0.200      (I wanted my IP to be static at this). Now whenever I try to update, or install "git" using: > >     sudo apt-get update >   I keep getting the error like so:               Err http://archive.raspberrypi.org wheezy InRelease                                             Err http://mirrordirector.raspbian.org wheezy InRelease                                         Err http://archive.raspberrypi.org wheezy Release.gpg                                      Temporary failure resolving 'archive.raspberrypi.org'     Err http://mirrordirector.raspbian.org wheezy Release.gpg                                  Temporary failure resolving 'mirrordirector.raspbian.org'     Reading package lists... Done                      W: Failed to fetch           http://mirrordirector.raspbian.org/raspbian/dists/wheezy/InRelease       W: Failed to fetch      http://archive.raspberrypi.org/debian/dists/wheezy/InRelease            W: Failed to fetch        http://archive.raspberrypi.org/debian/dists/wheezy/Release.gpg  Temporary      failure resolving 'archive.raspberrypi.org'          W: Failed to fetch      http://mirrordirector.raspbian.org/raspbian/dists/wheezy/Release.gpg       Temporary failure resolving 'mirrordirector.raspbian.org'      I am connected to the internet, and this only seems to be happening since I updated the particular file. Hope someone can help UPDATE:               Kernel IP routing table     Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface     0.0.0.0         192.168.0.200   0.0.0.0         UG        0 0          0 eth0     192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0 eth0               eth0      Link encap:Ethernet  HWaddr b8:27:eb:87:59:47                 inet addr:192.168.0.11  Bcast:192.168.0.255  Mask:255.255.255.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:4707 errors:0 dropped:50 overruns:0 frame:0               TX packets:3488 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:334663 (326.8 KiB)  TX bytes:390376 (381.2 KiB)          lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               UP LOOPBACK RUNNING  MTU:16436  Metric:1               RX packets:708 errors:0 dropped:0 overruns:0 frame:0               TX packets:708 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:67655 (66.0 KiB)  TX bytes:67655 (66.0 KiB)


title: Debian package available for ia64 but not for x86_64?

text: I want to download `aptitude` to build it from source on my 64bit machine.   It is a Thinkpad with a normal x86_64 CPU, nothing special. The download page only has:   * alpha    * amd64   * armel   * armhf   * hppa    * hurd-i386   * i386   * ia64   * kfreebsd-amd64   * kfreebsd-i386   * m68k    * mips   * mipsel   * powerpc   * powerpcspe    * ppc64    * s390   * s390x   * sh4    * sparc   * sparc64    * x32  I find it hard to believe x86_64 is not available.   Am I missing something? Note: I believe ia64 is for Itanium, so not for me.


title: 802.11ac Support in Fedora 20 (or any latest linux distro)

text: I bought a new HP Envy jt100 laptop (with an upgraded wireless card -- 802.11ac). The default OpenSUSE distro doesn't recognize the wireless card! I'm going crazy trying to figure out how to fix it, but meanwhile I want to ask the following: Do you know which Linux distro supports 802.11ac out of the box? Wireless Card: Broadcom Corporation BCM4352 802.11ac Wireless Network Adapter (rev 03)


title: How to write a job in Perl?

text: I have had very minimal experience in writing jobs. A long time ago, i had written a very small simple java job for reading and writing files using `tasklet` in java. Now I have to learn how to write jobs in `Perl`. Normally, in such cases , i google out the information, but i am not getting any information on how to write jobs in perl in internet searches. Can anyone please let me know of any internet resources / books, which i can download from the internet for learning perl jobs. I have a little knowledge in Perl.


title: Autocompletion and coloring not working, when using ssh in emacs shell

text: I'm connecting to remote server using `emacs shell`. Emacs shell displays directory listings with proper coloring and auto completion when working with local machine. But when I use `ssh` the autocompletion and coloring are gone. Same holds for `eshell`. Is there a way to fix this without resorting to `M-x term`? Because emacs keys don't work in `term` which is a real productivity killer. There is a similar question here. But that is rather about emacs in SSH instead of SSH in emacs.


title: Meaning of hard disk drive software partitions?

text: I would like to know   1. What is the exact meaning of primary partitions? Why it is named so? and why it is restricted to 4?   2. What is meant by extended partitions? Why it is named so? and what is the possible number of extended partitions in the hard disk?   3. What is mean by logical partitions? Why it is named so? How it is calculated? What are the advantages of these software partitioning? Is it it possible to install OS(Linux/windows) in all partitions ? If no, why?


title: Printing (saving) the last bash input command

text: How can I get the last executed command from bash? I know that !!:p prints the last command, but it seems I can't use that anywhere except the bash prompt. I tried `echo !!:p` but it prints               ~/Downloads$ pwd     Downloads     ~/Downloads$ echo !!:p     echo pwd      I want to use this inside the `PROMPT_COMMAND` variable so I need to get it as a string so I can just print it out. Is there an easy way to do this? Am I looking in the wrong place? I guess I'm not clear. I need to store the last command run so I can re- display it after the output and before the next prompt. For example this is what I want the output to look like:               ~/Downloads$ pwd     Downloads          pwd     ~/Downloads$      I'm doing this my changing my prompt in my `.bashrc` file               PROMPT_COMMAND='echo -en "\033[38;5;2m"!!:p"\033[0m\n"'     PS1='\W\$'      But !!:p only works correctly from the bash prompt. So how can I store the last command so that I can reprint it later?


title: What strings should I look for in /var/log/auth.log?

text: I wrote a bash command to scan `/var/log/auth.log` for messages occurring on the current day indicating unauthorised access. Currently it just fetches messages matching `BREAK-IN` and `unauthorized`. What other strings should I search for in `/var/log/auth.log` to keep tabs on unauthorized access? Here's the script for reference:               cat /var/log/auth.log|grep "$(date|awk '{print $2" "$3}')"|grep -E '(BREAK-IN|Invalid user|Failed|refused|su|Illegal)'      * * * ## Edit Here's the amended command based on Justins suggestions and what I found through Google               grep "$(date|awk '{print $2" "$3}')" /var/log/auth.log|grep -E '(BREAK-IN|Invalid user|Failed|refused|su|Illegal)'


title: Can you change mail accounts by recipient in mutt?

text: I have a pretty good mutt setup for dealing with multiple mail accounts (work and personal). I'd like to be able to have a `send-hook` that will change the account based on the recipient. I can do this with a `send-hook`, but I don't get back to the account that I was using before I sent the mail. Ideally, mutt would incorporate multiple accounts as a first-class feature, but I'm willing to hack it together if I can. Anyone doing this already?


title: How to disable Application Menu in XFCE?

text: I have just installed i3 as a Window Manager, and I feel the keyboard shortcuts and the integrated status bar are sufficient to manage my open applications, view the time, etc. In other words, I'd like to disable the Applications Menu that comes with XFCE. How should I do this? Under SETTINGS > PANEL I can remove all panels except for the principal one (Panel 1), which holds the Applications Menu, clock etc. I can only remove all elements inside, or put it on show/hide, but I do not see a way to permanently remove this. How can this be achieved?


title: Changing permissions

text: In the fedora docs they refer to owner and group owner as if both are owners of the file. The leads me to think that any member of a group which tries to change permissions of a file owned by that group will be allowed. Is this right, or can only the "owner" in it's most absolute sense change permissions? Example User foo group bar User pc group bar Can pc change a file creates by foo and group bar


title: How does one sync videos from banshee to 7th gen itouch

text: When I plug my ipod touch in and open Banshee, The itouch is recognized and sometimes I can play music I had previously synced from itunes but when I click the itouch icon the scroll bars only come up on the screen for music, podcasts and audiobooks but not videos. I think that it may not work because most of my videos are AVI or FLV. This leads to another question, is there some plugin that allows banshee to convert these formats on the fly and if not is there a way I can instruct banshee to sync only the duplicate videos that I have converted manually, Thank you for your input. P.S. my ipod model is A1367 and I am Running ubuntu 11.10 on a sony VAIO VGC-25LTE P. P. S. When I press sync three bars come up at the bottom left part of the banshee window and Banshee appears to synchronize all of the songs to my ipod, songs which fail to show up. Banshee also (only when syncronizing) does not recognize all of the songs synced by itunes.


title: Raid5, what could happen? Partition corruption, now what do I do?

text: First, I probably deserve this for not having a backup. My system was installed with Debian and Mint11. I recently installed Mint12 to play with. I expected all three to continue to work. I can no longer enter Mint11. I get an error saying it can't identify the specified partition. I think the cause is because in the fstab file I specified the id of the swap partition since mint11 had a tendancy to "change" drive designations. It's related to this question: Linux Mint: drives' map changing at reboot brings fstab error Now Disk utility doesn't recognize the partition Mint11 is installed on. It simply shows it as "Unknown". The drive is a raid5 on a dedicated controller. `fdisk -l` gives:                Disk /dev/sdc: 240.0 GB, 239997026304 bytes     255 heads, 63 sectors/track, 29177 cylinders     Units = cylinders of 16065 * 512 = 8225280 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x0000a3c7             Device Boot      Start         End      Blocks   Id  System     /dev/sdc1               1       24002   192794784   83  Linux     /dev/sdc2           24263       29178    39480321    5  Extended     /dev/sdc3           24003       24263     2093056   82  Linux swap / Solaris     /dev/sdc5           24263       28656    35288064   83  Linux     /dev/sdc6           28657       29178     4191232   82  Linux swap / Solaris      /dev/sdc1 is the primary mint11 partition. Is there a way to access or recover the data on that partition? I can live with not being able to boot to it so long as I can access the information on it. Thanks. Let me know if you need any further information. --update-- I tried using testdisk to recover the lost partitions but it said the partition could not be recovered. The exact error is: `The harddisk (248GB /223 Gib) seems too small! (< 315GB / 294 Gib) Check the harddisk size: HD jumpers settigns, Bios detection...` Before I do anything else, I'm running gddrescue:               ddrescue -vr /dev/sda1 /media/Backup/recovered_data_blocks.img gddrescue.log      This will give me a backup of the partition in case I mess up the actual one. I've also used Photorec to recover all the files on the partition. However that basically takes all the files and places them in arbitrary folders with arbitrary names. I'll be able to find some critical files but without structure or names much will be lost. At this point, I think I'm out of options. Does anyone have any other ideas? I hate bitter sweet irony, I know better then to allow myself to be in this position!


title: Is there a way to access Google Drive spreadsheet?

text: I'm using Linux Mint 16 Cinnamon. I tried `google-drive-ocamlfuse` and `grive`, but both of them can't access spreadsheet. `google-drive-ocamlfuse` shows this error: > Device or resource busy W hen it tries to access `.ods` file? Is there any alternative which can access? Actually I have many `.ods` Or `.xls` files which are to be shared with many different collaborators who can edit it. Up to this it is okay, it can be done using Google Drive . But now I have to use these files in Mathematica? So instead of Google Drive if there is any site which can edit Dropbox `.xls` files and save them, that would suffice for my job. Or if there is any other alternative for my purpose please let me know. I've read this one: Mount Google Drive in Linux?, but the question was asked two years before, so there may be new updates and my problem is also different from that.


title: File ID that doesn't change upon rename

text: I am trying to write a system utility script that will run as a cron job and capture file system statistics and environment settings in order to track as many changes as possible. Consider the following timeline               T0: there is a file /dir/fileX.txt     T1: job runs and captures every file and its stats (permissions, size, checksum etc), including /dir/fileX.txt     T2: mv /dir/fileX.txt /dir/fileY.txt     T3: job runs again and recaptures the file system.  But all it can tell is that fileX.txt was deleted and fileY.txt created      Is there some file ID that won't change if I rename the file that I can key all the files by rather than the name? That way, at T1 I would key the file but that ID and not the name and the file name would be just another attribute. At T3, I will be able to tell it is the same file but the name changed because the ID remains the same.


title: What is the basic difference between Arch and Gentoo Linux?

text: What is the difference between Arch Linux and Gentoo Linux? Their ideologies seem quite similar to me.


title: The shell command "top" shows which processes from the /proc directory?

text: The manual page states, > The top program provides a dynamic real-time view of a running system. It > can display system summary information as well as a list of processes or > threads currently being managed by the Linux kernel. The types of system > summary information shown and the types, order and size of information > displayed for processes are all user configurable and that configuration can > be made persistent across restarts. When running this command, it shows some processes having `pid`'s ranging from 1 onwards. And some other processes refreshing after some time interval. What kind of those particular processes are? On what criteria top shows these `threads` or `processes`?


title: Linus and Fedora

text: My friend to me that Linus Torvalds uses fedora to compile the kernel. Why does he prefer fedora over any other distribution (ex. Ubuntu)?


title: Generating file with ASCII numbers using /dev/urandom?

text: How can I generate 10 MB files from `/dev/urandom` filled with:   * ASCII 1s and 0s   * ASCII numbers between 0 and 9


title: Compiling the Linux kernel in Eclipse

text: I have a Mac running Snow Leopard and I know that I cannot compile the Linux kernel. I have used a Linux VM (virtualbox) to compile the kernel but I was wondering if I could compile it on Eclipse (galileo).


title: -p and -o comm doesn't work together?

text: I'm trying to get CPU usage of a process by, `ps -p 12990 -o comm=comm,pcpu` But that only print the command name (the process does exist), what's wrong with it?


title: Does loadavg affect CPU usage?

text: Does loadavg affect the CPU usage? Say I see a process consuming 60% of CPU time, both when loadavg (last minute) was 5 and 1, would it be the same?


title: Backup, without having to reinstall 3rd party programs?

text: Say I back up the `/` partition with `cpio` and the disk fails. Would I have to reinstall all third party programs if I used `cpio` to restore the `/` on a new disk? Or is backing `/` up enough to keep them installed. Or, is the only way to do this to clone the disk with `dd`? I don't have a disk large enough to clone the servers partitions, so cloning won't do.


title: Python failing to import winregistry

text: I'm trying to use `secretsdump.py`, which relies on `winregistry.py`. The error I'm getting is:               Traceback (most recent call last):       File "secretsdump.py", line 41, in <module>         from impacket import version, smbconnection, winregistry, ntlm     ImportError: cannot import name winregistry      I've used `sys.path` to see where python loads files from and copied `winregistry.py` to some of these directories, which made no difference. I'm using Kali Linux, a Debian based distribution. I've tried upgrading python, which had no effect. What else could I try to solve this problem?


title: .Xauthority file is empty

text: I have been trying to `ssh -X` to my cluster running OpenSUSE 11.2. It used to work well for me. But now I get this message:               X11 connection rejected because of wrong authentication.     Failed to open the X11 display!      So I tried to check the ownership and permission of the `.Xauthority` file using               sudo ls -al .Xauthority      and I get to see that the file is empty with size 0:               -rw------- 1 <my-user-name> users 0 2014-07-31 10:03 .Xauthority      When I log in with `ssh -Xv` I get the following when i try to open `xlock`               debug1: client_input_channel_open: ctype x11 rchan 3 win 65536 max 16384     debug1: client_request_x11: request from ::1 53267     debug1: channel 1: new [x11]     debug1: confirm x11     X11 connection rejected because of wrong authentication.     debug1: channel 1: free: x11, nchannels 2     Error: Can't open display: localhost:10.0      How would I fix this?


title: Terminal command (called not from SU) that would restrict process from writting to all directories but one?

text: We have an app `testApp`. We have a folder called `notRestricted` in the directory where we run app from. We want to limit access of the app to file system so that app could write only to that folder (we prefer to let it read from anywhere app can normaly read from). How to do such thing on Unix?


title: How to close any window in Awesome WM?

text: The shortcut to close individual applications completely depends on the application developer. Some examples:   * `Ctrl`-`q` for Firefox   * `Meta`-`F4` for Chromium   * `Ctrl`-`Shift`-`q` for GNOME Shell To close individual windows or sub-windows (tabs, dialog boxes) in applications all bets are off (`Esc`, `Meta`-`q`, `Ctrl`-`w`, mouse only). However, window managers can include global shortcuts which will generally do what is expected. **What are the global shortcuts to close _any_ window and/or application in Awesome WM?**


title: How disk IO priority is related with process priority?

text: I'm running software that overloads disk IO sometimes. I don't need fast response from that software, I need fast response from other applications, so I could set low process priority for that. I want to ask how process priority affects disk IO priority for a process. I tried a small experiment: I set low priority (in System Monitor under GNOME) for a process and checked IO priority with `ionice`. **Result:**               IO priority = 0 for normal process priority        IO priority = 4 for low process priority      But will this always work like this? Is IO priority always reduced when I reduce process priority?


title: How to find HDs associated with a mount point

text: I am running on Sun Solaris system. I would like to know the following   1. How to find the HDs associated with a mountpoint?   2. How to find all available HDs (those which are used as well as unused for the mountpoint)?   3. How can I find the IO controllers' usage for the HDs associated with a mountpoint? I am trying to find out if the IO controllers for the HDs associated with the mountpoints are handling too many requests forcing some other requests to wait.   4. How can I find the free space available on each available disk?


title: Auto-update on Scientific-linux 6.1 64bit

text: yum remove PackageKit*      what's next? I tried:               yum install yum-autoupdate      but I can't see any config file for it. How can I set the auto-update function* on Scientific-linux 6.1/GNOME? *want to make the auto-update completely invisible to the GUI users!! Does "yum-autoupdate" update packages if they fail at the GPG check?


title: Skype missing GPG key

text: I wanted to install Skype on Scientific Linux 6.1:               yum install alsa-lib.i686 dbus-libs.i686 e2fsprogs-libs.i686 expat.i686 fontconfig.i686 freetype.i686 glib2.i686 glibc.i686 keyutils-libs.i686 krb5-libs.i686 libcap.i686 libgcc.i686 libICE.i686 libpng.i686 libselinux.i686 libSM.i686 libstdc++.i686 libX11.i686 libXau.i686 libxcb.i686 libXcursor.i686 libXdmcp.i686 libXext.i686 libXfixes.i686 libXi.i686 libXinerama.i686 libXrandr.i686 libXrender.i686 libXScrnSaver.i686 libXv.i686 openssl.i686 qt.i686 qt-x11.i686 zlib.i686          vi /etc/yum.repos.d/skype.repo     [skype]     name=Skype Repository     baseurl=http://download.skype.com/linux/repos/fedora/updates/i586/     enabled=1     gpgkey=http://www.skype.com/products/skype/linux/rpm-public-key.asc     gpgcheck=1          wget http://www.skype.com/products/skype/linux/rpm-public-key.asc     rpm --import rpm-public-key.asc     yum install skype      But the Skype RPM public key link returns an `HTTP/404` (not found) error. Where is the GPG key for Skype? ### Update: So there is no GPG check when downloading Skype? OMG! Please say it's not true..


title: If I'm logged in as root, how do I restart mysql or apache with options?

text: I know the commands to restart/stop/start, but when I try to pass options it doesn't seem to work! CENTOS 6, MySQL 5.14               service mysql restart     service httpd restart      Then I tried this:               /etc/init.d/mysql --general_log /my/log/path.log      That doesn't work either (the error message says it doesn't have access) =/ **Update: Apparently I can't run`mysqld` as root because of security issues**


title: How to find out how many cores (including emulated via HT and such) are avaliable to user?

text: I wonder how to get how many cores (including emulated via HT and such) are avaliable to user via bash shell-script command?


title: What's the recommended way of copying changes with vimdiff?

text: When comparing files, and updating a source code repository, I like to use vimdiff. To copy changes made from one file to the other, I usually use a key sequence like this:-               Shift + V (select line)     k or j; { or }; Up or down arrow keys (select more lines)     y  (copy selected lines)     Ctrl + w, left/right arrow (move to other pane)     p (paste lines)      Vim, being the master of keyboard shortcuts, should surely have an easier way of performing this same task. Is there one? What do you use to manually update source-code changes?


title: Trouble booting server from GRUB prompt

text: I just installed CentOS 6.2 on my server but it keeps going to the GRUB prompt. I've never used Grub before but did some digging online. Looks like I have to run the `kernel` command before I can boot the system. However, the kernel command is not running. As I installed the OS I checked the box that said something like "Install boot loader on /dev/sda". The following is what I've done:               grub> find /vmlinuz-2.6.32-220.el6.x86_64        (hd1,0)          grub> root (hd1,0)          grub> kernel /vmlinuz-2.6.32-220.el6.x86_64 root=/dev/sda1          Error 27: Unrecognized command      I've tried it with and without the root=/dev/sda1, just /dev/sda, also tried a `ro` inserted in the middle but nothing works. I've read the docs but at a bit of a loss. Any suggestions?


title: 64-bit kernel, but all 32-bit ELF executable running processes, how is this?

text: The output from `uname`:               root@debian:~ # uname -a     Linux 5asnb 2.6.32-5-amd64 #1 SMP Mon Jun 13 05:49:32 UTC 2011 x86_64 GNU/Linux      However the `/sbin/init` executable shows up as 32-bit:               root@debian:~ # file /sbin/init     /sbin/init: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped      Other aspects of the system seem to contradict things as well:               root@debian:~ # echo $HOSTTYPE     i486          root@debian:~ # getconf LONG_BIT     32


title: Overwriting a Disk

text: Should I use:   * `find / -type f -exec shred -uvz -nX` or just good old   * `dd if=/dev/urandom of=/dev/sda` Is one faster or more secure than the other?


title: Clarification regarding behavior of shell script along with pipe

text: I need help understanding the behaviour of the following shell script.               #!/bin/bash     echo "First more"     more $1          echo "First echo"     echo $1          echo "Second more"     more $1      When I run the following command:               echo dir1 | bash script.sh      I get the following output               First more     dir1     First echo          Second more      Why does the `echo` and second `more` not get access to content of `$1`? When I run the following command:               echo dir1 | bash script.sh dir2      I get the following command               First more          dir1          *** dir2: directory ***          First echo     dir2     Second more          *** dir2: directory ***      `dir2` gets passed to all the commands, but more just prints `dir1` but considers `dir2` to be a directory. I am not able to understand this behaviour. Any guide would be helpful.


title: Power consumption monitoring problem

text: I used powertop v.2.1 under Ubuntu 12.04 but it missed the power est. column.It's the same situation as described https://bugzilla.redhat.com/show_bug.cgi?id=796068 and that bug is supposed to be fixed already.   I tried lm_sensors but it didn't give any voltage reading. Here's a log for sensors-detect and sesnors.   I am uncertain what caused the problem. I am running linux kernel 3.2.0-23-generic, ubuntu 12.04 distro on Lenovo thinkpad machine.   Are there any other linux utilty to monitor power consumption for different devices?


title: /dev/console points to tty0?

text: I've been trying to understand the /dev/console device, but there are a few things I'm not clear on:   1. What is the purpose of this device? From what I can gather it's just a place for the kernel to display messages, is that right?   2. The virtual terminal that is assigned as the console isn't allowed to have job control. Why? Is that just because the kernel is trying to stop you from running anything else in the place that it needs to print system messages?   3. For me, /dev/console seems to point to tty0, the current virtual console. I found this based on some simple testing and it seems to be a fairly common configuration. However, to me this indicates that tty0 should have job control disabled, which would mean that all consoles should have job control disabled, which would be bad. It's giving me a headache just thinking about it. Also, if tty0 is the console, then shouldn't I be getting kernel messages on the current terminal instead of just on tty1?


title: VPN on Fedora Linux?

text: I'm looking to install and setup a VPN on my Linux installation which is Fedora 14. At the moment the only one I know of is OpenVPN but I'm wondering if this the best option for Fedora or if Fedora offers other options that are better? EDIT: Definitely looking for free solutions :)


title: Script to let the user cancel a shell logout

text: I want to write a script to display a message and possibly cancel a logout from an interactive shell. This is because I often run background jobs in some of my shells and in the spur of the moment I logout from all, closing the running jobs. What I'm after is a script like:               # If there are running jobs     if [ -z "$(jobs)" ]; then         # Display messages, give choices, etc.         ...code...         # And finally, given some conditions (e.g. answers to questions, etc.)         cancel_logout     else         logout      Presumably, the above would go into `~/.bash_logout`.


title: How to tidy up the .keywords file on a gentoo system?

text: One can select testing packages on a `gentoo stable` system by adding a line with the following syntax to keywords list: `cat /etc/portage/package.keywords`               =dev-python/ipython-0.13.2 ~amd64     # and many lines later     =dev-python/ipython-0.14.1 ~amd64     # and many lines later     >=dev-python/ipython-0.13.4 ~amd64      This file will grow within the time and sooner or later one can not remember which lines are obsolete. **How can I tidy up the list with a script from time to time?** A line should be deleted,   * if the testing version is already stabilized    * >= was used for the same package   * = was used for the same package with smaller version number


title: How to remove multiple blank lines from a file?

text: I have some text-files I use to take notes in - just plain text, usually just using cat >> file. Occasionally I use a blank line or two (just return - the new-line character) to specify a new subject/line of thought. At the end of each sessions - before closing the file with ctrl-D - I typically add lots (5-10) blank lines (return-key) just to separate the sessions. This is obviously not very cleaver, but it work for me for this purpose. I _do_ however end-up with lots and lots of unnecessary blank lines, so I'm looking for a way to remove (most of) the extra lines. Is there a Linux- command (cut, paste, grep, ...?) that could be used directly with a few options? Alternatively, does anybody have an idea for a sed, awk or perl (well in any scripting-language really, though I'd prefer sed or awk) script that would do what I want? Writing something in C++ (which I actually could do myself), just seems like overkill... Case #1: What I need is a script/command that would remove more than two (3 or more) consecutive blank lines, and replace them with just two blank lines. Though it would be nice if it also could be tweaked to remove more than one line (2 or more) and/or replace multiple blank lines with just one blank line. Case #2: I could also use a script/command that would remove a _single_ blank line between two lines of text, but leave multiple blank lines as is (though removing one of the blank lines would also be acceptable). PS: Yes, I absolutely ought to learn advanced(?) sed and awk scripting, as well as perl... it's long overdue. But as I promised myself to do just that after reading a very good Linux-book back in 1995, I'm not that hopeful I will.


title: How do I find out what my ssh-key's finger print is?

text: I ask someone for their public key, and add it to my server. When they connect to the server for the first time, they will get the standard message in the form               The authenticity of host '[host]' can't be established.     # RSA key fingerprint is [fingerprint].      How do I find out why my key's finger print is, so I can provide it up front?


title: Openvz resource management

text: I have a couple of nodes ( which are not mine ) running one openvz kernel version -2.6.32-042stab092.2 specifications : processor model name : E5-2620 0 @ 2.00GHz Number of Processors : 24 RAM : 48G number of VPSs hosted on each : 23 each vps is assigned 1000 unit of cpu and a cpu limit of 400 each vps is assigned 1G of memory after some researching i have found that running on el6 kernel that means that each vps can take up to 1000/400 each cpu running intensive processes .. which means a total of 25% if the vps is running on maximum processing , am i right ? now i face a problem with high load , some of the vbs are running forums with plugins enabled and intensive mysql access . problem is whenever a VPS is causing a high load the whole node is also affected by it and the load average raise , which causes other VPSs problems .. slow them down why is this happening ? apart from resource management inside the vps it self , how do i prevent one vps causing load to not slow down the whole node and raising it's load average ? Thank you for your time


title: Filtering images according to file name, why?

text: When filtering the images using the below code, I also need to filter files. For example, _IMG_0079.JPG.JPG_ , when running the code below it's allowing files with additional `.JPG` to get filtered out, and I can't seem to discover why?   * Checking if the input is correct              if [ $# != 2 ]; then        echo "Usage: phar image_path archive_path" && exit;     fi        * This will create a destination dir if it doesn't exist              mkdir -p $2        * Statement which finds and copies and adds necessary suffixes to files              find $1 -iname IMG_[0-9][0-9][0-9][0-9].JPG -exec cp -b --suffix=.JPG      {} $2 \;      echo complete!        * Check and remove duplicate statement. It will compare the md5 of each file.                  shopt -s nullglob                       for file in "$2"/*          do           md5sum=$(md5sum < "$file")                   echo "-- Found: $file ($md5sum)"           for duplicate in "$2"/*     #loop to find/remove duplicates           do             [ "$file" = "$duplicate" ] && continue                   #comparison of 2 files             [ "$md5sum" = "$(md5sum < "$duplicate")" ] && rm -v                          "$duplicate"                  #removal of duplicates           done         done


title: awk + print line only if the first field start with string as Linux1

text: how to print the line in case the first field start with Linux1 for example:                 echo Linux1_ver2  12542 kernel-update  |   awk '{if ($1 ~ Linux1 ) print $0;}'      the target is to print the line , while the first field start with Linux1 example of lines:               Linux1-new  36352 Version:true     Linux1-1625543  9847     Linux1:16254 8467563       remark - space or TAB could be before the first filed


title: Basic sed command on large one-line file: couldn't re-allocate memory

text: I have a 250 MB text file, all in one line. In this file I want to replace `a` characters with `b` characters:               sed -e "s/a/b/g" < one-line-250-mb.txt      It fails with:               sed: couldn't re-allocate memory      It seems to me that this kind of task could be performed inline without allocating much memory.   Is there a better tool for the job, or a better way to use `sed`? * * * GNU sed version 4.2.1   Ubuntu 12.04.2 LTS   1 GB RAM


title: How to get Wine to work in Proxychains?

text: I have configured proxychains to use Tor:               proxychains firefox      Works well.               proxychains wine <app>      The applications always fail to connect to the Tor network, which can work without proxychains. What's the problem, how do I make it work?


title: Clear old prompt lines in bash to save scroll space

text: My terminal theme used to be like this, ![terminal them before](http://i.stack.imgur.com/6Aoes.png) But I thought the prompt wasted so much space. And later I got an idea that I could clean the prompt every time I ran a command. I was using bash, one of solution is to use the `preexec_invoke_exec` function. I use the following command to clean the last prompt chars:               echo -ne "\033[1A\033[K\033[1A\033[K\033[31;1m$ \033[0m"      So that the terminal is very clean, like this, ![enter image description here](http://i.stack.imgur.com/D25nX.png) But now my problem is, there will be problem if I want to use **multi commands in one line** , say, when I use `for i in ...`. Here is the full version of the function in my .bashrc,               preexec () { echo -ne "\033[1A\033[K\033[1A\033[K\033[31;1m$ \033[0m"; echo -n "$1"; echo -ne "  \033[37;2m["; echo -n "$2"; echo -ne "]\033[0m\n"; }     preexec_invoke_exec () {         [ -n "$COMP_LINE" ] && return  # do nothing if completing         [ "$BASH_COMMAND" = "$PROMPT_COMMAND" ] && return # don't cause a preexec for $PROMPT_COMMAND         local this_command=`history 1 | sed -e "s/^[ ]*[0-9]*[ ]*//g"`;         local this_pwd=`pwd`;          preexec "$this_command" "$this_pwd"     }     trap 'preexec_invoke_exec' DEBUG


title: How do I reload a proxy automatic configuration file (.pac)?

text: I have a server set up that I want to use as an automatic proxy server per rules in a `.pac` file. I'm troubleshooting different changes to the `.pac` file but I'm not sure if my web browser/OS is reloading the `.pac` file after each change. How can I force the client to re-download the `.pac` file or at least ensure it's using the latest version? I'm using Fedora 19 and configure proxy settings through the Gnome settings GUI.


title: How to recognize hostname on the port number 8080 in Ubuntu machine?

text: I have a very basic question here. This thing is puzzling me a little bit. I have two machines, one is my local desktop running Windows and I have cygwin installed in it and second machine I have is in staging domain in our company which is running Ubuntu 12.04. I started Netflix Exhibitor like this in my desktop through CYGWIN -               david@desktop /cygdrive/c/ApacheExhibitor/Exhibitor-1.5.1/target     $ java -jar exhibitor-1.5.1-jar-with-dependencies.jar -c file     v1.5.1     INFO  com.netflix.exhibitor.core.activity.ActivityLog  Exhibitor started [main]     INFO  org.mortbay.log  Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog [main]     INFO  org.mortbay.log  jetty-1.5.1 [main]     Dec 18, 2013 6:07:37 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate     INFO: Initiating Jersey application, version 'Jersey: 1.9.1 09/14/2011 02:36 PM'     INFO  org.mortbay.log  Started SocketConnector@0.0.0.0:8080 [main]      And then I went to chrome browser and I opened this URL -               http://localhost:8080/exhibitor/v1/ui/index.html      after that, I can see Exhibitor console up and showing me everything which it should be showing in my desktop. Now I did the same thing in my Ubuntu machine which is in staging domain in our company. With the below command I started Exhibitor -               cronusapp@phx5qa01c:/zook$ java -jar ./exhibitor-1.5.1/lib/exhibitor-1.5.1-jar-with-dependencies.jar -c file     v1.5.1     INFO  com.netflix.exhibitor.core.activity.ActivityLog  Exhibitor started [main]     INFO  org.mortbay.log  Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog [main]     INFO  org.mortbay.log  jetty-1.5.1 [main]     Dec 18, 2013 7:10:35 PM com.sun.jersey.server.impl.application.WebApplicationImpl _initiate     INFO: Initiating Jersey application, version 'Jersey: 1.9.1 09/14/2011 02:36 PM'     INFO  org.mortbay.log  Started SocketConnector@0.0.0.0:8080 [main]      And then I went to chrome and I opened the url like this with the machine hostname -               http://phx5qa01c.stratus.phx.qa.host.com:8080/exhibitor/v1/ui/index.html      And this url is showing me blank white page on the screen. Now I am not sure why this is happening. Is there any file which I am supposed to modify in my Ubuntu box to recognize the hostname so that it can show me the Exhibitor console page as I cannot use localhost now on the chrome? I am pretty much sure I am missing very minor thing here.. **UPDATE:-** HOSTNAME of my ubuntu machine -               cronusapp@phx5qa01c:/zook$ hostname -f     phx5qa01c.stratus.phx.qa.host.com


title: Ctrl-a does not take me to the beginning of the prompt while I am working within a GNU screen

text: To navigate to the starting and end of a command, I usually use `Ctrl``a` and `Ctrl``e`. However, when I work within a GNU screen, those keybinding do not work becuase perhaps they are being used by the GNU screen. Is there another way to move to the starting or the end of the command? I am on CentOS6.2


title: Remove all *.mp4 and *.zip but some files

text: In one of my programs I call a `bash` command to remove all files in the directory, but some:               bash -c     shopt -s extglob     shopt -s nullglob     rm /path/to/directory/!("file1" | "file2")      Which for what I understand mean "Use bash on this command, use the extended pattern, remove all files but those" It works good, but deletes every file but the ones put in the command. What I would like is to remove all .mp4 and .zip in the directory but the ones I put in the command. I think I'll have to add *.mp4 and *.zip somewhere in the command, but I have no idea where. EDIT: For clarity, what I need is "Delete all .mp4 and .zip files, but keep thoses"


title: Complicated variable content failed to get into sed

text: The first line is variable `ann` hold quite complicated value. The reason I use the second line is because I don't want to change anything in the third line `col1content`. To change replacement, I just need to change second line to other variable.               ann="<?php echo '<h2>'.views_get_view('frprev_ann')->get_title().'<\/h2>'; echo views_embed_view('frprev_ann'); ?>"     col1content=`echo $ann`     sed -i 's/r'$rownum'c1content/'$col1content'/g' templates/page--front.tpl.php      But when above command has been run, it result in error:               sed: -e expression #1, char 19: unterminated `s' command      If I change the first line to be `ann="testtext"`, everything running smoothly. And when change first line to be `ann="<?first second"`, it fails. using backslash also cannot help me.


title: Spreading stdin to parallel processes

text: I have a task that processes a list of files on stdin. The start-up time of the program is substantial, and the amount of time each file takes varies widely. I want to spawn a substantial number of these processes, then dispatch work to whichever ones are not busy. There are several different commandline tools that almost do what I want, I've narrowed it down to two almost working options:               find . -type f | split -n r/24 -u --filter="myjob"     find . -type f | parallel --pipe -u -l 1 myjob      The problem is that `split` does a pure round-robin, so one of the processes gets behind and stays behind, delaying the completion of the entire operation; while `parallel` wants to spawn one process per N lines or bytes of input and I wind up spending way too much time on startup overhead. Is there something like this that will re-use the processes and feed lines to whichever processes have unblocked stdins?


title: set up centos7, configuration of ip

text: when I'm searching for ip setting of centos 7. Responed is centos 6.X 's or ealier, and I tried. But how is the default DHCP configuration of centos 7. Some configurations have been done like ![enter image description here](http://i.stack.imgur.com/ipDQK.png) I want the os can get ip infomation by dhcp!!


title: How to install PHP 5.3 on RHEL5

text: I'm working with a RHEL5.1 box that has PHP 5.1.6 installed by default. I need to upgrade PHP to PHP 5.3.x. I've tried several tutorials and have had no luck. Can anyone help me out with this?


title: Meaning of colours in htop

text: Given the option:               [ ] Detailed CPU time (System/IO-Wait/Hard-IRQ/Soft-IRQ/Steal/Guest)      In `htop` (Version `1.0.1`) what are the meanings of the colours? In the following image, I'm seeing rather a lot of what I expect is IO-Wait, but where does one determine the meaning of the colours. ![htop screenshot demonstrating colours](http://f.cl.ly/items/1R2t42163o1F2m1G470C/Screen%20Shot%202012-10-09%20at%206.59.28%20PM.png) Naturally this depends on the htop colour theme in use (default) and the terminal color scheme (solarized light here), but is there a reference? _Note:_ This normally happens to my server right before it dies, so I thought I'd ask whilst I have some time waiting for the box to recover.


title: Tilling window manager written in Python

text: Is there any tiling manager like XMonad but written with Python? I think Haskell was too hard for me. But I know python a little.


title: davmail and JAVA INSTALLED MANUALLY

text: I'm trying to install davmail,   I've already install JAVA manually (tar.gz file). After trying with the ppa:webupd8team repo and not having good results. Had to clean a lot of files packages and so on.   Anyhow when trying to install davmail I'm getting this error               $ sudo dpkg -i davmail_4.4.1-2225-1_all.deb     Selecting previously unselected package davmail.     (Reading database ... 174785 files and directories currently installed.)     Preparing to unpack davmail_4.4.1-2225-1_all.deb ...     Unpacking davmail (4.4.1-2225-1) ...     dpkg: dependency problems prevent configuration of davmail:      davmail depends on openjdk-7-jre | openjdk-6-jre | oracle-java7-jre | sun-java6-jre; however:       Package openjdk-7-jre is not installed.       Package openjdk-6-jre is not installed.       Package oracle-java7-jre is not installed.       Package sun-java6-jre is not installed.          dpkg: error processing package davmail (--install):      dependency problems - leaving unconfigured     Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...     Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...     Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...     Rebuilding /usr/share/applications/bamf-2.index...     Processing triggers for mime-support (3.54ubuntu1) ...     Errors were encountered while processing:      davmail      And JAVA is configured               $ java -version      java version "1.7.0_55"     Java(TM) SE Runtime Environment (build 1.7.0_55-b13)     Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)          $ javac -version     javac 1.7.0_55          $ which java     /usr/bin/java          $ echo $JAVA_HOME     /opt/java/jdk1.7.0_55/      Is there a way to tell davmail that we already have JAVA installed?   or a workaround for this problem? The update-alternatives option is configured as well.               $ update-alternatives --list java     /opt/java/jdk1.7.0_55/bin/java          $ update-alternatives --display java     java - auto mode       link currently points to /opt/java/jdk1.7.0_55/bin/java     /opt/java/jdk1.7.0_55/bin/java - priority 100     Current 'best' version is '/opt/java/jdk1.7.0_55/bin/java'.          $ update-alternatives --config java     There is only one alternative in link group java (providing /usr/bin/java): /opt/java/jdk1.7.0_55/bin/java     Nothing to configure.


title: Ubuntu 12.10 always hanging

text: I am new in Ubuntu 12.10. In installation process, I choose "ext4 extended..." when then appears "something else" and another option. Is that wrong? After installation, my computer is going to very much slow and always appear to hang. My processor is Intel Dual-Core 2.5, Twin 1GB Ram, 250 GB Hard Disk, default video card and I have Windows XP in C drive and Ubuntu in D drive.


title: Is it possible to view unicode text in tcpdump capture output?

text: Unfortunately seems like `tcpdump` is not capable of detecting and displaying Unicode-encoded text (specifically utf-8) in captures. It treats unicode text like regular binary data and displays it in dots. I need this feature to debug an application. To be more specific, I run tcpdump 4.3.0 in a remote ssh session inside `tmux` in Gnome terminal. OS is debian 7. Is this possible to view unicode text in live network captures using `tcpdump` or combination of it with other linux commands?


title: Can't open any tool of the system administration panel in CentOS 6 that demands the root password

text: When I try to open any graphical tool that demands the root password, it won't launch after I enter the password. I have tried the "Authentication" and "Date and Time" apps, for example. When I try to launch the app from the command line by typing `system-config-authentication`, it says:               No protocol specified     Unable to initialize graphical environment. Most likely cause of failure     is that the tool was not run using a graphical environment. Please either     start your graphical user interface or set your DISPLAY variable.      This happens whether I am using Gnome or KDE. This is on CentOS 6.5. Edit: I installed CentOS as dualboot with windows 7 in laptop + i'm not using SSH and yes i'm in graphical environment when i run the command.


title: Why are the process priorities not respected?

text: I was running four jobs in the background with HTCondor. It sets the priority to 10. Then I was compiling something with `make -j4` in the foreground (priority 0). However, the HTCondor jobs still got most of the CPU time, which I find a little strange. ![htop screenshot](http://i.stack.imgur.com/o2Wg5.png) The background job does not interact with the disk at all and only little with memory, it is very CPU bound. The compilation might be a little different, but I still do not really understand why `clang` only gets less than 20% per CPU. When I run this without anything else running, the `clang` processes get most of the cores. In the screenshot, one of them was finished, so only three showed up. But all four cores were really doing hard work: ![enter image description here](http://i.stack.imgur.com/egc1d.png) How can I really background a task?


title: Reset atq list to zero?

text: I have been using `at` for quite a while now, and I noticed that the `at` job ids seem to increment forever.               $ atq     332 Mon Sep 23 17:25:00 2013 a cklein     $ # I'm up to 332 at jobs!      Interestingly, `at` doesn't seem to keep around data about completed jobs.               $ at -c 331     Cannot find jobid 331      Is it possible to reset this job id number back to 0?


title: TUN/TAP Will not load

text: I have an OpenVZ server but can't seem to get the tun/tap module to load. I ran `modprode tun` on the hostnode but when I go under the VM I get:               Tue Sep 24 03:08:36 2013 Note: Cannot open TUN/TAP dev /dev/net/tun: Operation not permitted (errno=1)     Tue Sep 24 03:08:36 2013 /sbin/ip link set dev  up mtu 1500      Kernel:               2.6.32-042stab079.4 #1 SMP Thu Jul 18 18:57:29 MSK 2013 x86_64 x86_64 x86_64 GNU/Linux


title: How to make RHEL Workstation to boots up faster?

text: I am using RHEL 6.4. Problem is it takes too much time to boots up? Can you say, what can I do to be out of this situation?


title: How to permanently swap esc and caps lock in xfce / xubuntu?

text: I followed some post a while ago, and it said to make an `~/.xmodmap` file like so:               ! Swap caps lock and escape     remove Lock = Caps_Lock     keysym Escape = Caps_Lock     keysym Caps_Lock = Escape     add Lock = Caps_Lock      I did, and it now I can swap `esc` and `caps lock` by doing `xmodmap ~/.xmodmap`. I wanted this to be permanent, so I added that command to my `~/.bash_profile`, but it doesn't seem to work; I still have to manually `xmodmap`. As an EEng dropout, I am tempted to just rewire my keyboard }:-) but I know there must be a better way. How can I make this work, permanently?


title: What's the best way to backup files via network on Linux and Solaris machines?

text: I wonder what the best way to backup files VIA network I have Solaris machines with Oracle 10i with VERITAS cluster, machines are connected to EMC storage /data/oracle directory is mounted on the EMC storage What I want is to backup /data/oracle directory (70G) on some backup machine VIA network (include soft links files), while the reliability of copying files is very very important I checked and find some ideas to do that For example the first option is to use rsync                 rsync   -WavH –progress   /data/oracle $backup_server_ip:/Backup_dir      The second option: using is transfer files with tar option so we do both sides transfer files and compress files                 cd /directory_that_we_want_to_backup       tar cpf - . | bzip2 -c | ssh  $backup_server_ip  \          "cd /Backup_dir && bzip2 -d | tar xpf -"and so on      I need advice what is more reliable from the options below, and maybe there are other good options


title: How to determine bitness of hardware and OS?

text: Output of `uname` -a on my RHEL 5.4 machine is:               Linux <machine name> 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux      Does it mean that hardware is 64 bit (going by perhaps first x86_64) and OS is also 64-bit going by last x86_64? Also, what are these so many instances of x86_64?   Can I install 64-bit vm over 32-bit OS and vice versa?


title: How do I add a custom package to debian repository?

text: I run my own debian apt repository server. I have a .deb file that i would like to add into the repository (Adaptec Storage Manager deb). I need the ability to manage that package independent of the rest of the repo. Question: How can I add the .deb file to the repo so that I can do a 'apt-get storman' on the client machines and have it installed?


title: Where to put a background script

text: I have a script that i want to be constantly running in the background but I don't know where to launch it from If I put it in `.bashrc` it will run multiple times (one for each login) It's an infinite loop that I want running provided a user is logged in, but not more than once for each user.


title: Postfix configuration? problem

text: I try to configure mail server on my VPS. I try this tutorial but unfortunately I cant run it.   My configuration files are exact the same I only replaced mydomain.com with my own domain. Also when I put service status on postfix I receive master dead but pid file exists. I have tried to stop Postfix and start it again (with OK result) but status is same. Tried to google it but I dont find any info I could use. Thanks for any advice. My configuration files: sudo vi /etc/postfix/main.cf               soft_bounce             = no     queue_directory         = /var/spool/postfix     command_directory       = /usr/sbin     daemon_directory        = /usr/libexec/postfix     mail_owner              = postfix          # The default_privs parameter specifies the default rights used by     # the local delivery agent for delivery to external file or command.     # These rights are used in the absence of a recipient user context.     # DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.     #     #default_privs = nobody          myhostname              = mail.adamlakomy.de      mydomain                = adamlakomy.de          mydestination           = $myhostname, localhost     unknown_local_recipient_reject_code = 550          mynetworks_style        = host     mailbox_transport       = lmtp:unix:/var/lib/imap/socket/lmtp     local_destination_recipient_limit       = 300     local_destination_concurrency_limit     = 5     recipient_delimiter=+          virtual_alias_maps      = hash:/etc/postfix/virtual          header_checks           = regexp:/etc/postfix/header_checks     mime_header_checks      = pcre:/etc/postfix/body_checks     smtpd_banner            = $myhostname          debug_peer_level        = 2     debugger_command =              PATH=/bin:/usr/bin:/usr/bin:/usr/X11R6/bin              xxgdb $daemon_directory/$process_name $process_id & sleep 5          sendmail_path           = /usr/sbin/sendmail.postfix     newaliases_path         = /usr/bin/newaliases.postfix     mailq_path              = /usr/bin/mailq.postfix     setgid_group            = postdrop     html_directory          = no     manpage_directory       = /usr/share/man     sample_directory        = /usr/share/doc/postfix-2.3.3/samples     readme_directory        = /usr/share/doc/postfix-2.3.3/README_FILES          smtpd_sasl_auth_enable          = yes     smtpd_sasl_application_name     = smtpd     smtpd_recipient_restrictions    = permit_sasl_authenticated,                                       permit_mynetworks,                                       reject_unauth_destination,                                       reject_invalid_hostname,                                       reject_non_fqdn_hostname,                                       reject_non_fqdn_sender,                                       reject_non_fqdn_recipient,                                       reject_unknown_sender_domain,                                       reject_unknown_recipient_domain,                                       reject_unauth_pipelining,                                       reject_rbl_client zen.spamhaus.org,                                       reject_rbl_client bl.spamcop.net,                                       reject_rbl_client dnsbl.njabl.org,                                       reject_rbl_client dnsbl.sorbs.net,                                       permit          smtpd_sasl_security_options     = noanonymous     smtpd_sasl_local_domain         =      broken_sasl_auth_clients        = yes          smtpd_helo_required             = yes       /etc/postfix/virtual               user@adamlakomy.de   user\@adamlakomy.de      /etc/sasl2/smtpd.conf               pwcheck_method: auxprop     auxprop_plugin: sasldb     mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5      /etc/imapd.conf               virtdomains:        userid     defaultdomain:      adamlakomy.de     servername:     adamlakomy.de     configdirectory:    /var/lib/imap     partition-default:  /var/spool/imap     admins:         cyrus     sievedir:       /var/lib/imap/sieve     sendmail:       /usr/sbin/sendmail.postfix     hashimapspool:      true     allowanonymouslogin:    no     allowplaintext:     yes     sasl_pwcheck_method:    auxprop     sasl_mech_list:     CRAM-MD5 DIGEST-MD5 PLAIN     tls_cert_file:      /etc/pki/cyrus-imapd/cyrus-imapd.pem     tls_key_file:       /etc/pki/cyrus-imapd/cyrus-imapd.pem     tls_ca_file:        /etc/pki/tls/certs/ca-bundle.crt          autocreatequota:        -1     createonpost:           yes     autocreateinboxfolders:     spam     autosubscribeinboxfolders:  spam


title: Download all dependencies with yumdownloader, even if already installed?

text: Is there a way to download all dependencies with yumdownloader, even if they are already installed? I'm trying to create a local repo and only want to include the packages we need.


title: PDF reader for OpenBSD that has default disabled JAVA/JavaScript/etc.?

text: I'm searching for a PDF reader that doesn't supports Java, JavaScript in PDF files (and other unneeded things what is only used in 1% of the PDF files, but can cause security issues). Or there isn't any?


title: Fastest ssh X tunneling on a local secure network

text: I have read in a few websites e.g. (1) that the default ssh cipher is not necessarily the fastest. I work on a local fully secure network. Assuming that security is not an issue and that I just care about latency and speed, what ssh parameters can a user tune to get the fastest X tunneling?


title: Shutdown Red5 failed on every attempt

text: I'm at my wits end. I have asked everywhere. I've uninstalled - reinstalled countless times in countless different ways and STILL Red5 fails to shutdown. Can someone please give me a clue? Not even any answers at Google group Red5 so far having to re-install my entire system on VPS which I really don't want to have to do, there must be someone who has run into the same problem.


title: Can't install dpkg on Linux 2.6.18

text: I have a virtual machine that I am trying to use. It doesn't seem to have dpkg or apt-get, so I downloaded the source from http://packages.debian.org/sid/dpkg-dev. If I run ./configure followed by make I get               $ make     make  all-recursive     make[1]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8'     Making all in lib     make[2]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8/lib'     Making all in compat     make[3]: Entering directory `/home/dbadmin/temp/dpkg-1.16.8/lib/compat'       CC     empty.o     cc1: error: unrecognized command line option "-Wvla"     make[3]: *** [empty.o] Error 1     make[3]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/lib/compat'     make[2]: *** [all-recursive] Error 1     make[2]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/lib'     make[1]: *** [all-recursive] Error 1     make[1]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8'     make: *** [all] Error 2      I tried $ ./configure --disable-compiler-warnings $ make to get ...                 CC     trigproc.o       CC     update.o       CCLD   dpkg     archives.o: In function `tar_writeback_barrier':     /home/dbadmin/temp/dpkg-1.16.8/src/archives.c:1139: undefined reference to `sync_file_range'     archives.o: In function `fd_writeback_init':     /home/dbadmin/temp/dpkg-1.16.8/src/archives.c:77: undefined reference to `sync_file_range'     collect2: ld returned 1 exit status     make[2]: *** [dpkg] Error 1     make[2]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8/src'     make[1]: *** [all-recursive] Error 1     make[1]: Leaving directory `/home/dbadmin/temp/dpkg-1.16.8'     make: *** [all] Error 2      This is my machine               $ uname -a     Linux server.name.domain.tld 2.6.18-194.26.1.el5xen #1 SMP Fri Oct 29 14:30:03 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux      How should I go about getting a functional package manager on this? **Update:** $ gcc --version gcc (GCC) 4.1.2 20080704 (Red Hat 4.1.2-51)


title: Distro for high end video editing

text: Which distro would be most suited for maximizing hardware to perform expensive video editing and optimize resources. I followed up with optimizing resources, as in some cases one operation may not be able to make use of available resources, but would know to delegate work concurrently for maximum utilization. Currently considering OpenSuSE or Red Hat


title: Very large values for utime and stime for foo. Is foo still running?

text: * I am running a program `foo`   * It has been running for close to 30 days now (even more)    * Until around 10 days ago (I cannot be very exact) it used 100% of one cpu on my dual core laptop (it was at the top of `top` sorted for CPU usage)   * Now it is nowhere near the top of CPU usage (top shows 0%)   * The Top 10 cpu intensive process (according to `ps`) are: `ps auxc | sort -r -k 3 | head -10`               USER       PID %CPU  %MEM     VSZ    RSS TTY      STAT START   TIME      COMMAND       bilbo    32734 15583  0.0   17816    960 pts/16   R+    2012 24322737:01 foo     bilbo    30916 10.1   0.5 1754340  22344 ?        Sl   Jan12      128:06 chrome     root      1119  9.8   0.8  241288  31704 tty7     Ss+   2012     6707:23 Xorg     bilbo    29177  9.3  15.5 1178348  10524 ?        Sl   01:11      106:47 opera     bilbo    30635  6.3   0.5  696972  23156 ?        Sl   01:12       72:13 opera:libflashp     bilbo    25415  1.4   3.2  805156 126352 ?        Sl   Jan12       18:28 chrome     bilbo    27576  1.0   0.2  373844  11060 ?        S     2012      220:13 compiz     root     12642  0.9   0.4  342848  17156 ?        Ssl  12:12        4:38 firestarter     bilbo     3197  0.7   0.4   84832  19436 ?        Ss    2012      508:10 screen     bilbo    29956  0.7   0.2  371612  10180 ?        Sl   12:02        3:34 plugin-containe        * In the above table `foo` is at the top, but the `%CPU` it is being shown to use is `15583`. This value seems nonsenical.   * However I am still seeing one of the processors being utilised at near 100% capacity   * Running ps gives me the following output `ps -eF | grep foo`               UID     PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD          bilbo 32734 20655 99  4454  3380   0  2012 pts/16   1184016092-19:52:29 foo      `ps aux | grep foo`               USER    PID %CPU  %MEM   VSZ   RSS TTY      STAT START   TIME COMMAND     bilbo 32734 15602  0.0 17816  3380 pts/16   R+    2012 24322737:01 foo        * The output of uptime is `up 46 days, 12:43, 19 users, load average: 1.58, 1.37, 1.82`   * It seems to me the TIME values returned by `ps`, `1184016092-19:52:29` (from `ps -e`) and `24322737:01` (from `ps aux`), are impossibly large   * The `utime` and `stime` returned by `/proc/32734/stat` are: `85714817892` and `4611685975569777027` respectively.   * I was anticipating a very large output, and I wanted to count the number of lines so I piped the output of `foo` to `wc -l`. In hindsight I should have done `tail -f` to see if the program was running.   * Nice value of `foo` is 0 **Question: Is`foo` still running?** Output of `uname -a` `Linux rivendell 2.6.32-44-generic #98-Ubuntu SMP Mon Sep 24 17:27:10 UTC 2012 x86_64 GNU/Linux` I am running Ubuntu 10.04.4 LTS Happy to provide more details if required.


title: How to supress the display of previous job details?

text: When I run a process in the background the process ID gets displayed in the command prompt. For example:               $ gvim 1 &          [3] 9584      Now when I run another process the state of the previous one also gets displayed. For example:               $ gvim 2 &          [4] 9500          [3]   Done                    gvimBackground 1       Is there any way I can suppress displaying the current PID and the data related to previous processes?


title: Create and format exFAT partition from Linux

text: Is it possible to create and format an exFAT partition from Linux?


title: Distinguishing a regular file from a symlink

text: I'm writing a bash script that needs to distinguish a regular file from a symlink. I thought I could do this with if/test expression, but it doesn't work as I expected to:               $ touch regular_file     $ test -f regular_file; echo $?     0     $ test -h regular_file; echo $?     1     $ ln -s regular_file symlink     $ test -h symlink; echo $?     0     $ test -f symlink; echo $?     0      Why is that? And, how can I properly do this?


title: How to call a generic function without importing its file?

text: Assume I have a `function.ksh` file that contains a function called `getServerIp`. I don't want to create a new script file and import `function.ksh`, I just want to run `getServerIp` from my current shell. As far as I know this is not possible; is there some way I've missed?


title: Virtual serial port problem

text: **Background:** I've to test external GSM module, connected to PC with serial port.   Since I'll have to either send messages both to do more, I need to create two virtual serial port (script provided by module owner) and a ppp connection throught it. **Operations test1:**   * Run script to create 2 virtual serial port, call it `/dev/vp1` and `/dev/vp2`   * `sudo pppd /dev/vp1 call <config_file>`   * `sudo route add <ip1> dev ppp0`   * `ping <ip1>` **Results:** In this way, `ping` crashes after a few cycles and I need to restart manually the module in order to do another test. **Operations test2:**   * Run script to create 2 virtual serial port, call it `/dev/vp1` and `/dev/vp2`   * Run C++ program that write AT command on `/dev/vp1`   * Run C++ program that write AT command on `/dev/vp2` **Result:** All work properly. I can't understand why test1 fails, ever.


title: How to detect a possible hardware error?

text: I'm running Debian Wheezy on a HP Pavilion dv7 laptop and it freezes every now and then, requiring a reboot. One time it didn't even load the operating system, but it wasn't I who was using it so I can't tell what error was displayed. On a previous Windows 7 install it constantly failed to load Windows, throwing the user at the "attempting repairs" screen, which would do something for a few minutes and then say Windows couldn't fix the problem. This leads me to think that there is a hardware problem, and I was wondering if there's anything at `/var/log` or somewhere else that could provide some info on what's going on, or if there's any test I could run, and what I should be looking for. I issued               grep -i "error" /var/log      The full output is here. The only line I could understand and that I think might have something to do with the problem was               /var/log/dmesg.0:[   11.632723] [drm:radeon_pci_probe] *ERROR* radeon kernel modesetting for R600 or later requires firmware-linux-nonfree.      But               lspci | grep -i vga      Returns               00:02.0 VGA compatible controller: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller (rev 09)     01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI Whistler XT [AMD Radeon HD 6700M Series]      And `System > System Settings > Details > Graphics` shows `Intel(R) Sandybridge Mobile` is being used. So I guess the error was "solved" by using the onboard graphics card? There was also               /var/log/syslog.1:Apr 19 20:14:09 magui kernel: [    1.087417]  pci0000:00: ACPI _OSC request failed (AE_ERROR), returned control mask: 0x1d     /var/log/syslog.1:Apr 19 20:14:09 magui kernel: [    8.510757] ata1.00: irq_stat 0x08000000, interface fatal error     /var/log/syslog.1:Apr 19 20:14:09 magui kernel: [    8.510810] ata1: SError: { UnrecovData 10B8B BadCRC }     /var/log/syslog.1:Apr 19 20:14:09 magui kernel: [    8.510914]          res 40/00:08:00:76:14/00:00:00:00:00/40 Emask 0x10 (ATA bus error)     /var/log/syslog.1:Apr 19 20:14:09 magui kernel: [    8.511121]          res 40/00:08:00:76:14/00:00:00:00:00/40 Emask 0x10 (ATA bus error)      But I have no idea what it means, so I'm kinda lost here. What should I be looking for?


title: How could I retain special character without replacing it with underscore?

text: I'm working on a file transfer script where I encounter a problem, when the file name look like `Dr' A`. The transfer script will fail due to following error:               sftp> put /path/Dr'\ A.tif     Unterminated quoted argument^      Is there a solution that could retain the single quote, without replacing it with underscore, while allowing me to handle other special characters as well.


title: Prevent yum from checking for updates when a new package is going to be installed

text: Whenever I want to install a new package with _yum_ , It first checks for updates. Is there a way to stop it from checking for updates each time a package is going to be installed?


title: PPTPD nic configuration and default gateway

text: I have a Ubuntu 10.04 server with PPTPD server. It has one nic with eth0 and eth0:0. eth0:0 has an UK IP and eth0 has a Franch IP. I have setup eth0:0 as default gateway because I want to show that the server has an UK IP address. The problem is that when I connect to the server using a Mac, the traffic is routed using the eth0 nic. Is there a way to tell to PPTPD which nic to use to route the internet traffic? Using route -n I get the right routing table:               Destination 0.0.0.0 -> UK-IP      If I access an IP to geolocation web site from the server, it shows the UK IP. Network configuration is:               auto eth0 iface eth0 inet static address xxx.xxx.xxx.xxx netmask 255.255.255.0 broadcast xxx.xxx.xxx.255 network xxx.xxx.xxx.0          auto eth0:0 iface eth0:0 inet static address IP.DE.FAIL.OVER netmask 255.255.255.255 broadcast IP.DE.FAIL.OVER gateway IP.DE.FAIL.OVER      I have used this guide to configure PPTPD: Howto: PPTP VPN Server with Ubuntu 10.04 ‘Lucid Lynx’ I tried this too:               iptables -t nat -A POSTROUTING -o eth0 -d xxx.xxx.xxx.xxx -j MASQUERADE      (where xxx.xxx.xxx.xxx is the UK IP assigned to eth0:0) but the client cannot access the network.


title: Prompt for password during boot with systemd service

text: This is relevant to Arch Linux (and perhaps other distributions using `systemd`). I want to mount a TrueCrypt partition at boot. With the old `sysvinit`, this was pretty straight forward with a script called by `rc.local`. I got to my current by hijacking an Arch forum thread. There's another thread where this systemd-devel thread is talked about as "having the solution," however it's not apparent to me what it actually is, and the OP has the last post stating that he wasn't able to accomplish his goal. From the looks of it this person is doing it, but was looking for a way to turn off continuous boot messages while he types the password. I posted there as well asking for him to post his actual `.service` file. In searching quite a bit, people mention that they have been successful or that it's possible, but don't spell out exactly what the solution was. I'm as far as being able to unlock the partition from the command line via a `systemd` service (which in turn gives me the ability to automatically dismount it on shutdown/reboot), but I have to do it manually once logged in. I'd really like the boot process to pause and ask me for the password. Here's my current script:               [Unit]     Description=Truecrypt Setup for vault     #DefaultDependencies=no     #Conflicts=umount.target     #Before=umount.target     #After=systemd-readahead-collect.service systemd-readahead-replay.service     #After=cryptsetup.target          [Service]     Type=oneshot     RemainAfterExit=yes     #StandardInput=tty-force     ExecStart=/bin/sh -c '/usr/bin/truecrypt -t --protect-hidden=no -k "" --filesystem=none --slot=1 -p `systemd-ask-password "Enter password for truecrypt volume: "` /dev/sda4'     ExecStop=/usr/bin/truecrypt --filesystem=none -d /dev/sda4          [Install]     WantedBy=multi-user.target      I left the commented stuff in `[Unit]`, as at some point I ran into suggestions that it should be there, but I had problems with it. The above seems to work just fine after booting/logging in... just not during.


title: Get Install File for Already Installed RPM

text: I would like to install this custom package, `packageA`, onto another Linux box.               $yum list installed | grep packageA     packageA.x86_64      But, I don't have access to the installation file, i.e. `packageA` only exists on this box. How can I do this?


title: service command: Failed to issue method call

text: I downloaded the source of tinyproxy and then use ./configure make make install to install it Then I want to start it, but get errors, like the following:               [root@kitty tinyproxy-1.8.3]# service tinyproxy start     Redirecting to /bin/systemctl  start tinyproxy.service     Failed to issue method call: Unit tinyproxy.service failed to load: No such file or directory. See system logs and 'systemctl status tinyproxy.service' for details.      Why can't I start `tinyproxy`? BTW, My system is fedora 16, tinyproxy version: 1.8.3 the configuration file:                   User nobody         Group nobody         Port 8888         Timeout 600         DefaultErrorFile "/usr/local/share/tinyproxy/default.html"         StatFile "/usr/local/share/tinyproxy/stats.html"         LogLevel Info         MaxClients 100         MinSpareServers 5         MaxSpareServers 20         StartServers 10         MaxRequestsPerChild 0         Allow 127.0.0.1         ViaProxyName "tinyproxy"         ConnectPort 443         ConnectPort 563


title: How do I kill 'repo sync' using crontab given it spawns many processes?

text: I need to 'repo sync' the Android source overnight, as my monthly bandwidth is limited. , I start the 'repo sync' at midnight, then want to kill it at 8am. The following is the command:               2 0 * * * /home/user/android-src/reposync.sh      reposync.sh contains:               cd /home/user/android-src     /home/user/bin/repo sync      I was hoping to kill it with the following cron entries:               55 7 * * * ps -eo pid,args | grep repo | awk '{print $1}' | xargs -I {} kill {}     0 8 * * * ps -eo pid,args | grep repo | awk '{print $1}' | xargs -I {} kill -9 {}      The problem is that 'repo sync' spawns many processes - lots of 'git', 'curl', 'git-remote-http', 'python', (and I think a 'bash' and an 'sh', as I put the repo sync command into a .sh script). (Apologies for my ignorance/terminology.) How can I find the processes to kill them? Or is there a better way? Will repo run as a normal user and I can just kill all that user's tasks? I'd like to leave my computer running over a few days unattended, and have it connect up every night and disconnect every morning, although any solutions gratefully considered, including the ugly, e.g., should I kill the internet connection so repo times out then resume it? There is nothing else running on the server, (VirtualBox on Win7 x64 running Ubuntu 10.04), so should I just reboot every 8am?


title: Setting up tty ports on Beaglebone Black with Angstrom linux

text: I'm using a Beaglebone Black running the Angstrom v2012.12 build that came pre-loaded. I want to be able to connect another device to a serial port via the UART connections on the GPIO headers. The problem is I can't tell which /dev/tty devices these map to. When I try to access the /dev/ttyS? devices (e.g. using od /dev/ttyS2) I get a "read error: Input/outpu error" Can anyone tell me if the UARTS are mapped to tty devices by default, if so, which ones and if not how I can create the right devices?


title: X.org: two 'Screens' on one 'Device'

text: **Gentoo, linux 3.7.10   X.Org X Server 1.13.4   GDM 2.20.11   GNOME 2.32.1   Radeon HD 6850 card, radeon xorg driver** I have Radeon HD 6850 card with two DVI monitors on it. `X -configure` command has generated `xorg.conf` file with which I see mirrored desktop on both monitors. If I go to _System->Preferences->Monitors_ and reset _Same image in all monitors_ flag then the desktop extends on both monitors. This is almost what I want, but there is still one problem. If I maximise a window it spreads on **both** monitors and looks ugly. **How do I change it?** I had idea that if I changed xorg settings a little and made it have two 'Screen' sections (per each monitor) then GDM would think there are two different screens and will create two different desktops. But xorg seems to ignore my settings (although the log file shows that there is no error and my configuration is accepted). Xrandr also says there are only one screen.               **xorg.conf**          Section "ServerLayout"         Identifier     "X.org Configured"         Screen      0  "Screen0" 0 0         Screen      1  "Screen1" LeftOf "Screen0"         Screen      2  "Screen2" RightOf "Screen0"         InputDevice    "Mouse0" "CorePointer"         InputDevice    "Keyboard0" "CoreKeyboard"     EndSection          Section "Files"         ModulePath   "/usr/lib64/xorg/modules"         FontPath     "/usr/share/fonts/misc/"         FontPath     "/usr/share/fonts/TTF/"         FontPath     "/usr/share/fonts/OTF/"         FontPath     "/usr/share/fonts/Type1/"         FontPath     "/usr/share/fonts/100dpi/"         FontPath     "/usr/share/fonts/75dpi/"     EndSection          Section "Module"         Load  "glx"     EndSection          Section "InputDevice"         Identifier  "Keyboard0"         Driver      "kbd"     EndSection          Section "InputDevice"         Identifier  "Mouse0"         Driver      "mouse"         Option      "Protocol" "auto"         Option      "Device" "/dev/input/mice"         Option      "ZAxisMapping" "4 5 6 7"     EndSection          Section "Monitor"         Identifier   "nec_ea191m"         VendorName   "NEC"         ModelName    "EA191M"     EndSection          Section "Monitor"         Identifier   "syncmaster_940n"         VendorName   "Samsung"         ModelName    "Syncmaster 940N"     EndSection          Section "Monitor"         Identifier   "acer_v233h"         VendorName   "Acer"         ModelName    "V233H"     EndSection          Section "Device"             ### Available Driver options are:-             ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",             ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",             ### <percent>: "<f>%"             ### [arg]: arg optional             #Option     "NoAccel"               # [<bool>]             #Option     "SWcursor"              # [<bool>]             #Option     "EnablePageFlip"        # [<bool>]             #Option     "AccelDFS"              # [<bool>]             #Option     "IgnoreEDID"            # [<bool>]             #Option     "ColorTiling"           # [<bool>]             #Option     "ColorTiling2D"         # [<bool>]             #Option     "RenderAccel"           # [<bool>]             #Option     "SubPixelOrder"         # [<str>]             #Option     "AccelMethod"           # <str>             #Option     "DRI"                   # [<bool>]             #Option     "TVStandard"            # <str>             #Option     "EXAVSync"              # [<bool>]             #Option     "EXAPixmaps"            # [<bool>]             #Option     "ZaphodHeads"           # <str>             #Option     "EnablePageFlip"        # [<bool>]             #Option     "SwapbuffersWait"       # [<bool>]         Identifier  "ati_hd6850"         Driver      "radeon"         BusID       "PCI:1:0:0"         Option      "Monitor-DVI-0" "acer_233h"         Option      "Monitor-DVI-1"     "nec_ea191m"     EndSection          Section "Device"             ### Available Driver options are:-             ### Values: <i>: integer, <f>: float, <bool>: "True"/"False",             ### <string>: "String", <freq>: "<f> Hz/kHz/MHz",             ### <percent>: "<f>%"             ### [arg]: arg optional             #Option     "NoAccel"               # [<bool>]             #Option     "AccelMethod"           # <str>             #Option     "Backlight"             # <str>             #Option     "DRI"                   # <str>             #Option     "ColorKey"              # <i>             #Option     "VideoKey"              # <i>             #Option     "Tiling"                # [<bool>]             #Option     "LinearFramebuffer"     # [<bool>]             #Option     "SwapbuffersWait"       # [<bool>]             #Option     "XvPreferOverlay"       # [<bool>]             #Option     "HotPlug"               # [<bool>]             #Option     "RelaxedFencing"        # [<bool>]             #Option     "Throttle"              # [<bool>]             #Option     "ZaphodHeads"           # <str>             #Option     "DelayedFlush"          # [<bool>]             #Option     "TearFree"              # [<bool>]             #Option     "PerCrtcPixmaps"        # [<bool>]         Identifier  "intel_hd2000"         Driver      "intel"         BusID       "PCI:0:2:0"         Option      "Monitor-VGA1"  "syncmaster_940n"     EndSection          Section "Screen"         Identifier "Screen0"         Device     "ati_hd6850"         #Monitor    "nec_ea191m"         Monitor    "acer_v233h"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection          Section "Screen"         Identifier "Screen1"         Device     "intel_hd2000"         Monitor    "syncmaster_940n"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection          Section "Screen"         Identifier "Screen2"         Device     "ati_hd6850"         Monitor    "nec_ea191m"         SubSection "Display"             Viewport   0 0             Depth     1         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     4         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     8         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     15         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     16         EndSubSection         SubSection "Display"             Viewport   0 0             Depth     24         EndSubSection     EndSection      **A piece of Xorg.0.log**               [   191.201] (==) Log file: "/var/log/Xorg.0.log", Time: Thu May  2 17:38:33 2013     [   191.201] (==) Using config file: "/etc/X11/xorg.conf"     [   191.201] (==) Using system config directory "/usr/share/X11/xorg.conf.d"     [   191.202] (==) ServerLayout "X.org Configured"     [   191.202] (**) |-->Screen "Screen0" (0)     [   191.202] (**) |   |-->Monitor "acer_v233h"     [   191.202] (**) |   |-->Device "ati_hd6850"     [   191.202] (**) |-->Screen "Screen1" (1)     [   191.202] (**) |   |-->Monitor "syncmaster_940n"     [   191.202] (**) |   |-->Device "intel_hd2000"     [   191.202] (**) |-->Screen "Screen2" (2)     [   191.202] (**) |   |-->Monitor "nec_ea191m"     [   191.202] (**) |   |-->Device "ati_hd6850"     [   191.202] (**) |-->Input Device "Mouse0"     [   191.202] (**) |-->Input Device "Keyboard0"     [   191.202] (==) Automatically adding devices     [   191.202] (==) Automatically enabling devices     [   191.202] (==) Automatically adding GPU devices      **BTW, in fact I have two video cards and three monitors. But the problem concerns only Radeon adapter.**


title: Comparison of forbidden symbols and names in different FS's

text: What symbols and (maybe) names are forbidden on different files systems available in modern Linux distribution?


title: Single process accessible temporary file

text: I want to create a file that is only accessible to the process that created it (and potentially its children), and that disappears when the process exits, ideally never persisting the file to disk. As an example, I want to create `/mylocation/myfile.txt`, where that file can only be read from the current process, but not any other processes, even from the same user. I am happy to use some magic location other than `/mylocation`, e.g. somewhere under `/prod/PID`, but it needs to work for any filename. The background is that I am using an existing library which reads a password from `$FOO/mypassword`. Several processes are running under the same user account, but have different secret passwords. I wish to communicate the password to the library securely from the other processes. I appreciate the ideal solutions would user different user accounts or have the library not read the password from a file, but I do not have control over either of those aspects.


title: Checking if a passphrase is able to decrypt symmetrically encrypted files

text: I have about twenty files symmetrically encrypted with CAST5. I have a single passphrase that is meant to work with all of the files and I wish to confirm that it does. I wrote a script to perform a check a check on each file.               read pass     for file in *.gpg ; do        if ! gpg --batch --passphrase "$pass" -d "$file" &>/dev/null ; then           echo "Passphrase invalid for '$file'."        fi     done      My method of checking to see if the passphrase is valid for each file requires the decryption of the entire file, which is extremely slow. Is there a quicker way to do what I am attempting to do?


title: Yum install not working

text: I have a newer version of an rpm that I want to install. A yum list shows i have xyz-1-10.rpm installed and xyz-2-10.rpm available. I ran "yum clean all", then ran "yum install xyz-1-11.rpm". Note that i have a local yum repository, and my yum.repos.d/my.repo looks like:               [my]          name=My Repository          baseurl=http://yum.my.com/yum/my/          gpgcheck=0      Also, when i did a yum search xyz-1-11.rpm, it is listed. So the rpm is in the repository, but it just won't install it.