Application in terminal still running but not directly accessible

> **Possible Duplicate:**   >  How to suspend and bring a background process to foreground I have kind of an odd problem which I haven't encountered before. Here's what I did: I started an application with `./myApp`. No command line arguments, no `&` to make it run in background. Unfortunately, my system froze at some point. No access via the GUI was possible, so I decided to first stop all CPU-intensive tasks. So I brought up a `tty` (Shortcut `Ctrl` + `Alt` + `F2` on Ubuntu) and did `kill -STOP pid`, after getting the right `pid` of `myApp` with `top`. Luckily, after some extra time, the system became unfrozen. So I restarted the process with `kill -CONT pid`. But here's what I see in the terminal:               [2]+ Stopped  ./myApp      And now the terminal is in the state as if the application isn't running (i.e. I can do `ls` or whatever I like), but the process manager still reports the application to be running. I'm very glad it does, because I would lose 34 hours of computing time (and yes, it's an extremely bad app; not written by me, of course), since there is no output at all to file. When the heavy task of the application is finished (expectedly in a couple of hours), I need to enter a specific task inside of the application to make it write to file (it is somewhat of a custom shell prompting for input, so I guess `cin` is in use). So the question is: How to bring me back to the application such that I see its output and can interact with it? If not possible: is it possible to stream into the app and initiate the required command without restarting the app? **Update** The application does still output to the exact same terminal. FYI, as you might need it: I'm running Ubuntu x86 with kernel 3.2.0-36


How to ssh to a server using another server with key from the second server?

How to configure ssh to imitate this:               ssh server1-user-name@server1.net -i /path/to/.ssh/server-1-ssh-key -t ssh server2-user-name@10.0.0.10 -i /home/server1-user-name/.ssh/server2-ssh-key      When I execute               ssh server2      Explanation:   * I'm login to server1.net with a key from my local machine (`/path/to/.ssh/server-1-ssh-key`)              ssh server1-user-name@server1.net -i /path/to/.ssh/server-1-ssh-key        * then I log in to a server with the following IP 10.0.0.10. To do this I use the key (`/home/server1-user-name/.ssh/server2-ssh-key`), which is stored on server-1 How should the ssh configuration look like for this case on my local machine? I tried the following configuration:               Host server2       Hostname 10.0.0.10       User server2-user-name       ForwardAgent yes       ProxyCommand ssh -i /path/to/.ssh/server-1-ssh-key -W %h:%p      But it does not work.


Intel Advanced-N 6235 wireless monitor mode problem

As far as I know, iwlwifi drivers (and this particular wireless card) support monitor mode. The only requirement is to install the latest driver from http://wireless.kernel.org/en/users/Drivers/iwlwifi (in this case, _iwlwifi-6000g2b-ucode-18.168.6.1_ will do the trick). The scenario is the following: BackTrack LiveCD booted in a laptop with this wireless card. The wireless does not work until the above driver is downloaded and loaded into the kernel via `modprobe`. After that, wireless do work (can connect to different networks, being stable, etc). However, when trying to activate monitor mode (`airmon-ng start wlan0`), it will never activate _mon0_ (monitor interface). I have some experience on this with an Alfa 1W and I was expecting a similar result with this card, but it seems that I am missing something, or maybe the drivers does not support monitor mode (using the wrong ones?). I have been googling around but I did not found any specific solution, so hopefully someone can suggest some workaround!


Will a running program be killed if I suspend my OS?

I am running a program. If I suspend my OS (Ubuntu 12.04) in the middle, will the process of the running program be killed? If not, when I wake up my OS, how can I resume the process? Thanks!


Lock screen w/ slock after a certain time?

I am running OpenBox in Arch Linux, how can I set it up so that I can have slock lock my screen after a certain amount of time (with no activity)? Thanks!


how to touch files like report-07/05/13

when I want to touch files like `report-05/07/13` with command `touch report-$(date +%D)` it gives me an error like this: `touch: cannot touch`report-07/05/13': No such file or directory` How can I build one? By the way there is "NO FOLDER" it is JUST THE FILENAME.


Change name of em1 to eth0 in Fedora 19?

I have already followed the instructions here but it doesn't seem to work, as my ifconfig output still shows the same "em1","em2" and "lo". I just need a way to rename one of these to eth0 in Fedora 19, since other methods dont seem to work. Matlab needs eth0 to activate, and I am stuck.


Is it safe to leave a enc folder mounted?

I was looking at this and ecryptfs seems cool. I'd like to use it on my server to encrypt git pushes. I dont want to ssh in everytime to mount/unmount the encrypted folder. However once in a while when i reboot or whatever it is fine. I like the idea that someone at my provider cant see my folder when scanning through a bunch of harddrives but is it relatively safe that the folder is always mounted? I dont think the password would be in memory plaintext? nor can someone connect to my server due to it being on the network and be able to access files? (the enc/prv folder would be 700) Do i really have anything to worry about if i leave it mounted all the time? My server is debian 6 (squeeze) if thats interesting.


Can't shutdown mandriva 2010.2

I can't seem to shutdown my machine from mandriva,I have to restart to shut it down from GRUB it says "System Halted" and just freezes there I'm using the x86_64 GNOME version I've already asked on mandriva forums and they couldn't determine the cause of this problem P.S. I'm using the 2.6.36.2-desktop-2mnb kernel


Change kernel parameters at runtime

While trying to fix an obscure hardware bug, it was suggested that adding a couple of parameters to the kernel might resolve the issue. I can of course do that, but I was wondering whether I can make these changes to a running kernel. In particular, I know that `procfs` and `sysfs` provide a way to make changes to the running kernel, but I am unsure how to map kernel parameter names to file paths. (I also presume that not _all_ settings are changable at runtime, and these particular parameters might well not be configurable once the system is booted.) The specific parameters I'm interested in are               i8042.nomux=1 i8042.reset      I'm particularly unsure as to whether it's possible to issue the reset command on a running system. If these parameters _are_ tweakable at runtime, where would I find them?


init: /etc/init.conf: Unable to load configuration: No such file or directory

Running Linux 6 on VMWare, I noticed this in the system message log: > init: /etc/init.conf: Unable to load configuration: No such file or > directory What's the cause of this error? How do I resolve it?


repair the static route to allow traffic to right place

I recently was taking an online test and I got the below question. The server has been configured with a TUN device `tun-aib0` that acts as an endpoint for a VPN tunnel. The IP address of the device is **192.xxx.xx.xx** and the network it is on is using a 22 bit netmask ( **255.255.252.0** ). The problem is that the server needs to be able to communicate with the **10.xx.xxx.x** network with a 24 bit netmask ( **255.255.255.0** ) but none of the traffic appears to be reaching the other VPN endpoint and instead is trying to be sent out to the public internet over `eth0`. Please repair the static route for **10.xx.xxx.0** so that traffic goes to the right place. I read the topics on subnet and kernel virtualization. I have a basic understanding on setting up of network. I am trying to figure out how should I approach the above problem. I believe it has to do something with `/etc/sysconfig/network` and setting up a bridge for eth0 in that file. However, I am not sure if am correct.


How to get address of connected USB modem?

I just connected my N81 telephone as USB modem to Linux Mint 14. All works fine, just wondering how to find a full path to this device, something like `/dev/tty*`.


Why do some default bindkey keys do not work in tcsh?

I'm using tcsh and I'm seeing that some of my custom and some of the default bindkey bindings do not work. Why don't they work? For example: I load some default bindings: `bindkey -e` I check the default bindings for backward-word `bindkey | grep backward-word` and see:               "\302"         ->  backward-word     "\342"         ->  backward-word     "^[B"          -> backward-word     "^[b"          -> backward-word      When I try to use backward-word, Alt+Shift+b works just fine, but Alt+b does not work. What gives? I try to create a new binding for backward-word `bindkey "^[u" backward-word`, but when I try to use it (Alt+u), it acts like backward-char instead.


I tried to compile some C code to get object file from a shell prompt:               $cc a.c        But this gives me the following error:               /usr/ucb/cc:  language optional software package not installed      How can I compile C code?


How to convert a PowerPoint ppt file into HTML files?

I have to find a free, gratis command line solution to convert primary Microsoft PowerPoint presentations into HTML files (1 HTML file per foil) on Linux (Debian, OpenSuse). It would be nice if the solution supports OpenOffice Impress presentations as well but this is not necessary. What is/are solution/s for this matter?


System sending SIGTERM and SIGKILL during normal work

I have a program (C++) that works with TCP sockets in multithreaded manner. The multithreading is intensive, about 100 threads (POSIX threads). Sometimes, not quite sure when, the program gets terminated by `SIGTERM`. After some googling I found out that it is not normal for system to send `SIGTERM`. I've decided to look what happens if I ignore the signal. Now the system sends `SIGKILL`. I assume it tries with `SIGTERM` and when the application does not terminate, the system kills it. I have tried running it in gdb, and got no signals. I've run it in valgrind, no signals. No valgrind errors either. Memory consumption was normal, it seems I have no memory leaks. Upon exit it had 7Mb heap in use. Nothing suspicious in `/var/log/messages, /var/log/syslogd`. The system is Debian 2.6.32-5. Basically, the question is why may the system send `SIGTERM` followed by `SIGKILL` to an arbitrary process? And how can I stop at that point to see what happens (gdb alters the behavior).


How can I configure fair bandwidth sharing between cgroups?

It's fairly easy to use `tc` with Stochastic Fairness Queueing (SFQ) to configure fair bandwidth sharing between _flows_ , but an application can open multiple flows and get an unfair share of bandwidth. Is it possible to configure fair bandwidth sharing between _applications_ instead? Grouping each application into a cgroup seems like a clear first step. If SFQ supported hashing on the class ID, it would be easy to use `tc filter` to assign each cgroup a class ID. Unfortunately, SFQ doesn't seem to support this. Another promising approach is to use CBQ, which does Weighted Round Robin across classes. Unfortunately, making the weights all equal doesn't seem to work. Is there another way to fairly share bandwidth between cgroups?


What is the difference between egrep, fgrep, find and grep commands?

i am new to linux console, however i know i can use grep to find files however i am wondering what the particular difference between these common commands ? They all seems to be equal in meaning to me.               egrep      fgrep     grep      find     locate      as windows search and find command.


Setting up boot scripts for BeagleBone/Angstrom

I'm working on setting up the pinmux on a BeagleBone so that I can access multiple UARTS. The OS is Angstrom Linux (the demo image, if that helps). I have a shell script:               #!/bin/sh          echo "Configuring Pinmux"          echo 0 > /sys/kernel/debug/omap_mux/uart1_txd     echo 20> /sys/kernel/debug/omap_mux/uart1_rxd          echo "UART 1 (TX):"     cat /sys/kernel/debug/omap_mux/uart1_txd     echo          echo "UART 1 (RX):"     cat /sys/kernel/debug/omap_mux/uart1_rxd     echo          echo 1 > /sys/kernel/debug/omap_mux/spi0_d0     echo 21> /sys/kernel/debug/omap_mux/spi0_sclk          echo "UART 2 (TX):"     cat /sys/kernel/debug/omap_mux/spi0_d0     echo          echo "UART 2 (RX):"     cat /sys/kernel/debug/omap_mux/spi0_sclk     echo      Which sets up the UARTS for use. Now, I want this script to run on boot, so that I don't have to mess with it every time. Where should I put this/ make a link in order to do that?


Why does echo >file use more real time than echo | sed >file?

The example, below, surprised me. It seems to be counter intuitive... aside from the fact that there is a whisker more _user time_ for the `echo | sed` combo. Why is `echo` using so much _sys time_ when it runs alone, or should the question be, How does `sed` change the state of play? It seems that `echo` would needs to do the same _echo-ing_ in both cases...               time echo -n a\ {1..1000000}\ c$'\n' >file          # real    0m9.481s     # user    0m5.304s     # sys     0m4.172s          time echo -n a\ {1..1000000}\ c$'\n' |sed s/^\ // >file          # real    0m5.955s     # user    0m5.488s     # sys     0m1.580s


ubuntu + how to install the patch command

Please advice how to install the patch command on Ubuntu Linux I download the following file , patch_2.6-2ubuntu1_amd64.deb ( from site - http://packages.ubuntu.com/lucid/patch ) But not clearly how to install it? I tried by ./patch_2.6-2ubuntu1_amd64.deb , ( but I get errors ) Please advice how to install the pkg patch_2.6-2ubuntu1_amd64.deb In order to use thepatch command on my unbuntu linux


Backup of svn repository and mysql database on daily basis

How do I instruct Ubuntu 13.10 server to:   1. zip svn repository   2. dump mysql database into .sql script   3. tar both files   4. copy backup tar onto sdb disk Are there any premade tools for such kind of operations?


How to execute a script on gdm login automatically for all users?

What file should I modify to execute some instructions when any user logs in through gdm? I tried `/etc/bashrc` but that is executed ony when starting bash (and each time an xterm is open). I'd like to execute something only once when the user logs in. What I want to do is to "reset" some user preferences each time the user logs on (including the window manager), so the script should run before the WM is initialized.


Scroll inside Screen, or Pause Output

I use screen for my command-line tasks while managing the servers where I work. I usually run small commands (mostly file-system tasks) but sometimes I run more extensive tasks (like DBA). The _output_ of those tasks is important to me. Since I use Ubuntu and OS X (both Terminal Windows) for my tasks, yet I need to use screen, the scrolling is not available, so any long output (think a 500-row table from a select) is invisible for me. Mouse-wheel is out of the question. When I say "scroll is invisible for me, I mean this: ![top while using screen, in Mac OS X, while scrolling](http://i.stack.imgur.com/kAIBx.png) I was thinking about two options:   1. Pause (think _paginate_ ) the output of a certain command. When the output begins, it would let me read what's happening, then I press "Enter", then the output continues... until there's nothing more to show.   2. Scroll inside screen. But I don't know if this is possible. Of course, I don't know if those options are actually _possible_. If they are, how can acheive them? Other alternatives will be well received. Thanks!


Cannot connect to any localhost connections

I'am using Centos 6.5 with latest updates. My problem is that whenever i try to connect to some local service it just hangs for example: # wget               wget 127.0.0.1     --2014-03-11 12:43:42--  http://127.0.0.1/     Connecting to 127.0.0.1:80...     After a while timeout...      # ssh               # ssh 127.0.0.1 -p 6060 -v     OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013     debug1: Reading configuration data /etc/ssh/ssh_config     debug1: Applying options for *     debug1: Connecting to 127.0.0.1 [127.0.0.1] port 6060.     debug1: connect to address 127.0.0.1 port 6060: Connection timed out     ssh: connect to host 127.0.0.1 port 6060: Connection timed out      and it hangs out to timeout. Same with telnet, and same with connecting to irc server. External connections are running fine... # netstat -tpln               # netstat -tpln     Active Internet connections (only servers)     Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name        tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      589/sendmail             tcp        0      0 127.0.0.1:6060              0.0.0.0:*                   LISTEN      520/sshd                 tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      619/nginx                tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      478/sshd                 tcp        0      0 ::1:6060                    :::*                        LISTEN      520/sshd                 tcp        0      0 :::22                       :::*                        LISTEN      478/sshd                  # netstat -rn               # netstat -rn     Kernel IP routing table     Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface     169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 venet0     0.0.0.0         0.0.0.0         0.0.0.0         U         0 0          0 venet0      # iptables I arleady flush out iptables, without luck. Output form iptables:               # iptables -nvL     Chain INPUT (policy ACCEPT 634 packets, 49819 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 517 packets, 47027 bytes)      pkts bytes target     prot opt in     out     source               destination               # Loopback config               # ip a     1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00         inet 127.0.0.1/8 scope host lo         inet6 ::1/128 scope host             valid_lft forever preferred_lft forever     2: venet0: <BROADCAST,POINTOPOINT,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN          link/void          inet 127.0.0.1/32 scope host venet0         inet 176.122.224.115/32 brd 176.122.224.115 scope global venet0:0      Turning of SELinux didn't improve it with anything. # ip route show table local               # ip route show table local     local 176.122.224.115 dev venet0  proto kernel  scope host  src 176.122.224.115      broadcast 176.122.224.115 dev venet0  proto kernel  scope link  src 176.122.224.115      broadcast 127.255.255.255 dev lo  proto kernel  scope link  src 127.0.0.1      broadcast 127.0.0.0 dev lo  proto kernel  scope link  src 127.0.0.1      local 127.0.0.1 dev lo  proto kernel  scope host  src 127.0.0.1      local 127.0.0.0/8 dev lo  proto kernel  scope host  src 127.0.0.1       # traceroute               # traceroute 127.0.0.1     traceroute to 127.0.0.1 (127.0.0.1), 30 hops max, 60 byte packets      1  localhost.localdomain (127.0.0.1)  0.029 ms  0.014 ms  0.012 ms      # ping 127.0.0.1 works ok               # ping 127.0.0.1     PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.     64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.024 ms     64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.036 ms      The weirdest thing about it is that, i can connect to ssh, nginx server from **external** address (for ex. computer from which i ssh'ing) without problems. This happens after ISP has rebooted my server. Thing that maybe useful is that, server was frequently updated without reboots.


How to change height and width of each page of a pdf

I was wondering how to change width and height of each page of a pdf? In my scanned pdf, each page has paper size too big, 31.98 × 49.20 inch. I would like to shrink the width and height to smaller ones which are normally seen in pdf files. Are there some applications or programming tools to accomplish this?


Adding public is_rsa.pub to known_hosts automatically - how to?

How to automatically add server to known_hosts ? (and not use md5 fingerprint, as I mean secure way, please not send "auto yes/accept" solutions. I want to bring required credentials from server to machine) I'd like to update automatically my ssh `known_hosts` file to accept new server. I assume, that I need to add server's public key (`id_rsa.pub` obtained through secure channel), but what I see is that format is different (I've tried adding like this `awk '{print "server "$1" "$2}' id_rsa.pub > .ssh/known_hosts` with verification failed. Please note that I don't want to use md5 fingerprint due to flaws in md5). If something else than `id_rsa.pub` would be useful I can run commands on server and obtain results though trusted channel. (Please note that it is not network channel (think of physically bringing pendrive from place to another), so `ssh-keyscan` does not solve the problem, what's more id_rsa.pub is key of dropbear server that is not running at server, so only files with keys are available, not server)


Emptying a directory owned by another user weekly

I have a temp directory set up where users can place whatever files they need to send to other users via HTTP. The owner of this directory is an SFTP user, and cannot run cron jobs. I have one shell user that can run cron jobs, but does not have permission to edit files in the SFTP user's directory. I have an admin user that can access the SFTP user's directory when using sudo, but can't (read: I'd really rather not) run cron jobs. So, here's the conundrum. How do I get a nightly cron job to run as a shell user to delete files older than 1 week within the SFTP user's directory, with the admin user's privileges?


How to return the exit code? Error: return: Reading: numeric argument required

Here's a simplified version of my script. My question is, How do I return the exit code from `apt-get` in this case?               #!/bin/bash     install_auto() {     apt-get -h > /dev/null 2>&1     if [ $? -eq 0 ] ; then         return $(sudo apt-get install --assume-yes $@)     fi     return 1     }     echo "installing $@"     install_auto "$@"     echo $?     echo "finished"     exit 0      The output is:               ./install_test.sh: line 5: return: Reading: numeric argument required      Update: I came up with something that works:               return $(sudo apt-get install --assume-yes "$@" >/dev/null 2>&1; echo $?)      Is that a good approach?


My /var/www directory is full

I am using Debian 7 on VirutalBox as my virtual web server. Now, my `/var/www` directory is almost full. I added 27 GB of space to my VM as a new partition, formatted the partition with `ext4` but my `/var/www` directory still doesn't have enough space. How can I resize `/var/www`? The output of df -h:   ![enter image description here](http://i.stack.imgur.com/Krjhs.png)


Environment variable for command called via nice

I need to set an environment variable for a command that is being called via nice. [Bash and dash, Slackware and FreeBSD.]                $ JIM=20 nice -n 10 echo $JIM           $      Nope, `echo` can't see JIM                $ nice -n 10 JIM=20 echo $JIM      nice: JIM=20: No such file or directory      $      `nice` don't like it. I can export JIM and then echo can see it, but now I'm polluting the environment. Unclean! I tried the "--" option to signify end of command line variables for `nice`, but it makes no difference, `nice` complains. I can't believe no one has wanted to do this before, so I'm probably making a very basic error. Any ideas?


Debian package of Tomee plus

I'm looking for Debian package of Tomee plus but I have not found anything. Also, I would like to know if it is possible to download the package( on windows) then be installed on Debian or I have to download and install directly on Debian?


Xorg with Kernel Mode Settings won't work with other tty

Using intel video drivers with kms and i915 on arch linux I haven't been able to start Xorg in a different tty than from the calling one logged as root. By example: Logged as root on tty1               X vt7 :0      Freezes the PC and within the Xorg.0.log I see               intel(0): failed to set mode: Permission denied [13]      In the other hand Logged as root on tty1               X vt1 :0      Everything works as usual I know is not really a serious problem since I still can use Xorg but I'm really intrigued about this behavior for two main reasons   1. permissions for all tty1 ... tty49 are cwr-w----- root tty   2. even if a I'm logged in both tty1 and tty2 with root and try to start X server on tty2 from tty1 it doesn't work as if it only had permission for the calling tty Does anyone have and idea on what's going on?


prevent XFCE from showing display settings on laptop lid close/open

When I close or open my laptop lid, xfce executes _xfce4-display-settings --minimal_. I want to make that stop, but how? I found nothing in the settings under _/etc/xdg/xfce4_ and _.config/xfce4_.


Backup and synchronization

I want to synchronize my personal document repository between my different computers in my home. Today this folder is under a dedicated partition of the hard drive of a dual boot workstation. My configuration is the following one:   1. Dual boot Workstation running Ubuntu 11 and windows Xp (the documents are simply shared using the dedicated partition)   2. Laptop running Ubuntu 12.04 (Today no access to the documents)   3. A freebox with an external hard drive pluged to it What I want is to be able to synchronize this document folder also with the laptop and in addition to have a "backup" of this on the hard drive attached to the freebox. What tools should I use for this (`rsync`, `unison`, others?)


Does flashplugin still use mms.cfg?

I was poking around the flashplugin of Adobe for Linux trying to get the Hardware Acceleration working (which my current configuration supports). Then I found several forums/blogs that recommend I create/modify some or other value in the `/etc/adobe/mms.cfg`, which didn't help at all for my current situation. This leads me to think, does the Flash non-free plugin of Adobe for Linux read this file for configuration? Is there another way to modify Flash configuration without the traditional GUI's (`flash-player-properties` doesn't help in the HWA topic and I am already tired of ticking the box Right-click -> Settings -> Enable Hardware Acceleration)? I'm using Iceweasel 24.0a2, Debian Wheezy 7.0, _Shockwave Flash 11.2 r202 11,2,202,297_.               $ glxinfo | grep render     direct rendering: Yes     OpenGL renderer string: Gallium 0.4 on ATI RV515


Is it possible to run any distro from RAM from within an .iso saved on an NTFS file system?

Running entirely from RAM been done on various distros such as Slax, DamnSmallLinux, and newer Ubuntu versions, and since I have 8GB it seems reasonable that I could run many distros entirely from RAM (as long as I select one that has the ability). I would like to do this with `OpenELEC` (or any distro), and with a further complication: I'm a `.NET` developer, work and primarily use Windows, which means NTFS and FAT32 are my preferred file systems. Until the day comes if and when Windows can natively read/write ext partitions, this won't change. Ext2fck won't even install in Windows 8, so there's no convincing me of the 'merits' of having drives and partitions in an unreadable format to my daily operation. There's also things like `syslinux`, `vmlinuz`, `extlinux` and the like that can load `.iso` files into RAM and effectively bootload them. To add icing on the cake, Windows' bootloader will allow me to add these as options in the native Windows boot menu, which I have done for UBCD 5.11, and will even work for virtual file systems like `.vhd`, etc. ### So, here's my dream: I want to combine all three into one. I want to take an installed ext2/ext3/ext4 partition, in this case an install of OpenELEC, compress it into an .iso, and create an entry in my boot menu that will either do this directly, or pass it to syslinux or the like that will do the following: Extract the .iso completely into RAM as an ext2/3/4 partition and boot into that OS in RAM. I'll then mount my NTFS hard drive for the /STORAGE portion of the OpenELEC install with ntfs-3g. Then, as a bonus, on exit I'd have the system recompress itself to an .iso, and if successful replace the initial .iso thereby persisting my changes across boots (provided the shutdown was successful). It wouldn't have to copy itself from memory, either: it could copy any files/changes it wanted to track (if some were not available) back onto the drive it booted from, if present, then compress that back into an .iso. Slax, DSL and Ubuntu can boot to RAM and persist changes, so I know it's possible if your OS supports it. I'm wondering if this can be made into a 'works for any distro you want'. Slax saves your changes in an ext directory /slax/changes if it's on an ext partition, or as changes.dat otherwise (for NTFS/FAT32). This solution could work too, I suppose, but would probably require more interaction with the hosted OS to coordinate this than using the .iso. ### So, how close can I get? Are there easy solutions for this already out there? Would I have to write a custom 'SYSLINUX'/'ISOLINUX'/'EXTLINUX'/'VMLINUX? What would be required to make this happen, and if it's possible already how do I get started?


How to execute command on list of file names in a file?

I have listed the names of the files which are to be deleted into a file. How can I pass the file to `rm` command so that it should delete them one by one.


Page gets cut in the half if I print from Chrome or Google Cloud but with Firefox doesn't

I'm setting up print server for custom thermal printer on RaspberryPi running Linux Debian and I have a strange problem. If I print a test page it prints OK, same with web page from Firefox, but when I try print from Google Chrome or Google Cloud Printing (I set up cloud printing server), half of page is cut, like there's wrong width defined. In PDF viewer when I just click 'Print' it prints in wrong format, but when I enter in printer properties (just enter and close, no changes!) it prints OK. I made `PPD` file for this printer manually, but it looks OK compared to other `PPD`s. Any ideas? **Edit:**   If I'm printing from safari on iOS google page is scaled properly, but others aren't. Here's my PPD file:               *PPD-Adobe: "4.3"     *%%%% PPD file for Label Printer with CUPS.     *%%%% Created by the CUPS PPD Compiler CUPS v1.5.3.     *% Copyright 2007-2011 by Apple Inc.     *% Copyright 1997-2007 by Easy Software Products.     *%      *% These coded instructions, statements, and computer programs are the     *% property of Apple Inc. and are protected by Federal copyright     *% law.  Distribution and use rights are outlined in the file "LICENSE.txt"     *% which should have been included with this file.  If this file is     *% file is missing or damaged, see the license at "http://www.cups.org/".     *FormatVersion: "4.3"     *FileVersion: "1.5"     *LanguageVersion: English     *LanguageEncoding: ISOLatin1     *PCFileName: "mefa2012-4.ppd"     *Product: "Mefa 2012-4"     *Manufacturer: "Mefa"     *ModelName: "MEFA2012-2"     *ShortNickName: "MEFA2012-2"     *NickName: "Mefa 2012-4"     *PSVersion: "(3010.000) 0"     *LanguageLevel: "3"     *ColorDevice: False     *DefaultColorSpace: Gray     *FileSystem: False     *Throughput: "8"     *LandscapeOrientation: Plus90     *TTRasterizer: Type42     *% Driver-defined attributes...     *RequiresPageRegion All: True     *cupsVersion: 1.5     *cupsModelNumber: 0     *cupsManualCopies: False     *cupsFilter: "application/vnd.cups-raster 0 rastertolabel"     *cupsLanguages: "en"     *OpenUI *PageSize/Media Size: PickOne     *OrderDependency: 10 AnySetup *PageSize     *DefaultPageSize: Def     *PageSize Def/112 x 149 mm:"<</PageSize[318 421]/ImagingBBox null>>setpagedevice"     *PageSize w112h158/112 x 158 mm: "<</PageSize[318 448]/ImagingBBox null>>setpagedevice"     *PageSize w112h210/112 x 210 mm: "<</PageSize[318 596]/ImagingBBox null>>setpagedevice"     *PageSize w112h297/112 x 297 mm: "<</PageSize[318 843]/ImagingBBox null>>setpagedevice"     *CloseUI: *PageSize     *OpenUI *PageRegion/Media Size: PickOne     *OrderDependency: 10 AnySetup *PageRegion     *DefaultPageRegion: Def     *PageRegion Def/112 x 149 mm: "<</PageSize[318 421]/ImagingBBox null>>setpagedevice"     *PageRegion w112h158/112 x 158 mm: "<</PageSize[318 448]/ImagingBBox null>>setpagedevice"     *PageRegion w112h210/112 x 210 mm: "<</PageSize[318 596]/ImagingBBox null>>setpagedevice"     *PageRegion w112h297/112 x 297 mm: "<</PageSize[318 843]/ImagingBBox null>>setpagedevice"     *CloseUI: *PageRegion     *DefaultImageableArea: Def     *ImageableArea Def/112 x 149 mm: "11.3 0 306.1 421.3596"     *ImageableArea w112h158/112 x 158 mm: "11.3 0 306.1 448.315"      *ImageableArea w112h210/112 x 210 mm: "11.3 0 306.1 595.862"     *ImageableArea w112h297/112 x 297 mm: "11.3 0 306.1 842.719"     *DefaultPaperDimension: Def     *PaperDimension Def/112 x 149 mm: "317 421"     *PaperDimension w112h158/112 x 158 mm: "317 448"     *PaperDimension w112h210/112 x 210 mm: "317 596"     *PaperDimension w112h297/112 x 297 mm: "317 843"     *MaxMediaWidth: "317"     *MaxMediaHeight: "843"     *HWMargins: 11 0 11 0     *OpenUI *Resolution/Resolution: PickOne     *OrderDependency: 10 AnySetup *Resolution     *DefaultResolution: 203dpi     *Resolution 203dpi/203dpi: "<</HWResolution[203 203]/cupsBitsPerColor 1/cupsRowCount 0/cupsRowFeed 0/cupsRowStep 0/cupsColorSpace 3>>setpagedevice"     *CloseUI: *Resolution     *OpenUI *cupsDarkness/Darkness: PickOne     *OrderDependency: 10 AnySetup *cupsDarkness     *DefaultcupsDarkness: Normal     *cupsDarkness Light/Light: "<</cupsCompression 0>>setpagedevice"     *cupsDarkness Medium/Medium: "<</cupsCompression 1>>setpagedevice"     *cupsDarkness Normal/Normal: "<</cupsCompression 2>>setpagedevice"     *cupsDarkness Dark/Dark: "<</cupsCompression 3>>setpagedevice"     *CloseUI: *cupsDarkness     *DefaultFont: Courier     *Font AvantGarde-Book: Standard "(1.05)" Standard ROM     *Font AvantGarde-BookOblique: Standard "(1.05)" Standard ROM     *Font AvantGarde-Demi: Standard "(1.05)" Standard ROM     *Font AvantGarde-DemiOblique: Standard "(1.05)" Standard ROM     *Font Bookman-Demi: Standard "(1.05)" Standard ROM     *Font Bookman-DemiItalic: Standard "(1.05)" Standard ROM     *Font Bookman-Light: Standard "(1.05)" Standard ROM     *Font Bookman-LightItalic: Standard "(1.05)" Standard ROM     *Font Courier: Standard "(1.05)" Standard ROM     *Font Courier-Bold: Standard "(1.05)" Standard ROM     *Font Courier-BoldOblique: Standard "(1.05)" Standard ROM     *Font Courier-Oblique: Standard "(1.05)" Standard ROM     *Font Helvetica: Standard "(1.05)" Standard ROM     *Font Helvetica-Bold: Standard "(1.05)" Standard ROM     *Font Helvetica-BoldOblique: Standard "(1.05)" Standard ROM     *Font Helvetica-Narrow: Standard "(1.05)" Standard ROM     *Font Helvetica-Narrow-Bold: Standard "(1.05)" Standard ROM     *Font Helvetica-Narrow-BoldOblique: Standard "(1.05)" Standard ROM     *Font Helvetica-Narrow-Oblique: Standard "(1.05)" Standard ROM     *Font Helvetica-Oblique: Standard "(1.05)" Standard ROM     *Font NewCenturySchlbk-Bold: Standard "(1.05)" Standard ROM     *Font NewCenturySchlbk-BoldItalic: Standard "(1.05)" Standard ROM     *Font NewCenturySchlbk-Italic: Standard "(1.05)" Standard ROM     *Font NewCenturySchlbk-Roman: Standard "(1.05)" Standard ROM     *Font Palatino-Bold: Standard "(1.05)" Standard ROM     *Font Palatino-BoldItalic: Standard "(1.05)" Standard ROM     *Font Palatino-Italic: Standard "(1.05)" Standard ROM     *Font Palatino-Roman: Standard "(1.05)" Standard ROM     *Font Symbol: Special "(001.005)" Special ROM     *Font Times-Bold: Standard "(1.05)" Standard ROM     *Font Times-BoldItalic: Standard "(1.05)" Standard ROM     *Font Times-Italic: Standard "(1.05)" Standard ROM     *Font Times-Roman: Standard "(1.05)" Standard ROM     *Font ZapfChancery-MediumItalic: Standard "(1.05)" Standard ROM     *Font ZapfDingbats: Special "(001.005)" Special ROM     *% End of mefa2012-4.ppd, 07287 bytes.


target/build CFLAGS mixup when cross-emerging due to bug or my stupidity?

I'm trying to emerge LLVM using emerge from a crossdev (for ARM) overlay in Gentoo. I've set the CFLAG of the overlay to optimise for arm (-march=armv6j), which seems to make ./configure fail on the "checking for executable suffix on build platform" with the message "error: installation or configuration problem: compiler cannot create executables" due to "bad value (armv6j) for -march= switch"; suggesting that it is trying to use the CFLAGS of the crossdev overlay even when not cross compiling. My question is if this is most likely due to a bug in the ebuild/package/llvm or due to me being silly (as far as I've been able to tell LLVM should be pretty cross compilable)? I've pasted the relevant output/logs here, in case they turn out to clarify anything.


Backup files with tar command and progress bar?

![enter image description here](http://i.stack.imgur.com/ba8NL.png)Can I see a progress bar or something not only ust the terminal screen output while backing up? Here is my shell script that I used backup with `tar` command:               # !/bin/bash           DATEJOUR=$(date +"%Y-%m-%d-%H-%M-%S")      REPABACKUPER="--exclude=/home/(username)/myfolders \      --exclude=/home/(username)/backup                  \      --exclude=/proc                                    \      --exclude=/lost+found                              \      --exclude=/mnt                                     \      --exclude=/media                                   \      --exclude=/sys /"      REPBACKUP="/home/(username)/backup"      NOMFIC=$REPBACKUP/Pavilion_backup-$DATEJOUR.tar.bz2           sudo tar cvpjf $NOMFIC $REPABACKUPER                exit $?


Is there a command line utility that copy files with progress information?

> **Possible Duplicate:**   >  move files with progress bar cp gets the job done but it would be nice if it had a little more feedback. Are there any utilities out there that do this? Personally, my ideal feedback would be a progress bar. But, I would take something as basic as output listing the files being copied as they are completed. Thanks!


Can I copy a folder with a progress bar?

I want to copy a folder with some kind of progress bar. I tried "pv" (Pipe Viewer) but it seems there is no way to copy a folder. Actually I'm not interested in using a script for pv - I would prefer some 'ready-to-go' package.


Measure pipe throughput in the shell

There is a shell command that allows to measure how fast the data goes through it, so you can measure the speed of output of commands in a pipe. So instead of:               $ somecommand | anothercommand      you can do something like:               $ somecomand | ??? | anothercommand      And throughput stats (bytes/sec) are prited to stderr, I think. But I can't for the life of me remember what that command was. Hints?


OpenVPN uses wrong IP-Address

I've installed OpenVPN on a client (behind NAT-Router) and a VPS server. The tunnel is established. However, ping is only possible from client to server. The server uses its public IP address on tun0 when trying to ping the client:               13:03:56.766564 IP publicIP > 192.168.11.8: ICMP echo request, id 12279, seq 46, length 64      The routing table seems to be correct:               root@:~# route     Kernel IP routing table     Destination Gateway Genmask Flags Metric Ref Use Iface     192.168.11.2 * 255.255.255.255 UH 0 0 0 tun0     184.x.x.x * 255.255.255.0 U 0 0 0 venet0     192.168.11.0 192.168.11.2 255.255.255.0 UG 0 0 0 tun0     default * 0.0.0.0 U 0 0 0 venet0      What's wrong? Why is it using the public IP? (It is a OpenVZ Container).


Cannot connect to wireless at School

I'm using Debian Mint and my internet has worked everywhere on earth (Home, Mcdonalds, other peoples homes) except at school where I really need it. It will always see the networks and will 'try' to connect but will never be able to do so. Occasionally it will work if I reboot, and disconnect networking, and reconnect, but only occasionally. It works perfectly if I dual boot to Windows so it's kinda frustrating. Power management is off, and Tx power is at 15db.


Map file to URL

I'm looking for a way to do something like this:               some_tool --go-to-background http://server.com/~me/uber_vimrc ~/.vimrc      After which, reading `~/.vimrc` would give the data downloaded from that URL. Read-only mapping is enough, though support for writing (through a REST API or whatever) would be cool. Is this possible with some existing utility? **The key aspect I am after is mapping individual URL to individual file from user account on demand.** Needing a system daemon to support this is ok, and other schemes like _ftp_ or _scp_ would be ok too, does not have to be _http(s)_. * * * If there's no existing utility, what would be the general mechanism to implement this myself? Symbolic link to FUSE file system which implements the network communication part comes to mind as a possible way. Is there any simpler way?


Dynamic Symlinks

I have built my app for different architectures and would like to create a "dynamic symlink" which takes me to the right version based on a variable. If the machine I am currently logged in to, is x86, then the symlink should take me to that build. A **mocked example** of what I want to do:               $ uname -i     x86_64          $ ls -ltr      lrwxr-xr-x  1 dogbane gg     4 Feb 16 15:40 mylink -> @sys/     drwxrwxr-x  2 dogbane gg  2048 Feb 16 15:40 x86_64/     drwxrwxr-x  2 dogbane gg  2048 Feb 16 15:40 i386/          $ cd mylink          $ pwd -P     ~/x86_64      Is this possible? I know I can use `cd $(uname -i)`, but want something simpler.


File systems or services that facilitate self updating, variable symbolic links

I'm curious if there are any implementations provided as a file system or a service/daemon that facilitate the following:   1. Symbolic links that can be specified to update if the target is moved   2. Symbolic links that contain a variable (said variable provided by a service, like the environment, ie an environment variable) One can presumably implement said features with custom mv, ln, rm, cp (& other relevant crud operations) and a service with data structures that manage relevant targets, links, and variables.


remove white space before delimiter with sed

I have data of the following format that I want to input into LibreOffice calc               data | num   | num | num     | num      For some reason Libreoffice does not think the string "3214 " is a number by default (trailing white space). I want to replace `(\s)*|` with `|` where `\s` stands for space and `*` for the Kleene star operation. And do this at multiple places in each line (all matches). I tried:               sed  -i 's/(\s)*|/|/' DataStats0914.txt      But it has no effect.


Why there are many BSD systems but only one Linux kernel? I wonder why BSD was forked many times, but no such thing with Linux.


escape characters in /etc/network/interfaces

I want to be sure that whatever string I pass into the line `wpa-ssid "abc"` in `/etc/network/interfaces` won't be used to break out of the configuration. All I can find in the manual is that `\` can be used at the end of a line to continue on the next line. But what about `\"` in the middle of a line? My worries is an SSID something like               A"     up rm -rf /\      Are there any general encoding that can be used for arbitrary characters into the SSID field?


Adjust sensitivity of trackball in Linux Mint 13

I am using Logitech Trackball Marble and I have difficulty adjusting the sensitivity of it in Linux Mint 13. Apparently the sensitivity and acceleration setting in Linux Mint only work for the mouse. ( I have both mouse and trackball plugged) How can I adjust it? I searched about it in google but find no useful result. I've seen people digging in something called xorf.conf but I have no idea what it is. I check my /etc/X11 directory and found no xorf.conf but only some file looks like xorf.conf.fail


Fedora Firewall no option as of yet

I need a firewall because I was decade long user of internet security suites on windows. I am not a professional of networks or anything but a student who just needs to block unblock running applications... GUFW a simple firewall was a good option but isnt available on Fedora nor any gui firewall & am frustrated over searching it for 2days... I checked Vuurmuur its powerful but for noobs & if configured wrongly its a great mess (even their documentation forewarns that). Similarly SeLinux is not a firewall > A firewall controls the flow of traffic to and from a computer to the > network. SELinux can confine access of programs within a computer and hence > can be conceptually thought of a internal firewall between programs I think its just a way to protect **core filesystem** nothing more than that ... So what are my options, please suggest me something some resource that is understandable to a starter & if somehow bugged willn't have **irreversible** consequences. Further just tell me if I want to reject in/out traffic for the address(s) containing keyword _wolfram_ e.g pk.server.wolfram or wolfram-mathematica.com how would I do that in iptables or somehow...& if I want to block intenet for application /opt/telepath-gabble how would I achieve that


Graphics fuzzy in Ubuntu 12.10

I am new to Linux and Ubuntu. Having just installed 12.10 I notice that I get fuzzy text and icons that change when I move my mouse over them. See picture below as an example. What could be wrong and what can I do to fix it? I have a NVIDIA Quadro 600 graphics card. ![enter image description here](http://i.stack.imgur.com/D62DC.png)


How to put an argument vector with an argument containing spaces in a bash variable

How can I store an argument vector with an argument containing spaces in a `bash` variable? For example, I want `2.sh` to print `b c` ### 1.sh               #!/bin/bash          ARGV='a "b c"'     ./2.sh $ARGV      ### 2.sh               #!/bin/bash          echo $2


How to find a position of a character using grep?

I need to identify the postion of a character in string using grep command. Example, the string is `RAMSITALSKHMAN|1223333`.               grep -n '[^a-zA-Z0-9\$\~\%\#\^]'      How do I find the position of `|` in the given string?


How to get dual graphic cards working under Linux?

My laptop is **Dell Inspiron 5420** , with two graphic cards:   * Intel HD Graphics 4000   * Nvidia GeForce GT 630M I took the Thinkpad T400 configuration guide as an example to configure my Linux, but I only get the integrated card to work, and the card is not using the **Intel** driver Currently, the behavior of my system is:   * using the **intel** driver in the Xorg.config, X cannot starts, reports cannot find the device   * using the **vesa** driver, the X could work, but no advanced graphic features, which means _Gnome 3_ is not available   * using the **nvidia** / **nouveau** driver, according to the log, the X seems to be started, but I got a black screen with nothing If you know a better guide/example to configure the system, please let me know. If you need my Xorg.config, I will post it.


convert to epoch and back

I've used the following two perl command lines successfully:               perl -e 'use Time::Local; print timelocal(7,51,10,22,3,2014), "\n";'      which returns `1398163867`, and               perl -e 'print scalar(localtime(1398163867)), "\n"'      which returns `Tue Apr 22 10:51:07 2014` What I would like to do is replace `7,51,10,22,3,2014`, and `1398163867` with a variable containing those values. How can I do this?


Differences between Windows registry and UNIX/Linux approach

What are the main differences between the Windows registry and the approach used in UNIX/Linux, and what are the advantages and disadvantages of each approach?


Finding/Mounting USB Device in Mac OS X 10.8

I've looked all over and found similar questions and answers and none seem to work for me or match what I see. I should add I'm new to UNIX and the OS X command line but have got a basic overview to get this far from reading the forums in the last few days. I have a UPS device which comes with monitoring software but it appears to not find the connected device. I can hard code the `/dev` location into the config file but the problem is I can't find or establish how to link the device itself to this type of assignment. System Profiler provides the following which I am sure is the correct device:               USB Bus:            Host Controller Location: Built-in USB       Host Controller Driver: AppleUSBOHCI       PCI Device ID: 0x7ff200000aa5        PCI Revision ID: 0x7ff2000000b1        PCI Vendor ID: 0x7ff2000010de        Bus Number: 0x04               Composite Device:                Vendor ID: 0x0001  (Kavi-EVAL)           Version: 1.00           Speed: Up to 1.5 Mb/sec           Location ID: 0x04300000 / 3           Current Available (mA): 500           Current Required (mA): 100      But I simply have no idea (mount?) how to establish the existing, or create the correct mount point for inclusion into the application's cfg file. This is the line extracted from the cfg file:               UPS Comport           ( /dev/xxttyxx    )  : [HID/MEC0002]      When I look in the `/dev` folder there is no HID/anything or anything that looks to come close to the device info returned by the profiler. Can anyone be kind enough to explain in newbie terms how I bind the USB device in the system profiler to an assignment I can use in the configuration?


Pivot in text mode (no X) (Pivot = rotated 90 degrees)

How to get rotated video in text mode (no X), even during booting sequence ? OS: Linux Graphics card: mostly ATI, but curious about NVida and Intel solutions.


Booting grub-2.00 with 2 initrds, crashes with RAMDISK: incomplete write

So, I'm trying to split my initrd into two initrd's. There's some pretty significant scripts that run in the initrd, and we wanted to split the initrd so we could rev the just the logic or just the kernel portion. As a single initrd, it boots fine. But, when I split it into two, I get an error:               RAMDISK: incomplete write (-28 != 8388608)      The grub menu entry's initrd looks like:               initrd /initramfs-scripts.img /initramfs-kernel.img      I can't find any documentation on using two initrd's. All I have found so far are this: stackexchange question, and this: grub bug. But, it doesn't give me an idea about what I'm doing wrong.


Print files with file size less than 100 bytes

Basically this script is just supposed to print out the file size and the name of all files in a directory that are under 100 bytes. This script I wrote works perfectly on my Ubuntu, but wont work on my mac os lion. Can anyone tell me why?               #!/bin/bash          for i in $(ls)     do       if [[ $(wc -c $i | cut -d" " -f1) -le 100 ]]; then         echo $(wc -c $i)       fi     done


Does Windows recognize Linux's symbolic links?

I was just wondering how a Windows system handles symbolic links. My best guess is that it will not recognize them, but I'm not entirely sure. Also, what do Macs do when confronted by one?


Delete the matching line and several more from a file

I have a text file called file_a.txt. My first command is               grep -A 12 ".production =" file_a.txt      The output is a few block. Each block of string contains 13 rows I specifically want to delete all the block of strings I got with the `grep` command from the original file file_a.txt. I do not want to send the grep output to a new file. Also I do not want to to use `grep -v` because it will not work in my case. I have tried something like things like this, but nothing is working:               cut < grep -A 12 ".production =" file_a.txt          sed -i '/`grep -A 12 ".production ="`/d' file_a.txt


How to check the Passive and Active FTP

How do I check which FTP (Passive or Active) is running? By default, passive FTP is running in linux, but how do I check?


Where does GSettings store its files?

I would like to have a look at the files the dconf-editor uses to read/write settings, and I'm assuming that they are managed by gsettings. Where are these files stored on the system, and in what format?


Bash command to delete a certain file in * folders

The situation isn't really as simple as the title may imply. I have a `.desktop` file that execs with `bash -c` to set an environment variable then load the program. Now I need to add another command before it goes to loading the program. Sometimes the program creates file called `SOFT_REPAIR` in `~/path to/*/`, and I need to delete it before running the program. `*` represents whatever version the program maybe, and as `/path to/` implies, there's spaces in the folder names within which the `SOFT_REPAIR` resides. So here's the thing:   * Do I need to do `/path\ to/`?   * Will `rm 'path to/*/SOFT_REPAIR/'` work?   * Can I just use the `rm` command whether `SOFT_REPAIR` exists or not, or do I need to use the `if` statement?


Impossible pmap results

Nautilus is taking up 450 MiB according to System Monitor (Ubuntu 10.04).               $pmap <PID of Nautilus>     ...     total          1578276K      Is `pmap` reporting 1.5 GiB of memory here? I'm trying to find out what's taking up the 450 MiB so I can deduce what I'm doing wrong, or where the problem lies.


Run a cron job every minute, meaning of syntax

I read somewhere that you can add a cron job to run every minute like this:               #min hour day month weekday command     */1   *    *    *    *     <your command>      What does the `/1` part mean? Can I omit it?


Why doesn't GoogleTalk plugin recognize my camera, even with v4l?

The thing is that I have GoogleTalk plugin, also used for Google+ hangouts, and it works in my netbook, on Ubuntu. But on my laptop, using the same Ubuntu (Oneric) and having used the camera on Cheese so it works, Google+ shows a black screen while trying to use webcam in hangouts. This is weird, I have installed libv4l-0 and forced GoogleTalkPlugin to preload it. Starting from a console, it shows:               [009:591] Got cookie response, socket is authorized     [009:591] AUTHORIZED; socket handshake complete     [014:536] HandleOnlineCheck: Starting check     [014:536] HandleOnlineCheck: OK; current state: 3     [031:321] Error(scriptinterface.cc:288): Passed a non-object for onmessasge_callback     Check failed: g_shutdown_pipe_write_fd != -1     [113:230] Warning(clientchannel.cc:678): Connection to GoogleTalkPlugin lost, reason=0     [113:367] Error(scriptinterface.cc:288): Passed a non-object for onmessasge_callback      I just don't know why I cannot get it to work. My netbook (hp-mini) works fine with an integrated camera.


groff to PS Conversion

I am very new to **`UNIX`** , learning **`groff`** with the help of **`cygwin`** on **`Windows XP SP3`**. I have downloaded **`groff-binaries`** from **_here_**, but using **`cygwin`**, I could not able to re-produce **`ps`** files. I have used following command in **`cygwin`** :               $ groff grnexmpl.me > grnexmpl.ps      But, in generated `grnexmpl.ps` file, all special formatting are gone. When I look inside the `grnexmpl.ps.gz` archive(comes with the binaries) and the `grnexmpl.ps` looks beautiful. It would be a great help if somebody assist me to understand what is going here? Am I missing something?


Countdown timer in panel

Is there some widget that I can put in the panel of my Xubuntu system that will show me a countdown of time? I've tried `pystopwatch`, but although it minimizes, it doesn't show me how long I have left. I've also tried xfce `timer-plugin`, but it doesn't really minimize. I just need something that will show how much time left I have for a certain task, as inconspicuously as possible. I'm running Xubuntu 12.04.


Using regex in for loop

I'm looking to loop through a directory of files and match them with regex, then subsitute the appropriate character:               #somefile.txt     %somefile.txt     >somefile.txt          # arr=(\% \> \#) ;for f in *; do echo -- "$f" "${f//${arr[@]}/}"; done      should echo:               #somefile.txt -- somefile.txt     %somefile.txt -- somefile.txt     >somefile.txt -- somefile.txt      instead i get:               #somefile.txt -- #somefile.txt     %somefile.txt -- %somefile.txt     >somefile.txt -- >somefile.txt      which results in no change, nada, zilch. the array works if i use `arr(\%)` with a single character, which defeats the whole purpose.               #somefile.txt -- #somefile.txt     %somefile.txt -- somefile.txt     >somefile.txt -- >somefile.txt


Change font in vesa menu for pxelinux

I am trying to change the font of the menu in my syslinux/pxelinux configuration. According to the documentation this is all it takes:               FONT myfont.psf      where in my case `myfont.psf` has been decompressed from `/usr/share/consolefonts/Uni3-TerminusBold32x16.psf.gz` on my Debian system. However, the font does not load in the menu. Are there any restrictions on the font that can be used that is not mentioned in the documentation?


getent hosts prints IPv4, getent ahosts prints IPv6

Verbatim output from my terminal:               $ getent hosts example.org     2001:500:88:200::10 example.org     $ getent ahosts example.org     192.0.43.10     STREAM 43-10.any.icann.org     192.0.43.10     DGRAM       192.0.43.10     RAW          I thought they were both (at the very least ahosts) supposed to print both IPv4 and IPv6 addresses. Why are these printing different address types?               $ uname -srvmpio     Linux 3.2.0-31-generic #50-Ubuntu SMP Fri Sep 7 16:17:36 UTC 2012 i686 i686 i386 GNU/Linux      **Edit** : Looks like it might be related to this bug report.


How does Debian make use of lots of CPU cores?

I just got an account on a 24 core VPS (according to UnixBench there are 24 CPUs).   1. In general terms, how can I make good use of all these cores for general purpose shell computing in Debian?   2. Do I need to type something special when I issue long-running apps from the shell in order to make each process run on a separate core if one is available? Or does Debian just handle all of that, invisible to me?


IP_TRANSPARENT missing from glibc headers

I'm trying to use the `IP_TRANSPARENT` declaration. I am using debian 6.0.5. IP_TRANSPARENT is only defined in `linux/in.h` however it conflicts with `netinet/in.h`. In centos for example, `IP_TRANSPARENT` is defined in both `linux/in.h` and `bits/in.h`. When I look at the top of `bits/in.h` (which I get when I include `netinet/in.h`, the centos one has               /* Copyright (C) ... 2008, 2010 Free Software Foundation, Inc.      Whereas one in my debian install has               /* Copyright (C) ... 2004, 2008 Free Software Foundation, Inc.      I've tried               apt-get install linux-headers-2.6.32-5-686      But it says it is already the newest version. How do I update the debian linux headers to the latest versions? **Edit:** In centos, `IP_TRANSPARENT` is defined in `bits/in.h`, which I get if I include `netinet/in.h`. It compiles fine under centos. In debian, `IP_TRANSPARENT` is not in `bits/in.h`, so when I include `netinet/in.h` I get a `‘IP_TRANSPARENT’ undeclared` error when compiling.


Adding 2 lines in text file stanza

I have a text file divided in stanzas. Each stanza starts with a [keyword] and ends with a blank line. Something like this:               [keyword1]     param1 = value1     param2 = value2     param3 = value3          [keyword2]     param4 = value4     param5 = value5     ...      I need a script (probably a one line command will work) to insert 2 lines immediately after a given `[keyword]`. Lines to be inserted are like the above couples:               param = value      I was thinking about using `sed` with in place editing plus a backup copy file just in case.


How to mimic zsh named directories with bash

> **Possible Duplicate:**   >  bash directory shortcuts zsh has the concept of named directories, so you can say in ~/.zshrc               c=/home/fschmitt/svn/plugin_root     : ~c      and later use this short cut in the shell like this               cd ~c/release      How to best emulate this with bash? I can of course say               export c=/home/fschmitt/svn/plugin_root      and then               cd $c/release      however firstly, the $ is complicated to input on German keyboard layout and secondly, I fear binding a variable with just a single letter name might give problems with unwanted variable expansion.


Difference between --xz and --lzma in GNU tar?

As far as I can tell, XZ is a container that uses the LZMA2 algorithm (i.e. extended LZMA); but e.g.               $ xz foo/      complains about `foo/` being a directory. So presumably the correct way to preserve directories with XZ is with `tar`; then what is the difference between `tar --lzma` and `tar --xz`? (Note that I do explicitly want ownership and permissions preserved, which is why I'm not just using 7z.)


A real non-"better touch tools" solution for select-to-copy on Mac OS X

I recently moved to Mac. I am missing my X11 copy-paste style. I can't find a way to exactly emulate X11 behavior "select-to-copy", "middle-click-to-paste" **globally** on Mac OS X. I am aware that this issue has been around for a long time, yet I can't find any real killer solution. The best thing I found is in Can I copy by highlighting and paste by middle click on Mac OS X?. All suggested solutions try to find out a way to paste text from the clipboard with a middle click. Yet, nobody has a real solution for automatically copying the highlighted text. I am wondering if there can be a way to automate the copying of highlighted text. Even if I should write a daemon to do it. Any pointers on where to start thinking will be great.


keybinding in xterm to shift one line up using shift+up

follow urxvt: scroll just one line How can we set keybindings so that shift+up can scroll one line up in xterm?


VPN and gateway problems

I've got a corporate VPN, which I use to access the Internet. When it's on, I cannot reach the servers inside the corporate network anymore, so I think there are some problems with the gateway setup. Here is the `netstat -rn` output when the VPN is turned off:               Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface     91.218.225.31   10.131.60.1     255.255.255.255 UGH       0 0          0 eth1_rename     10.131.60.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1_rename     169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1_rename     0.0.0.0         10.131.60.1     0.0.0.0         UG        0 0          0 eth1_rename      Here it is with the VPN turned on:               Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface     10.7.4.0        0.0.0.0         255.255.255.255 UH        0 0          0 ppp0     91.218.225.31   10.131.60.1     255.255.255.255 UGH       0 0          0 eth1_rename     91.218.225.31   10.131.60.1     255.255.255.255 UGH       0 0          0 eth1_rename     10.131.60.0     0.0.0.0         255.255.255.0   U         0 0          0 eth1_rename     169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1_rename     0.0.0.0         0.0.0.0         0.0.0.0         U         0 0          0 ppp0      `ppp0` is the VPN device. How can I make both the Internet and LAN routing work when the VPN is enabled?


extracting attachments from mail that is coming to my postfix inbox

How do I extract attachments from mails arriving at my postfix mailbox and preferably send the content of the attachment to another email account? I am interested in being able to acquire/read the content of the attachment on ubuntu terminal.


How can I install Sun JDK on a Debian based system?

I can't find any `.deb` packages for Sun's Java Development Kit. How can I install it on my Debian machine without causing conflicts with the already installed `openjdk` packages?


Can use Password authentication with SFTP even though "PasswordAuthentication no" in /etc/ssh/sshd_config

I have enabled SSH-keys based authentication on the Ubuntu 14.04 server, disabled root login using SSH and can connect successfully using SSH-keys based authentication with my user account _blahblah_ on my Mac SSH client. However, to test the SSH login with Password authentication, I used the SFTP login in Filezilla for user account _blahblah_ with its password, and it allowed me to log in without the need for any SSH-keys based authentication. The `/etc/ssh/sshd_config` file is as below. As you can see, I have disabled `PasswordAuthentication`. I have already restarted the sshd daemon by using `sudo service ssh restart` after modifying this config file. Any ideas why this might be happening?               Port 8888     Protocol 2     HostKey /etc/ssh/ssh_host_rsa_key     HostKey /etc/ssh/ssh_host_dsa_key     HostKey /etc/ssh/ssh_host_ecdsa_key     HostKey /etc/ssh/ssh_host_ed25519_key     UsePrivilegeSeparation yes          KeyRegenerationInterval 3600     ServerKeyBits 1024          SyslogFacility AUTH     LogLevel INFO          LoginGraceTime 120     PermitRootLogin no     StrictModes yes          RSAAuthentication yes     PubkeyAuthentication yes          IgnoreRhosts yes     RhostsRSAAuthentication no     HostbasedAuthentication no          PermitEmptyPasswords no          ChallengeResponseAuthentication no          PasswordAuthentication no               X11Forwarding yes     X11DisplayOffset 10     PrintMotd no     PrintLastLog yes     TCPKeepAlive yes          AcceptEnv LANG LC_*          Subsystem sftp /usr/lib/openssh/sftp-server          UsePAM no     AllowUsers blahblah


Issue with mv command in a script

This must be a very simple issue to solve, but I am stuck (not a UNIX pro). I need to move a gz to a target directory, but I get a `No such file or directory`.               NOW=$(date +"%Y-%m-%d-%T")          DEST="~/scripts/backup"     SQL_DUMP="db_dump_$NOW.sql.gz"     echo "$SQL_DUMP"          drush sql-dump | gzip -9 > $SQL_DUMP     mv -t $DEST $SQL_DUMP      The `sql.gz` is created properly, only the last command does not work. How should I use it? Thanks.


Permissions changed on /dev/nvidia* when GPU accessed as root on SUSE

I've got a Linux box running SLES11SP1 with 4 NVIDIA GPUs in it, for running CUDA programs. If the GPU is accessed by a process running as root, it changes the permissions on /dev/nvidia{0,1,2,3,ctl} to something inaccessible by non-root users. However, this behavior doesn't seem to occur when running on Ubuntu. Does anybody know what would cause this behavior on SLES, and how to disable it?


Get contact information of system administrator from the terminal

Do any of the common Unix/Linux platforms provide a way to query the system administrator contact information from the command line. Obviously a system admin might not include this information when they set up the server, but is there a way to ask for it when it is there (e.g., name or email)?


Internet connection help

So I just installed Elementary OS, and everything works perfect except for internet, I can't connect to the internet whatsoever, I cant tether through my phone, cant use ethernet, and don't even get wifi networks. I have a Toshiba S855D-00U with a Realtek RTL8188CE. I'm having trouble making work. How can I make it work on Elementary (Ubuntu 12.04)? Any help would be extremely appreciated, I'm totally new to Linux, so the simpler the response, the better.


What linux server settings allow my long running processes to keep running after the terminal is closed/terminated?

In previous jobs and experiences, I used screen or nohup to run my long running jobs from my terminal screen. Most, if not all of my previous jobs' servers dropped you if it didn't detect any activity after X amount of time. Even if I had set ServerKeepAlive and other settings in my .ssh/config file, in some cases I still got booted, probably because the server ignored my settings. I used nohup once or twice but I mainly use screen to keep my process running. Yesterday, I forgot to run my command with screen or nohup. I got booted off and I thought I was hosed. However, for some reason, the process was still running, even after several hours. I typed in `ps -ef | grep myprocname` and it was there until it was completed. I didn't run my process in the background (not sure if that makes a difference). I just type in `./script.sh` and let it run. What setting on the server allowed this fortuitous event to occur? I think the remote server is running Centos 6.4. Is this a Centos 6.4 thing, to not terminate processes when the parent process (in this case my shell) is killed? Do I need to go back to reading a Unix/Linux book since this is an easy question? Do I have my basic Unix facts wrong (about the parent process)? Did I get lucky?


Allow non-root process to access all home directories without compromising security?

Any ideas how to allow one non-root process to access (read&write) all home directories without compromising security? Normal users should not have access to each other's home directories. All ideas are welcome, even crazy ones (nfs&kerberos setups?) :) I basically need to create web interface for user home directories, where the non-root process is the web server process. New files should have the home directory user as the owner. Is this even possible?


Use sed to fix broken newlines

I have a folder full of files, each with many hundreds of lines. Many of these files have occasional broken newlines: when I open them in vim, many have ^M^L interspersed where newlines should be. In vim, I can run `%s/^M^L/\r/g` which will correct them. However, I don't want to have to do this to every file. So I'm trying to do this in a bash script via sed, but it hasn't worked. I've tried both: `sed 's/^M^L/\r/g' filename` and               sed 's/^M^L/\     /g' filename      Note: each time ^M^L appears here, I have done ctrl-v ctrl-m, not just shift-6 (^) M. What am I doing wrong? More to the point, what do I need to do for this to work?


Resize vdi size doesn't work as supposed

I just installed the new one Debian xfce via VirtualBox, but decided to increase the vdi size from 8GB to 20GB (because it requires 42% of all disk space at this moment): > VBoxManage.exe modifyhd debian.vdi --resize 20000 VirtualBox Manager tells me that debian.vdi now has 20GB as supposed, but when I started Debian, the df output tells me that it has 8GB as earlier. Why?


Virtualbox: OS cannot use the new extended disk space (.vdi)

I am running Virtualbox. I increased the size of my hard disk (.vdi) from 10G to 15G. Now when I start my Mint vm, the hard disk reports as 7.5g (df) even though i extended it (fdisk -l). I am not sure what is the problem. Can anyone point me the problem?               $ df -h     Filesystem      Size  Used Avail Use% Mounted on     /dev/sda1     >>7.5G<< 7.1G   61M 100% /     udev            1.5G  4.0K  1.5G   1% /dev     tmpfs           581M  888K  581M   1% /run     none            5.0M     0  5.0M   0% /run/lock     none            1.5G   88K  1.5G   1% /run/shm          $ sudo fdisk -l     Disk /dev/sda: >>16.1 GB<<, 16106127360 bytes     255 heads, 63 sectors/track, 1958 cylinders, total 31457280 sectors     Units = sectors of 1 * 512 = 512 bytes     Sector size (logical/physical): 512 bytes / 512 bytes     I/O size (minimum/optimal): 512 bytes / 512 bytes     Disk identifier: 0x000c55a4             Device Boot      Start         End      Blocks   Id  System     /dev/sda1   *        2048    15728639     7863296   83  Linux     /dev/sda2        15730686    16775167      522241    5  Extended     /dev/sda5        15730688    16775167      522240   82  Linux swap / Solaris          $ vboxmanage showhdinfo mint.vdi     UUID:                 a94931b9-673c-440a-ab6b-2c3eedd0cf93     Accessible:           yes     Logical size:         15360 MBytes     Current size on disk: 7806 MBytes     Type:                 normal (base)     Storage format:       VDI     Format variant:       dynamic default     Location:             /opt/virtualization/vm/mint.vdi


Fedora: System hangs after upgrade to FC18 (“started gdm”)

I've been upgrading my eee laptop from Fedora 17 to 18. After a reboot the system shows up the boot message               [  OK  ] Started GNOME Display Manager.      and does not go on any further. The system is alive, I can logon via ssh. Any suggestions how to fix or debug this issue any further? Thank you Chris               [xxx@eee X11]$  lspci |grep VGA     00:02.0 VGA compatible controller: Intel Corporation Atom Processor D4xx/D5xx/N4xx/


Configuring File Associations in Ubuntu with Wine

Related to this question, I have Ubuntu 20.04.1 LTS. I downloaded PlayOnLinux 4.1.9 (the Precise version) and used it to install Microsoft Office 2010 Pro. PlayOnLinux downloaded Wine 1.5.21 and whatever else it needed to install office. I did a customized installation and it seems to work fine. The only issue is now that I can't quite get file associations to work correctly. So for example, if I have a .docx document, I want to be able to just double click it and have it open with Microsoft Word. When I try to do that I get an error saying "IOPL not enabled" and the document never opens. I googled it and everyone said to open up wine configuration, go to libraries, add gdiplus and edit it to "Native (Windows)" but this still hasn't fixed the problem. I have no idea what this is or how it is supposed to work but can someone who does, please help. Currently I have to start Word and then use it to open up the document. That works fine. I am not very familiar with linux so hope this isn't too complicated and can be broken down into easy steps which I can follow and execute. Thank you.


How to rename a gnu screen session

I am running a screen session and I'd like to change it's name. I know that when starting a new screen session I can use the '-S' option to give it a name. How do I change that name once the session has already started? Thanks!


Synonyms (from a thesaurus) in Emacs

I use Emacs 23 on Debian sid. I can check the spelling of a word in Emacs with `M-$`. How can I obtain synonyms (using a thesaurus?) for a word in Emacs? None of the following were useful: one, two, three. If I download `synonyms.el` from the second link, where should I place it? Do I need to download a thesaurus as well?


Create a CentOS Guest img over Ubuntu

I want to create a basic CentOS 5.8 system from scratch. for now i build my own img for Ubuntu Guest (debootstrap), my host is a Ubuntu 12.04.1LTS but I don't know how to make for a CentOS, **is possible build CentOS from Ubuntu?**


"Permission denied" when starting binary despite "rwx" priviledge

I am trying to run the statistics software Stata 11 on Ubuntu 11.10. as a regular user and I get the following error message:               bash: xstata: Permission denied      The user priviledges seem ok to me as a linux newbie, tough:               -rwxr-x--x 1 root root 16177752 2009-08-27 16:29 xstata*      I would very much appreciate some advice on how to resolve this issue!


Why is my hard drive out of space if gparted says I have 500+GB

I recently installed Debian on my machine and made separate `/` and `/home` partitions. Yet my disk usage analyzer shows that my `/home` is inside `/`. But `gparted` shows that `/home` is indeed in it's own partition, and has 500+ GB of free space. I checked my `/etc/mtab` and it shows that `/home` is mounted at `/dev/sdb6` whereas `/` is mounted at `/dev/sda1`. I don't understand what is wrong. I'm going to keep reading about partitioning, but I'd like to leave this question here to simmer to see if anyone has a quick answer. I put translations in the `gparted` window just in case. ![What The Heck](http://i.stack.imgur.com/ppLgk.png)


How to compile my own linux kernel?

I want to learn about compiling a kernel from scratch. How can I download the latest stable Linux kernel from http://kernel.org/, compile it, and install it in a VMware virtual machine? This is just for educational purposes.


Configuring, compiling and installing a custom Linux kernel

I'd like to try using a kernel other than the one provided by my distro -- either from somewhere else, or as customized by me. Is this difficult or dangerous? Where do I start?


How to move files with same name and concatenate

My directory structure is given below. I need to move all the folders from Test3 to Test2 and concatenate the files with same names               [jg@hpc Test2]$ tree     .     |-- Sample_1008     |   |-- 1008_ATCACG_L002_R1_001.fastq     |   |-- 1008_ATCACG_L002_R2_001.fastq     |   |-- 1008_ATCACG_L006_R1_001.fastq     |   `-- 1008_ATCACG_L006_R2_001.fastq     `-- Sample_1009         |-- 1009_CGATGT_L002_R1_001.fastq         |-- 1009_CGATGT_L002_R2_001.fastq         |-- 1009_CGATGT_L006_R1_001.fastq         `-- 1009_CGATGT_L006_R2_001.fastq          [jg@hpc Test3]$ tree     .     |-- Sample_1008     |   |-- 1008_ATCACG_L002_R1_001.fastq     |   |-- 1008_ATCACG_L002_R2_001.fastq     |   |-- 1008_ATCACG_L006_R1_001.fastq     |   `-- 1008_ATCACG_L006_R2_001.fastq     `-- Sample_1009         |-- 1009_CGATGT_L002_R1_001.fastq         |-- 1009_CGATGT_L002_R2_001.fastq         |-- 1009_CGATGT_L006_R1_001.fastq         `-- 1009_CGATGT_L006_R2_001.fastq      I tried               mv Test3/* /auto/dr-lc_sa1/Data/Test2      nothing worked but when I tried               cp -r Test3/* Test2/      It overwrites. I want the files to be concatenated. At the end I need to have one Test2 directory and under every sample and their fastq files in the Test3 directory will be concatenated to corresponding fastq files in Test2 directory.


Rename file in Mac OS Terminal using Regex

Hundreds of images need to be renamed with a terminal command using regex on MacOS 10.9 Mavericks. The files are named this way:               0045AW489R3T(IPCAM)_0_20131124101245_931.jpg     0021DF025C8E(IPCAM)_0_20131127101721_44591.jpg     389223GT4Z6W(IPCAM)_0_20131128103423_7893282.jpg      They need to be renamed to this:               2013-11-24  10-12-45.jpg     2013-11-27  10-17-21.jpg     2013-11-28  10-34-23.jpg      Can anyone please show me how to do it?


How to ignore files if there is an similar file with the same size?

I want to list the files in a directory, using ls. Typically, the files in that directory have the same name (except for the extension - one has extension .rej, one has .failed) . If a pair of files with similar names have the same size, move the .failed file to a specific directory, and leave the .rej alone. How can I do this?


How to repair the grub on debian

I am loading Linux (Debian Lenny) on VirtualBox but there is apparently something wrong with the GRUB. When I start the system, a grub menu appears: ![enter image description here](http://i.stack.imgur.com/mNBaP.png) Then I run the following commands: > root (hd0,0)   >  kernel /vmlinuz root=/dev/hda1 ro quiet   >  initrd /initrd.img   >  boot After the system boots, how should I continue to repair the grub file? Any advice would be appreciated!


How to search in specific files matching a pattern

How can I find a word in specific files matching a pattern. e.g. searching for `version` in `CMake*` files recursively found in the current directory.


RAID setups questions

I have a RAID setup questions My mobo supports hardware RAID, my question is, should I use the board's RAID system or freeNAS/Ubuntu's software RAID system? I realize performance is better with h/w, but my concern is what happens when a drive fails? I want to go with whatever option allows me to keep the data accessible after failure. I.E. drive 1 of a RAID 1 pair fails, I want the second drive to still be accessible to me if a) I swap a new drive in and or b) I take the good drive out and put it in another system. I've never messed with it and I've heard that software RAID setups can render a drive unusable in other systems and I've heard the same said of hardware setups so, which is it?? This setup will be for an NAS type of server.


Fusing old "KNotes" repository into a "KNnotes" repository on a new KDE installation

_(Migrated from "superuser"; I will probably manage to actually test this over the weekend. Meanwhile...)_ I want to migrate the KDE Knotes database from an account that existed on a Fedora 17 installation (`kdepim 4.10.5`) to a new account that exists on a Fedora 20 installation (`kdepim 4.13.3`). Looking at Fedora 20, I have found that the notes text content is contained in an iCalendar file called `notes.ics` located under `~/.kde`. Additionally, a copy of each note, this time in RFC2822 format can be found under `~/.local`; this may be for desktop searching (Akonadi etc.) purposes, I don't know. I have a copy of the `notes.ics` file from the Fedora 17 installation. So, what do I do? Can I just take the old account's `notes.ics` and append it to the new account's `notes.ics`? Is this going to work? ![KNotes files in ~](http://i.stack.imgur.com/aRqS7.png)


Always look up non-FQDN domains as .example.com?

When I connect to the company OpenVPN they don't push their DNS to my computer, which means I have to type the FQDN for the hosts I e.g. SSH and HTTP to. **Question** Is it possible to configure my Linux desktop, so can do               ssh ss@serv      instead of               ssh ss@serv.example.com      ? There is only one domain, so incase the non-FQDN fails, it will always work, if just `example.com` is appended.


What are the new features available to bash 4?

I was using bash3 up to now, and just got a copy of the latest version               $ ./bash --version     GNU bash, version 4.1.0(1)-release (i686-pc-linux-gnu)     Copyright (C) 2009 Free Software Foundation, Inc.     License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>          This is free software; you are free to change and redistribute it.     There is NO WARRANTY, to the extent permitted by law.     $      What are the major changes/feature additions in version 4 over version 3?


Find all directories, in which user has access to search and echo this directories in shell

I need to find all directories, in which user has access to search(command `find`) and echo this directories in shell. USER is read from ksh. for example:               read user      I know, if user want to use `find` in directory, user should have "read access" and "execute access" for this directory. I should check all directories for `r` and `x` access for inputed user. I'm having a little trouble with this steps. Maybe a simple solution can help me and my algorithm is wrong. Please,help!


Encrypted disk filesystem compatibilities

On my Debian Linux system during the install I decided to use disk encryption (the one offered during a regulard Debian install). When the system boots up I need to enter a password and then the "real" boot begins. Could someone explain how this encryption is performed? Does it happen before or after the filesystem's laid out? Can I use any filesystem available for Linux with the disk encryption? The _/etc/mtab/_ is more complicated than what I was used with Linux and I take it it's related to disk encryption but I'm really not sure. Here's (what I think is) the relevant bits from my _/etc/mtab_ :               /dev/sda1 /boot ext2 rw,relatime,errors=continue 0      /dev/mapper/archon-root / ext4 rw,noatime,errors=remount-ro,user_xattr,commit=300,barrier=1,data=ordered 0 0     rootfs / rootfs rw 0 0      I don't really understand why /boot is ext2 and why / is ext-4 and using a _/dev/mapper_. Could /boot be itself using ext4? Could / be using, say, ZFS and yet still offer encryption?


Adding numbers from the result of a grep

I run the following command:               grep -o "[0-9] errors" verification_report_3.txt | awk '{print $1}'      and I get the following result:               1     4     0     8      I'd like to add each of the numbers up to a running count variable. Is there a magic one liner someone can help me build?


Running Gst Player through command line

> **Possible Duplicate:**   >  Commandline gstreamer player I want to run my Gst Player through command prompt in ubuntu 10.10 please help


Did I messed up something by accidentally pasting the '/etc/inittab' into the shell?

Help me Unix specialists, We were doing some system checkup and I entered into the shell (ussing PuTTY):   `# more /etc/inittab`.   I copied the contents of the output with intentions to paste all that into a document. But then accidentally I hit the right click, and in putty that means PASTE so i pasted all that back into the shell. Did i messed up something really bad? I am afraid that the system won't boot next time? Im going crazy it's a production system. So far everything seems normal. The `/etc/inittab` is still the same, but I am afraid that I might have messed up something else that will reveal itself later.               # more /etc/inittab     init:3:initdefault:     ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1     tape::sysinit:/sbin/mtinit > /dev/console 2>&1     muxi::sysinit:/sbin/dasetup   </dev/console >/dev/console 2>&1 # mux init     stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar </dev/systty     brc1::bootwait:/sbin/bcheckrc </dev/console >/dev/console 2>&1 # fsck, etc.     link::wait:/sbin/sh -c "/sbin/rm -f /dev/syscon;                        /sbin/ln /dev/systty /dev/syscon" >/dev/console     2>&1     cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon           # legal req     sqnc::wait:/sbin/rc </dev/console >/dev/console 2>&1           # system init     #powf::powerwait:/sbin/powerfail >/dev/console 2>&1            # powerfail     cons:123456:respawn:/usr/sbin/getty console console            # system console     #ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600     #ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600     #ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600     #ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600     #ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600     ems1::bootwait:/sbin/rm -f /etc/opt/resmon/persistence/runlevel4_flag     ems2::bootwait:/sbin/cat </dev/null >/etc/opt/resmon/persistence/reboot_flag     ems3:3456:wait:/sbin/sh -c "/usr/bin/touch /etc/opt/resmon/persistence/runlevel4_flag; /usr/bin/chmod 644 /etc/opt/resmo     n/persistence/runlevel4_flag"     ems4:3456:respawn:/etc/opt/resmon/lbin/p_client     #ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf     a0:3:off:/usr/sbin/getty -h ttyd2a1 1200     a1:3:off:/usr/sbin/getty -h ttyd2a2 1200     #      ##      And bellow is the paste:                 # # more /etc/inittab     init:3:initdefault:     # init:3:initdefault:     stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar </dev/systty     brc1::bootwait:/sbin/bcheckrc </dev/console >/dev/console 2>&1 # fsck, etc.     link::wait:/sbin/sh -c "/sbin/rm -f /dev/syscon;                        /sbin/ln /dev/systty /dev/syscon" >/dev/console     2>&1     cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon           # legal req     sqnc::wait:/sbin/rc </dev/console >/dev/console 2>&1           # system init     #powf::powerwait:/sbin/powerfail >/dev/console 2>&1            # powerfail     cons:123456:respawn:/usr/sbin/getty console console            # system console     #ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600     #ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600     #ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600     #ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600     #ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600     ems1::bootwait:/sbin/rm -f /etc/opt/resmon/persistence/runlevel4_flag     ems2::bootwait:/sbin/cat </dev/null >/etc/opt/resmon/persistence/reboot_flag     ems3:3456:wait:/sbin/sh -c "/usr/bin/touch /etc/opt/resmon/persistence/runlevel4_flag; /usr/bin/chmod 644 /etc/opt/resmo     n/persistence/runlevel4_flag"     ems4:3456:respawn:/etc/opt/resmon/lbin/p_client     #ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf     a0:3:off:/usr/sbin/getty -h ttyd2a1 1200     a1:3:off:/usr/sbin/getty -h ttyd2a2 1200     sh: init:3:initdefault::  not found.     # ioin::sysinit:/sbin/ioinitrc >/dev/console 2>&1     # tape::sysinit:/sbin/mtinit > /dev/console 2>&1     # muxi::sysinit:/sbin/dasetup   </dev/console >/dev/console 2>&1 # mux init     # stty::sysinit:/sbin/stty 9600 clocal icanon echo opost onlcr ixon icrnl ignpar </dev/systty     sh: stty::sysinit:/sbin/stty:  not found.     # brc1::bootwait:/sbin/bcheckrc </dev/console >/dev/console 2>&1 # fsck, etc.     #               /sbin/ln /dev/systty /dev/syscon" >/dev/console                                                      <     sh: link::wait:/sbin/sh:  not found.     # 2>&1     # cprt::bootwait:/sbin/cat /etc/copyright >/dev/syscon           # legal req     sh: cprt::bootwait:/sbin/cat:  not found.     # sqnc::wait:/sbin/rc </dev/console >/dev/console 2>&1           # system init     # #powf::powerwait:/sbin/powerfail >/dev/console 2>&1            # powerfail     # cons:123456:respawn:/usr/sbin/getty console console            # system console     sh: cons:123456:respawn:/usr/sbin/getty:  not found.     # #ttp1:234:respawn:/usr/sbin/getty -h tty0p1 9600     # #ttp2:234:respawn:/usr/sbin/getty -h tty0p2 9600     # #ttp3:234:respawn:/usr/sbin/getty -h tty0p3 9600     # #ttp4:234:respawn:/usr/sbin/getty -h tty0p4 9600     # #ttp5:234:respawn:/usr/sbin/getty -h tty0p5 9600     # ems1::bootwait:/sbin/rm -f /etc/opt/resmon/persistence/runlevel4_flag     sh: ems1::bootwait:/sbin/rm:  not found.     # ems2::bootwait:/sbin/cat </dev/null >/etc/opt/resmon/persistence/reboot_flag     sh: ems2::bootwait:/sbin/cat:  not found.     # /persistence/runlevel4_flag; /usr/bin/chmod 644 /etc/opt/resmo                                                     <     > n/persistence/runlevel4_flag"     sh: ems3:3456:wait:/sbin/sh:  not found.     # ems4:3456:respawn:/etc/opt/resmon/lbin/p_client     sh: ems4:3456:respawn:/etc/opt/resmon/lbin/p_client:  not found.     # #ups::respawn:rtprio 0 /usr/lbin/ups_mond -f /etc/ups_conf     # a0:3:off:/usr/sbin/getty -h ttyd2a1 1200     sh: a0:3:off:/usr/sbin/getty:  not found.     # a1:3:off:/usr/sbin/getty -h ttyd2a2 1200     sh: a1:3:off:/usr/sbin/getty:  not found.     #


Is there a pager that stops on form feeds? When I'm reading RFCs, I can read them like this:               $ less -z57 rfc748.txt      This will keep the pager lined up with the pages, but this is a bit of a hack, and when I do a search I'd prefer it to line up the screen with the page boundaries. The page boundaries are marked with form feeds.


X hangs after hibernating Fedora 18

Yesterday I was using my FC18, of which I haven't updated significant packages for long time, maybe just a few desktop apps some weeks ago. On shutdown I chose to hibernate it, as I usually do and as I have been doing for months almost daily. Today I turned it on just to have X hanging after boot. I tried hard reboot, passing the `noresume` option to grub so that it didn't use the booting data on swap, summoning a login screen and then shutting down by command-line, etc... Nothing changes. Everything loads, even wpa-supplicant, gdm..., at least according to the messages displayed on boot, and then I still end up stuck on a default wallpaper with my working mouse pointer. On the second time I tried rebooting a graphical message, with a sad-faced computer, appeared saying "It seems an error occurred, contact administrator." If I try to start X again on another login screen via `startx` it still hangs. I have made no recent changes to X or system's configuration, nor any important update. The only thing I did differently from usual was hibernating while having some more videos running: a video file played on VLC and some Firefox tabs with flash videos, which, however, were not playing all together at the same time. I usually hibernate after having closed a few apps, that's it. Do you have any idea on what's going on? what should I check to fix the problem?


How to change swap partition from primary to logical?

I was installing Mint on dual boot with Win8 and I accidentally created primary swap partition. Is there any way I can change the partition type from primary to logical? Or do I have to delete those partitions and reinstall Mint?


forward vs. backward symlinks: administrative practice?

I'm wondering how other people feel about forward symlinks: are they safe? Good practice? Depends? The reason I ask is that apparently in the linux desktop world, there seems to be a push by various distros to combine /usr/bin with /bin. I've asked why but haven't gotten any great answers other than being able to do an "exec" call to load programs and not have to search PATH (which, to me, seems a rather inconsequential thing to do). So they don't want to search path and always use /usr/bin/ -- ok, why not just put symlinks in /usr/bin pointing back to /bin? (FWIW, it's not just "bin", but also sbin, lib and lib64). Instead of using backlinks, my current current distro has chosen to move binaries off of the root partition onto/into /usr and, as they move files from /[s]bin and the libs to /usr/[s]bin, they are putting forward-links from the root-based dirs to the files in /usr. I have gotten no reasons, at all, for why they decided to move things from the root partition to /usr, but I thought it was common sense, in the case of critical files (like those needed for boot), to never use links to a file- system that might not be mounted by the time you can reference the symlinks. I.e. links in /usr to root are safe because you can't mount /usr if you don't have a root! But the other way around... moer than once I've restored /usr from backup or hand-fixed some problem solely from the rootfs. Am I being overly conservative or are forward link now considered to be in the realm of 'good practice' for critical files??


fedora slow to aquire network ip after startup or cable unplug

I've installed Fedora 19, and i'm new to it (I used Ubtuntu until now). After every reboot, or when i unplug my network cable, the system is slow to pickup the state change, and it takes a long time until the system reloads its IP from my router (i'im using DHCP). On ubuntu these changes were instantaneous, and resuming from sleep or occasional cable unplugs were handled without problems. How can i fix this?


Setting up a user for sftp acces into a sub directory of another users home directory

An interesting problem. The broader goal is to setup a directory that one of our clients can sftp into (via ssh keys, not user/pass combination) and upload files. This directory will need to be accessed by another cPanel user (called user1) running crons which are in-turn running php scripts to handle these files and act on them (reading, and possibly moving). I have setup a new user (called user2) with it's home directory in a sub directory of user1. I am able to sftp into the home directory of user2 using a username / password combination. But I am now unable to connect using ssh keys. I have setup the ~/.shh/authorized_keys file and everything for user2. From what I understand the issue is due to file ownership. As user2 doesn't explicitly own the files in ~/.ssh it refuses to look in the file and therefore refuses the key. Does anyone have any experience, advice or suggestions to working this out. Even if my initial solution isn't feasible and I have to go down another path.


Fedora session / process startup issues

I've installed fedora 16 with lxde(xfce) desktop. My problem is that when I login into the system, it gives me redundant app startup, for instance it launches Installation manager, also I've noticed quite a few httpd processes. Looks really strange to me. Any suggestions guys ?               [midnight@localhost ~]$ ps aux | grep httpd     root       985  0.0  0.3 437472  9964 ?        Ss   18:58   0:00 /usr/sbin/httpd -k start     apache     988  0.0  0.4 441816 12112 ?        S    18:58   0:00 /usr/sbin/httpd -k start     apache     989  0.0  0.2 437472  6112 ?        S    18:58   0:00 /usr/sbin/httpd -k start     apache     990  0.0  0.2 437472  5364 ?        S    18:58   0:00 /usr/sbin/httpd -k start     apache     991  0.0  0.2 437472  5364 ?        S    18:58   0:00 /usr/sbin/httpd -k start     apache     992  0.0  0.2 437472  5364 ?        S    18:58   0:00 /usr/sbin/httpd -k start     apache     993  0.0  0.2 437472  5364 ?        S    18:58   0:00 /usr/sbin/httpd -k start     apache     994  0.0  0.2 437472  5364 ?        S    18:58   0:00 /usr/sbin/httpd -k start     apache     995  0.0  0.2 437472  5364 ?        S    18:58   0:00 /usr/sbin/httpd -k start


How to clone an apt repository to keep all old packages?

This may sound trivial, but I haven't found a solution anywhere yet. Is there a way to backup or clone an apt repository such that I get a clone that (1) contains all current packages and (2) keeps all old packages. I know that there is `apt-mirror` and `apt-clone` but the very brief documentation doesn't say anything if old package versions are kept. Unfortunately our product depends on packages from a repository where only the newest version is kept. I would like to maintain a local repository that contains the current and all old package versions. Is that possible and how?


Linux tools to choose suitable Cisco ASA 5500

I have a linux webhosting server which attracts DDOS attacks. I want to use **Cisco ASA 5500 Series Adaptive Security Appliances** to protect the linux server from them. I know there are many factors should you know before you choose the suitable hardware firewall like the amount of this DDOS and pps ..etc Please suggest a linux tools to measure those factors and to help me collect the required informations ( pps - amount of DDOS - concurrent connections and other factors ).