Install init scripts manually under Debian Wheezy

I played around with LSB-compatible init-scripts under Debian Wheezy (`init` is from sysvinit package version 2.88dsf-41+deb7u1). My script in the `/etc/init.d` directory is as follows:               root@T60:~# ls -l /etc/init.d/test-script     -rwxr-xr-x 1 root root 811 Aug 10 03:18 /etc/init.d/test-script     root@T60:~# cat /etc/init.d/test-script     #! /bin/sh          ### BEGIN INIT INFO     # Provides:          test     # Required-Start:    $all     # Required-Stop:     $all     # Default-Start:     2 3 4 5     # Default-Stop:      0 1 6     # Short-Description: test script     # Description:       test script     ### END INIT INFO          # always executes     touch /var/test-file          case "$1" in       start)         echo "Starting script test"         touch /var/test-file-start         ;;       stop)         echo "Stopping script test"         touch /var/test-file-stop         ;;       restart)         echo "Restarting script test"         touch /var/test-file-restart         ;;       force-reload)         echo "Force-reloading script test"         touch /var/test-file-force-reload         ;;       status)         echo "Status of test"         touch /var/test-file-status         ;;       *)         echo "Usage: /etc/init.d/test-script {start|stop}"         exit 1         ;;     esac          exit 0     root@T60:~#       As a next step I added symlink to `/etc/rc3.d` directory:               root@T60:~# file /etc/rc3.d/S05test-script     /etc/rc3.d/S05test-script: symbolic link to `../init.d/test-script'     root@T60:~#       Now if I changed my runlevel from 2 to 3 I expected script to be executed, but this did not happen:               root@T60:~# who -r              run-level 2  2014-08-01 20:47                   last=S     root@T60:~# init 3     root@T60:~# who -r              run-level 3  2014-08-10 03:27                   last=2     root@T60:~# ls -l /var/test*     ls: cannot access /var/test*: No such file or directory     root@T60:~#       I am aware that I could use `insserv` or `update-rc.d` to install scripts and then they will work as expected. Am I correct that both `insserv` and `update- rc.d` take some additional steps when enabling the script besides installing the symlinks? If yes, then which steps?


Galculator does not compile

I'm trying to compile `galculator-2.0.1` but when I run `make` I get some errors like               galculator-general_functions.o: In function `set_button_color':     /home/user/Downloads/galculator-2.0.1/src/general_functions.c:268: undefined reference to `GTK_COLOR_CHOOSER'      I'm using Lubuntu 11.10. I read something about update to gtk3 but I don't want to install many thins or update almost the whole LXDE. What should I install to solve the problem?


Wikipedia says that: > A page, memory page, or virtual page is a fixed-length **contiguous** block > of virtual memory, described by a single entry in the page table. It is the > smallest unit of data for memory allocation performed by the operating > system on behalf of a program, and for transfers between the main memory and > any other auxiliary store, such as a hard disk drive. Is a page contiguous in the virtual address space or physical memory or both? Thanks.


Samba not working through AD

I'm trying to get a samba to work with a windows AD. And i can't use my shares through samba. My `smb.conf`               #GLOBAL PARAMETERS     [global]        workgroup = MY_DOMAIN        realm = MY_DOMAIN.COM        preferred master = no        server string = Linux Test Machine        security = ADS        encrypt passwords = yes        password server = MY_MASTER_DOMAIN_CONTROLLER        log level = 3        log file = /var/log/samba/%m        max log size = 50        printcap name = cups        printing = cups        winbind enum users = Yes        winbind enum groups = Yes        winbind use default domain = Yes        winbind nested groups = Yes        winbind separator = +        idmap uid = 1100-20000        idmap gid = 1100-20000        ;template primary group = "Domain Users"        template shell = /bin/bash                    [homes]        comment = Home Direcotries        valid users = %S        read only = No        browseable = No          [tmp]        comment = Directory for storing pictures by jims users        path= /var/tmp        Valid Users = @"MY_DOMAIN+group name" MY_DOMAIN+MY_ACCOUNT       ; public=no        writable=yes        browseable=yes        read only = no        guest ok = no        create mask = 0777        directory mask = 0777      `wbinfo -u and wbinfo -g` work as expected. `kinit MY_ACCOUNT@MY_DOMAIN.COM` works too. But i can't connect to samba. I'm using debian 5, samba 3.2.5 and kerberos 5. My `/var/www` is 777. Any ideas ? UPDATE : testparm ==>               Load smb config files from /etc/samba/smb.conf     Processing section "[homes]"     Processing section "[tmp]"     Loaded services file OK.     'winbind separator = +' might cause problems with group membership.     Server role: ROLE_DOMAIN_MEMBER      UPDATE 2 : I'm able to connect on linux with my AD credentials, but samba don't want to let me access to my shares with the same credentials.


How to link the unlinked files?

When you `rm` a file it will call unlink(), and unlink() will remove the file from the Directory entry and its inode is freed. But, the actual content of the file is still in the disk. Is there any way to get back the file again i.e add it back to directory entry ?


grub waits for user input when booting as guest in virtualbox

I have several ubuntu guests inside a Mac OS X virtualbox host. When I start them, about half of the time they correctly boot and get to their login screens/start all their services. The other half of the time, they sit waiting for me to choose an OS. This is fine when I'm sitting in front of them, but I'd like the VMs to automatically boot when the machine starts. It's worth noting that the same problem doesn't seem to happen if I do a reboot from within the guest OS. ### What I've tried: I've tried uncommenting `GRUB_HIDDEN_TIMEOUT` and running `update-grub`, this makes the guest OS boot correctly more often, but doesn't fix the problem. Booting them headlessly doesn't help either. ### Where they get stuck: ![what I see about half the time](http://i.stack.imgur.com/P3uWv.png) `/etc/default/grub`:               # If you change this file, run 'update-grub' afterwards to update     # /boot/grub/grub.cfg.     # For full documentation of the options in this file, see:     #   info -f grub -n 'Simple configuration'          GRUB_DEFAULT=0     GRUB_HIDDEN_TIMEOUT=0     GRUB_HIDDEN_TIMEOUT_QUIET=true     GRUB_TIMEOUT=2     GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`     GRUB_CMDLINE_LINUX_DEFAULT=""     GRUB_CMDLINE_LINUX=""          # Uncomment to enable BadRAM filtering, modify to suit your needs     # This works with Linux (no patch required) and with any kernel that obtains     # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)     #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"          # Uncomment to disable graphical terminal (grub-pc only)     #GRUB_TERMINAL=console          # The resolution used on graphical terminal     # note that you can use only modes which your graphic card supports via VBE     # you can see them in real GRUB with the command `vbeinfo'     #GRUB_GFXMODE=640x480          # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux     #GRUB_DISABLE_LINUX_UUID=true          # Uncomment to disable generation of recovery mode menu entries     #GRUB_DISABLE_RECOVERY="true"          # Uncomment to get a beep at grub start     #GRUB_INIT_TUNE="480 440 1"      Versions:               Grub 1.99-21ubuntu3.9     Ubuntu Server LTS     Virtualbox 4.2.10


No AirPlay in XBMC on EeePC (Debian)

I have a Asus EeePC (900 model I think) and I've installed Debian 6.0 on it. I've managed to get WiFi working on it and I've installed XBMC. It's working with our NAS drive on the network but for some reason, if I go to Settings->Network in XBMC, the only things that appear are General, SMB, and Internet Access. The main things I want/need are AirPlay and Remote Control - both of which I can not see settings anywhere. I have installed ssh, and avahi-daemon also. Can anybody suggest why these options aren't available and how I can resolve the problem. Thanks


explanation of the output's command "ifconfig ppp0"

I'm trying to understand the meaning the output of the command:               ifconfig ppp0      Note that I'm using an internet-usb-board and so I'm sure that **ppp0** interface is associated to it. In particular I have these questions:   1. What is the field `P-t-P:x.x.x.x`?   2. Why is the subnet field set to 255.255.255.255?   3. If the inet address is my internet address, why is it different from the internet address computed by a generic web site (I mean http://www.whatismyip.com)?   4. inet = internet? :)   5. At the third line there is the uppercase string `UP POINTOPOINT RUNNING NOARP MULTICAST`; does it mean that my subnet doesn't support multicast of level 2?


What's the difference between Ctrl-Z and kill -STOP?

When I run a command (`make` on a large project) from the shell, I can type Ctrl-Z to stop the process and return to the shell. Subsequently, I can run `fg` to continue the process. I'm trying to write a shell script to automate this (specifically, to check my CPU temperature every few seconds and stop the process if it gets too hot, since my computer is prone to overheating). My first attempt worked like this (simplified):               make &     subpid="$!"          sleep 2     # If the CPU temperature is too high...     kill -STOP "$subpid"          sleep 2     # If the CPU temperature has dropped to safe levels...     kill -CONT "$subpid"          wait "$subpid"      Unfortunately, this didn't work; sending SIGSTOP to the process didn't pause it (as made evident by its continuing to send output to the terminal). I ran `make &` at the command line, sent SIGSTOP, and checked the process status with `ps`; it was listed as stopped (and started again when I sent SIGCONT), but it was still spewing output and driving up my core temperature! Stopping it with Ctrl-Z never had this problem, but I don't know how to do that in a script. What makes Ctrl-Z different from `kill -STOP`, and how can I get the behavior of the former in a shell script?


Using apt or aptitude to get version information about an uninstalled package?

I'm looking to install a package, but I'd like to make sure that I can't get a more recent version than, e.g., a PPA. Is there an `aptitude` or `apt-get` command that will enable me to input a package name and have it dump out the version information?


Is a symbolic/soft link similar to a shortcut/alias on a desktop?

It sounds to me like the basic idea of soft/symbolic links compared to shortcuts (on a PC) or aliases (on a Mac) are the same thing. Am I way off? Are they similar?


Regex : match 2nd and 3rd character

I was doing some exercises on regular expressions, but I can't seem to be able to crack this one : > egrep in a file where the 2nd and 3rd character are the same. I tried :               egrep  '^..{2}' /usr/share/dict/dutch      However this is wrong, how should I match the 2nd and 3rd character in a regex? How would I match the 2nd and 4th character in a regex (not an exercise, but I would like to know this one as well.)?


How to make exported shell variables permanent?

export LD_PRELOAD=/usr/lib/libtsocks.so      It's ok that I can export in this way, but how can I make it permanent? I want LD_PRELOAD to still be changed after a reboot. I'm using Ubuntu and Fedora


./configure, how to provide a different executable during the checking phase

I am trying to install the MonoDevelop IDE from source. One of its prerequisites is Mono 2.10. Unfortunately the preinstalled mono runtime on my current Ubuntu system is 2.6.7. I managed to make a parallel mono install on my system. It is located at `/opt/mono-2.10`. Sadly, once I run the `./configure` script, it fails saying that the `/usr/bin/mono` executable is outdated (as well as other executables related to mono). I would want to try to pass a different path to `./configure`, to point to my parallel mono install (`/opt/mono-2.10/bin/mono`) etc. How can I do that? Thanks in advance.


Upstart and bash function names containing "-"

I inherited some bash scripts where the author used "-" in the function names instead of the more normal "_" e.g.:               function a-b {     ...     }      Ugly but legal in bash. Problem is I sourced this inside an upstart script and got > x.sh: line 5: `a-b': not a valid identifier Took a while to realize it was the name and not the function contents. Anyway, renaming is not an easy option in this case and as I've learned, upstart uses `/bin/sh` not `/bin/bash` to parse? run its scripts. Hence I guess this issue. Any ideas on a workaround other than renaming? If nothing else, at least I hope this question will warn others on the perils of odd bash coding styles and how they come back to bite you sometimes.


How do I stop a find from descending into found directories?

I'm wanting to find all directories with a specific string so I can do another find on the files contained within. So I don't want to waste time on `./my-search-term/dir/my-search-term` etc. How can I stop recursing when I've found the first my-search-term directory?


Power off USB storage device/port to avoid power consumption

A connected USB storage device, even if unused (unmounted, etc.), consumes power. How can I turn it off / turn its power off so that it doesn't consume power as if it was disconnected, but without actually disconnecting it? I suppose that [temporary] disabling the USB port the device is connected to would lead to the same results. Is that possible? ** Running Linux Kernel 3.1 (Arch Linux)


KDE Startup Applications over xrdp

I have Google Chrome installed on my machine. The new chrome runs in the background (for addons like google chat) and has an entry in the KDE startup apps. The trouble I am facing is that when I log in to an xrdp session, a chrome window starts up on the local session along with more vino-server session. How do I fix this? How do I stop chrome from opening a new window at the local session? I am using Mint 13 on x64


Identifying local and remote sessions

I would like to write a startup script that would perform it's task if it was run on the local machine, but not if it was called from a remote xrdp session.               If Local     {      do something     }     If remote     {      do something else     }      How would I identify if the session is locally started or remotely started?


can't start default network, is there a way to run dnsmasq for both local and kvm?

I can't start KVM since I use dnsmasq on my laptop as a DNS cache server, ![enter image description here](http://i.stack.imgur.com/MNOBv.png) So, I'm wondering if this can be merged to the server I'm running.


Top and ps not showing the same cpu result

This is linked to this question. When I run `top` I get the following result: ![enter image description here](http://i.stack.imgur.com/YeYpy.png) pid `3038` is using 18% cpu, however when running ![enter image description here](http://i.stack.imgur.com/uCoFi.png) the result is 5.5%. And this number does not appear to be changing with time (i.e. when running the same command a bit later)... Is the `ps` command somehow averaging the cpu usage?


Directory filenames with sed with whitespaces

I'm working on a script and I'm stuck, even with the help of teh googles. Here's my code:               for FOLDER in `find . -type d | sed "s#^.#$(pwd)#" | sed 's/ /\ /g'`     do         echo "$FOLDER"     done      This will replace only the first instance of " " with "\ " but not the rest. Any ideas?


Where does Mac OS X come from?

Discussing with Mac owners, I got several versions of where Mac OS X comes from. It is known to have some root in BSD, but how much, and where? Some say that Mac OS X has a FreeBSD kernel, with all the utilities above that makes it an OS being Mac specific. (Not speaking about user apps here, only all of the `init`, `ls`, `cd`, and others. _binutils?_ ) Others say Mac OS X is a Darwin kernel, that is pure Mac, and that the OS utilities come from BSD. Where's the truth?


print a file in hex using awk

I have a file name `x`               $ cat x     1A34532112345      I wants to print in hex using `awk` I written a script (with help from web)               fold -1 /home/cscape/Desktop/x | gawk '{ printf("%s , %X\n",$0, int($0) )}'       But output for each char is `0`               $ fold -1 /home/cscape/Desktop/x | gawk '{ printf("%s , %X\n",$0, int($0) )}'     1 , 1     A , 0     3 , 3     4 , 4     5 , 5     3 , 3     2 , 2     1 , 1     1 , 1     2 , 2     3 , 3     4 , 4     5 , 5      Why `0` for `A`. even with `%d`. I wants to print ASCII value of `A` as `HEX`.


Get list of top 10 memory consuming processes with graph using Cacti in Centos 6.3

I'm using Cacti in Centos 6.3 and I would like to get the list of the top 10 memory consuming processes, with a memory graph, so that if server fails I can easily find the processes behind that. It is possible with a plugin or template?


What editor can be used to provide highlighting for Mallard project files?

I normally switch between Geany, vim and Emacs (depending on my mood. LOL) when editing on a linux platform. Recently, I have begun exploring the Mallard Project, but have been unable to find the right tool for editing files to be processed by Mallard. Does such a tool exist? **UPDATE** Shortly after posting my question, I went to the Mallard mailing list to search for an answer... and posted my question there. I share, here, the answer which I received from that list: > > On Thu, Jan 5, 2012 at 8:44 PM, The Geeko wrote: >>   >>   >>     Is there a tool available which properly handles Mallard documents? >>   >>     I normally use Geany, Emacs and Vim... (depending on my mood and the task at >>     hand), but none of these identify Mallard files; therefore, there is no >>     coloring and other assistance. >>   > > gedit recognizes Mallard documents, and even has some handy Mallard code > snippets. > > It does not do code completion like some advanced IDEs, but it does code > coloring. > > Jim I appreciated the answer.


Emacs mode in zsh: M-b M-f etc. show weird symbols

I have set up zsh to use emacs mode. But typing `Alt+f` or `Alt+b` inserts weird symbols (accented letters and so on), rather than moving around by word in the shell like it should. Since I don't ever want to insert the "ae" symbol into a shell prompt, how can I get zsh to behave? I had the same problem with bash, but now that I'm actually taking the time to customise zsh, I thought I'd ask... `AltGr+b` etc. produces _different_ weird symbols... I'm using Ubuntu 10.4


What is in fsck section in fstab?

I have a basic understanding of fsck utility but what does "fsck" section in /etc/fstab denote? It has values 0, 1, 2 what are these values? Googling says 0- it wont be checked 1- will be checked on boot 2- Now what is it?


Color of the fonts in my remote terminal screen when using VI in linux

I notice one of my linux remote login window shows color in VI editor interface but another window doesn't show color. These 2 windows are remotely connected to 2 different server IP addresses. ![Screenshots](http://i.stack.imgur.com/KP0xz.png) May I know why and how to change the color of the VI screen? I am using Putty on Windows 7 to remotely access the linux server.


Creating a .sh wrapper in my debian package

I'm trying to build a debian package for a program that uses mono. My `make install` target currently puts all of my binaries `/usr/local/lib/mypackage`, then creates a tiny executable script in `/usr/local/bin` that invokes the actual binaries with mono. I use a one-liner to replace the placeholder `PREFIX` with the actual install path:               install: DESTDIR=/usr/local     install: LIBDIR=$(DESTDIR)/lib     install: BINDIR=$(DESTDIR)/bin     install: $(PHONIX) $(ANTLR) doc         install -m 0755 -d $(LIBDIR)/phonix         install -m 0755 -t $(LIBDIR)/phonix $(PHONIX) $(ANTLER)         install -m 0755 -D phonix.sh $(BINDIR)/phonix         sed -i "s!PREFIX!$(LIBDIR)!" $(BINDIR)/phonix      When I'm running under `dh_make`, `$(LIBDIR)` and `$(BINDIR)` point to the packaging directory as desired. Everything gets installed into the right place for the packager, but the `sed` call puts the path of my local packaging directory into the script, which then gets placed verbatim in the package. This obviously doesn't work once I actually install the package on the target system. I think that I need to move the `sed` call into the post-install script, but I'm not sure how to get the local install directory (the moral equivalent of my `$(LIBDIR)` and `$(BINDIR)`) in the post-install step. Or is there a better way altogether to do this? * * * **Edit** : Here's my actual `phonix.sh` file, before sed is called:               #!/usr/bin/sh          exec mono PREFIX/phonix.exe      As you can see, the _only_ purpose of this file is to provide an executable wrapper for the mono-based .exe. The sed call just replaces `PREFIX` with the value of `$(LIBDIR)`. So all I really need to know is _how can I get the actual installed location of my .exe on the target system_ so that the wrapper script works?


How to divide a list of values by a number in command line?

I am trying to translate a simple program to the command line using unix utilities. For example, if I have a frequency list (after piping through uniq and sort)               5 x     4 y     1 z      I want to print out, instead of the frequencies, the fraction of the times they occur:               0.5 x     0.4 y     0.1 z      (I have a python program that does this, but I wanted to know if this could be done through the command line itself.) So far, I have tried to compute the sum               <...>| awk -F" " '{print $1}' | tr '\n' +; echo 0 | bc      but this is just giving me the output `5+1+4+0` without computing it. EDIT: I got the sum . I modified the above command to               <...>| awk -F" " '{print $1}' | echo $(tr '\n' +; echo 0) | bc > sum       and the correct result is stored in sum. Now I just want to divide the original list by sum and display it.


What happens when my internet dies out during the net installation of Debian?

So it downloaded all kinds of things (I think GNOME didn't make it, because I'm doing everything in command line atm). My router is so crappy that it loses its internet connection if I surpass 450 kB/s. I usually prevent this with wondershaper (and at the time I didn't figure to install it before installing anything else), but now the installation stopped around 17%. So then I skipped that step and finished my installation. Upon rebooting, all I had was tty's, no sign of GNOME. Now I'm wondering what happened with that 17%. Is it just taking up space somewhere on my hard drive? Or did the installation procedure delete that 17% when it realized that step was cancelled?


Force change of a user's cwd as root

I'm looking to change a user's process such that I can set it's cwd. Related, and _secondary_ to the question, I have a filesystem I want to unmount but a user is sitting on it with a bash process. I don't want to kill that user's process but I'd like to gently redirect them to say ... /tmp while I unmount the disk. I'm root obviously.


Chroot debian squeeze for shell access

A user requires shell access to an Ubuntu server from the WAN side. There are many shell accounts with simple passwords. So shell port (port 22) is blocked in the firewall. For my WAN side user I am planning to run a ssh server in a Debian chroot, and open its port in the firewall. If this kind of setup is feasible, what is the best way of achieving it?


Find used drivers for printer

My printer CANON PIXMA MP170 (usb) doesn't work on Debian 7 amd64 but does work on my Ubuntu 12.04 i386. I've tried a lot of tutorial about this but no success. So for now I'd like to to know more about what driver is used on my Ubuntu 12.04 for this printer. So, i'm searching a way to find what driver CUPS use for my printer on ubuntu and maybe use this information to make work it on my debian.


Why doesn't /etc/udev/rules.d/70-persistent-net.rules exist on virtual machines?

CENTOS 5.9 I'm curious, why doesn't `/etc/udev/rules.d/70-persistent-net.rules` exist on virtual machines with CentOS 5.9? Is there an alternative file name for this when using a virtual machine?


How to test whether the file is crlf or lf without modyfing it?

I need to periodically run a command, that ensures that some _text_ files are kept in linux mode. Unfortunately `dos2unix` always modifies file, which would mess file's and folder's timestamp and cause unnecessary writes. The script I write is in Bash, so I'd prefer answers based on Bash.


How can I determine the wall clock time of a process?

I have found the general Linux program `time`, which times a command. For example, suppose I want to time the execution of `foo`. I can use:               time foo      which gives this sample output:               real    0m8.738s     user    0m5.796s     sys     0m0.576s      However, the man page for `time` seems a bit unclear (although I am a Linux novice): > >     TIME(1)                       Linux User's Manual > TIME(1) >   >   >   >     NAME >            time - time a simple command or give resource usage >   >     SYNOPSIS >            time [options] command [arguments...] >   >     DESCRIPTION >            The  time  command  runs  the  specified program command with the > given >            arguments.  When command finishes, time writes a  message  to > standard >            error  giving  timing statistics about this program run.  These > statis- >            tics consist of (i) the elapsed real time between invocation and > termi- >            nation, (ii) the user CPU time (the sum of the tms_utime and > tms_cutime >            values in a struct tms as returned by times(2)), and (iii)  the > system >            CPU  time  (the  sum of the tms_stime and tms_cstime values in a > struct >            tms as returned by times(2)). >   Does the "real" time refer to the **_wall clock_** time?


file still read-only after a mount --bind from a rw partition

I use `mount --bind` to "overlay" a file from one `ext4,rw` filesystem onto another file in `ext4,ro` filesystem. For example, `/etc/hosts` is on a read- only `/` partition, but I have another partition where `/rw/etc/hosts` is writable. So when I do               # mount --bind /rw/etc/hosts /etc/hosts      any writes to `/etc/hosts` will go to `/rw/etc/hosts` * * * This worked fine in `CentOS 6.3`.               # mount -o ro /dev/sdc1 /ro     # mount -o rw /dev/sdc2 /rw     # mount --bind rw/test ro/test     # echo 1 > rw/test     # cat ro/test     1     # echo 2 > ro/test                    # [1]     # cat rw/test     2      But I cannot get it to work in `CentOS 6.4` I repeat the steps from above, but I get an error when trying to write to `ro/test`:               # echo 2 > ro/test                    # [1]     -bash: ro/test: Read-only file system      `SELinux` is disabled. Any ideas what could cause this to stop working? CentOS 6.3 kernel: `2.6.32-279.22.1.el6.x86_64`   CentOS 6.4 kernel: `2.6.32-358.el6.x86_64` and `2.6.32-358.2.1.el6.x86_64`


What are the characters printed when Alt+Arrow keys are pressed?

When I press `Alt``Up`, `A` printed to terminal screen. Same thing happened when I pressed `Alt``Down` but `B` is printed instead. Other characters that I realized; `Alt``Left` = `D` and `Alt``Right` = `C` What is the purpose of these commands?


Format the content of the file using Perl

I am new to Perl programming and I am stuck with this problem for some time. Can you please help me in solving it? I have a file with the following format:               >Country1      Aus     trali     a          >Country5     Swi     tzer     land          >Country2     Net     herland     s      I want to output a file with the following format:               >Country1 Australia     >Country5 Switzerland     >Country2 Netherlands


Unable to start apache

I'm running CentOS7 in virtualbox on a mac (osx 10.9.3). Ultimately, I want to acces the website on my Guest VM from my Host. I can Ping and SSH to VM but I can't acces the webpage when entering the VM's IP in Host browser. When running               systemctl status httpd.service       I get 2 errors: 1) "No listening sockets available". Netstat tells me there is no process on port 80. I'm not out of disk space. Error log is empty (for today) In "/etc/httpd/conf/httpd.conf" I put:               Listen 80      2) "Unable to open logs". In "/var/log/httpd" I did               chmod 777 error_log acces_log      I'm stuck, been trying to acces this webpage for a day now. Any help is much appreciated.


i3wm : start applications on specific workspaces when i3 starts

How can I start applications on specific workspaces in i3 when it starts? Why is this not working in my config file? :               workspace 1; exec firefox; workspace 2; exec chromium; workspace 1


Install application to /usr/local

Some application that installs automatically such as Netbean, JDK often install to `/usr/local` and I run it by normal user (not root). But another application, just extract `tar.gz` file and run it. Under normal user, I cannot use `cp` command to copy from `Download` directory to `/usr/local` directory, I must use root user (`su` command). But because I copy by root user this directory belongs to root, so I cannot run it under normal user. It makes my headache. How can I run it under normal user, as other application that I list above. Or, is there another way to install it?


Flashing rootfs on Embedded Linux with Limited RAM

I'm fairly new to the embedded world, so forgive me if this seems obvious. I'm working on a board based off of the AT91SAM9260. I have 256MB of flash and 64MB of RAM. The current setup flashes two uImages. The first if a RAMDISK only recovery image, and the second is the main uImage. The first is used to flash rootfs.ubifs onto /dev/mtd1 for the main uImage. One of the problems I'm encountering is running out of memory while flashing the rootfs from the recovery image. Depending on the size of the rootfs, it runs out of memory while flashing. I'm using TFTP to pull the image over onto the device and flash it. So, it must reside in memory along with the recovery uImage. Is there a more efficient way of doing this perhaps? While the goal is to keep our rootfs small, obviously, given it's going onto an embedded device, some of our customers have different needs and don't mind some more of the flash being taken up by the OS.


Getting xmonad and gnome-panel working with Fedora 18

I have been using fedora 18 lately and trying to get xmonad working with gnome-panel. On my ubuntu and kali installations this works perfectly fine, but in fedora I have yet to get gnome-panels to show up correctly. Any help as to why the gnome-panels show up the way they do and getting it to work correctly is greatly appreciated. Here is a screenshot. Notice the 2 black panels on the right. I have figured out they are suppose to be the upper and lower gnome-panel menus but obviously they are not working in fedora and xmonad yet.![enter image description here](http://i.stack.imgur.com/AnzIm.png) I have an xmonad desktop file               #/usr/share/applications/xmonad.desktop     [Desktop Entry]     Type=Application     Encoding=UTF-8     Name=Xmonad     Exec=xmonad-start     NoDisplay=true     X-GNOME-WMName=Xmonad     X-GNOME-Autostart-Phase=WindowManager     X-GNOME-Provides=windowmanager     X-GNOME-Autostart-Notify=false      I have a gnome-session file               #/usr/share/gnome-session/sessions/xmonad.session     [GNOME Session]     Name=Xmonad/GNOME     RequiredComponents=gnome-settings-daemon;gnome-panel;     RequiredProviders=windowmanager;notifications;     DefaultProvider-windowmanager=xmonad     DefaultProvider-notifications=notification-daemon      I have an xsessions file               #/usr/share/xsessions/xmonad.desktop     [Desktop Entry]     Encoding=UTF-8     Name=XMonad Gnome     Comment=Lightweight tiling window manager     TryExec=/usr/bin/gnome-session     Exec=gnome-session --session=xmonad     #Icon=xmonad.png     Type=XSession      This works just fine in my other systems but in fedora after logging into xmonad gnome-panel seems to open two panels that are suppose to be the gnome- panels at the top and the bottom but they are blank. Plus you cant close them or anything else with them. Inside my xmonad.hs file a the top I import the GnomeConfig module and the ManageDocks module.               import XMonad.Config.Gnome     import XMonad.Hooks.ManageDocks      I also have added gnome-panel ignore to my configuration, but I don't know for all certainty what it does ( I just know it made my other systems work after adding it)               myManageHook = composeAll     [ manageHook gnomeConfig     , className =? "File Operation Progress"  --> doFloat     , className =? "google-chrome"  --> doShift "4:chrome"     , resource  =? "desktop_window" --> doIgnore     , resource  =? "kdesktop"       --> doIgnore     , resource  =? "gnome-panel"    --> doIgnore ]       And I have changed my defaults to the GnomeConfig that I imported at the top.               main = xmonad defaults          defaults = gnomeConfig {            -- simple stuff         terminal           = myTerminal,         focusFollowsMouse  = myFocusFollowsMouse,         borderWidth        = myBorderWidth,         modMask            = myModMask,         -- numlockMask deprecated in 0.9.1         -- numlockMask        = myNumlockMask,         workspaces         = myWorkspaces,         normalBorderColor  = myNormalBorderColor,         focusedBorderColor = myFocusedBorderColor,            -- key bindings         keys               = myKeys,         mouseBindings      = myMouseBindings,            -- hooks, layouts         layoutHook         = myLayout,         manageHook         = myManageHook,         handleEventHook    = myEventHook,         logHook            = myLogHook,         startupHook        = myStartupHook     }


Modifying a BTRFS filesystem UUID

I've made backups of my BTRFS filesystem using Clonezilla, and have restored one of those backups to a file named `2013-11-29.sda3.img`. I need to get some files out of this backup, but there's a hitch. Since the backup is of this machine, I cannot mount the backup anywhere on my filesystem, as its UUID matches the UUID of `/`. Is there a way that I can change the UUID of the backup volume? As I understand it, BTRFS stores UUID information in every block on the filesystem, which complicates things for my purposes. However, is there a way that I could modify this? I understand that it'd probably take a long time to do, but that doesn't concern me. My main concern is keeping the server online. The backup is fairly large, so transferring it to another machine would take quite a while. What are my options?


wget a file, logging the output and showing the output on prompt

In a bash script, I need to download a file from the web, for doing it i use wget command. I would log the output of wget command, and at "the same time" having the output prompting on terminal. I searched in the `man wget` without find the way to achieve that. it seems that if you turn on the log with `-o` or `-a` parameter, then the prompt output is automatically 'redirected' to the log file, and nothing is showed on terminal while executing the script, until it have done to download. > wget -a wget_log --no-check-certificate --auth-no-challenge \--http- > user=$jen_uname --http-password=$jen_psswd link_to_the_file Is it possible to do both? output on prompt and writing on log file? every hint is appreciated


How to enable vim addon packages?

I have installed `vim-nox` as well as `vim-latexsuite` and `vim-outliner` on Ubuntu 12.10. There's nothing wrong with Vim but neither of the add-on packages does anything. What do I have to do to in order to enable them?


Providing the full path doesn't work but calling just the name of the program does, why?

What am I missing? I can call "rvm" from the command line but not reference the entire path that `which rvm` says I'm using. Not that it's important, but I stay logged in as "jenkins" the entire time and these commands are executed in succession.               $ whoami     jenkins      RVM is located here               $ which rvm     /home/jenkins/.rvm/bin/rvm      This works               $ rvm use 1.8.7     Using /home/jenkins/.rvm/gems/ruby-1.8.7-p370     Running /home/jenkins/.rvm/hooks/after_use      But this doesn't work               $ /home/jenkins/.rvm/bin/rvm use 1.8.7     RVM is not a function, selecting rubies with 'rvm use ...' will not work.     You need to change your terminal settings to allow shell login.     Please visit https://rvm.io/workflow/screen/ for example.      Yes, I have visited the link that is referenced but I don't see how it applies to me.


My echo command doesn't accept switches (echo -n or echo -e)

I have an echo statement in my script as below:               echo -ne "Check Script";      I was expecting it to print               Check Script      but I am getting the below output               -ne Check Script      But when I run the same script on some other machine I get the expected output. What could be machine specific variables or properties because of which the script is behaving differently.


Why don't /etc/group and /etc/password match?

OK this is a basic question showing my ignorance of sysadmin matters... Looking at the UNIX system I work on, my /etc/passwd entry says my_name:x:uid:gid:comments:home directory:login shell Then when I go and look at group 'gid' in /etc/group, I see group_name:x:gid:some_other_name So how come /etc/passwd thinks I am a member of the group, but /etc/group doesn't? Am I a member of the group or aren't I? Is this normal? Your help would be appreciated.


Compare 2 tab delimited files and output differences with column header

I would like to compare 2 similar files on a common column. The files will have identical headers. `file1.txt`               mem_id      Date    Time    Building         aa          bb      cc      dd     ee          ff      gg      hh     ii          jj      kk      ll      `file2.txt`               mem_id      Date    Time    Building         aa          bb      cc      dd     ee          ff      2g      hh     ii          jj      kk      2l      `Command`               awk 'NR==FNR{for(i=1;i<=NF;i++){A[i,NR]=$i}next} {for(i=1;i<=NF;i++){if(A[i,FNR]!=$i)\      {print "ID#-"$1": Column",i"- File1.txt value=",A[i,FNR]" / File2.txt value= "$i}}}'\      file1.txt file2.txt      `Current Output`               ID#-ee: Column 3- File1.txt value= gg / File2.txt value= 2g     ID#-ii: Column 4- File1.txt value= ll / File2.txt value= 2l      `Desired Output`               mem_id#-ee: Time- file1.txt value= gg / file2.txt value= 2g     mem_id#-ii: Building- file1.txt value= ll / file2.txt value= 2l       I am very close. But I would like help with a few improvements. 1- I would like to replace the “Column 3” and “Column 4” with the actual column header (Time, Building, whatever) 2- I would like to dynamically gather the file names in the output and not have to add it as part of the command (to make it universal) 3- I would like this scriptable. Any help would be appreciated.


Why am I getting an InitDevice::CreateDevice error when I try to run "Pirates of the Caribbean" with Wine?

I am running Ubuntu 11.04 on a Sony Vaio. I am using wine 1.3 to run a rather complex yet archaic gaming program, "Pirates of the Caribbean" (2003; not based off the movie). I started it up and after five minutes it crashed. I unplugged the computer, and when I tried to run the program it crashed and an error came up saying "runtime error! abnormal program termination". Also I created a link to the executable on my desktop and when I tried to load it that way it crashed loading `PCS_control.dll` and a log file showed up with the content:               Scanning current directory     Loading modules...     Loaded 0      Reset...     Initializing CORE...     User Rised Exception     C:\PROJECTS\DRIVE_V2\ENGINE\SOURCES\Core.cpp line 364     no 'engine.ini' file      I think this report is superficial -- I know that there is an `engine.ini` file and that it is not corrupted because I tried recopying from my other computer. I also happen to know the above directory does not exist. How can I get this game to run? P.P.(post, post) when I run engine.exe on the computer while its not in the directory with all of the program files it still says runtime error, maybe when the program crashed it somehow damaged a driver... P.P.P. sorry I might have made a mistake, it crashes loading directX 8 P.P.P.P. This time I tried running pirates, The Loading screen said "InitDevice::CreateDevice, This Technique is not supported by your device" What does This mean and if possible, how may I fix it? Thanks for your input.


Linux kernel: task vs thread

When I was reading a book(Linux kernel programming), I got interesting/confusing paragraph about `mm_segment_t addr_limit`(one of the member in `struct_task`) as below: > **mm_segment_t addr_limit;**   >  Unlike the older kernels, since 2.4 tasks (threads) aslo can be within the > kernel. These can access a larger address space than tasks in user space. > _addr_limit_ describes the address space, which it is possible to acess > using the kernel of the task. **Questions** : 1.In first point, "(tasks) threads **also can be** within the kernel" is there. What does it means? So threads not necessarily within the kernel? 2.Second sentence, `These can access a larger address space than tasks in user space`. I don't understand what `these` means? If he is talking about threads, how can a threads have larger address space than tasks?


/usr/bin/ld: cannot find -ldb while compiling iproute2

I am trying to compile iproute2-3-12-0 on Fedora 19, I have BerkeleyDB installed, the command `ls -la /usr/lib/libdb*` gives following results:               -rwxr-xr-x 1 root root 1847852 May 16  2013 /usr/lib/libdb-5.3.so     lrwxrwxrwx 1 root root      12 Sep 18 20:15 /usr/lib/libdb-5.so -> libdb-5.3.so     lrwxrwxrwx 1 root root      18 Jan  4 12:57 /usr/lib/libdbus-1.so.3 -> libdbus-1.so.3.7.4     -rwxr-xr-x 1 root root  317720 Nov 11 19:24 /usr/lib/libdbus-1.so.3.7.4      I have newest version of Bison and Flex. I use kernel: 3.12.8-200.fc19.x86_64. I have ldb in `/usr/lib and /usr/lib64`. I did not find any `LDFLAGS` in `Makefile` though. I get an error:               ssfilter.y: conflicts: 27 shift/reduce     /usr/bin/ld: cannot find -ldb     collect2: error: ld returned 1 exit status     make[1]: *** [arpd] Error 1     make: *** [all] Error 2      A closer look at the end of make log reveals:                       make[1]: Entering directory `/root/Traffic_Shaping/iproute2-3.12.0/bridge'     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE   -c -o bridge.o bridge.c     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE   -c -o fdb.o fdb.c     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE   -c -o monitor.o monitor.c     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE   -c -o link.o link.c     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE   -c -o mdb.o mdb.c     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE   -c -o vlan.o vlan.c     gcc   bridge.o fdb.o monitor.o link.o mdb.o vlan.o ../lib/libnetlink.a ../lib/libutil.a  ../lib/libnetlink.a ../lib/libutil.a -o bridge     make[1]: Leaving directory `/root/Traffic_Shaping/iproute2-3.12.0/bridge'     make[1]: Entering directory `/root/Traffic_Shaping/iproute2-3.12.0/misc'     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE   -c -o ss.o ss.c     bison ssfilter.y -o ssfilter.c     ssfilter.y: conflicts: 27 shift/reduce     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE   -c -o ssfilter.o ssfilter.c     gcc   ss.o ssfilter.o  ../lib/libnetlink.a ../lib/libutil.a -o ss     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE  -o nstat nstat.c -lm     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE  -o ifstat ifstat.c ../lib/libnetlink.a ../lib/libutil.a -lm     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE  -o rtacct rtacct.c ../lib/libnetlink.a ../lib/libutil.a -lm     gcc -Wall -Wstrict-prototypes  -Wmissing-prototypes -Wmissing-declarations -Wold-style-definition -O2 -I../include -DRESOLVE_HOSTNAMES -DLIBDIR=\"/usr/lib64\" -DCONFDIR=\"/etc/iproute2\" -D_GNU_SOURCE -I/usr/include/libdb4  -o arpd arpd.c ../lib/libnetlink.a ../lib/libutil.a -ldb -lpthread     /usr/bin/ld: cannot find -ldb     collect2: error: ld returned 1 exit status     make[1]: *** [arpd] Error 1     make[1]: Leaving directory `/root/Traffic_Shaping/iproute2-3.12.0/misc'     make: *** [all] Error 2      How can I get `ld` to find `libdb`?


using grep --perl-regexp

this is a sample output of `ls`               $ ls -lAF     -rw-------  1 martin martin  168 Jan 25 23:26 aaa     -rw-------  1 martin martin  168 Jan 25 23:26 bbb     -rw-------  1 martin martin  168 Jan 25 23:26 ccc      I would like to colorize the `user` and `group` entries. However, my syntax only colorizes `user`,but not the `group`:               ls -lAF | grep --color -P '^\S+\s+\S+\s+\K\S+'      I don't understand what the `\K` exactly means. How could I match both `martin martin` in my sample output?


Mysterious automated emails

I remember messing around with crontab and setting up email capabilities on a server many months back, and now all of a sudden I'm getting the following email: EMAIL HEADER:               from:    root <myemail@gmail.com>     to:  root     date:    Thu, Dec 5, 2013 at 6:48 AM     subject:     Cron <root@server-ip> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )     mailed-by:   gmail.com      BODY:               /etc/cron.daily/mlocate:     /usr/bin/updatedb.mlocate: `/var/lib/mlocate/mlocate.db' is locked (probably by an earlier updatedb)     run-parts: /etc/cron.daily/mlocate exited with return code 1


Local variables in zsh: what is the equivalent of bash's "export -n" in zsh

I'm trying to contain the scope of a variable to a shell, and not have children see it, in zsh. For example, I type this in .zshrc:               GREP_OPTIONS=--color=always      But if I run a shell script with the following:               #!/bin/bash     echo $GREP_OPTIONS      The output is:               --color=always      while I want it to be null (the shell script above should not see the GREP_OPTIONS variable at all). In bash, one can say: `export -n GREP_OPTIONS=--color=always`, which will prevent this from happening. How do I accomplish this in zsh?


Understanding /var/log/messages entries

192.168.25.1 = router 192.168.10.1 = gateway/modem 192.168.25.144 = this pc (which is 'linuxpc' running fedora 17) What happened during these log entry events below? Specifically what do the last two log entries mean.               Oct 10 13:24:22 linuxpc dhclient[5779]: DHCPREQUEST on p14p1 to 192.168.25.1 port 67 (xid=0x466a6633)     Oct 10 13:24:22 linuxpc dhclient[5779]: DHCPACK from 192.168.25.1 (xid=0x466a6633)     Oct 10 13:24:22 linuxpc dhclient[5779]: bound to 192.168.25.144 -- renewal in 32701 seconds.     Oct 10 13:24:22 linuxpc NetworkManager[846]: <info> (p14p1): DHCPv4 state changed renew -> renew     Oct 10 13:24:22 linuxpc NetworkManager[846]: <info>   address 192.168.25.144     Oct 10 13:24:22 linuxpc NetworkManager[846]: <info>   prefix 24 (255.255.255.0)     Oct 10 13:24:22 linuxpc NetworkManager[846]: <info>   gateway 192.168.25.1     Oct 10 13:24:22 linuxpc NetworkManager[846]: <info>   hostname 'linuxpc'     Oct 10 13:24:22 linuxpc NetworkManager[846]: <info>   nameserver '192.168.10.1'     Oct 10 13:24:22 linuxpc dbus[910]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using servicehelper)     Oct 10 13:24:22 linuxpc dbus-daemon[910]: dbus[910]: [system] Activating service name='org.freedesktop.nm_dispatcher' (using     servicehelper)     Oct 10 13:24:22 linuxpc dbus-daemon[910]: dbus[910]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'     Oct 10 13:24:22 linuxpc dbus[910]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'     Oct 10 13:30:29 linuxpc dbus-daemon[910]: dbus[910]: [system] Rejected send message, 2 matched rules; type="method_return", sender=":1.2" (uid=0 pid=865 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.36" (uid=1000 pid=1182 comm="gnome-session ")     Oct 10 13:30:29 linuxpc dbus[910]: [system] Rejected send message, 2 matched rules; type="method_return", sender=":1.2" (uid=0 pid=865 comm="/usr/lib/systemd/systemd-logind ") interface="(unset)" member="(unset)" error name="(unset)" requested_reply="0" destination=":1.36" (uid=1000 pid=1182 comm="gnome-session ")


Arch Linux slow shutdown

I'm suffering from a very slow shutdown/reboot with Arch Linux, so I followed the instructions given here to enable logging. So here is the log generated during (slow) reboot that unfortunatelly I can't analyze by myself. Can someone help me please to understand where the problem is? PS: According to that article I've also tried rebooting with `sync && reboot -f` and it goes super fast.


Error launching Safari with PlayOnLinux

I've installed PlayOnLinux with the following commands:               wget -q -O- http://deb.playonlinux.com/public.gpg | sudo apt-key add -     sudo wget http://deb.playonlinux.com/playonlinux_precise.list -O /etc/apt/sources.list.d/playonlinux.list     sudo apt-get update          # useful dependencies     sudo apt-get install -y curl p7zip-full          # install playonlinux          sudo apt-get install -y playonlinux      and then I've installed Safari from inside PlayOnLinux. It is correctly installed, but when I try to launch it I get the next errors:               [01/23/14 12:15:35] - Running wine-1.4.1 Safari.exe (Working directory : /home/manolo/.PlayOnLinux/wineprefix/Safari/drive_c/Program Files (x86)/Safari)     p11-kit: couldn't load module: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: no se puede abrir el archivo del objeto compartido: No exApplication tried to create a window, but no driver could be loaded.     Unknown error (127).     [01/23/14 12:15:47] - Running wine-1.4.1 Safari.exe (Working directory : /home/manolo/.PlayOnLinux/wineprefix/Safari/drive_c/Program Files (x86)/Safari)     err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": libSM.so.6: no se puede abrir el archivo del objeto compartido: No existe el archivo o el directorio     err:module:load_builtin_dll failed to load .so lib for builtin L"winex11.drv": libSM.so.6: no se puede abrir el archivo del objeto compartido: No existe el archivo o el directorio     fixme:heap:HeapSetInformation (nil) 1 (nil) 0     err:module:load_builtin_dll failed to load .so lib for builtin L"winemp3.acm": libmpg123.so.0: clase ELF errónea: ELFCLASS64     fixme:process:SetProcessDEPPolicy (1): stub     fixme:shell:SetCurrentProcessExplicitAppUserModelID L"Apple.Safari": stub     fixme:advapi:GetCurrentHwProfileA (0x32f9ec) semi-stub     fixme:dwmapi:DwmIsCompositionEnabled 0x32fb48     fixme:win:DisableProcessWindowsGhosting : stub     fixme:service:EnumServicesStatusW resume handle not supported     fixme:service:EnumServicesStatusW resume handle not supported     p11-kit: couldn't load module: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: /usr/lib/i386-linux-gnu/pkcs11/gnome-keyring-pkcs11.so: no se puede abrir el archivo del objeto compartido: No exApplication tried to create a window, but no driver could be loaded.     Unknown error (127).     fixme:ntdll:NtLockFile I/O completion on lock not implemented yet     fixme:msg:pack_message msg 14 (WM_ERASEBKGND) not supported yet     err:ole:RegisterDragDrop invalid hwnd (nil)     err:ole:RegisterDragDrop invalid hwnd (nil)     err:ole:RegisterDragDrop invalid hwnd (nil)     err:ole:RegisterDragDrop invalid hwnd (nil)     err:ole:RegisterDragDrop invalid hwnd (nil)      Any idea of what I am missing?


What is i915.modeset=1 for?

I'm running Ubuntu 13.10 and since I upgraded to kernel 3.12.8 (build from source, including ubuntu patches) on a ivybridge video, the boot spash screen was flickering and messing up. So I googled around and tried adding `i915.modeset=1` paramenter to grub (without really knowing what I was doing) and magically the spash screen was fixed and I also noticed a much smoother scrolling of window contents (e.g a web page in chrome). So I just would like to know more about `i915.modeset=1`.


How to configure FreeBSD to run headless without hitting high interrupt rates?

When running headless (without monitor, keyboard, mouse attached) FreeBSD versions 8.2, 8.3, 9.0 and NetBSD version 5.0 has known issues (FreeBSD PR 156596, NetBSD 46596) to generate extremely high interrupt rates. The issue is also known as an interrupt storm and happens when PCI interrupts are shared. Often EHCI is on the same interrupt (#16, irq16) as VGAPCI. Other users reported to have success by attaching a PS/2 keyboard. The Intel NUC DC3217BY BIOS has no option to disable the onboard video/GPU. We don't need VGA output (headless operation). We do need USB: the boot drive (SDHC card) is attached via a USB bridge. How can FreeBSD configured to not hit the high interrupts rates, or limit the interrupt rate on ehci0? For example how to **disable VGA irq assignment** in FreeBSD?


How can I save the positions of the icons in GNOME 2?

Using Centos 6.5 with GNOME 2. Puting the notebook on an external monitor always randomly puts the icons to different places. It would be a great thing if I can just set the position of them back with a script/click. **My question:** How can I save the positions of the icons on the desktop?


how to add command line calculator to bash that uses comma as decimal mark?

How can I add a command line calculator to my bash? I have found some, but all of them use the full stop as decimal mark, but I want to have it to use the **comma as decimal mark** as most of the world does, see picture: ![map of the world showing the use of decimal marks](http://i.stack.imgur.com/D4BqZ.png) (source wikipedia)   * blue: Full stop/Period (.)   * green: Comma (,)   * red: Momayyez (٫)   * gray: Data unavailable * * * The ones that I have found (all with full stop as decimal mark) are the following, where these lines have to be put into your `~/.bashrc` file:   1. Using bc, which has the advantage, that you can calculate ridiculously large numbers:              calc () {       bc -l <<< "$@"     }        2. With awk, where you have mnemonic names for trigonometric and other functions and you can use fractional exponents and you can give the exponent by the two chars `**` instead of the, on some keyboards difficult to type `^`:              calc () {       awk "BEGIN { print $* ; }"     }


renaming images to include creation date in name

When I look at the properties of an image, I can see the date the photo was taken in "Date Taken". When I edit the images (proprietary program) this data gets lost. How can I rename the image files before editing to include this date (preferably in ISO format for sorting by name).


Why 'echo $0' gives different result for two different terminals?

I opened a terminal on Ubuntu using `Ctrl`+`Alt`+`T` and a different terminal by going to a directory and then right clicking and choosing "Open in Terminal". I did an `echo $0` in both cases. In the first case:               $ echo $0     -bash      In the second case:               $ echo $0     /bin/bash      Why this difference?


Debian system: install specific packages from source automatically to boost the performance

On Debian /Ubuntu systems, how to set a list of packages which can be installed from sources automatically by apt-get or aptitude? The server is mainly for scientific computing and I would like to compile some specific packages with highly optimized flags such as `-O3 -march=native` to boost the performance. I know how to do this for one single package, however, I don't want to redo these when there comes an upgrade.


To install software on a Linux system, many tools like `yum`, `apt-get`, `rpm`, `dpkg` and so on are available to either fetch a package from a repository or install a downloaded package. Alternatively, it is possible to download a (typically) `.tar.gz2` archive of the source and compile manually using               ./configure     make     make install      or similar. My question is: When should one compile and install from source?


how to find the server key


Where can I find Aptana error logs?

Where are Aptana error logs stored in fedora?I want them to see why Aptana crashes. Edit: According to Mat's answer I checked the .log file in .metadata directory but this is what Is added to file after crash, which doesn't contain any helpful information to find what's causing the crash.                    !SESSION 2011-10-07 15:03:51.721 -----------------------------------------------     eclipse.buildId=unknown     java.version=1.6.0_22     java.vendor=Sun Microsystems Inc.     BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US     Command-line arguments:  -os linux -ws gtk -arch x86          !ENTRY org.eclipse.core.resources 2 10035 2011-10-07 15:03:52.870     !MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.


Reuse last line of output from shell command

I am compiling something and depending on success (last line of output contains "success"= I want to scp the binary to the target. I'd prefer a piped oneliner. Is there a way to do this?


Is it possible to kill another user's program? How?

`root` can kill any program run by any user. Is it possible for a user to kill another user's program without using `sudo`, etc.? Example: How can make user `foo` kill program `x` which is run by user `bar`?


Output of command when piped to another command

I am running a command which does a quick checksum of some file like so               find / -type f -ctime +30 -mtime +30 -atime +30 -exec md5sum {} \; | xargs -P 4      and I am trying to run it in parallel with               xargs -P 4      Now, when I run the find command, by itself, I see output as each file is being checksummed. But when I pipe it to xargs, I no longer see the output of the find command. Is there a way I could see the output of find when it is piped to another command?


How store in a variable a file list that includes the backslash when needed?

**Main question:** I am writing a script to perform a backup. I make a list of files in the following way:               LISTOFFILES=$(find ~ \( -name '*.[pP][dD][fF]' -o -name '*.[oO][dD][tT]' \))      The variable `LISTOFFILES` stores more or less something like:               /home/user/file1.pdf /home/user/file2.odt /home/user/Python Tutorial.pdf      My next step is:               tar cvf backup.tar $LISTOFFILES      Bash response is:               /home/user/file1.pdf     /home/user/file2.odt     /home/user/Python: Cannot stat: No such file or directory     tar: Tutorial.pdf      I understand that Bash assumes that `Python` and `Tutorial.pdf` are different files. Is there a way to do a list of files with backslash included with `find` or should I change to use `ls` with pipes? I'd like read your tips and advices. **My other question:** _The answer to this question is not really important, but one tip could help_ How to list files only with the file name without the file path? For example: `file` instead of `/home/user/file`. I've trying with `find` command with `prune` and `path` options, but I have not succeeded.


Avoid a trailing slash in bash when completing a directory name (like zsh)

I'm on a Mac and the cp and mv commands are killing me due to them copying the contents of a directory if a trailing slash is present. It has bitten me more than once when I use tab completion to specify the directory I want to copy. I have noticed zsh has a neat feature that removes the trailing slash if it's not needed after a space or enter key is pressed. Is there any way to have bash mimic this behavior?


Creating eth0 with consistent network device naming

From my understanding, Arch Linux uses Consistent Network Device Naming where the network devices are no longer named eth0, eth1, etc. I use the proprietary MATLAB software which requires a device eth0 for activation. As a work around they suggest turning off consistent network device naming here. I don't think this will work in Arch, but maybe I am wrong, and I am not sure that is a good idea even if it does work. Is it possible to create a dummy eth0 device to fool the MATLAB activation software. Note that this is not intended to, and I don't believe that it does, violate any licensing agreements with MATLAB/The MathWorks.


Counting lines without text in a file

I am using Ubuntu 13.10 for a while now, programming in C++ and Python. I have some question that I can solve by making a program, but maybe there are easier ways, so here is the first question. I can use `grep` to find lines with a word/pattern and then use `wc` to count them:               grep word somefile | wc -l      How do I count the lines that have no "text"? Those that are empty or have only spaces or tabs.


Parse/Manipulate in awk

I am new to `awk` programming. I have a question on manipulating text file, which is required to draw certain network based images in a visualization software (Circos http://circos.ca) I have input data for which I want to manipulate values using `awk/grep/sed`. There are 9 pairs (18 lines). 5 pairs (first 10 lines) are for "from=ABCB11", and 4 pairs (next 8 lines) are for "from =ABCC8". What I want is extract the value from the first line of the first pair and replace it in each alternate line of the rest of the other pairs. So value for group-2 is 9 10, which should replace all the occurrence of value in group2. The next value for group-2 is 28 29, which should be replaced by 9 10. The stop should be determined by "from=name" which is "from=ABCB11". It is not necessary that the rows that have to captured expression from and replace in its next occurrence will belong to group-2 as in this instance. It could be group-3 or group-4 until group-10. So second set ("from =ABCC8") could have been belonged to group-4/5/6 not necessary group-2. It is just a coincidence here, but all group-num's will be same for each "from=" alternate line.               group-2 9 10 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=ACE,toid=11,use=1,z=1     group-3 0 1 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=ACE,toid=11,use=1,z=1     group-2 28 29 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=CHRM1,toid=114,use=1,z=1     group-5 0 1 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=CHRM1,toid=114,use=1,z=1     group-2 29 30 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=CHRM2,toid=115,use=1,z=1     group-5 1 2 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=CHRM2,toid=115,use=1,z=1     group-2 10 11 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=DRD2,toid=158,use=1,z=1     group-3 1 2 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=DRD2,toid=158,use=1,z=1     group-2 11 12 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=EGF,toid=164,use=1,z=1     group-3 2 3 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=EGF,toid=164,use=1,z=1     group-2 21 22 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ACE,toid=11,use=1,z=1     group-3 12 13 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ACE,toid=11,use=1,z=1     group-2 0 1 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1A,toid=21,use=1,z=1     group-1 0 1 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1A,toid=21,use=1,z=1     group-2 1 2 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1B,toid=22,use=1,z=1     group-1 1 2 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1B,toid=22,use=1,z=1     group-2 2 3 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1D,toid=23,use=1,z=1     group-1 2 3 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1D,toid=23,use=1,z=1      Below is the FINAL output,I am looking for:               group-2 9 10 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=ACE,toid=11,use=1,z=1     group-3 0 1 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=ACE,toid=11,use=1,z=1     group-2 9 10 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=CHRM1,toid=114,use=1,z=1     group-5 0 1 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=CHRM1,toid=114,use=1,z=1     group-2 9 10 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=CHRM2,toid=115,use=1,z=1     group-5 1 2 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=CHRM2,toid=115,use=1,z=1     group-2 9 10 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=DRD2,toid=158,use=1,z=1     group-3 1 2 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=DRD2,toid=158,use=1,z=1     group-2 9 10 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=EGF,toid=164,use=1,z=1     group-3 2 3 text color=black,from=ABCB11,fromid=4,order=2,thickness=3,to=EGF,toid=164,use=1,z=1     group-2 21 22 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ACE,toid=11,use=1,z=1     group-3 12 13 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ACE,toid=11,use=1,z=1     group-2 21 22 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1A,toid=21,use=1,z=1     group-1 0 1 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1A,toid=21,use=1,z=1     group-2 21 22 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1B,toid=22,use=1,z=1     group-1 1 2 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1B,toid=22,use=1,z=1     group-2 21 22 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1D,toid=23,use=1,z=1     group-1 2 3 text color=black,from=ABCC8,fromid=5,order=2,thickness=3,to=ADRA1D,toid=23,use=1,z=1      Also,this is just a sample data. So many pairs would have group-1,group-4,group-5 up to group 10. Here, only pairs from lesser groups are mentioned. Basically, these are the modifications that should be seen while printing complete lines, until "from=ABCB11" ends, in each alternate line. Similarly for "from=ABCC8".               group-2 9 10     group-3 0 1     group-2 9 10     group-5 0 1     group-2 9 10     .........     .........     .........      Here is what I tried: I want to loop through the lines until the value in "from=name" remains same,so that I can change all occurrences in each alternate line.Code:               awk -F, 'NR%2==1 {split($2,a,"="); print a[2]}' file.txt      The above code is able to extract the alternate lines and the "name" in "from=name".


Disable "Recently used" in GTK file/directory selector

Can I completely disable "Recently Used" feature in GTK's file / directory selector? ![Recently Used](http://i.imgur.com/AuRhZon.png) Sometimes programs default to this but since it's not useful in my work-flow and with the way I organize my files, it only adds confusion:   * I usually just expect to start from my `$HOME`, so I get surprised by the list of folders   * Also in case of file saving, I'm annoyed by the fact that you can't just type in the name and hit Enter--you have to type a path or select one I'm using Xfce 4.8 on Debian Wheezy and this feature was not available in older Xfce (in Squeeze). I found a post on Xfce-users' mailing list regarding this feature, but without any useful output. Is it possible to simply turn this off and default to `$HOME`?


How do you compile your own kernel on a RHEL6 system?

In RHEL6, the kernel is 2.6.32. What is the procedure to compile your own kernel?


PGP keyserver and proxy firewall issues

I am not sure this is a Linux question directly ... I use Arch Linux which uses package signing. This requires me to download a set of pgp keys with the `pacman-key` program. This works off the presumably more general `gpg` program. If I can get `gpg` to work, I am guessing I can get `pacman-key` working. The error I am getting suggests that the firewall I am behind is blocking the port (or something isn't set correctly in my proxy). I am behind a pretty restrictive university firewall and proxy, but the ports for things like ssh, ftp, and http are open and working, but it appears port 11371 is closed. To debug my problem I tried going to http://pgp.mit.edu/, which works fine. When I try and download a key I get redirected to http://pgp.mit.edu:11371/ and then               HTTP Error Status: 403 Forbidden     Error Reason: Forbidden port      I think I am looking for a pgp keyserver that uses a port that might already be open in the firewall. Is there a different keyserver that I can use that works on a more "universal" port?


Mint 15 on Lenovo G700: wired internet not working (Atheros QCA8172)

Mint 15 doesn't see internet after installing it in dualboot with windows 8 (in Windows internet works well). My network card is Qualcomm Atheros QCA8172 Fast Ethernet (rev 10). What I did:   1. Install drivers from http://www.linuxfoundation.org/collaborate/workgroups/networking/alx   2. Update kernel to 3.11.6 But it didn't fix the problem. * * * Here some additional information. ### ifconfig               $ ifconfig     eth0      Link encap:Ethernet  HWaddr 00:11:d8:0c:73:68                 inet6 addr: fe80::211:d8ff:fe0c:7368/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:0 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)               Interrupt:18           lo        Link encap:Local Loopback                 inet addr:127.0.0.1  Mask:255.0.0.0               inet6 addr: ::1/128 Scope:Host               UP LOOPBACK RUNNING  MTU:65536  Metric:1               RX packets:25 errors:0 dropped:0 overruns:0 frame:0               TX packets:25 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:0                RX bytes:2951 (2.9 KB)  TX bytes:2951 (2.9 KB)      ### interfaces               $ cat /etc/network/interfaces     # interfaces(5) file used by ifup(8) and ifdown(8)     auto lo     iface lo inet loopback      ### ip               $ ip link     1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00     2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000         link/ether 00:11:d8:0c:73:68 brd ff:ff:ff:ff:ff:ff      ### iptables               $ sudo iptables -L -nv          Chain INPUT (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination                   Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination                   Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)      pkts bytes target     prot opt in     out     source               destination               ### iwconfig               $ iwconfig          eth0      no wireless extensions.     lo        no wireless extensions.      ### lsmod               $ lsmod          Module                  Size  Used by     iptable_filter         12810  0      ip_tables              27716  1 iptable_filter     x_tables               34194  2 ip_tables,iptable_filter     bnep                   23966  2      parport_pc             32866  0      rfcomm                 74589  0      bluetooth             391564  10 bnep,rfcomm     ppdev                  17711  0      binfmt_misc            17508  1      nls_iso8859_1          12713  1      ext2                   73792  1      joydev                 17613  0      snd_hda_codec_hdmi     41736  1      snd_hda_codec_idt      55053  1      snd_hda_intel          53038  3      snd_hda_codec         194727  3 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_intel     snd_hwdep              13613  1 snd_hda_codec     snd_pcm               107140  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel     snd_page_alloc         18798  2 snd_pcm,snd_hda_intel     snd_seq_midi           13324  0      snd_seq_midi_event     14899  1 snd_seq_midi     snd_rawmidi            30416  1 snd_seq_midi     snd_seq                66061  2 snd_seq_midi_event,snd_seq_midi     lpc_ich                21163  0      snd_seq_device         14497  3 snd_seq,snd_rawmidi,snd_seq_midi     snd_timer              29989  2 snd_pcm,snd_seq     uvcvideo               82247  0      snd                    69657  17 snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_hda_codec_idt,snd_pcm,snd_seq,snd_rawmidi,snd_hda_codec,snd_hda_intel,snd_seq_device,snd_seq_midi     psmouse               104064  0      soundcore              12680  1 snd     ideapad_laptop         18596  0      videobuf2_vmalloc      13216  1 uvcvideo     sparse_keymap          13890  1 ideapad_laptop     videobuf2_memops       13362  1 videobuf2_vmalloc     videobuf2_core         40785  1 uvcvideo     mac_hid                13253  0      serio_raw              13413  0      dm_multipath           27371  0      lp                     17799  0      mei_me                 18418  0      scsi_dh                14873  1 dm_multipath     mei                    78448  1 mei_me     videodev              138443  2 uvcvideo,videobuf2_core     bcma                   47065  0      parport                42466  3 lp,ppdev,parport_pc     btrfs                 847481  0      xor                    21411  1 btrfs     zlib_deflate           27110  1 btrfs     raid6_pq               97812  1 btrfs     libcrc32c              12615  1 btrfs     hid_generic            12548  0      dm_mirror              22277  0      usbhid                 53329  0      dm_region_hash         20932  1 dm_mirror     dm_log                 18527  2 dm_region_hash,dm_mirror     hid                   106004  2 hid_generic,usbhid     usb_storage            66567  0      nouveau               979463  0      i915                  682899  3      mxm_wmi                13021  1 nouveau     video                  19574  2 i915,nouveau     i2c_algo_bit           13564  2 i915,nouveau     ttm                    84705  1 nouveau     drm_kms_helper         53178  2 i915,nouveau     alx                    32792  0      mdio                   13807  1 alx     wmi                    19256  2 mxm_wmi,nouveau     drm                   302332  6 ttm,i915,drm_kms_helper,nouveau     ahci                   30063  6      libahci                32088  1 ahci      ### lspci               $ lspci -v          00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)         Subsystem: Lenovo Device 3977         Flags: bus master, fast devsel, latency 0         Capabilities: <access denied>          00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09) (prog-if 00 [Normal decode])         Flags: bus master, fast devsel, latency 0         Bus: primary=00, secondary=01, subordinate=06, sec-latency=0         I/O behind bridge: 00003000-00003fff         Memory behind bridge: d0000000-d0ffffff         Prefetchable memory behind bridge: 00000000a0000000-00000000bfffffff         Capabilities: <access denied>         Kernel driver in use: pcieport          00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09) (prog-if 00 [VGA controller])         Subsystem: Lenovo Device 3977         Flags: bus master, fast devsel, latency 0, IRQ 43         Memory at d1000000 (64-bit, non-prefetchable) [size=4M]         Memory at c0000000 (64-bit, prefetchable) [size=256M]         I/O ports at 4000 [size=64]         Expansion ROM at <unassigned> [disabled]         Capabilities: <access denied>         Kernel driver in use: i915          00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04) (prog-if 30 [XHCI])         Subsystem: Lenovo Device 3977         Flags: bus master, medium devsel, latency 0, IRQ 41         Memory at d1600000 (64-bit, non-prefetchable) [size=64K]         Capabilities: <access denied>         Kernel driver in use: xhci_hcd          00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)         Subsystem: Lenovo Device 3977         Flags: bus master, fast devsel, latency 0, IRQ 44         Memory at d1614000 (64-bit, non-prefetchable) [size=16]         Capabilities: <access denied>         Kernel driver in use: mei_me          00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04) (prog-if 20 [EHCI])         Subsystem: Lenovo Device 3977         Flags: bus master, medium devsel, latency 0, IRQ 16         Memory at d1619000 (32-bit, non-prefetchable) [size=1K]         Capabilities: <access denied>         Kernel driver in use: ehci-pci          00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)         Subsystem: Lenovo Device 3977         Flags: bus master, fast devsel, latency 0, IRQ 45         Memory at d1610000 (64-bit, non-prefetchable) [size=16K]         Capabilities: <access denied>         Kernel driver in use: snd_hda_intel          00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4) (prog-if 00 [Normal decode])         Flags: bus master, fast devsel, latency 0         Bus: primary=00, secondary=07, subordinate=07, sec-latency=0         Capabilities: <access denied>         Kernel driver in use: pcieport          00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4) (prog-if 00 [Normal decode])         Flags: bus master, fast devsel, latency 0         Bus: primary=00, secondary=08, subordinate=08, sec-latency=0         Memory behind bridge: d1500000-d15fffff         Capabilities: <access denied>         Kernel driver in use: pcieport          00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4) (prog-if 00 [Normal decode])         Flags: bus master, fast devsel, latency 0         Bus: primary=00, secondary=09, subordinate=09, sec-latency=0         I/O behind bridge: 00002000-00002fff         Memory behind bridge: d1400000-d14fffff         Capabilities: <access denied>         Kernel driver in use: pcieport          00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04) (prog-if 20 [EHCI])         Subsystem: Lenovo Device 3977         Flags: bus master, medium devsel, latency 0, IRQ 23         Memory at d1618000 (32-bit, non-prefetchable) [size=1K]         Capabilities: <access denied>         Kernel driver in use: ehci-pci          00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)         Subsystem: Lenovo Device 3977         Flags: bus master, medium devsel, latency 0         Capabilities: <access denied>         Kernel driver in use: lpc_ich          00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04) (prog-if 01 [AHCI 1.0])         Subsystem: Lenovo Device 3977         Flags: bus master, 66MHz, medium devsel, latency 0, IRQ 42         I/O ports at 4088 [size=8]         I/O ports at 4094 [size=4]         I/O ports at 4080 [size=8]         I/O ports at 4090 [size=4]         I/O ports at 4060 [size=32]         Memory at d1617000 (32-bit, non-prefetchable) [size=2K]         Capabilities: <access denied>         Kernel driver in use: ahci          00:1f.3 SMBus: Intel Corporation 7 Series/C210 Series Chipset Family SMBus Controller (rev 04)         Subsystem: Lenovo Device 3977         Flags: medium devsel, IRQ 10         Memory at d1615000 (64-bit, non-prefetchable) [size=256]         I/O ports at 4040 [size=32]          01:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M / GT 620M/625M/630M/720M] (rev a1)         Subsystem: Lenovo Device 3910         Flags: fast devsel, IRQ 16         Memory at d0000000 (32-bit, non-prefetchable) [size=16M]         Memory at a0000000 (64-bit, prefetchable) [size=256M]         Memory at b0000000 (64-bit, prefetchable) [size=32M]         I/O ports at 3000 [size=128]         Expansion ROM at b2000000 [disabled] [size=512K]         Capabilities: <access denied>          08:00.0 Network controller: Broadcom Corporation BCM43142 802.11b/g/n (rev 01)         Subsystem: Lenovo Device 0611         Flags: bus master, fast devsel, latency 0, IRQ 17         Memory at d1500000 (64-bit, non-prefetchable) [size=32K]         Capabilities: <access denied>         Kernel driver in use: bcma-pci-bridge          09:00.0 Ethernet controller: Qualcomm Atheros QCA8172 Fast Ethernet (rev 10)         Subsystem: Lenovo Device 3803         Flags: bus master, fast devsel, latency 0, IRQ 46         Memory at d1400000 (64-bit, non-prefetchable) [size=256K]         I/O ports at 2000 [size=128]         Capabilities: <access denied>         Kernel driver in use: alx      ### rfkill               $ rfkill list all          0: ideapad_3g: Wireless WAN         Soft blocked: no         Hard blocked: no      ### dmesg https://docs.google.com/file/d/0Bz7Myw57yQvoVlZCLTNrUjdhNmc/edit?usp=sharing&pli=1


If /usr partition not specified, does it go on same partition as root by default?

I plan to install Fedora Linux on a machine with an SSD and an HDD. `/boot`, and the root will have their own partitions on the SSD. If I want `/usr` to be on same partition as `/`, will that occur by default if I set the root mountpoint on an SSD partition and don't specify anything with `/usr`?


Dual booting Debian and Windows 8?

My problem is a little weird (maybe to me only). Specification: Lenovo, Ideapad Z510. i7 intel core. 1920x1080. ISO: GNOME Debian 7.2.0 amd64. Bootable Device: Universal USB Installer. \---Process begins--- After making the bootable USB, I, in Windows 8, go to Settings -> Change PC Settings -> Update and Recovery -> ... -> Change UEFI Settings. In the UEFI settings, I directly make the boot method Legacy Boot with Legacy First enabled. I restart. As I expect, of course, the installation screen shows up. I hit Install, without DHCP network configured because my computer can only access a wireless network at the time. When dealing with the partitioning, I see that I have already had an ESP, so I only did two things: 1. Have a 4-GiB free space formatted to be the swap area; 2. Have a 100-GiB free space formatted to be the ex4 primary partition. Then I go on installing. The progress is fluid, and after finishing, I reboot it. Hooray! I see both Debian and Windows 8 on the GRUB menu (I am still in Legacy Boot method). Here come the problems: I hit "Debian..." on the GRUB menu, and I see this: "GNOME 3 failed to load... Unfortunately GNOME 3 failed to start properly and started in the fallback mode. This most likely means your system (graphics hardware or driver) is not capable of delivering the full GNOME 3 experience... Learn more about GNOME 3". I looked up the Internet and I found something about 3D acceleration, but it doesn't apply. How do I know it doesn't? I boot the GNOME Debian live CD 64-bit in VMWare Player with 3D Acceleration turned on, but the message still pops up. So here is the first problem I have. I hit "Windows 8" on the GRUB menu, and I see this: "Windows failed to start. A recent hardware or software change might have caused the issue...". Probably it's because I am using Legacy Boot. \--- Process stops --- The only way to dual-boot successfully is to make Debian boot under UEFI boot method with Secure Boot turned off and Fast Boot (in Power Options in Control Panel in Windows 8) turned off. In short, what I need is that Debian will boot normally without any form of errors (like the GNOME 3 message above) with UEFI Boot turned on and Secure Boot disabled. I first try to do this by getting in Debian. After opening a terminal with my mouse (Ctrl-Alt-T doesn't work and I haven't checked the keyboard shortcut yet.), I typed in "grub-install" but it complains "command not found"; thus I am not able to proceed. I checked the /boot directory but I didn't see the "efi" directory. I don't know why when there should be one since GRUB 2 can be for UEFI boot. By the way, during the installation I see the grub-install run without any warning or error so I am super confused right now. I try to use EasyBCD but Debian won't boot, but saying something similar to "Windows 8 failed to start...". I try different software for creating a bootable device including YUMI, Unetbootin, SARDU, but the problem is still not solved. I am almost desperate now; thus I post the problem here.


Pipe in a shell script

I have done this little script :               #! /bin/sh       path="foo"      while touch $path ; do          path=./${path}      done           echo "echec avec le nom $path qui fait"      echo $path|wc -c      echo "caracteres"      How can I print on the same line the 3 echo lines? Thank you in advance ;)


Specify identity file (id_rsa) with rsync

I need to make periodic backups of a directory on a remote server which is a virtual machine hosted by a research organisation. They mandate that access to VMs is through ssh keys, which is all good, except that I can't figure out how to point rsync to the ssh key for this server. Rsync has no problem if the key file is `~/.ssh/id_rsa`, but when it is something else I get `Permission denied (publickey)`. With ssh I can specify the identity file with `-i`, but rsync appears to have no such option. I have also tried temporarily moving the key on the local machine to `~/.ssh/id_rsa`, but that similarly does not work. **tl;dr** Can you specify an identity file with rsync?


Is the Tango project dead?

Is the Tango Desktop Project dead? It looks totally abandoned to me...


Multiple GUI windows in one (GUI applications windows multiplexer/wrapper)

I was wandering if there are some programs or methods, where I can do something similar like Terminal multiplexer - Wikipedia, the free encyclopedia \- except where each region of the "multiplexer" application is a GUI window of an application all its own. Here is an imaginary example - I'd, basically, like to write in terminal something like this (pseudocode):               $ gui-multiplexer-application --width 600 --height 600 \       --command "scite" --heightratio 60       --command "gnome-terminal -e 'PS1=\"$\"'" --heightratio rest      ... which would, in turn, start up something like this (that image I montaged manually in Gimp): ![gui-mplex](http://i.stack.imgur.com/bBPgz.png) I don't need any methods to specifically connect these applications (if a command can be started with arguments, then I could use that) - what I would like is that both windows are moved in sync when you drag the master ("gui- multiplexer-application") window title bar; and hopefully, that the horizontal separator line is draggable, so one can readjust the height that the inner windows take up respectively (readjusting the width through the master bounds goes without saying, I guess). Anything like this out there? (I'm on Ubuntu 11.04 with Gnome2; however, I imagine this kind of application would work on an X11 level, thus being hopefully portable between different DE/WM. ) EDIT: This is somewhat like a tiling window manager - however, a proper tiling window manager replaces the entire desktop; I instead would like a tiling window manager inside a window with a titlebar (which can appear in any other WM I may otherwise be using). In fact, one could use scripts like `awesome_test` in Using Xephyr - awesome, but they start a whole new X session, so there are interaction problems like grabbing keyboard inputs, and not being able to find the "regular" desktop environment styling. Which is why I'm looking for a similar functionality, but which works within a single application window. (Also possibly related: sticking stickies to windows - Unix & Linux Stack Exchange) (Backround: I like writing Latex in Scite; and while Scite does have a terminal window, on my version it is non-interactive - so if `latex` ends up with an error, I cannot issue a Ctrl-C or X or anything to have the process terminate; so I have to use a proper terminal anyways. Now, there is `geany` which actually does have a proper terminal, but I don't want to change text editors for this application (Latex writing). I'm sure there could the other situations where this "GUI window multiplexing" would be useful, though. )


How do I edit the hotspot configuration for Network Manager?

Running Arch/Linux with everything up-to-date and I use network manager's built-in hotspot function to share my Internet. I'm trying to edit the configuration (mostly the password, as I don't like the random password) for the "hotspot" connection. I've worked on both the network settings GUI and the config file under `/etc/NetworkManager/system- connections`. Somehow network manager doesn't like this configuration being edited. Every time I change anything and start hotspot again, the edited one will be abandoned, and NM will create a new hotspot connection with default settings and a new random password. How do I tell NM to accept what I've edited?


Best directory for shared scripts

What is the conventional directory to keep shared scripts that might be used by more than one user? I've read through this overview of the standard file system hierarchy, but it doesn't seem to recommend a location for storing shared scripts. Creating a /opt/scripts directory seems like a reasonable option, but I'd like to know if there is a standard UNIX convention for this.


GNU Guix usb-install freezes at GRUB after boot

I wanted to try out the GNU usb install that was released with Guix 0.7. The problem is that when I try to boot from the USB, it freezes, with the word GRUB and a flashing type line. I followed the instructions. First I downloaded the compressed file from `wget http://alpha.gnu.org/gnu/guix/gnu-usb- install-0.7.x86_64-linux.xz`, then I extracted it `xz gnu-usb- install-0.7.x86_64-linux.xz`, then I dd it onto my 64GB USB flash drive, which I formatted to FAT32 and added the boot flag prior to dd'ing it, as so `sudo dd if=gnu-usb-install-0.7.x86_64-linux of=/dev/sdb1`. And as I said before, when I go on the boot menu and choose to boot from the flash drive, it just shows `GRUB _`, and everytime I press a key it beeps.


how to put particular application on system startup in fedora 15?

How do I put particular application on system startup on my Fedora 15. For instance if I want to start my Firefox browser on system startup how do I achieve this? What have I done so far is, I just created a simple shell scrip and put the command of starting a Firefox browser in that and placed that shell script in `/etc/init.d/` directory.               #!/bin/bash     /usr/bin/firefox


How to change the username in Ubuntu 10.10?

I want to change a username. In the prompt, which says `abhishek@hello$`, I want to replace `abhishek` with `alok` (i.e. `alok@hello$`). Is it possible to do that without reinstalling Ubuntu?


How can I monitor all outgoing requests/connections from my machine?

My machine is a server so I want to ignore connections being made to my server (e.g. when someone visits my website). I want to see _only_ connections/requests being made by my server to other places. How do I see _only_ those outgoing connections? EDIT: I'm new to these type of things. What I'm trying to do is just see if anything from my server is being sent out other than data for my web apps. For example, if someone visits my websites, then obviously my server will send out data to the client's browser. But suppose there's also code somewhere in my web app's framework that sends statistical data to somewhere else I'm not aware of. I'd like to see those places my server is sending data to, if any. It's probably not likely, but suppose you decide to use a php or nodejs framework that you didn't write: there's a small chance it may send some type of data somewhere. If so, that's what I'd like to see.


What happens to a continuing operation if we do ssh and then disconnect?

I am moving one directory to another using mv command. However, I was forced to shut down my computer, which means losing connection to the server. What happen to the mv command? Note: After I relogin, I saw that all the files have been properly moved even though I was sure that it wasn't moved when I closed the connection. It seems that mv did continue running. This is me ssh to centosh machine in steadfast.net cloud server.


irc connection timeout problem

I am using tcpredir to connect to freenode server via port 6665 for some firewall difficulties:               server:~# redir --lport=6665 --cport=6665 --caddr=irc.freenode.net      and recently i faced a problem, i can not connect to irc i tried telnet to connect via telnet for test it seems connection established without problem               client:~$ telnet irc.myserver.com 6665     Trying x.x.x.x ...     Connected to irc.xamin.ir.     Escape character is '^]'.     :holmes.freenode.net NOTICE * :*** Looking up your hostname...     :holmes.freenode.net NOTICE * :*** Checking Ident     :holmes.freenode.net NOTICE * :*** Couldn't look up your hostname     :holmes.freenode.net NOTICE * :*** No Ident response          ERROR :Closing Link: 127.0.0.1 (Connection timed out)     Connection closed by foreign host.      netstat returns this:               server:~# netstat -ntlpa | grep 6665     tcp        0      0 0.0.0.0:6665            0.0.0.0:*               LISTEN      23741/redir          tcp        0      0 172.20.5.240:40263      83.170.73.249:6665      ESTABLISHED 30320/redir          tcp        0    264 172.20.5.240:6665       80.191.2.58:51948       ESTABLISHED 30320/redir      have you any idea on this,


Can we use Linux Mint ISO to repair Ubuntu's Grub?

A friend of mine is running Ubuntu and got `GRUB RESCUE`. Can they use Mint ISO to repair their Grub? As I don't have Ubuntu ISO?


How to get rid of the *Personal File Sharing* bar in Nautilus?

I just moved from Ubuntu to Debian Wheezy and I thought I'd be finally free of all the unnecessary clutter. I guess I was wrong. Here is the situation: In the `Downloads` folder, Nautilus displays the following message: > Personal File Sharing > > _You can receive files over Bluetooth into this folder_ ![enter image description here](http://i.stack.imgur.com/RHtf0.png) I'd really like that to go away. My PC is not bluetooth-enabled, and even if it were, I'd figure out a way to share my files without the constant reminder. But I digress. Here's what I've tried so far:   * The launch preferences dialog doesn't seem to make the notification go away, even when I enable sharing over the non-existent bluetooth device   * Nautilus' `Preferences` dialog doesn't present a relevant option   * Removing the `bluez` package via `synaptic` threatens to take the entire Gnome desktop with it. Same with trying to remove `gedit` or, indeed, `nautilus`. I feel like having Jules Winnfield over my head saying "I dare you. I _double_ dare you". In my previous Ubuntu installation I managed to remove bluetooth-related packages by switching to Thunar (and getting rid of the entire Unity family). This time I'd like to keep Nautilus if possible. The presence of a bluetooth package is something I can deal with later, what I'm worried about is the notification. Is there any way to make it go away? * * * ### Update: I decided to manually remove dependencies from the .deb files. Using this for guidance, I removed pretty much all but the most fundamental packages (such as X11 or sound packages) from `gnome`, `gnome-core` and `task-gnome-desktop`. I must have missed something though because removing unwanted packages such as bluetooth still wanted to take away Gnome. * * * ### Update 2: It turns out neither `gnome` nor `gnome-core` are essential to the system. In fact, from what I can tell, their only job is to provide dependencies and recommendations. I went ahead and purged them. This cased aptitude to see a bunch of useful packages as "no longer needed" and required to set the "manual install" flag on the ones I wanted - fair enough. A happy side-effect, bluetooth-related packages are gone. I did get rid of `nautilus-share` though as @grawity suggested. ~~This did not affect the notification at all. The problem remains~~. After a re-login, the offending area had vanished.


Change cursor theme with immediate effect

Is there a way to change the cursor theme with immediate effect in X, after it starts up? I've tried `xrdb -merge` which doesn't work (nothing happens).