title: VNC connection taking a long time to connect (essentially...never)

text: I have my Ubuntu 13.10 desktop with vnc setup and installed. I'm using both a Macbook's integrated vnc remote desktop program and Windows 7's built-in Remote Desktop program to vnc. Both give the same results. When I open the Remote Desktop application, I set up the vnc connection. It asks for IP address, username, and password. I plug all those in and click connect. After that, it tries to load,but never stops (I'm guessing, by default, vnc will keep trying to connect until it does). I've literally left it alone for hours, and it still hadn't connected. During this whole process, nowhere does it give me an error....not even a warning about something. I'm able to ping and SSH into it, but it seems that Ubuntu doesn't like it when I vnc into it. I don't know what else to say. I was going off this source.


title: IP Prefix - how do I declare this?

text: Hi I have an IP Prefix issue I would like to declare the following IP's as "safe" using ip prefix "methodology" ("?") _**The IP's first three parts of the IP have been doctored to protect the innocent, but the last digit is correct_** These External IP's are to be considered safe.. `121.241.34.208` `121.241.34.209` `121.241.34.210` `121.241.34.211` How can I do that? Is 121.241.34.210/1 ok?


title: Find files that a user can not read?

text: I want to find files that a particular user will not be able to read. Assume the username is "user123" and they are in a group called "user123". I want to find files that, if they are owned by user123 have u+r on; failing that if the file is group user123 it should have g+r on; failing that it can have o+r on. Since GNU find has "-readable", I could do this:               sudo -u user123 find /start ! -readable -ls      However the process has to run by a user that does not have sudo access. Therefore I I tried this: (it doesn't check o+r but that isn't important at this point)               find /start \( -user user123 ! -perm -u=r  \) -o \( -group user123 ! -perm -g=r  \) -ls      but it lists this file:               272118    4 -rw-------   1 user123   user123       3243 Jul  3 19:50 /start/blah/blah/file.txt      This file is the only file under `/start` that is owned by user123 with `g=r` off. It is as if find is interpreting the `-u=r` as `-g=r`. I decided to try reversing the logic and instead test `not ( truth )` instead:               find /etc/puppet ! \( \( -user puppet -perm -u=r  \) -o \( -group puppet -perm -g=r \) -o \( -perm -o=r \) \)  -ls      That works! Why did the original `find` fail? Is it a bug in `find` (unlikely) or is the logic wrong? **Update:** I had the logic wrong. As pointed out below, since ! ( A || B || C ) == ( !A && !B && !C ) these are the two equivalent statements:               find /start ! \( \( -user user123 -perm -u=r \) -o \( -group user123 -perm -g=r \) -o \( ! \( -user user123 -o -group user123 \) -perm -o=r \) \) -ls     find /start ! \( -user user123 -perm -u=r \) ! \( -group user123 -perm -g=r \) ! \( ! \( -user user123 -o -group user123 \) -perm -o=r \) -ls      My goal was not to have to test user/group twice. What I really need is a more complicated if-then-else structure, which would probably only be possible if there was an -xor operator. I could build an xor out of and/or/not but it would be more complex than the two solutions above.


Java community use 4 spaces as the unit of indentation. 1   Ruby community use 2 spaces that is generally agreed-upon. 2 What's the standard for indentation in shell scripts? 2 or 4 spaces or 1 tab?


title: Archive of QNX's use messages?

text: **Context** I do not know all standard linux/unix commands, so I need manpages. I found QNX's manuals (invoked by "use [command name]") terse; I prefer them to linux manpages. I can get them from QNX with shell script, but I need to have QNX installed and it seems system does not have "use" for all commands. **Question** Is there archive of QNX's use messages on internet?


title: Cannot connect to fedora on port 80

text: I can't access to my local sites on a fedora machine from ubuntu. In firefox I get this error: `The connection has timed out` In fedora _iptables_ I added this line: `-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT` Also disabled _selinux_ , but still can't connect. Why? Edit: output of `netstap -tpln`:               Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name        tcp        0      0 0.0.0.0:3306                0.0.0.0:*                   LISTEN      -                        tcp        0      0 0.0.0.0:139                 0.0.0.0:*                   LISTEN      -                        tcp        0      0 0.0.0.0:631                 0.0.0.0:*                   LISTEN      -                        tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      -                        tcp        0      0 0.0.0.0:445                 0.0.0.0:*                   LISTEN      -                        tcp        0      0 :::139                      :::*                        LISTEN      -                        tcp        0      0 :::80                       :::*                        LISTEN      -                        tcp        0      0 :::631                      :::*                        LISTEN      -                        tcp        0      0 :::445                      :::*                        LISTEN      -       Output of `iptables -L -n -v`:               Chain INPUT (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination               9982 1956K ACCEPT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            state RELATED,ESTABLISHED         0     0 REJECT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 0 reject-with icmp-host-prohibited         0     0 REJECT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0            icmptype 8 reject-with icmp-host-prohibited         0     0 ACCEPT     icmp --  *      *       0.0.0.0/0            0.0.0.0/0                  139  9168 ACCEPT     all  --  lo     *       0.0.0.0/0            0.0.0.0/0                   20 16824 ACCEPT     udp  --  *      *       0.0.0.0/0            224.0.0.251          state NEW udp dpt:5353         0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW udp dpt:631         0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:631         0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW udp dpt:631         0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW udp dpt:137         0     0 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW udp dpt:138         0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:139         5   355 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:445         0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:22         0     0 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            state NEW tcp dpt:80        87  4524 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited          Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination                  0     0 REJECT     all  --  *      *       0.0.0.0/0            0.0.0.0/0            reject-with icmp-host-prohibited          Chain OUTPUT (policy ACCEPT 14997 packets, 16M bytes)      pkts bytes target     prot opt in     out     source               destination


title: Throttle the download speed of wget or curl while downloading

text: Is it possible to throttle (limit) the download speed of `wget` or `curl` ? Is it possible to change the throttle value while it is downloading ?


title: What should be the security context of these cron files?

text: I am running Fedora 20 and I am having some issues when running logrotate and anacron which I suspect may be related to SELinux:               Failed to determine timestamp: Cannot assign requested address     chgrp: changing group of /var/log/mariadb: Permission denied      I did some research and came across this article from Gentoo wiki that says the following: > If you want to perform system administrative tasks using cronjobs, you will > need to take special care that the domain in which the job runs has > sufficient privileges. > > First, make sure that your cronjobs run in the system_cronjob_t domains. > This means that the cronjobs must be defined as either >   >   >     scripts in the /etc/cron.hourly, /etc/cron.daily, ... directories >     crontab entries in the /etc/cron.d directory >     crontab entries in the /etc/crontab file >   A check on my SELinux default policies reveals that I have the following instead:               /etc/cron.daily(/.*)?    all files      system_u:object_r:bin_t:s0      /etc/cron.hourly(/.*)?   all files      system_u:object_r:bin_t:s0      /etc/cron.monthly(/.*)?  all files      system_u:object_r:bin_t:s0      /etc/cron.weekly(/.*)?   all files      system_u:object_r:bin_t:s0      /etc/cron\.d(/.*)?       all files      system_u:object_r:system_cron_spool_t:s0      /etc/crontab             regular file   system_u:object_r:system_cron_spool_t:s0      Should I change the SELinux policy to so that these have `system_cronjob_t` as the context label instead?


title: tar exits on "Cannot stat: No such file of directory", why?

text: I'm trying to create tar.gz file using the following command:               sudo tar -vcfz dvr_rdk_v1.tar.gz dvr_rdk/      It then start to create files (many files in folder), but then I get the following error:               tar: dvr_rdk_v1.tar.gz: Cannot stat: No such file or directory     tar: Exiting with failure status due to previous errors      I don't see any description of this error, what does it mean?


title: Restore from wastebasket shortcut?

text: Is there a shortcut for GNOME desktop to restore a file which has been sent to wastebasket? I did this on windows with ctrl + y, I just wonder if someone uses something similar on Linux?


title: Verify if a system has DVD burners?

text: Is it possible to verify if the system has a DVD burner installed? I need this for a script.


title: creating custom mount point in / for a file system

text: If I want to mount a file system at `/myname` is it possible by just editing **fstab** file?   Or should I do more to be safer? Is any other way to do it, or its not a good idea to do?


title: wired connection not working under Ubuntu 10.04

text: (using Ubuntu 10.04 LTS on a netbook prior to any updates) The wireless works fine, the wired connection has been tested using a Windows computer. Choosing auto eth0 from the power manager fails. Using Wicd network manager - pressing connect to Wired Nework - 'connecting' Wired network: Obtaining IP address... - Connection Failed: Unable to Get IP Address               alex@alex-laptop:~$ ifconfig -a     eth0      Link encap:Ethernet  HWaddr 00:24:54:df:22:d5             inet6 addr: fe80::224:54ff:fedf:22d5/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:8558 errors:0 dropped:0 overruns:0 frame:0           TX packets:48 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:526280 (526.2 KB)  TX bytes:9564 (9.5 KB)           Interrupt:18       testing dhclient on eth0               alex@alex-laptop:~$ sudo dhclient eth0     [sudo] password for alex:      Internet Systems Consortium DHCP Client V3.1.3     Copyright 2004-2009 Internet Systems Consortium.     All rights reserved.     For info, please visit https://www.isc.org/software/dhcp/          Listening on LPF/eth0/00:24:54:df:22:d5     Sending on   LPF/eth0/00:24:54:df:22:d5     Sending on   Socket/fallback     DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3     DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 3     DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5     DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13     DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8     DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 18     DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 11     No DHCPOFFERS received.     No working leases in persistent database - sleeping.      running dmesg                   alex@alex-laptop:~$ dmesg | grep eth0     [    1.092888] sky2 eth0: addr 00:24:54:df:22:d5     [   13.521498] sky2 eth0: enabling interface     [   13.522027] ADDRCONF(NETDEV_UP): eth0: link is not ready     [   15.036628] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control rx     [   15.099270] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready     [   21.505203] sky2 eth0: disabling interface     [   21.516896] sky2 eth0: enabling interface     [   21.517394] ADDRCONF(NETDEV_UP): eth0: link is not ready     [   21.544054] sky2 eth0: disabling interface     [   21.573775] sky2 eth0: enabling interface     [   21.574326] ADDRCONF(NETDEV_UP): eth0: link is not ready     [   23.085959] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control rx     [   23.086287] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready     [   33.488031] eth0: no IPv6 routers present     [   98.269052] sky2 eth0: disabling interface     [   98.289665] sky2 eth0: enabling interface     [   98.290176] ADDRCONF(NETDEV_UP): eth0: link is not ready     [   99.795289] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control rx     [   99.795826] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready     [  110.272732] eth0: no IPv6 routers present     [  133.463522] sky2 eth0: Link is down.     [ 7748.854103] sky2 eth0: Link is up at 100 Mbps, full duplex, flow control rx      running ifup                   alex@alex-laptop:~$ sudo ifup eth0     [sudo] password for alex:      Ignoring unknown interface eth0=eth0.      running lspci                   alex@alex-laptop:~$ lspci | grep -i ethernet     09:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller     alex@alex-laptop:~$ lshw -c Network | driver     WARNING: you should run this program as super-user.     No command 'driver' found, did you mean:      Command 'drivel' from package 'drivel' (universe)     driver: command not found     alex@alex-laptop:~$ lshw -c Network | grep driver     WARNING: you should run this program as super-user.            configuration: broadcast=yes driver=wl0 driverversion=5.60.48.36 latency=0 multicast=yes wireless=IEEE 802.11            configuration: broadcast=yes driver=sky2 driverversion=1.25 firmware=N/A latency=0 multicast=yes      running route                 alex@alex-laptop:/etc$ route     Kernel IP routing table     Destination     Gateway         Genmask         Flags Metric Ref    Use Iface     link-local      *               255.255.0.0     U     0      0        0 pan0     link-local      *               255.255.0.0     U     0      0        0 eth1      I have seen advice to edit the `/etc/dhcp3/dhclient.conf` file by putting a # infront of rfc3442 and save and restart, but this did not work. Then I tried adding to `/etc/network/interfaces` **auto eth0 iface eth0 inet dhcp**. Originally the interfaces file was:               auto lo     iface lo inet loopback      which I edited to be:                auto lo     iface lo inet loopback          auto eth0     iface eth0 inet dhcp      and then removing network manager from start up, and after a reboot this also did not help. any ideas why the wired connection still does not work?


title: Custom date format in emacs org-mode

text: I want to have something like "Dec 15, 2011" Emacs org-mode only lets me toggle between <11/29/13 Fri> and <2013-11-29 Fri>. Can anyone suggest a way to do this?


title: Threads vs (Forked) Processes

text: Linux applications generally fork then exec (with execve() ), but Java applications, and certain Apache MPMs use threading. If forking, uses the fork + exec to spawn a process, what is the high level version for threading? How does JVM or Worker MPM spawn threads?


title: In Openbox, is it possible to execute a command in a matching window, or open a new one if no match exists?

text: Essentially, I'm looking for a way to keep one terminal open running tmux, and open new windows inside of the session rather than spawning new terminals. On pushing a key sequence, I'd like to open a new terminal if there isn't one open. But if there is one open already, I'd like to switch to its desktop if necessary and focus the window, then send the command. I found the documentation for the `If` action for windows and I was hoping there was a similar construct for global actions as well, but I'm not seeing it. Edit: Solution I ended up using a simplified version of jw013's script. The original script was written for a quake terminal effect, but what I wanted was simpler: not to toggle a terminal, but simply to always open a window in a single tmux terminal session. The key component which I was missing was `wmctrl`, which I hadn't heard of. Using jw013's script as a base, I simplified to:               # the variable name for the window (used in openbox rc.xml for the rule as well)     wmclass=tmux_terminal          # if we successfully focus the window then open a new tmux window inside     if wmctrl -a $wmclass -x; then       tmux new-window          # otherwise the window hasn't been opened.  open it and attach to tmux.     else       urxvt -name $wmclass -e tmux attach &     fi      I then bound this to `W-space` in openbox, and set up an application for `name=tmux_terminal` to open maximized on the 1st desktop. Now if the terminal is not opened, `W-space` will open it and attach to tmux, else, it will simply switch to the existing tmux session window and open a new window inside of it.


title: I killed sshd but it's still running?

text: On AIX 6100-05-01-1016 I accidentally killed the sshd. But for a suprise it still was running. Why? I did a:               kill PID      Q: ..so sshd doesn't reacts to normal kill signal? or are there any default security methods that starts an sshd if the old one get's killed?


title: Extract data from line and prepend to the line?

text: Ok, I have some data in the form:                                    and I'd like to change it to:               5-cervna      4-cervna      3-cervna      19-kvetna       ie. extract the date from the link and prepend it to the link. Is there a nice way to do this with regular expressions, or with some nice bash script? The number of dashes is not always the same and it's not "cervna" all the time either. I've arrived to the following grep command which grabs the appropriate output, I just don't know how to paste it together with the original data:               grep -Po '[0-9]{1,2}-[[:alpha:]]*'


title: Executing 'ssh-add -D' from a cron job doesn't work

text: I've set up an openSSH server on an ubuntu-server machine, and I configured it to use public/private key (without password). I want to require both password and key check when the client connects to the server, so I created the private key with a passphrase. Problem is, that the passphrase is required only on the first time the client tries to connect to the server, and any consecutive connections (from the same client) will connect automatically without asking for the passphrase again. An exception to that is when the client's computer reboots, but that's not what I want. I have full control on the client's machine, so I decided to add a cron job with the command "ssh-add -D", which removes all the identities from the ssh agent on the client computer, which means the next time the client tries to connect, he will be asked to enter the passphrase as if it was the first time. I added this command to a cron job to run every hour (that would satisfy me, even that it means that not EVERY attempt to connect would require password). Unfortunately, it appears that it doesnt do anything when the job executes. I checked that the job actually executes with adding more commands to it - while all the commands work as expected, only the ssh-add appears to malfunction. I added the cron job with the following lines:               user@ubuntu:~$ crontab -u user -e      then I chose vim to edit, and added the line:               * * * * * ssh-add -D      saved. What am I doing wrong? Just on a side note: I'm very new to linux (using ubuntu), so I may not understand some high-level concepts.. I'll appreciate if your answers will be simple :)


title: Add album-art cover to mp3/ogg file from command-line in batch mode?

text: I am looking for a software in Linux, that will add the album-art/cover to each of the selected files in batch-mode. The album art is a jpg/png stored in my computer. It will be awesome if it can import from internet. Currently I have tried both Rhythmbox and Banshee. I have also tried `lame` and `easytag`, but seems they do not support batch mode. `lame` is _not_ adding the properties, but overwriting. (I know lame is the _only_ command line s/w i have used so far). So, basically I am looking for:               <some magic s/w> --picture=<my chosen picture> Music/Artist/*.mp3      That will add the picture to the metadata of the file, permanently. Can you suggest me any such software?


title: `chmod 770 folderName` restrics access to subdirectories & subfiles?

text: If I run `chmod 770 ./folderName`, then users who are not the owner or in the group owning `./folderName` (i.e. users in the “others” category) cannot access `./folderName/folderB` or `./folderName/fileC`, even after running:               chmod 777 ./folderName/folderB      chmod 777 ./folderName/fileC      Right? Does that rule applies to all Linux distributions? Thank you.


title: How do you create RPM from .spec file?

text: I'm attempting to create an RPM from a spec file that was provided here: http://sauron.jyu.fi/docs/manual/x191.html Having not used rpm much, I assume that I execute the command `rpmbuild` and point it at the spec file.               rpmbuild sauron.spec     error: File /root/rpmbuild/SOURCES/sauron-0.7.3.tar.gz: No such file or directory      Since it appears that the rpmbulid utility epects files to be located in a certain location, I copy them there.               tree ~/rpmbuild/     /root/rpmbuild/     ├── BUILD     ├── BUILDROOT     ├── RPMS     ├── SOURCES     │   └── sauron-0.7.3.tar.gz     ├── SPECS     │   └── sauron.spec     └── SRPMS      I've tried executing the rpmbuild command from ~ , ~/rpmbuild/SPECS and other directories, yet I'm not able to create the RPM. There is no output or logging that would indicate what the problem might me. This should be a simple task, yet even with google, I'm not able to figure it out. Can anyone offer guidance on how to build this RPM?


title: Fedora: dmidecode VS lscpu - different CPU reports

text: When it comes to retrieving CPU information via the Terminal, I'm getting a different output from `dmidecode --type 4` than I am from `lscpu`. I've included the relevant output below. For the sake of brevity, I've only included the input and relevant output. In general, though, I'm wondering which of these is the more reliable source. I know that dmidecode reads from the BIOS, but that's a mixed bag. Any insight would be greatly appreciated!               [root@Royal Desktop]# sudo dmidecode --type 4     # dmidecode 2.11     SMBIOS 2.4 present.              Manufacturer: AMD                       ID: B1 0F 06 00 FF FB 8B 17         Version: AMD Athlon(tm) 64 X2 Dual Core Processor 4800+               External Clock: 200 MHz         Max Speed: 2500 MHz         Current Speed: 2500 MHz                    [root@Royal Desktop]# lscpu         Architecture:          i686         CPU op-mode(s):        32-bit, 64-bit         Byte Order:            Little Endian         CPU(s):                2         On-line CPU(s) list:   0,1         Thread(s) per core:    1         Core(s) per socket:    2         Socket(s):             1         CPU MHz:               1000.000


title: How to list files starting with "a" or "c" from /etc.

text: I tried `ls /etc/[ac]*` but it shows directories starting with _a_ or _c_ , and their entire contents, not the files starting with " **a** " or " **c** ".


title: Installling phpmyadmin to Kali Linux

text: I want to add phpmyadmin to Kali Linux. But i am getting the following error. First i ran apt-get update which worked successfully than the following. Here is the output of apt-get update               root@kali:~# sudo apt-get update     Hit http://http.kali.org kali InRelease                                             Hit http://http.kali.org kali/main Sources                                          Hit http://http.kali.org kali/non-free Sources                                      Hit http://http.kali.org kali/contrib Sources                                       Hit http://http.kali.org kali/main i386 Packages                                    Hit http://http.kali.org kali/non-free i386 Packages                                Hit http://http.kali.org kali/contrib i386 Packages                                 Ign http://dl.google.com stable InRelease                                           Hit http://dl.google.com stable Release.gpg                               Hit http://dl.google.com stable Release             Hit http://dl.google.com stable/main i386 Packages                         Hit http://security.kali.org kali/updates InRelease                       Ign http://dl.google.com stable/main Translation-en_IN                       Ign http://dl.google.com stable/main Translation-en     Hit http://security.kali.org kali/updates/main i386 Packages     Hit http://security.kali.org kali/updates/contrib i386 Packages     Hit http://security.kali.org kali/updates/non-free i386 Packages     Ign http://http.kali.org kali/contrib Translation-en_IN     Ign http://http.kali.org kali/contrib Translation-en     Ign http://http.kali.org kali/main Translation-en_IN     Ign http://http.kali.org kali/main Translation-en     Ign http://http.kali.org kali/non-free Translation-en_IN     Ign http://http.kali.org kali/non-free Translation-en     Ign http://security.kali.org kali/updates/contrib Translation-en_IN     Ign http://security.kali.org kali/updates/contrib Translation-en     Ign http://security.kali.org kali/updates/main Translation-en_IN     Ign http://security.kali.org kali/updates/main Translation-en     Ign http://security.kali.org kali/updates/non-free Translation-en_IN     Ign http://security.kali.org kali/updates/non-free Translation-en     Reading package lists... Done     root@kali:~#       After this i tried the following which is showing error ! !               root@kali:~# sudo apt-get install phpmyadmin     Reading package lists... Done     Building dependency tree            Reading state information... Done     The following extra packages will be installed:     dbconfig-common libapache2-mod-php5 libmcrypt4 php5-cli php5-common php5-gd php5-mcrypt php5-mysql     Suggested packages:     php-pear libmcrypt-dev mcrypt     The following NEW packages will be installed:     dbconfig-common libmcrypt4 php5-gd php5-mcrypt phpmyadmin     The following packages will be upgraded:     libapache2-mod-php5 php5-cli php5-common php5-mysql     4 upgraded, 5 newly installed, 0 to remove and 635 not upgraded.     Need to get 5,503 kB/12.0 MB of archives.     After this operation, 17.2 MB of additional disk space will be used.     Do you want to continue [Y/n]? y     Err http://security.kali.org/kali-security/ kali/updates/main phpmyadmin all 4:3.4.11.1-2+deb7u1     Connection failed     Failed to fetch http://security.kali.org/kali-security/pool/main/p/phpmyadmin/phpmyadmin_3.4.11.1-2+deb7u1_all.deb  Connection failed     E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


title: port forwarding keeps changing back ti ipad

text: i am new to this site, but have been creeping it for a while and reading as much as i can, i have found many answers to my issues with my kali linux box. i am new to linux (wish i got it sooner) i finally gave up on win7 and i hate all of the Microsoft product line, and i hate apple as well. android and linux seem to be the best choices (for me anyway) but my question is i have a bell 2wire 2701hg-g router, every time i set the port forwarding to my linux box and save the changes, almost immediately after i leave the page (i.e go to a different tab in the router settings) and go back to the port forwarding, it has switched back to my mothers ipad. i dont know how to stop this. does anybody have any ideas?


title: Linux command book

text: Am new to Linux I would request you to kindly provide me Linux commands for administration.


title: How to get the value in a file?

text: I would like to ask how to get the 4th to the last value in a file. I don't have problem on extracting a value from the beginning of the file using sed (e.g. sed -n '4p' filename.txt) only have a trouble when parsing value using the last part of the file.


title: How logical address of one process differs from the logical address of another?

text: I am a newbie. I am reading **Understanding Linux Kernel**. There, I am trying to understand how **logical address** got translated to **physical address**. To my understanding, I believe logical address got translated to linear address(with the help of Segmentation Unit) and then linear got translated to physical address(with the help of paging unit). Digging a step deeper, I found set of segmentation register changes only if we are switching from user to kernel mode, else it remain constant. i.e. for the various process executing in user mode, the set of segmentation register which is **cs** , **ds** , **ss** etc. are same. And also in the segment descriptor table **base** and **limit** fields of various process executing is also the same.   Under such situation, I am not able to understand how logical address of one process **differs** from the logical address of another?


title: Why highest priority threads are displayed with RT in top and htop?

text: In the `top` and `htop` tools, processes (or/and threads depending on display settings) having the highest realtime priority (99 from the userland API point of view) with either the scheduling policy `SCHED_RR` or `SCHED_FIFO` the priority is displayed as `RT`. For all the other real time processes, the priority is displayed as a number p defined by:               p = -userprio -1       I am wondering why `top` and `htop` don't display `-100` for higest priority real time processes ?


title: How to locate a file in a directory

text: How can I locate a file using `locate` in `CentOS` under a specific directory from terminal? Locate search the whole database!


title: Bond slave link up is too slow

text: On one of my servers I set up a bond-device consisting of an onboard network- card and an PCIe network card. (eth1 and eth5) I set up the configugration according to `man ifcfg-bonding` - i.e. eth1 and eth5 will not be brought up on system boot, but bond0 will do this. Now the problem seems to be that eth5 takes too long to establish a link. Result is a running bond0 consisting of eth1 and eth5, but eth5 link is down. If I do a manual `ifconfig eth5 up` in this situation, eth5 will have a link and everything will be ok. Details:               # cat /proc/net/bonding/pbond0     Ethernet Channel Bonding Driver: v3.2.5 (March 21, 2008)          Bonding Mode: fault-tolerance (active-backup)     Primary Slave: None     Currently Active Slave: eth1     MII Status: up     MII Polling Interval (ms): 100     Up Delay (ms): 0     Down Delay (ms): 0          Slave Interface: eth1     MII Status: up     Link Failure Count: 0          Slave Interface: eth5     MII Status: up     Link Failure Count: 0          # ethtool -i eth1     driver: bnx2     version: 2.0.18-suse     firmware-version: 6.2.16 bc 5.0.4 UMP 1.1.9          # ethtool -i eth5     driver: e1000     version: 7.6.15.5-NAPI     firmware-version: 5.6-2      The solution might be to give eth5 more time to settle the link during boot. This is propably very OS-specific (here: SLES10 SP4).


title: Copy the last Emacs message into the current buffer

text: Is there a function I could use to quickly copy the message in the echo area (if any) into my working buffer? Should I define the shortcut for that function with `define-key` or `global-set-key` or some other way?


title: How to Install BASH in FreeBSD

text: I really find that using `bash` helps a lot, when you need to retrieve strings of text that you used previously. But how can I install it on FreeBSD? I have tried typing `bash` into the terminal, but that returns: `bash: not found`


title: When auto-completing in tcsh, can I reference a previous argument?

text: I'm trying to get some efficient auto-completing going here, and have hit upon a bit of a snag. I've got a command for setting two things at once. The first is a relatively small list, but the second, if not filtered by the first, is unmanageably huge. What I want to be able to do is pass what's already been typed or auto- completed for the first argument to the second autocomplete command...               complete job 'p/1/`listJobs`/' 'p/2/`listTasks`/'      What I want to be able to do is pass the job that has already been entered for the first argument to the 'listTasks' command. Any idea how I can do this? Cheers (this is a repost from an old SuperUser.com question of mine that nobody ever answered... The SuperUser question can be found here)


title: How to get output from a remote shell

text: I have an application running on a server, started from the command line. From time to time, I need to connect to the server via SSH and get the output messages written to stdout from the application. Is there a way to read/sniff/catch the messages on that terminal? The server runs Fedora 12. To clarify a bit more. I have admin access to the server, but I cannot stop the running application because it is in critical environment. It is the end user who starts the application from a terminal. Via ssh I have to read messages in the terminal whenever user sees strange behaviors. It is a graphical application. I may build a script to run the application with screen, this means I have to change the "launcher" but there are some servers not always accessible for security reason from outside the LAN. Updating is complicate. My question is, if there is an application running, is there any way to catch its output in the terminal without stopping it and rerun under screen or whatever?


title: High-level command to request several branches of snmp in one tcp-session?

text: We are trying to monitor our servers mainly with SNMP. Due to performance reasons we are changing this from single requests to snmp-bulk-requests (as allowed in SNMP v2c). In theory (at least to my knowledge) it should be possible to request several branches/values in a single bulk-request, so the number of tcp-sessions needed for this will be minimal. We are currently using CentOS 5 for this - the high-level-command in question is `snmpbulkwalk` - but this only seems to be able to request a single branch (i.e. subtree) at a time. Am I wrong in theory, or is there a high-level-command out there that can do what I want?


title: vi/vim, how can I write out a number of lines to a new file

text: I have a bunch of lines that I want to write out to a different file.   How can I do that?


title: How do I set the PATH or other environment variables so that X apps can access it?

text: How can I set env variables so that KDE recognizes them? How do you set the path in a non-shell environment (KDE)? Unlike the above two questions, I want to know how to do this for GNOME. Or better yet, is there a method that is independent of the window manager. For the shell/terminal, I usually edit `~/.bashrc`. Where can I place export statements so that environment variables are available for all X applications, no matter the window manager used?


title: file(1) and magic(5) : prioritizing a result

text: My question follows that one: file(1) and magic(5) : describing other formats . I want to describe a FASTA sequence ( http://en.wikipedia.org/wiki/FASTA_format) It could be a **DNA sequence** (with only ATGC)               >header     ATGCTAGCATAGCATCGATGCTGTAGCTACGTAGCTACGTCTACG      A 'magic' pattern would be               >.*\n[ATGC]*      or a **PROTEIN** sequence ( ACDEFGHIKLMNPQRSTVWYBZX containing ATGC too)               >header     AHITKLMNPQRGHIKLMNPQRC      A 'magic' pattern would be               >.*\n[ACDEFGHIKLMNPQRSTVWYBZX]*      But whenever I use those regular expressions, file tells me that it's a protein because it matches the 2nd regex. Is there a way to prioritize a result ? Is there a way to proritize , something like "Don't try any other pattern if that one matches ? ".


title: How to set up network for Ekiga on Arch Linux?

text: I've got two machines with identical Ekiga versions and settings (including accounts), both behind the same router. Both have contacts referencing myself and the standard call back test. Machine A:   * Up to date Ubuntu 13.04   * Connected to wireless network Machine B:   * Up to date Arch Linux   * Connected to wired network No port forwarding is set up on the router. On machine A, after logging in, my "self" contact shows I'm online and I'm able to successfully complete a call back test with audio and video. After logging out on machine A and logging in on machine B, I do _not_ see myself as online and the call back test just opens the call window for a long time and never calls back. No messages are displayed indicating what is happening. Some debug output:               $ ekiga -d 4 2>&1 | grep STUN | cut -f 3-                             Ekiga   Started STUN detector     StunDetect...6b8651d700 OPAL    STUN server "stun.ekiga.net" replies Cone NAT, external IP 91.190.8.175     Housekeepe...6b8c0dd700 Ekiga   Stopped STUN detector                             MonSock Created bundled UDP socket via STUN, internal=192.168.1.3:5060, external=91.190.8.175:5060      I don't get any "PDU is likely too large" messages. I tried setting up port forwarding to machine B as well. The result is that machine A complains "Ekiga did not manage to configure your network settings automatically", but machine B is still not able to do anything. Despite the warning and the port forwarding setup, machine A is still able to successfully complete a call back test. The only difference I could find in the two clients is that A has some extra video codecs - H263, H263-1998 and MP4V-ES, to be specific.


title: Convert Debian Live USB persistent filesystem to a standalone installation

text: How would I convert a persistent filesystem (`live-rw`) from a Debian Live USB to a standalone, bootable installation that can be run on a VM? ### What I've tried   1. Chrooting and installing a bootloader (grub) - Can't chroot since the filesystem (`live-rw`) is a very limited installation, no `bash` etc.   2. Installing Debian from this USB in hope that it will preserve the persistent files (like Ubuntu does) - installs a clean system. ### Full story I have been given files copied from a Live Debian (Squeeze) USB that has been used with the persistent option. I need to convert the persistent filesystem to a standalone installation and put it on a vmware vSphere VM, as it contains configured servers/services I would rather not configure from scratch. Since the persistent file (`live-rw`) is just an `ext2` filesystem i thought I would only need to install a bootloader and provide kernel/initrd image. The problem is this image has no `/proc` `/sys` and `/dev` nodes and only a few binaries in /bin (can't even `chroot` into it without `bash`)               $ file live-rw      live-rw: Linux rev 1.0 ext2 filesystem data (mounted or unclean), UUID=fa55a4d2-1fc4-5344-9e94-dc12cb60612d (large files)      Contents of /:               $ ls /     bin  etc  home  lib  live  lost+found  media  opt  root  sbin  tmp  usr  va      Contents of /bin:               $ ls /bin/     bunzip2  bzcat  bzcmp  bzdiff  bzegrep  bzexe  bzfgrep  bzgrep  bzip2  bzip2recover  bzless  bzmore      I had an 'A ha!' moment when I realized that I would just need to install Debian from this USB drive and that would keep my persistent data. This is how Ubuntu works I believe. I've created an empty image, partitioned and formatted it, copied the USB file and installed MBR & extlinux. However after booting and running an installation from this USB it has only installed a clean system... What should I do in this situation? How to convert this image fully featured Debian installation? I know it can be done, it's Linux after all...


title: What is the [rc0] kernel process?

text: I have several servers. A few of them are running ubuntu 12.04 LTS. I'm looking into an intermittent hanging issue, and noticed an `[rc0]` kernel process From `ps -ef`:               ...     root      1025     2  0 Feb09 ?        01:00:44 [rc0]     ...      It has quite a bit of CPU time. What does this process do? Is it accociated with `/etc/rc0.d` (halt)?


title: How to detect out-bound port from PID

text: I have several applications that run on random ports. How would I take the pid or the file location and find which port it is running on? Example of desired output:               www-data/apache = 80     my-awesome-game = 2023


title: Change date "July 29th, 2011" to "20110729"

text: I have lots of HTML files contains date with format `July 29th, 2011` I want to change date format `July 29th, 2011` to `20110729`, `December 9th, 2010` to `20101209`, etc. I think `sed` may works but still can't find the solution because of its indirect sequence.


title: CentOS VM 3972 Segmentation Fault

text: I'm trying to install MATLAB 2012 on CentOS 5.8 running on a VM cluster. I was able to mount the .iso file, but when I run `./install`, it was unable to write to `/tmp` giving the error, "no space on device". So after running the command:               mount -o mode=1777,nosuid,nodev -t tmpfs tmpfs /tmp      I get the following:               [root@pub121 iso]# df -H /tmp     Filesystem             Size   Used  Avail Use% Mounted on     tmpfs                  2.2G      0   2.2G   0% /tmp      and `/etc/fstab` looks like this:               [root@pub121 iso]# cat /etc/fstab     LABEL=/                 /                       ext3    defaults        1 1     tmpfs                   /dev/shm                tmpfs   size=10g        0 0     devpts                  /dev/pts                devpts  gid=5,mode=620  0 0     sysfs                   /sys                    sysfs   defaults        0 0     proc                    /proc                   proc    defaults        0 0     LABEL=SWAP-xvda2        swap                    swap    defaults        0 0      When I install MATLAB, the following message is shown:               Preparing installation files ...     Installing ...     ./install: line 713:  3972 Segmentation fault           /tmp/mathworks_3936/sys/java/jre/glnx86/jre/bin/java -splash:"/mnt/iso/java/splash.png"-Djava.ext.dirs=/tmp/mathworks_3936/sys/java/jre/glnx86/jre/lib/ext:/tmp/mathworks_3936/java/jar:/tmp/mathworks_3936/java/jarext:/tmp/mathworks_3936/java/jarext/axis2/:/tmp/mathworks_3936/java/jarext/guice/:/tmp/mathworks_3936/java/jarext/webservices/ com/mathworks/professionalinstaller/Launcher -root "/mnt/iso" -tmpdir "/tmp/mathworks_3936"      Any suggestions? [EDIT] I have the option to provide an alternate location instead of /tmp in the install script. However, I am running CentOS as an MPICH2 cluster with 8 nodes and there is limited space as shown               [root@pub121 ~]# df     Filesystem           1K-blocks      Used Available Use% Mounted on     /dev/xvda1             7103744   7095484         0 100% /     tmpfs                 10485760         0  10485760   0% /dev/shm     /home/Matlab_Unix_2012a/ml2012au.iso                        5212274   5212274         0 100% /mnt/iso     tmpfs                  2097244         0   2097244   0% /tmp      Is it possible to run the install script with this configuration?


title: Linux support for new Sony Vaio Z external graphics card?

text: The new Sony Vaio Z series laptop comes with a media dock that has a USB connection (Light Peak) to an external AMD Radeon graphics card. What is the support for devices like this in Linux?


title: urxvt transparent cursor

text: I've changed my `.Xdefaults` for a black background, white foreground, but my cursor is now opague. I can't see the letter I'm over, and worse, I can't see my screen hardstatus. Google is just pulling up how to make the whole term transparent. How can I get my cursor transparent again?               $ cat .Xdefaults     URxvt*transparent: true     URxvt*tintColor: Black     URxvt*shading: 110     URxvt*saveLines: 60000     URxvt*foreground: White     URxvt*font: xft:Droid Sans Mono:pixelsize=14     URxvt*scrollBar: false     # Clickable links     URxvt*perl-ext-common: default,matcher     URxvt*urlLauncher: firefox     URxvt*matcher.button: 1


How I would go about opening multiple URLs from a text file as different tabs in Firefox/Chrome? My text file is just a list of URLs, one per line:               http://www.url1.com     http://www.url2.com     http://www.url3.com     http://www.url4.com


title: Video archiving method?

text: I want to archive family videos, films, etc. I'm currently using:               mencoder INPUT.avi -o OUTPUT.avi -ovc x264 -x264encopts bitrate=750 pass=1 nr=2000 -oac mp3lame -lameopts cbr:br=128      I want to retain good quality, but obtain the smallest video size. Can I do better than this? (Command-line applications only please.)


title: VPS not replying on ftp port 21 using pure-ftpd

text: There is no response from my VPS when I connect to the ftp service on port 21. It's a Linux server with kloxo and pure-ftp. I have been using it without troubles from past 8 months. I installed ConfigServer before few months, which didn't create any troubles but to check, I have disabled it. It starts working at sometime for few minutes and then again stops for like 2-3hours and then again work for like 10-20minutes. I tried connecting using telnet and it was blank response but after a few minutes, it started working.


title: How to dump USB traffic?

text: I got an USB gamepad and I would like to see and inspect the signals and commands that this peripherals is actually sending to my PC/kernel: how I can do that ? I was assuming that something like               cat /dev/bus/usb/006/003      Was enough, but apparently this command returns immediately and prints some unreadable encoded chars . There is a way to "debug" an USB device like that ?


title: Why does 'apt-get install' suggest packages that I already have?

text: On Ubuntu Desktop 10.04.1, I have just run `apt-get install` to install a package. Amongst the list of suggested packages is `ssh`. I'm confused, because I am sure that I already have `ssh` installed:               # ssh --version     usage: ssh [-1246AaCfgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]                [-D [bind_address:]port] [-e escape_char] [-F configfile]                [-i identity_file] [-L [bind_address:]port:host:hostport]                [-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]                [-R [bind_address:]port:host:hostport] [-S ctl_path]                [-w local_tun[:remote_tun]] [user@]hostname [command]      So... When `apt-get install` suggests packages, does it take my existing set-up into consideration before making the suggestion? If so, why does it suggest something that I already have?


title: Cannot scroll terminal in Fedora CLI

text: I work on Fedora 17 entirely in CLI (or TUI) and I do not have a mouse. If I output something that is long I cannot scroll the lines. I tried `Ctr`+`Up`, `Ctr`+`Shift`+`Up`, `Ctrl`+`A` as some sites suggest but none let me scroll the terminal. Is there a universal way to let me scroll the terminal line by line?


title: How to grep, then search and replace on the output?

text: I have some output from iconv, e.g.               $ iconv -l | grep ISO | head -5     CSISO4UNITEDKINGDOM//     CSISO10SWEDISH//     CSISO11SWEDISHFORNAMES//     CSISO14JISC6220RO//     CSISO15ITALIAN//     durrantm:~      How can I change the `//`'s to, say `\--`'s ? I tried `$ (iconv -l | grep ISO).gsub('\/\/','--')` but no luck.


title: confirmed exit using trap

text: I am trying to trap the `Ctrl+C` signal asking a confirmation from the user. The trapping part works fine. But once the signal gets trapped, it does not return to the normal execution. Instead, it quits the script. How to make it resume the execution when the user presses no. here is my code               hell()     {     echo "Do you want to quit? Press 1 for yes and 0 for no";     read n;     if [ $n == 1 ]; then     exit 1;     fi     }          trap "hell" SIGINT          find /


title: Fedora or OpenSuse? which one takes me to redhat/centos family philosophy

text: I know questions like this are quickly closed according to your rules but this question is not about which one is better. I have criteria as a Ubuntu user who wants to take a RedHat certification. My office wants me to take it. As I guess files would be arranged in a particular ways in the Debian family, I wanted to use a Desktop OS which is closed to RedHat instead. I am looking at stability, ease of use (I will be developing as well, mostly Java and maven stuff), the one which would not shutdown because of overheating and ideally one with nice package manager like Ubuntu's own.


title: I broke zypper somehow; zypper: /lib64/libresolv.so.2

text: Every time I try and run `zypper` I get the following error:               WLS1:~ # zypper     zypper: /lib64/libresolv.so.2: version `GLIBC_2.9' not found (required by /usr/lib64/libkrb5.so.3)          WLS1:~ # dir /lib64/libresolv*     -rwxr-xr-x 1 root root 78608 Jun  6  2008 /lib64/libresolv-2.8.so     lrwxrwxrwx 1 root root    16 Sep 13 12:11 /lib64/libresolv.so.2 -> libresolv-2.8.so      I am not that familiar with `zypper` and `Suse Enterprise Linux` in general. I know more about Redhat/Centos. I know that I have `2.8` and that I need `2.9` the question is where can I get `2.9`, I don't know what caused this.


title: Grub does not list windows after crunchbang installation

text: I have a couple of years of experience with ubuntu, but this is my first time with a non-ubuntu based distribution. I managed to successfully install Crunchbang from a bootable usb stick, created with unetbootin (my hom laptop's cd drive is dead) and at the end of installation, it asked me whether I wanted to install grub. It said that it detected the windows operating system that was already there and that it should be fine if all my operating systems are listed. So, I let it install grub and now when I boot into my machine only a couple of Crunchbang listings appear in the grub boot menu. My windows has become inaccessible. With the little experience I had, I tried to look for the menu.lst file which I expect to list the entries that would be shown in the grub boot menu. But I couldn't find that file. Perhaps crunchbang puts it in a different location? I want to get my windows be listed in the grub boot menu. Any ideas? **Edit:** From a comment on the question Editing grub menu I came to know the location of the boot menus, as `/boot/grub/grub.cfg` and that file exists on my crunchbang system. I now need to know how and what to add to it to get my windows. **Edit 2:** From the same question as above, I learned to do `sudo update- grub` which did put my windows entry in my grub boot listing and everything is fine. But I would still like to know... why wasn't it there initially when crunchbang did detect it and said that it would be added. Thanks.


title: best way to set up separate linux environment in ~

text: I do most of my work (involves a lot of C/Python) on a development server that is shared with several other people. As a result we all seem to do a bit of the system administration chores (there is no sysadmin). This tends to work alright, but installing and maintaining packages and libraries tends to be messy. Lately I've found myself installing and building more and more packages etc in my home directory. What is the best way to formalize/streamline this process? Right now I am merely `./configuring` with `\--prefix`, setting my path so that my `~/usr/bin` comes before `usr/bin`, etc, and trying to set `LD_LIBRARY_PATH` and `C_INCLUDE_PATH` and `PYTHONPATH properly, but this is becoming error-prone and painful. Is there a more "automated" method?


title: system went unresponsive and had to hard reboot

text: without not much load on the machine, it suddenly went busy and went unresponsive. it could not respond to keyboard or mouse movement or neither would move to another other tty's. there is some log which may hint about the problem. can someone please help identify the problem? EDIT: also sometimes my internet just stalls; i cannot see any packets going through when using `tcpdump`. i have to reconnect again to the wifi network for the packets to start flowing again; but i have noticed these problems after i have recently changed my provider to Sky, Uk and they have provided a router with model number, `SR101` sky router settings               region: europe; channel: auto; mode: auto; auth: wpa2-psk (aes)      /var/log/syslog               kernel: [ 7593.778323] ------------[ cut here ]------------     kernel: [ 7593.778352] WARNING: at /build/buildd/linux-3.5.0/drivers/net/wireless/brcm80211/brcmsmac/main.c:7953 brcms_c_wait_for_tx_comp     kernel: [ 7593.778355] Hardware name: Satellite R630     kernel: [ 7593.778357] Modules linked in: pci_stub vboxpci(O) vboxnetadp(O) vboxnetflt(O) vboxdrv(O) bnep rfcomm parport_pc ppdev joydev      kvm arc4 snd_hda_codec_hdmi snd_hda_codec_realtek brcmsmac mac80211 brcmutil cfg80211 cordic uvcvideo videobuf2_core videodev videobu     snd_hwdep snd_pcm microcode snd_seq_midi snd_rawmidi toshiba_acpi sparse_keymap snd_seq_midi_event wmi toshiba_b     mac_hid snd intel_ips lpc_ich soundcore snd_page_alloc i915 drm_kms_helper psmouse serio_raw mei bcma drm i2c_algo_bit video l     [last unloaded: e1000e]     kernel: [ 7593.778416] Pid: 18560, comm: kworker/u:1 Tainted: G           O 3.5.0-17-generic #28-Ubuntu     kernel: [ 7593.778418] Call Trace:     kernel: [ 7593.778428]  [<ffffffff81051c4f>] warn_slowpath_common+0x7f/0xc0     kernel: [ 7593.778432]  [<ffffffff81051caa>] warn_slowpath_null+0x1a/0x20     kernel: [ 7593.778445]  [<ffffffffa03af709>] brcms_c_wait_for_tx_completion+0x99/0xb0 [brcmsmac]     kernel: [ 7593.778453]  [<ffffffffa03a05fb>] brcms_ops_flush+0x3b/0x60 [brcmsmac]     kernel: [ 7593.778473]  [<ffffffffa030282d>] ieee80211_scan_work+0x34d/0x5e0 [mac80211]     kernel: [ 7593.778481]  [<ffffffff81083d3a>] ? finish_task_switch+0x4a/0xf0     kernel: [ 7593.778485]  [<ffffffff8107079a>] process_one_work+0x12a/0x420     kernel: [ 7593.778498]  [<ffffffffa03024e0>] ? ieee80211_run_deferred_scan+0x80/0x80 [mac80211]     kernel: [ 7593.778502]  [<ffffffff8107133e>] worker_thread+0x12e/0x2f0     kernel: [ 7593.778506]  [<ffffffff81071210>] ? manage_workers.isra.26+0x200/0x200     kernel: [ 7593.778510]  [<ffffffff81075e33>] kthread+0x93/0xa0     kernel: [ 7593.778516]  [<ffffffff8168b024>] kernel_thread_helper+0x4/0x10     kernel: [ 7593.778520]  [<ffffffff81075da0>] ? kthread_freezable_should_stop+0x70/0x70     kernel: [ 7593.778523]  [<ffffffff8168b020>] ? gs_change+0x13/0x13     kernel: [ 7593.778526] ---[ end trace 6499cba8e2fb8557 ]---      kernel modules                pci_stub vboxpci vboxnetadp vboxnetflt vboxdrv parport_pc ppdev bnep rfcomm joydev btusb bluetooth snd_hda_codec_hdmi snd_hda_codec_realtek coretemp kvm_intel kvm arc4 brcmsmac mac80211 brcmutil cfg80211 cordic snd_hda_intel snd_hda_codec snd_hwdep snd_pcm snd_seq_midi uvcvideo videobuf2_core videodev videobuf2_vmalloc snd_rawmidi videobuf2_memops snd_seq_midi_event snd_seq snd_timer snd_seq_device toshiba_acpi sparse_keymap wmi toshiba_bluetooth snd mac_hid microcode i915 psmouse serio_raw lpc_ich bcma drm_kms_helper intel_ips drm soundcore snd_page_alloc lp i2c_algo_bit mei video parport sdhci_pci sdhci      uname               Linux 3.5.0-17-generic #28-Ubuntu SMP Tue Oct 9 19:31:23 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux      network information from lshw                 *-network            description: Wireless interface            physical id: 4            logical name: wlan0            serial: b4:74:9f:5b:a0:57            capabilities: ethernet physical wireless            configuration: broadcast=yes driver=brcmsmac driverversion=3.5.0-17-generic firmware=N/A ip=192.168.0.4 link=yes multicast=yes wireless=IEEE 802.11bgn      EDIT: wireless info               ~$ sudo lspci -vv -s 02:00.0     02:00.0 Network controller: Broadcom Corporation BCM4313 802.11b/g/n Wireless LAN Controller (rev 01)         ..         Capabilities: [16c v1] Power Budgeting <?>         Kernel driver in use: bcma-pci-bridge         Kernel modules: bcma      log when wifi cannot send anymore packets and wifi needs to be turned off and on               kernel: [ 1791.266956] Pid: 7728, comm: kworker/u:0 Tainted: G           O 3.5.0-17-generic #28-Ubuntu     kernel: [ 1791.266958] Call Trace:     kernel: [ 1791.266968]  [<ffffffff81051c4f>] warn_slowpath_common+0x7f/0xc0     kernel: [ 1791.266971]  [<ffffffff81051caa>] warn_slowpath_null+0x1a/0x20     kernel: [ 1791.266980]  [<ffffffffa03f5709>] brcms_c_wait_for_tx_completion+0x99/0xb0 [brcmsmac]     kernel: [ 1791.266986]  [<ffffffffa03e65fb>] brcms_ops_flush+0x3b/0x60 [brcmsmac]     kernel: [ 1791.267006]  [<ffffffffa034882d>] ieee80211_scan_work+0x34d/0x5e0 [mac80211]     kernel: [ 1791.267013]  [<ffffffff81083d3a>] ? finish_task_switch+0x4a/0xf0     kernel: [ 1791.267016]  [<ffffffff8107079a>] process_one_work+0x12a/0x420     kernel: [ 1791.267027]  [<ffffffffa03484e0>] ? ieee80211_run_deferred_scan+0x80/0x80 [mac80211]     kernel: [ 1791.267030]  [<ffffffff8107133e>] worker_thread+0x12e/0x2f0     kernel: [ 1791.267033]  [<ffffffff81071210>] ? manage_workers.isra.26+0x200/0x200     kernel: [ 1791.267037]  [<ffffffff81075e33>] kthread+0x93/0xa0     kernel: [ 1791.267042]  [<ffffffff8168b024>] kernel_thread_helper+0x4/0x10     kernel: [ 1791.267046]  [<ffffffff81075da0>] ? kthread_freezable_should_stop+0x70/0x70     kernel: [ 1791.267049]  [<ffffffff8168b020>] ? gs_change+0x13/0x13     kernel: [ 1791.267050] ---[ end trace 56f847a7c78d0da0 ]---     kernel: [ 2004.872993] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2006.035759] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2006.036162] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2006.546185] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2007.543524] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2008.542929] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4          kernel: [ 2408.822335] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2408.868303] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2408.937553] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2408.953977] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2408.958060] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2408.976166] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2409.264878] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2409.766008] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2409.793456] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2409.807420] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2409.834179] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2409.994049] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2410.062283] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2410.067860] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2410.785801] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2410.837042] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2410.915746] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2411.060400] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2411.063439] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     NetworkManager[991]: <info> (wlan0): device state change: activated -> unavailable (reason 'none') [100 20 0]     NetworkManager[991]: <info> (wlan0): deactivating device (reason 'none') [0]     kernel: [ 2411.249095] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2411.276068] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     kernel: [ 2411.276755] ieee80211 phy0: >brcms_c_prec_enq_head: No where to go, prec == 4     NetworkManager[991]: <info> (wlan0): canceled DHCP transaction, DHCP client pid 1768


title: Comparing files and their properties

text: I get information of a certain set of files in my mail every day, which looks like this:               58623208 Sep 14 20:08 blbn_blfbe_drv     57904920 Sep 14 19:54 blbn_cycmn     55814208 Sep 14 06:02 clsa_Upd     38912000 Sep 14 19:12 cs_chgpp     41107456 Sep 14 19:17 csmRFbe     39403520 Sep 14 19:09 csmUAddAct     39235584 Sep 14 19:20 csmUAddSub      ... and so on, for about 60 files. Now, I need to compare all these files, one by one, with the existing files to make sure that all the files are are found matching. `filename`, `timestamp`, `date`, and `size` are the things should be matching. Is there any way to automate it? I was thinking about using either `comm` or `diff`.


title: How to stop Bash appending history

text: I am having a lot of trouble setting up the terminal history of Bash the way I want. I would like to have no duplicate entries and if I enter a command I want it saved and the duplicates above removed. The problem is the history command shows me it is functioning the way I want however once I log out the duplicates come back again. I believe it is just appending the history to the existing one. I have these lines in my `.bashrc` file:               HISTCONTROL=ignoreboth:erasedups     shopt -u histappend      I have even tried uncommenting shopt but it still appends the history on logout. How can I have the history be exactly how it is before I logout?


title: HD Video Sticks

text: I have HD video, which I play through browser. Whenever I try to play it with "low quality" and "medium quality", the video plays smoothly. But when I select "High quality", the same video sticks while playing. All videos are fully buffered before playing. What can be the cause for this? The browser is Mozilla. I experienced the same behavior for YouTube videos also.


title: How to improve IO when there is a lot of random read and write?

text: My scripts uses tons of read and writes. Most of them are small and random. I want Linux to wait 10 seconds before writing any data to the disk. How would this be achieved? I think Linux can already do this automatically. I want to do it in a more extreme way. It's like supercache in Windows. Note: This is related to question Does linux have something like supercache? . I already know that by default linux use "supercache" like system. However the supercache-like setting for linux must be low. I want more share of memory is for supercache. I also want lazy writes every 10 seconds.


title: What is pageant for Linux? Saving SSH private key passwords

text: I want the computer like pageant, to show a SSH password prompt during boot time. I have my private keys stored in a Dropbox between 3 computers of which 1 is now Ubuntu. I have googled for 2 hours and asked other people, but most people simply do not use private keys at all or use private keys without passwords and therefore do not need something like this. I however use my same private key at multiple locations and renew it every year. It must be password-protected because it's on multiple locations and on my Dropbox. I found Seahorse, although I am no sure it does what I want it to do, but it gives segmentation faults on a fresh Ubuntu install while importing a PuTTy key exported to OpenSSH.


title: Is it possible that KDE applications running under Gnome can use the information of Gnome applications?

text: I am running Okular on Ubuntu. When I try to save a copy of a pdf file I edited in Okular back to the same directory, I can't access the "Recent" and "bookmark" information of Nautilus. This is unlike in Evince, where I can always access the above information of Nautilus from Evince. So I wonder if it is possible that KDE applications, when running under Gnome, can use the information from applications based on Gnome? Thanks!


title: How can I run a kwin script from the command line?

text: I wrote a really basic kwin script to tile windows how I like them,               // Main reference: http://techbase.kde.org/Development/Tutorials/KWin/Scripting          // Top-level parameters. Adjust these as suitable for your desktop.     var width = 3840;     var third = Math.round(width / 3);               var clients = workspace.clientList();     for (var i=0; i<clients.length; i++) {       var client = clients[i];       var cap = client.caption.toLowerCase();       var g = client.geometry;            if (cap.indexOf("firefox") != -1) {         g.x = 0;         g.width = third;       } else if (cap.indexOf("vim") != -1) {         g.x = third;         g.width = third;       } else if (cap.indexOf("konsole") != -1) {         g.x = third * 2;         g.width = third;       }            client.geometry = g;     }      using the scripting console (`qdbus org.kde.plasma-desktop /MainApplication showInteractiveKWinConsole`, or `wm console` from krunner). I want to bind this to a hotkey. I've only been able to find resources about building Plasma packages, which I haven't gotten to work (I have a `metadata.desktop` that's similar to the ones in `/usr/share/kde4/apps/kwin/scripts`, and similar directory contents, but it says `plasmapkg(3980)/libplasma Plasma::Package::installPackage: Could not register package as service (this is not necessarily fatal): "kwin-script- tilewindows"`). I'm a little tired of mucking with Plasma packaging. How can I invoke my JavaScript-based kwin script from the command line? ### EDIT / Note In case you're not familiar, it's easy to bind command to hotkeys in KDE -- just right-click the application launcher, go to "Edit Applications", add a new item, enter the shell command in the "Command" box, and then set the shortcut key in the "Advanced" tab.


title: How to update linux "locate" cache

text: How can i update the cache / index of locate? I installed new packages and the files are clearly not yet indexed. So which command do I have to ommit, in order for the indexer to trigger. I'm currently working on debian jessie (testing): with Linux mbpc 3.13-1-amd64 #1 SMP Debian 3.13.7-1 (2014-03-25) x86_64 GNU/Linux


title: determine what is processing command GB_INIT()

text: debian wheezy (raspbian armhf) and i'm struggling to compile gambas3 from source:               pi@raspberrypi ~/gambas-svn $ ./configure     checking whether to enable maintainer-specific portions of Makefiles... no     checking for a BSD-compatible install... /usr/bin/install -c     checking whether build environment is sane... yes     checking for a thread-safe mkdir -p... /bin/mkdir -p     checking for gawk... no     checking for mawk... mawk     checking whether make sets $(MAKE)... yes     checking build system type... armv6l-unknown-linux-gnueabihf     checking host system type... armv6l-unknown-linux-gnueabihf     configure: creating ./config.status     config.status: creating Makefile     config.status: creating config.h     config.status: config.h is unchanged     === configuring in main (/home/pi/gambas-svn/main)     configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  --cache-file=/dev/null --srcdir=.     ./configure: line 2063: syntax error near unexpected token `main'     ./configure: line 2063: `GB_INIT(main)'     configure: error: ./configure failed for main      I am trying to identify what application is responsible for interpreting the GB_INIT command? (in the hope that maybe a different version may fix things (long shot i know)).


title: Use xdotool in a telnet session

text: I have to simulate key presses in a telnet session, and everything has to be invoked by a shell script.               #!/bin/sh         telnet 192.168.1.14 50000      xdotool type "404"      However, once the telnet session takes place, it has to end before the xdotool is actually executed. Is there a way to the key simulation while telnet is running?


title: Installing a shell (e.g. zsh) without being system admistrator

text: > **Possible Duplicate:**   >  how can I use bash as my login shell when my sysadmin refuses to let me > change it Say I have **rwx** permissions to a directory (my home directory). Can I install a shell (e.g. zsh) on some path on under my home directory, and use it? In other words, can I install a shell bypassing the system administrator?


title: how to sum output of awk or other expression with xargs

text: Suppose i have the following bash shell script:               #!/bin/bash     export  count=0;     for i in `ls ./mydoc` ;do               pdfinfo ./mydoc/$i | egrep Pages |awk {'print $2'} |xargs -+ $count   ;                                                             ^^^^^^^^^^^^^^^^^     done;          echo $count;      It enumarates pages of each pdf files, but i don't know how to sum them together. !!!!!


title: Opensuse remove kernel module

text: I recently installed OpenSuse. I have a problem with the mouse left click. I had the same problem in Debian but when I removed the `psmouse` module everything started working perfectly. I tried the same in OpenSUSE but I get this error:               FATAL: Module psmouse is builtin      the touchpad is working perfectly. I use the Genius USB mouse in my KDE desktop. Is there anyway to solve this problem?


title: Once connection is lost wi-fi cannot be brought up again

text: I'm running Arch, using `netctl-auto` to connect, and it connects well. However, as soon as the connection is lost (e.g., timed out in a network where connection must be renewed after a period of inactivity) I can't reconnect: `ping` gives "unknown host", and `wifi-menu` says " **No networks found** ". At the same time,               $ netctl is-enabled *my_profile*     enabled      The same problem occurs when plugging the cable in and out - wi-fi connection is lost until reboot. I don't have a good idea where to look at to better diagnose it. Question How to debug repeated Wi-Fi disconnestions in Arch Linux? doesn't seem to help out.


title: Brother scanner and missing /dev/bus/usb entry?

text: I'm having awful trouble getting a DCP-7055 multi-function printer to work as a scanner with Mint 16. (My old flatbed scanner _was_ working.) (I have printing working.) I've installed the Brother scanner drivers. As a normal user, in simple scan, clicking scan immediately says `Failed to scan. Unable to connect to scanner`. If I run it as root it takes 15 seconds before saying `Failed to scan. unable to start scan` I found this comment and for me `scanimage -L` says:               device `brother4:bus2;dev3' is a Brother DCP-7055 USB scanner      However `ls /dev/bus/usb/002/` only lists:               001  002      I.e. I think /dev/bus/usb/002/003 ought to exist, and doesn't, and that might explain everything?? But, now I've reached the end of my knowledge: what do I do about this? **UPDATE:** Or maybe this is a red herring... after plugging the scanner into a different USB port, `scanimage -L` says:               device `brother4:bus2;dev1' is a Brother DCP-7055 USB scanner      But that exists:               crw-rw-r-- 1 root root 189, 128 Jul  2 22:16 /dev/bus/usb/002/001      Yet `simple-scan` gives exactly the same behaviour for both normal and root users.


title: How to install ubuntu 12.04 and replace fedora. i have previously installed fedora apart from windows xp

text: How can I replace previously installed Fedora with Ubuntu 12.04? My GRUB version is 0.97-71.fc15.


title: switching windows in twm with keyboard shortcuts

text: I am using a system that runs `twm` and I am wondering if it is possible to switch between windows using keyboard shortcuts, as I do in gnome with `Alt`+`Tab`.


title: How to scroll in a terminal by line in GNOME Terminal 2.31.3?

text: I use `Shift`+(`PgUp`/`PgDown`) while scrolling in the terminal. But it seems to scroll one screen (or a half may be) at a time. I feel comfortable scrolling the terminal by line with the mouse, but don't like to touch it every time. After googling I found `Ctrl`+`Shift`+(`Up`/`Down`) does this on other Linux systems. But it doesn't seem to work on my CentOS. Could somebody give the easiest solution to this problem?


title: Copy directory, but fail if file already exists at destination

text: `cp -a foo/* bar/` will copy the contents of foo into bar, replacing any files that already exist. I can use the -n flag to make `cp` not overwrite existing files or `-i` to make it ask interactively whether to overwrite files. ### Questions   * Is there a way to make `cp` fail and return an error code if the file already exists?    * If not, is it possible to do with `rsync` or some other common tool?


title: "ps" command doesn't return to prompt

text: I have this linux box that I need to maintain periodically. To do that, I issue a `ps` command programmatically and check the running processes. But as shown in the screenshot, sometimes, the `ps` command does not terminate and return to the prompt, it just stays there, and so my application cannot proceed. It's also obvious that previous `ps` commands are still running while the current one (i.e. which's output is shown in the screenshot) is also hanged. Does anyone know what could be the problem and how to fix it ? ![ps command hanged](http://i.stack.imgur.com/FlF4z.png)


title: What are the possible ways a Debian Linux system may write data to HDD and how to avoid them?

text: **The background:**      Here I have a spare x86 board which has a low energe costing AMD CPU built on it. I am planning to DIY a home use file server with it running a Debian base system and some common service programs such as ftp/telnet/svn/samba... etc.   The main storage media is a 4GB EIDE flash disk, with possibility to mount USB HDDs. The board can support up to 1GB of RAM. The rough idea is to install Debian on the 4GB flash disk, and using external USB HDDs as data storage.   Since the flash disk has a limited number of erase cycles, I would like to avoid data writing to it as much as possible. The Linux swap partition, among other things, is to be disabled.      **My questions are:**      What are the other possible ways in which my system would write data to the flash disk at run time, and how to avoid them?   For one thing whether linux persists log messages to hard disk? **EDIT - one more question:**      Is there any tool can monitor disk data writing events?


title: Where to find the source code for ps?

text: I want to check out the source code for commands such as ps. It seems to be impossible to search LXR (linux.no) for "ps". Where do I find it?


title: How do I set cron to run on background?

text: I am on ubuntu 12.04 and following this tutorial. I want to setup cron to run in the background but I don't have a chckconfig in sbin so I can't run `sudo /sbin/chkconfig crond on` I am fairly new to sys admin stuff so need advice on how to workaround this. I tried searching for the crond command but could not find it. I found another instance of chckconfig but am not sure if this is the same thing I am supposed to use to schedule cron.               $ sudo !!     sudo find / -executable -name crond     $ sudo find / -name chkconfig     /etc/bash_completion.d/chkconfig      Why is my chckconfig in /etc/bash... Is it the same one used in this tutorial? How can I set cron to run on background?               $ sudo !!     sudo find / -executable -name crond     $ sudo find / -name chkconfig     /etc/bash_completion.d/chkconfig


title: tr not replacing apostrophe

text: I want to convert all apostrophes in this file to `X`:               Bob's book     Bob’s book     Bob′s book  # (Might look the same but actually different)      The first apostrophe is replaced as expected:               $ cat file | tr "'" "X"     BobXs book     Bob’s book     Bob′s book      But the the two other kinds of apostrophe, strange things happen:               $ cat file | tr "’" "X"     Bob's book     BobXXXs book     BobXX�s book          $ cat file | tr "′" "X"     Bob's book     BobXX�s book     BobXXXs book      How to make it work?


title: Can't connect to windows server with rdesktop - “No valid license available” error

text: Im using Remotedesktop Client 0.23 on Linux Mint. When im trying to connect to a windows server, I get the following error: Disconnect: No valid license available I know that I'm supposed to delete a file, but I can't find it. Anyone who can help me?


title: btrfs confused about subvolumes

text: I'm starting out with btrfs on my embedded Linux system. My system currently has a single SD card used for the rfs. What I'd like to do is have a way to snapshot both the system files (currently under /) and the home directories (under /home). Is creating the subvolumes /mnt/root and /mnt/home the way to do this? Once I have created the subvolumes would I then copy all the files that are currently under / and /home to the new subvolumes to populate them and remove the originals? Or is it better to populate the new subvolumes with snapshots of the source data? I would also then want to mount these new subvolumes at bootup time, so not sure how to do that.


title: Is it possible to save the state of open terminals?

text: When working on certain projects, I routinely open a number of terminals, navigate each of them to various directories and resize and position them on my desktop. Is there any way to save this configuration, so that I can come back to this state easily? Ideally I would like to save the number of terminals and for each terminal:   * The position on the monitor   * The window size   * The current working directory I'm using gnome shell, but I am very open to trying other desktop environments.


title: Live Linux CD/DVD with Bittorrent client, Java, Flash, VLC?

text: I'm looking for a live CD distribution that offers me fully featured environment for using Internet and OpenOffice (or some other office app compatible with M$ Word). I thought about installing a mainstream distro like Ubuntu on USB Flash drive and adding the software myself, but I would have to get a fast 8 GB USB stick and I would lose the added security of CD/DVD -- that is the resistance to rootkits and the guarantee that I won't break anything on my system.


title: Unix install best practices, append to path or link through

text: I have some software I am about to ship (gradschool project) and I want to know on a unix machine what the best practices are for installing software. I originally linked through `/usr/local/bin` my project, but recently I looked into installing it by appending to the `.bashrc` file for the specific user, with the special case that if the user is root, it appends to the global path rather than user specific. This bought me some easy functionality additions as I can quickly link to other resources with a single variable addition to the `.bashrc` folder of the installing user. However, I am beginning to doubt this decision. To append to path or not to append to path, that is the question. Whether 'tis nobler to symbolic link in `/usr/local/bin`, or to take arms and append to an ever growing path variable. More information: It's a C++ back end with a TCL front end. There is also a java archive (created much earlier in my career) that the TCL front end launches. On top of this, there is a extension of the TCL front end that plays with another program with its own TCL interpreter. I need to provide the bwidget tcl package to the program with the interpreter. So providing the bwidget package and launching the jar file necessitates having a location to link to. Further more, I need to make it easy on the users as they are primarily chemistry users and are not very familure with unix and might be on mac. The platform nees to work on Mac or Unix. Ideally I want the user to be able to launch the TCL script with a single command and not make them remember the location. This is a previously closed source project that is now open source and we want users to be able to easily compile and install the program I am using make to create an install option.


title: Scribus crashes with .ICEauthority

text: I've been trying to get scribus to work on my new gentoo 12.1 (amd64, XFCE, qt 4.8.2) installation, but when running as a regular user the program won't start up. Thanks to suggestions and extra tests below I've narrowed it down to a problem with .ICEauthority, when I move the file (or start Scribus as root, sho doesn't have the file) it loads up perfectly. The file is created at login automatically though, so removing it is no option. I've tried these ebuilds, with the same result:   * Stable amd64 (1.4.0-r2)   * Unstable amd64 (1.4.1)   * Stable i386 (1.4.0-r2) Some strace results, I've mixed strace -eopen and full output on the first one. As User:               open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     open("/home/xxx/.ICEauthority", O_RDONLY) = 8     open("/home/xxx/.ICEauthority", O_RDONLY) = 8     open("/home/xxx/.ICEauthority", O_RDONLY) = 8     open("/home/xxx/.ICEauthority", O_RDONLY) = 8     open("/home/xxx/.scribus//prefs140.xml", O_RDONLY|O_CLOEXEC) = 8     open("/usr/share/scribus/translations/scribus.en_GB.qm", O_RDONLY|O_CLOEXEC) = 8     open("/etc/nsswitch.conf", O_RDONLY)    = 8     open("/etc/ld.so.cache", O_RDONLY)      = 8     open("/lib64/libnss_compat.so.2", O_RDONLY) = 8     open("/lib64/libnsl.so.1", O_RDONLY)    = 8     open("/etc/ld.so.cache", O_RDONLY)      = 8     open("/lib64/libnss_nis.so.2", O_RDONLY) = 8     open("/lib64/libnss_files.so.2", O_RDONLY) = 8     open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 8     open("/etc/passwd", O_RDONLY|O_CLOEXEC) = 8     fcntl(8, F_GETFD)                       = 0x1 (flags FD_CLOEXEC)     lseek(8, 0, SEEK_CUR)                   = 0     fstat(8, {st_mode=S_IFREG|0644, st_size=1129, ...}) = 0     mmap(NULL, 1129, PROT_READ, MAP_SHARED, 8, 0) = 0x7f748c6bd000     lseek(8, 1129, SEEK_SET)                = 1129     munmap(0x7f748c6bd000, 1129)            = 0     close(8)                                = 0     write(7, "\1\f\1\0\7\0\0\0\1\0\0\0\0\0\0\0\6\0\0\0UserID\0\0\0\0\0\0"..., 64) = 64     --- SIGSEGV {si_signo=SIGSEGV, si_code=SEGV_MAPERR, si_addr=0x7070415173} ---     rt_sigaction(SIGALRM, {SIG_DFL, [ALRM], SA_RESTORER|SA_RESTART, 0x7f7488617bc0}, {SIG_DFL, [], 0}, 8) = 0     fstat(1, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0     mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f748c6bd000     write(1, "Scribus Crash\n", 14)         = 14     write(1, "-------------\n", 14)         = 14     write(1, "Scribus crashes due to Signal #1"..., 34) = 34      As root (same first file, different afterwards):               open("/usr/share/locale/en/LC_MESSAGES/libc.mo", O_RDONLY) = -1 ENOENT (No such file or directory)     Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed     open("/root/.scribus//prefs140.xml", O_RDONLY|O_CLOEXEC) = 7     open("/usr/share/scribus/translations/scribus.en_GB.qm", O_RDONLY|O_CLOEXEC) = 7     open("/usr/share/scribus/icons/Splash.png", O_RDONLY|O_CLOEXEC) = 7     open("/etc/qt4/Trolltech.conf", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)     open("/usr/lib64/qt4/plugins/imageformats", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 8     open("/usr/lib64/qt4/plugins/imageformats/libqgif.so", O_RDONLY) = 8     open("/usr/lib64/qt4/plugins/imageformats/libqico.so", O_RDONLY) = 8     open("/usr/lib64/qt4/plugins/imageformats/libqjpeg.so", O_RDONLY) = 8     open("/usr/lib64/qt4/plugins/imageformats/libqmng.so", O_RDONLY) = 8     open("/etc/ld.so.cache", O_RDONLY)      = 8     open("/usr/lib64/libmng.so.1", O_RDONLY) = 8     open("/usr/lib64/liblcms.so.1", O_RDONLY) = 8     open("/usr/lib64/qt4/plugins/imageformats/libqtiff.so", O_RDONLY) = 8      I ran it through gdb (after compiling without -O2):               (gdb) run     Starting program: /usr/bin/scribus      [Thread debugging using libthread_db enabled]          Program received signal SIGSEGV, Segmentation fault.     0x0000000000e932c8 in typeinfo name for ScribusQApp ()     (gdb) backtrace     #0  0x0000000000e932c8 in typeinfo name for ScribusQApp ()     #1  0x00007ffff70c94bf in ?? () from /usr/lib64/qt4/libQtGui.so.4     #2  0x00007ffff70c9789 in ?? () from /usr/lib64/qt4/libQtGui.so.4     #3  0x00007ffff278b11e in _SmcProcessMessage () from /usr/lib64/libSM.so.6     #4  0x00007ffff257a9c3 in IceProcessMessages () from /usr/lib64/libICE.so.6     #5  0x00007ffff65b7de3 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib64/qt4/libQtCore.so.4     #6  0x00007ffff660338e in QSocketNotifier::activated(int) () from /usr/lib64/qt4/libQtCore.so.4     #7  0x00007ffff65bfaab in QSocketNotifier::event(QEvent*) () from /usr/lib64/qt4/libQtCore.so.4     #8  0x00007ffff704c8b4 in QApplicationPrivate::notify_helper(QObject*, QEvent*)     () from /usr/lib64/qt4/libQtGui.so.4     #9  0x00007ffff705136f in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/qt4/libQtGui.so.4     #10 0x00007ffff65a33ab in QCoreApplication::notifyInternal(QObject*, QEvent*)     () from /usr/lib64/qt4/libQtCore.so.4     #11 0x00007ffff65d0c18 in ?? () from /usr/lib64/qt4/libQtCore.so.4     #12 0x00007ffff29d6672 in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0     #13 0x00007ffff29d6e68 in ?? () from /usr/lib64/libglib-2.0.so.0     #14 0x00007ffff29d7041 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0     #15 0x00007ffff65d12bf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4     #16 0x00007ffff70edc7e in ?? () from /usr/lib64/qt4/libQtGui.so.4     #17 0x00007ffff65a722f in QCoreApplication::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/qt4/libQtCore.so.4     #18 0x0000000000c26285 in ScribusQApp::init() ()     #19 0x0000000000e04250 in mainApp(int, char**) ()     #20 0x0000000000e041f8 in main ()      I usually always find solutions to a problem online - so I'm not used to filing bug reports. However, I can't seem to find any cases with this problem this time. So where should I go from here - file a bug report with scribus? Would they need any additional information from the one provided here? Any advice would be greatly appreciated. All the best and thank you for your time.


title: Xfce 4: Change global keyboard shortcuts

text: I use `Alt+Space` in Emacs, but in Xfce it pops up window manager menu at the upper left corner of a window. How do i disable `Alt+Space` for Xfce and change global keyboard shortcuts in general?


title: How do I reinstall software properly in Debian?

text: I got myself into trouble with mysql on debian lenny (details). I tried these commands:   * `dpkg-reconfigure mysql`   * `dpkg --purge mysql-server`   * `apt-get install mysql-server`   * `mysql_install_db` and variants of these in different order using `killall mysql` and `killall mysqld` and had no luck whatsoever. I even deleted every mysql folder listed in `whereis mysql`. How do I properly reinstall a package? Because the above is not working for me.


title: Selective stripping on RAID-0 with mdadm

text: With mdadm one can create a raid with a fixed chunk. I am trying to have a line by line stripping of a file. In fact, I'd like my files to have there lines repartitioned across the RAID. I am wondering if this is possible given that the lines length vary across the files, but is the same within a file.


title: Why did my sudoers file suddenly reset itself?

text: After setting up Wave in a Box on my Debian server, I started noticing strange things happening: I could no longer use sftp to transfer files, and even worse, I couldn't run any sudo commands! Thankfully, I could still `su` to root. When I checked `/etc/sudoers`, I found that it had been completely reset, with only the root user having sudoer permission. I don't think my server was hacked, since I'm running denyhosts to shut out any attempts. Any idea what could have caused `/etc/sudoers` and `/etc/ssh/sshd_config` to reset themselves?


title: Must an X11 server be installed for X11 forwarding over ssh to work?

text: I would expect that my local X11 server and sshd X11 forwarding turned on is all that is needed for X11 over ssh to work, but I haven't been able to get it. Am I wrong about this? Does the remote system need an X11 server?


title: Errors from cfdisk with new external USB backup drive

text: I've picked up an HP SimpleSave sd500a backup drive. This is a 2.5", 500GB drive. It has a mysterious CD-like partition, but otherwise seems to contain a WD Scorpio Blue disk. It seems that the CD-like partition is implemented in the enclosure's firmware, but I've no way to be certain of this. I'm repartitioning the drive for the first time. When attempting to open the drive using `cfdisk /dev/sdb`, it exits with status 4 after outputting this error message:               FATAL ERROR: Bad primary partition 0: Partition ends in the final partial cylinder      `sfdisk -l` is able to output info on the drive without errors:               Disk /dev/sdb: 60715 cylinders, 255 heads, 63 sectors/track     Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0             Device Boot Start     End   #cyls    #blocks   Id  System     /dev/sdb1          0+  60715-  60716- 487699456    7  HPFS/NTFS     /dev/sdb2          0       -       0          0    0  Empty     /dev/sdb3          0       -       0          0    0  Empty     /dev/sdb4          0       -       0          0    0  Empty      Is the error from `cfdisk` any reason to question the stability of the drive or the compatibility of its firmware?


title: Why does the Centos apache httpd-2.2.3 rpm remove the bundled apr,apr-util,pcre?

text: I am manually building httpd-2.2.17 from the source. Just to make sure I have the configuration options right, I checked the latest CENTOS apache srpm (which is for httpd-2.2.3). In the httpd.spec I find this line:               # forcibly prevent use of bundled apr, apr-util, pcre     rm -rf srclib/{apr,apr-util,pcre}      I was wondering why this is required ? What's wrong with using the apr included within the default httpd source ?


title: Time that init waits before sending kill -9 upon shutdown?

text: As far as I understand the `shutdown` command: If I send a `shutdown -h now` init will try and stop all processes gracefully, wait a certain amount of time, then send `kill -9`. My question is: how long will init wait, and how do I configure this length of time? I have a `mysql server` that can take up to 15 minutes to stop gracefully, and I want to be sure that init doesn't try and `kill -9` it. From reading the man page, at first glance it looks like the `-t` flag is what I'm looking for, however, reading in a bit more detail this flag actually specifies the delay between sending the shutdown command and init trying to stop all processes gracefully. OS is CentOS 6, but interested in Debian 7 as well.


title: Root able to login but non root users are denied - PAM

text: One of our servers is not letting non-root users login, but root can login without any issues.   The following are the messages from `/var/log/secure`:               Jun 24 18:08:43 jonnserver sshd[14470]: debug1: attempt 2 failures 2     Jun 24 18:08:43 jonnserver sshd[14470]: debug1: keyboard-interactive devs     Jun 24 18:08:43 jonnserver sshd[14470]: debug1: auth2_challenge: user=user.name ting=     Jun 24 18:08:43 jonnserver sshd[14470]: debug1: kbdint_alloc: devices 'pam'     Jun 24 18:08:43 jonnserver sshd[14470]: debug1: auth2_challenge_start: trying authentication method 'pam'     Jun 24 18:08:43 jonnserver sshd[14470]: Postponed keyboard-interactive for user.name from 10.10.10.10 port 57775 ssh2     Jun 24 18:08:43 jonnserver sshd[14470]: Received disconnect from 10.10.10.10: 13: Unable to authenticate     Jun 24 18:08:43 jonnserver sshd[14470]: debug1: do_cleanup     Jun 24 18:08:43 jonnserver sshd[14466]: debug1: do_cleanup     Jun 24 18:08:43 jonnserver sshd[14466]: debug1: PAM: cleanup     Jun 24 18:09:01 jonnserver crond[14482]: pam_limits(crond:session): invalid line 'hard core 0' - skipped     Jun 24 18:09:01 jonnserver crond[14483]: pam_limits(crond:session): invalid line 'hard core 0' - skipped


title: 200+ instances for fglrx?

text: I was browsing the basic info about the modules that my kernel is currently using on a machine I have, and this piece of information pops up.               $ grep fglrx /proc/modules      fglrx 8085343 200 - Live 0x0000000000000000 (POF)      and there are also times where that `200` becomes something near to `300` or `250` . Really there are 200+ instances of the driver for my GPU ? I'm doing something wrong here ? What's the optimal number ?


title: Wired connection from CLI with NetworkManager - "up" in elegant way

text: Sometimes I need to do some operational work in text mode and I need to setup internet connection from command line (without any networkmanager applet). (Please note: that when I run Window Manager, I have network connection immediately, thanks to NetworkManager applet.) When I list my connections and look for wired one:               # nmcli con | grep Wired     New Wired Connection      b15ffacf-a5c58-44af-b755-b30c6d52e53e   802-3-ethernet    Thu Dec 27 21:31:21 2012        I get `uuid` and with it it's easy:               nmcli con up uuid b15ffacf-a5c58-44af-b755-b30c6d52e53e eth0      If someone wants to automate stuff, it goes like this:               nmcli con up uuid "$( nmcli con | awk '/Wired/ {print $4}' )" eth0      It's correct and working solution, but I have a feeling that there must be more elegant way to "up" this "Wired" device. Could you suggest more elegant way ?


title: pacman-key --init takes too long and does not exit

text: First, I am new to Arch Linux. I have installed Arch Linux on my system and now when I try to install something using pacman, it gives me an error that the key 'xxxxxxx' was not found. I Googled and found out I should have run `pacman-key --init`.   Now when I run `pacman-key --init`, it seems to go on for ever. I waited for more than 45 minutes, but still no result. I think it has something to do with generating Entropy. Any idea what is wrong?


title: How to remove error messages when searching recursively for a string?

text: I use               find -type f -print0 | xargs -0 -n 10 grep -i searchstring to search recursively for a string. But it also gives me error messages like "permission denied". How can I avoid such error messages and only see results?


title: Problem on update manager

text: I am using OS4. When I installed the OS and went to update manager it told me: > Requires installation of untrusted packages : mountall Can you tell me what I should do?


title: AIX 6.1 -- Without root can I get the last failed login for a user i have access to?

text: I know the information is in the security files but I don't have access and it's more work then I want to do to go to our Unix admins to get the information (everytime the account gets locked which is often) If I have access to user A but not to root is there a way to get unsuccessful login information?


title: SVN access control is not working

text: I have project in svn which contains more branches and tags, more user too working in same project but different branches. i gave access to particular user to access particular branch only not to others but other user also accessing different branch. Step 1 : I have create user using               htpasswd -m /etc/apache2/dav_svn.passwd username       step 2 : svnserve.conf               [general]     password-db = passwd     realm = reponame     anon-access = none     auth-access = write     authz-db = authz      step 3 : passwd               username : passwd       added user & passwd which used for created htpasswd for this project in passwd file. step 4 : authz               #[the_name_of_repository:/path_in_that_repository]     [test:/]     user1 = r     user2 = r          [test:/branches/data1]     user1 = rw          [test:/branches/data2]     user2 = rw      so now user2 can only access(commit, update, checkout) data2 branches and can ready all other folders but user2 can able to access(commit, update, checkout) data1 branch too. Access control not working properly as we entered in authz file. please help me to resolve this.