How do I set up a BitTornado tracker?

As the title suggests I would like to setup a BitTornado tracker for a local network. At the moment I am using OpenBitTorrent as my tracker but this seems strange as I don't want to do this over the net and I'm not sure how secure or legal it is. The "server" is running Bodhi Linux. I found a how-to on TuxCoder using this command to start the tracker               bttrack --port 6969 --dfile ~/.bttrack/dstate --logfile ~/.bttrack/tracker.log --nat_check 0 --scrape_allowed full      However I get back a deprecation warning:               /usr/lib/pymodules/python2.6/BitTornado/__init__.py:8: DeprecationWarning: the sha module is deprecated; use the hashlib module instead       from sha import sha     **warning** could not redirect stdout to log file:  <type 'exceptions.IOError'>      It may be that there is a better tracker out there. I'm not an expert, which is why I'm asking this question.


how to downgrade in command line for ubuntu?

I am using OS 12.04 version, but using `upgrade` command results in the desktop being changed for the new version 13.04. How do I downgrade to the old version using the command-line? From this:               root@metal004:~# lsb_release -a       No LSB modules are available.       Distributor ID:   Ubuntu       Description:  Ubuntu 13.04       Release:  13.04       Codename: raring      To:               root@metal004:~# lsb_release -a       No LSB modules are available.       Distributor ID:   Ubuntu       Description:  Ubuntu 12.04.3 LTS       Release:  12.04       Codename: precise


On petalinux, lsmod does not work

I have seen that when I do `lsmod` in petalinux , I get "not tainted" message. Is there any alternative for `lsmod` then ?


Bash Scripting : Printing column data in the same row

I have written a bash script to calculate the size of a `PostgreSQL` database and print the output along with the date when the script was executed in a text file. The script code is as follows:               #!/bin/bash     date +"%d:%m" >> dbdata.growth     psql -h 192.168.2.173 -U postgres -c "select pg_database_size('ddb'); "  | sed -n         '3,3p' | numfmt --to=iec >>dbdata.growth     psql -h 192.168.2.173 -U postgres -c "select pg_database_size('dpkidb'); "  | sed       -n '3,3p' | numfmt --to=iec >>dbdata.growth      The script produces the following output in the format as shown below               26:03              134G              4.4M     26:03              134G              4.4M      The issue for me is that I want all the three columns in the same row. How can I achieve that?


How do I know which kernel version will have a bug fix I need?

> **Possible Duplicate:**   >  Given a git patch id, how to find out which kernel release contains it? I encountered a bug in one of the newer kernel versions. There is no workaround; if I want to have sound at my system at all, I have to boot an older kernel version. Since this is a home computer I use for video and music, I need the sound and haven't updated the kernel since 3.5.4-2, not wanting to overwrite the version which still works. There already is a fix which repairs the problem. But I don't know when it will be included in a kernel update. How do I find out which kernel version will contain the fix? I don't want to update until this version comes out.


How to get current buffer's filename in emacs?

One of the main features I miss about Vim, is that it always saves the filename of the current file in the `%` buffer (more info). That allows launching commands easily like:               ;; compile current file     :! gcc %     ;; source current file (useful when I'm editing .vimrc     :source %     ;; get the size of current file     :! du -sh %     ;; etc, etc...      I would like to have similar functionality under `emacs` (version 24, if that makes any difference), namely have an easy way to insert the name of the file opened in the current buffer. **Examples of what I want to do** _Here I describe some basic use cases as to explain better when I feel the need for such a shortcut_   1. Compile: When I enter `M-x compile` emacs asks me for a compile command. I would like to enter `gcc (current-buffer)` easily.   2. Load-file: When I'm editing my .emacs file, I would like to load it right away to test the changes. The way I do it is `M-x load-file` and then I always spell out the name `.` `e` `m` `a` `c` `s`. I would like to have a shortcut.   3. Launch outside processes: I gave `du -sh` as an example, only to illustrate that I want the shortcut to be also available when I execute shell commands with `M-!` **What I found so far**   * This question here on U&L. The answers given are basically showing where to find the filename of a buffer so one can add it to the kill-ring. It's not exactly what I'm looking for, I don't want to have to manually kill the filename before I want to use it. (Also solutions described in both answers don't seem to work as smoothly in my emacs and require additional keystrokes making them a bit of a pain). _**EDIT** : A bit unrelated, by I found out why these solutions don't work. I have IDO enabled, for better or worse._   * The `(current-buffer)` function described in the manual does return the name of the file in the current buffer, but nowhere in the examples I gave above, am I evaluating elisp code. Is there a way to insert the result of the evaluation of this function in a (mini)buffer and binding this way to a shortcut? **Am I wrong to think this way?** I am currently learning to use emacs (it's been a few months actually) after years of using Vim. I want to avoid a predictable _using-emacs-in-a-Vim-way_ trap. If you feel that what I'm asking for is not very _emacs-y_ , and there should be a better (cleaner?) way to do it, please do mention it in your answers.


How I can emulate a big endian platform on a x86?

I need to get a big endian platform to develop with `gcc` and `g++`, what is a solution for that? I know that the SPARC is one of those big endian architectures, but I have no idea what OSs can run on it and how to emulate a SPARC machine under Linux; I also should note that I need any big endian that I can emulate on an X86 but with `g++` available on it.


Hp Deskjet 1000 printer stop printing after upgrade ubuntu to 12.04?

I upgrade my Ubuntu to 12.04 , my hp printer stop printing , i tried to upgrade hplip but didn't work. What should i do to let it work again. How can i fix this problem , hp site state that the printer is supported , any help ?


How to find where driver.mod.c links to?

I'm trying to port the webcam composite gadget from kernel 2.6.37 to 2.6.32. I don't have a choice on this since I depend on other drivers and a SDK which only compile for this version. My train of thought was to mimic the ethernet gadget functionality with some minor changes and get it working fast, at least loading properly, then spend time working on the video streaming capabilities. I ran into a brick wall pretty fast, because my new driver cannot be insmod, because -1 Device of resource busy. I tried to dig in deeper with printk and figure out what was going on. Main initialization seems to go as follow               module_init(webcam_init)     webcam_init()     usb_composite_register(&webcam_driver)     usb_gadget_register_driver(&composite_driver)      Those functions are defined as follow :               static struct usb_composite_driver webcam_driver = {         .name       = "g_webcam",         .dev        = &webcam_device_descriptor,         .strings    = webcam_device_strings,         .bind           = webcam_bind,         .unbind     = webcam_unbind,     };          static int __init     webcam_init(void)     {         return usb_composite_register(&webcam_driver);     }          int __init usb_composite_register(struct usb_composite_driver *driver)     {         if (!driver || !driver->dev || !driver->bind || composite)             return -EINVAL;              if (!driver->name)             driver->name = "composite";         composite_driver.function =  (char *) driver->name;         composite_driver.driver.name = driver->name;         composite = driver;              return usb_gadget_register_driver(&composite_driver);     }      usb_gadget_register_driver man page shows this > Call this in your gadget driver's module initialization function, to tell > the underlying usb controller driver about your driver. The driver's bind > function will be called to bind it to a gadget before this registration call > returns. It's expected that the bind functions will be in init sections. > This function must be called in a context that can sleep. I would expect usb_gadget_register_driver to be mapped to either composite_bind of webcam_bind, both of which are defined. Unfortunately printks in either function never show up in dmesg so I would assume I am missing something here. `usb_gadget_register_driver` does show up in g_webcam.mod.c which tells me that it is mapped somewhere, I just can't get where that place is!


Create a VPN network between a live server and private networks

I have a VPS (Cent OS 6) on a live IP. I have several other machines (All linux, mostly Cent OS 6 and a few Android devices) sitting behind NATted ADSL Routers on several sites. I need to create a VPN between them, so that any device can ping or ssh into other devices participating in the VPN. Live Server can act as the host. Security is important. I fairly comfortable with Linux CLI, but I don't know where to start for this project. My questions is, What are the steps that I need to do to achieve the above setup?


IMAP mail notifier for window manager/task bar?

I am searching for a small new-email-notifier for IMAP mailboxes that displays it's status in the icon-bar (how do you call it?) of a window manager. Basically some biff/xbiff like tool ported to 21th century technology. ;) I am using awesomewm, which is able to display in its taskbar the 'applets' (?), which also work under gnome (I guess that it implements some freedesktop standard). Basic requirements:   * should not waste memory/CPU (e.g. a pythonGTK based solution probably would)   * support for IMAPS, and should check the host TLS certificate   * configurable poll intervalls   * should not distract too much   * nice interface Nice to have:   * optional configuration of a user defined action (executing an external command)


List of software preinstalled in Linux Mint?

Is there a complete list of software (not package) preinstalled in Linux Mint?


Smooth scrolling - where does it come from?

So, I've been dealing with Ubuntu and other Debian-based distros for a while and kinda like Crunchbang. But I've been also noticing that Ubuntu (as well as LMDE) comes with that fancy/nice/eyecandy feature called "smooth scrolling" (not just in Firefox/Chrome, I'm referring to the system-wide scrolling experience). I want to have it in Crunchbang as well. I've been searching the web for documentation about the feature for weeks, but I can't find anything! I could just understand (and I'm not even sure) that smooth scrolling has to do with GTK+ (and Synaptics driver perhaps?), and nothing else. To make it clear, I'm referring to the same difference between scrolling in WinXP (commonly 3 or 5 lines at time) with a mouse wheel and scrolling in OSX with their clickpads (where it is more like swiping on a touchscreen). If it is of any importance, I'm running Crunchbang in a Samsung Series 9, with an Elantech clickpad. Could you please help me find the way to learn more? Or do you know any guide to get it working in Crunchbang?


libvirtd (KVM) doesn't reload the kernel when I reboot the machine

I'm using `Direct kernel boot` with libvirtd and KVM as backend. ![enter image description here](http://i.stack.imgur.com/tOexa.jpg) But, every time I recompiled the kernel, and reboot inside the VM, the changes doesn't reflect until I do a `Force off` and `Power on` again. I'm wondering, if there's any way to change that behavior? I want the new kernel loaded every time I reboot inside the VM.


Badblocks on 2TB external USB disk

I'm running badblocks on a 2TB external USB drive (WD Elements) for about 4 days now and it is still running. I initiated the command as follows: > /sbin/badblocks -wsv -o badblocks-ext-disk.txt /dev/sdc It's output untill now has been:               Checking for bad blocks in read-write mode     From block 0 to 1953481728     Testing with pattern 0xaa: done     Reading and comparing: done     Testing with pattern 0x55: done     Reading and comparing: 857148544 / 1953481728      I'm not really familiar with badblocks and can't imagine that it should take this long. I would imagine badblocks should already have put some contents in `badblocks-ext-disk.txt` but it's still 0 bytes. So now I guess that it will write it's output when it finishes the scan. Can I cancel badblocks and still get some useful results? Are there any other tips you can give me on analysing this disk on defects? And what is causing the long scan?


Python file issue from root path

I have a script that is well-tested and known to be working. I am running into an issue with it where when I try to run it from `/root/backup/script.py` or `~/backup/script.py` I get a file not found error from the script when it runs and looks for other files called from within the script. It works on other machines but settings are the same and it works if I am in my home directory and run `python backup/script.py` or run it directly with `python script.py` it works. The files it is trying to get are inside the same directory as script.py so I can't see what's wrong. It works to get the first file the script calls but fails to get this one. I am thinking it could be some kind of path issue as it works on other systems if it is done the same way. **EDIT** after reading the first comment I have posted the code snippet that is falling over and realised that the first file is also not being found like I said it was sorry for the mistake here is the code. As I said above it works from other location but not the two I mentioned.               storage = Storage("user_creds.dat")     credentials = storage.get()     if credentials is None or credentials.invalid:             credentials = run_flow(flow_from_clientsecrets("client_secrets.json", OAUTH_SCOPE, ), storage, fla$


How to intall sumtool on redhat 6

This is the version of my redhat system ;               2.6.32-71.el6.x86_64      I need to install a tool called sumtool While I tried `yum install sumtool`, it says:               Setting up Install Process     No package sumtool available.     Error: Nothing to do


Bash command that uses wildcard in place of folder to copy folder contents of multiple files into one directory?

I have a directory `~/dir` that contains a bunch of random folders like: `~/dir/av 801` and `~/dir/lm 320`. I want to copy the contents of every inner folder (ie: av 801) into a different directory. The contents of that folder can consist of folders or files. This is what I guessed the bash command would be:               cp ~/dir/*/* ~/target/      But it gives this error: > cp: when copying multiple files, last argument must be a directory Is there a bash command that can do such a thing?


How can I use aliases in commands?

I have created `aliases` in my `.bashrc` for various frequently used long paths but I can not seem to be able to use them inside `vim` or with commands such as `find` or `grep`.   E.g the following:   `db`   in cli does `cd /some/very/long/path/db`   But in vim this:   `:e db/file.java`   or on the command line: `grep -r string db` do not work.   How is this fixed?


Which tools for ASCII portfolio visualization?

I. I want to do a simple graph from timestamp `YEAR-month-day` to `valuation`, not wanting to use spreadsheets. Is there some ASCII tool for it to see it on CLI? There are over 500k lines of data, and I want to see only a sketch of it like in Ascii:               Value     |          *     |    *   *   *     |  *   *       *   *     |*               *     |----------------------> Timestamp      II. Then, I want to see allocation like in pizza slices:                       - - -          -\       -        -    \ World -       - Food \ Index -        -    /  \   -          - /oil \-             - - -      I know how-to-get grappy CSV data in Python but totally newbie in visualization:               import csv     csv_reader = csv.reader(open('data.csv', 'rb'), delimiter=';')     for row in csv_reader:         # do something with row....      Before I do my own ASCII visualization thing, I want to know whether such thing exists. How do you visualize your portfolio in ASCII?


Linux cryptography with hidden hardware-stored key

I am running Linux on iMX233, an ARM CPU with hardware-accelerated AES engine. The AES key can be programmed permanently into the chip ROM (OTP). This key is not directly accessible by software. Programs just invokes the engine and it performs encryption/decryption on the given data block using the internal key and returns back the result to the program. This feature is not implemented into iMX kernel as a standard Linux crypto device. Instead, a properietary IOCTL exists for accessing this feature. What do you suggest as the best practice for data encryption based on this feature?   * Is there a data encryption tool that can support such a feature out of the box?   * or should I develop custom kernel crypto device driver and use dm-crypt or loop-aes? Is it possible at all when no key can be supplied externally to the algorithm?   * or should I develop custom user space code?   * ...


What does su - `whoami` command do?

I am running a script in my project and I see this command               su - `whoami`      I am having a few basic questions:   1. What does this command do ?   2. What is the significance of `` quotes outside the whoami command ?   3. What is - used for ? I know `su` stands for switch user.


Highlight the current date in cal

I would like to highlight today's date in the output of the `cal` command. What is the best way? This is what I have so far:               cal -m | grep -C6 --color "$(date +%e)"      but it doesn't work for all cases e.g, when the date has a single digit. I also want the highlighting to work when I display the calendar for a year.


Dual monitors and panels

I have a question with regard to a multiple monitor setup. I'm currently primarily a Windows user, but I've been running Ubuntu in dual boot to get a feel for it. The one thing I find lacking that will (I feel) force me to choose Windows over any Unix system for general use is the seeming lack of adequate support for multiple taskbars (or panels, as they're referred to in Ubuntu) on multiple screens. I've googled, I've searched here, I've read every old forum post I could find, and found information numerous times that suggest I should be able to move panels from one screen to another. Now, this might sound silly, but they won't move to my secondary screen. I can add, remove and move around panels on the main screen, but they'll never drag to the secondary screen. Even if I could drag panels across screens correctly, this doesn't necessarily solve my problem anyway: On Windows I use Ultramon. I get two displays, and a secondary taskbar that shows windows/tasks specific to that second screen. I'm looking for something similar, or as close to it on Unix; supporting Ubuntu would be preferable but I could always switch to something else (my important stuff is all in Windows right now). **Is there a Unix application available (free or not) that will provide multiple monitor panels/taskbars?** Or alternatively, is there a way to hack in similar functionality?


/etc/profile is not read in changed user shell

I need to run custom binary when user logged in to system ,so that I have changed user's shell to /bin/binary to /etc/passwd but I have observed that /etc/profile file was not read when I logged in with changed user's shell So /etc/profile will be only read if user's shell is /bin/sh in /etc/passwd??


Input a list of files & directories to be copied with ditto

I have a short list of files and directories of which I would like to make a flat copy of using ditto in a bash shell. There are approximately 8-10 files and/or directories that need to be copied. I know that I can just create a series of conditional statements such as:               if [ -d ~/Documents ];     then       ditto ~/Documents ~/BACKUP/Documents       echo "Documents copied successfully."     else       echo "WARNING: No documents were copied, directory does not exist in expected location."     fi      However, I am curious if there is a stylistically better or more efficient way of accomplishing this task? Another approach that I have considered is creating an array that holds the files/directories and then using a loop to move through the array to copy each file. Thoughts? Ideas? Insights? Best practices?


Linux Terminal SSH Username Change

I want to connect via ssh to my Ubuntu server from my Linux PC. Xterm uses my Linux PC username for the login. I've another username on the server. It's not the same name like on my Linux PC. How can I change the username? The client always says that the password is incorrect with the clients username.


Has my machine been compromised?

I have a bunch of lines in my machine if I use "ps aux". Here are the lines:               samp      8413  0.0  0.0    968   564 ?        S    12:28   0:00 ./ssh 150     samp      8419  0.0  0.0    956   380 ?        S    12:28   0:00 ./ssh 150     samp      8420  0.0  0.0    956   380 ?        S    12:28   0:00 ./ssh 150     samp      8421  0.0  0.0    956   384 ?        S    12:28   0:00 ./ssh 150     samp      8422  0.0  0.0    956   384 ?        S    12:28   0:00 ./ssh 150     samp      8423  0.0  0.0    956   396 ?        S    12:28   0:00 ./ssh 150     samp      8424  0.0  0.0    956   384 ?        S    12:28   0:00 ./ssh 150      Just a few out of hundreds. I don't know what "./ssh 150" is or what it does, but I know it shouldn't be there. Or am I wrong? Edit: All my logins are fine under "root". However, under "samp", I have weird lines:               samp     pts/1        quannei.de       Wed Jan 29 07:59 - 08:01  (00:01)     samp     pts/0        go2tech.de       Sat Jan 11 11:24 - 11:24  (00:00)


Print last element of each row

How can one print the element after the last tab in a file? Exemple: File1               A    3    8    6    7     B    4    6    2    3    6    8     c    1    9      would return:               7     8     9


how to add wamp feature to lamp

I am used to do web development using wampserver in windows but recently I wanted to move to Linux and I am using LAMP now but I found that some useful feature in wampserver are not available in LAMP like :   * switch online/offline   * stop all services   * restart all services   * start all services How can I add those feature to Lamp especially switch online/offline? **edit : What i mean with switch online/offline is to give access to everyone or only localhost**


How can I know the default path for log directory?

I am programming in **shell scripting** , and would like to log results. Is there any way to know what is the **default path storage for logfiles** in my operating system? I have researched:               set | grep "log" -i      but there is nothing that seems to be like a log path directory.


How to make .bashrc call dependant on tmux program being installed?

I have a section in my .bashrc that fires up the tmux program (terminal multiplexor). However if the tmux program isn't installed (say I'm setting up a new computer) then having this in my .bashrc file stops any terminal window from successfully opening at all. Of course installing tmux fixes this, but that isn't my problem. How can I make this conditional so that if tmux **isn't** installed it doesn't crap out / give an error message? Currently I have:               if [[ ! $TERM =~ screen ]]; then       exec tmux     fi      I want something like:               if tmux; then       if [[ ! $TERM =~ screen ]]; then         exec tmux       fi     fi      but that gives me               The program 'tmux' is currently not installed.  You can install it by typing:     sudo apt-get install tmux      Though it does at least give me a terminal prompt instead of closing the window! Also if/when tmux is installed this doesn't give any error / cause any issue when opening a new terminal window.


What is the minimum version for liblgrp support on Solaris

What is the minimum version of Solaris SunOS that supports liblgrp?


How do I force ssh to use a second interface with higher metric?

I have a Crunchbang VM with two interfaces, `eth0` and `eth1`, each of which connects to an OpenWRT VM (`eth0` being `10.232.64.20` and `eth1` being `10.232.65.20`). I'm using Network Manager and DHCP. My overall goal is having multiple `ssh` connections, and bonding them with `ifenslave`. By default, `eth1` (for some reason) is the default gateway:               user@crunchbang:~$ ip ro     default via 10.232.65.1 dev eth1  proto static     10.232.64.0/24 dev eth0  proto kernel  scope link  src 10.232.64.20     10.232.65.0/24 dev eth1  proto kernel  scope link  src 10.232.65.20      I added a route for `eth0`:               user@crunchbang:~$ sudo ip route add default via 10.232.64.1 dev eth0  proto static metric 1      Then I have two routes:               user@crunchbang:~$ ip ro     default via 10.232.65.1 dev eth1  proto static     default via 10.232.64.1 dev eth0  proto static  metric 1     10.232.64.0/24 dev eth0  proto kernel  scope link  src 10.232.64.20     10.232.65.0/24 dev eth1  proto kernel  scope link  src 10.232.65.20      However, `ssh` only gets out via `eth1`:               user@crunchbang:~$ ssh -b 10.232.64.20 user@1.2.3.4     ssh: connect to host 1.2.3.4 port 22: Connection timed out          user@crunchbang:~$ ssh -b 10.232.65.20 user@1.2.3.4     Enter passphrase for key '/home/user/.ssh/id_rsa':       After changing the `eth0` metric I have:               user@crunchbang:~$ ip ro     default via 10.232.64.1 dev eth0  proto static  metric 1     default via 10.232.65.1 dev eth1  proto static  metric 2     10.232.64.0/24 dev eth0  proto kernel  scope link  src 10.232.64.20     10.232.65.0/24 dev eth1  proto kernel  scope link  src 10.232.65.20      And now `ssh` only gets out via `eth0`:               user@crunchbang:~$ ssh -b 10.232.64.20 user@1.2.3.4     Enter passphrase for key '/home/user/.ssh/id_rsa':           user@crunchbang:~$ ssh -b 10.232.65.20 user@1.2.3.4     ssh: connect to host 1.2.3.4 port 22: Connection timed out      How do I force `ssh` to use an interface with a higher metric? **Edit** I have implemented and tested the configuration in the 4.2. Routing for multiple uplinks/providers section of the Linux Advanced Routing & Traffic Control HOWTO. Given that the configuration is simple, and that I didn't encounter errors, I'll just show code and results, with minimal explanation.               root@crunchbang:~# ip route add 10.232.64.0/24 dev eth0 src 10.232.64.20 table T0     root@crunchbang:~# ip route add default via 10.232.64.1 table T0     root@crunchbang:~# ip route add 10.232.65.0/24 dev eth1 src 10.232.65.20 table T1     root@crunchbang:~# ip route add default via 10.232.65.1 table T1     root@crunchbang:~# ip route flush table main     root@crunchbang:~# ip route add 10.232.64.0/24 dev eth0 src 10.232.64.20     root@crunchbang:~# ip route add 10.232.65.0/24 dev eth1 src 10.232.65.20     root@crunchbang:~# ip rule add from 10.232.64.20 table T0     root@crunchbang:~# ip rule add from 10.232.65.20 table T1     root@crunchbang:~# ip route add default scope global nexthop via 10.232.64.1 dev eth0 weight 1 nexthop via 10.232.65.1 dev eth1 weight 1      Here are the routing tables generated:               root@crunchbang:~# ip route show table T0     default via 10.232.64.1 dev eth0      10.232.64.0/24 dev eth0  scope link  src 10.232.64.20           root@crunchbang:~# ip route show table T1     default via 10.232.65.1 dev eth1      10.232.65.0/24 dev eth1  scope link  src 10.232.65.20           root@crunchbang:~# ip ro     default          nexthop via 10.232.64.1  dev eth0 weight 1         nexthop via 10.232.65.1  dev eth1 weight 1     10.232.64.0/24 dev eth0  scope link  src 10.232.64.20      10.232.65.0/24 dev eth1  scope link  src 10.232.65.20       With that configuration, ssh connects via both interfaces:               user@crunchbang:~$ ssh -b 10.232.64.20 user@1.2.3.4     Enter passphrase for key '/home/user/.ssh/id_rsa':           user@crunchbang:~$ ssh -b 10.232.65.20 user@1.2.3.4     Enter passphrase for key '/home/user/.ssh/id_rsa':       However, it does appear that I need to lose Network Manager. If anyone could explain why that's a bad idea, or warn of pitfalls, I would appreciate it. **Edit2** Removing Network Manager went well. I have just one last question. What is the current standard way to load the configuration at boot?


Use ssh with a specific network interface

I'm using `openconnect` to connect to vpn. After entering my credentials, I get this:               POST https://domain.name/...     Got CONNECT response: HTTP/1.1 200 OK     CSTP connected. DPD 30, Keepalive 30     Connected tun0 as xxx.xxx.xxx.xxx, using SSL     Established DTLS connection      Running `ifconfig` shows I have a new network interface `tun0` with a certain ip address. Question: How do I make `ssh` use only the network interface `tun0` so that I can access computers on that private network? **Edit:** My network configuration (`route -n`) seems to be this:               172.16.194.0    0.0.0.0         255.255.255.0   U     0      0        0 vmnet8     192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0     172.16.25.0     0.0.0.0         255.255.255.0   U     0      0        0 vmnet1     169.254.0.0     0.0.0.0         255.255.0.0     U     1000   0        0 eth0     0.0.0.0         192.168.0.1     0.0.0.0         UG    100    0        0 eth0


How does bash continue to work correctly when you move its working directory?

On Linux, I moved a directory to another directory using `mv`, and in another shell, my working directory happened to be the directory that was moved. I ran `hg pull` in that shell, and to my surprise, it ran correctly in the new working directory - without me having to type `cd`. How did that work?


How can I access a shared folder from R on Ubuntu to a 2nd Ubuntu machine using Samba?

I have two machines running Ubuntu 12.04 LTS with Samba installed. I have access to myshared folder as expected. However, when setting in R the path `smb://mymachine1/mysharedfolder` to read a file it does't find the directory. I'm new to Ubuntu so I'm sorry if my question results obvious to you.


Run command automatically after login?

Another quick question. I have installed f.lux on Ubuntu 12.04, however the program refuses to work unless I run a command               xflux -l [longitude] -g [latitute] -k [temperature]      So I've created an alias with my settings so that I simply have to type the command `startflux` in a terminal at login. I want to automate this process so that my alias (or the full command above) will run after login, how would I go about doing so? I've read bits and pieces about editing the `rc.local` file, however trying this didn't seem to work? What exactly is the `rc.local` file and `etc/init.d/` and how are they used? Thanks!


Is it safe to add . to my PATH? How come?

I've seen people mention in other answers that it's a bad idea to include the current working directory ('`.`') in your `$PATH` environment variable, but haven't been able to find a question specifically addressing the issue. So, why shouldn't I add `.` to my path? And if despite all warnings I do it anyway, what do I have to watch out for? Is it safer to add it to the end than to the the start?


how do I do this: dd if=coolstuff.iso of=(ssh kev@mypi )

the card reader on my laptop doesn't want to work. can I use dd (or some other tool) to write an image to a networked disk. I am trying to replace one raspberry pi distro with another. The SD card has 6gb free and uses only 2gb. from the SD card               $ sudo parted -l     Model: SD SU08G (sd/mmc)     Disk /dev/mmcblk0: 7948MB     Sector size (logical/physical): 512B/512B     Partition Table: msdos     Disk Flags:           Number  Start   End     Size    Type      File system  Flags      1      1049kB  95.4MB  94.4MB  primary   fat16        lba      2      95.4MB  1878MB  1783MB  extended      5      96.5MB  1878MB  1782MB  logical   ext4      3      1878MB  7948MB  6070MB  primary   ext4      And **Please** , before you criticize why I want to do this, answer the question... then tell me how stupid I am.


How to compile xbindkeys

I cloned the git repository of `xbindkeys` using:               git clone git://git.sv.gnu.org/xbindkeys.git      I want to compile it. How can I do this? Where can I find the compile instructions? What are the dependencies?


In Debian 6, how to start a daemon as a different user?

I'm trying to start the Tor daemon as another user. When it installs, Tor automatically creates a new user "debian-tor", however, it does not run as this user, but rather as root. In Debain 5 I removed Tor from start up with Update-rc.d, and added a new start up script that basically does `su debian-tor -c '/etc/init/tor $1'`. This worked great, but in Dabian 6 (using insserv instead of update-rc.d) it asked for **debiant-tor** 's password (in spite of running as root). I'm at a loss here, my iptables will only work if Tor runs as a different user, and it's much safer not to run it as root. What can I do?


How to force rsync to overwrite read-only archive files?

I'm using `rsync` to copy some source code. The copied code must not be modified at the destination place by my mistake while code editing. So I set `\--chmod=u-w` flag to make it read-only after copying.                rsync --delete -a --chmod=u-w      First is working well. But from second time `rsync` cannot perform copying because destination is read-only.               rsync: delete_file: unlink "/path/file1" failed: Permission denied (13)     rsync: delete_file: unlink "/path/file2" failed: Permission denied (13)     rsync error: some files could not be transferred (code 23) at /SourceCache/rsync/rsync-42/rsync/main.c(992) [sender=2.6.9]      I believe there's some feature that forces `rsync` to overwrite any files regardless of readonly or writable. How can I do that?


Static IP config no longer persistent in CentOS6

I was messing around with KVM in CentOS 6.3 when I noticed I was having problems with the IP address of my principle network connection (eth0). I backed out my bridge and restored the network-script file for eth0 but the IP address still goes missing after reboot. At this point I have to return to the console and restart the "network" service. The address will then be restored but only until the next boot. I have turned off NetworkManager but this does not seem to help. The ifcfg is below:               *DEVICE=eth0      ONBOOT=yes      BOOTPROTO=static      NM_Controlled=no      IPADDR=192.168.17.49      NETMASK=255.255.255.0      GATEWAY=192.168.17.1         DEFAULT=yes DNS1=67.69.184.212*      Any ideas?


What is happening exactly when I install a package with yum?

I'm running F17 from Terminal. I was wondering what is happening in the background when I `yum install packagename`. Is that package being searched for on my browser? Where is it being downloaded from? Is that a default location?


How to find the url of the saved web page?

I am facing this issue since long. I open a web page and save on my hard drive. Later I open the saved file. But suppose I want to know the url of the same page, how to know that. As I have no idea of how to get the url, I again have to search for the page in google. Does url also gets saved somewhere while saving the web page?


What does "kernel-resident" mean?

Quoting from the `ifconfig` man page: > `ifconfig` is used to configure the kernel-resident network interfaces. It > is used at boot time to set up interfaces as necessary. After that, it is > usually only needed when debugging or when system tuning is needed. What does kernel-resident mean?


adding text to filename before extension

I would like to add text to the end of filename but before the extension. Right now I am trying, `for f in *.shp; do echo $f_poly; done` the output is,               Quercus_acutifolia.shp_poly     Quercus_agrifolia.shp_poly     Quercus_corrugata.shp_poly     Quercus_cortesii.shp_poly     Quercus_costaricensis.shp_poly     Quercus_havardii.shp_poly     Quercus_hemisphaerica.shp_poly     Quercus_kelloggii.shp_poly     Quercus_knoblochii.shp_poly     Quercus_laceyi.shp_poly      I want it to be,               Quercus_acutifolia_poly.shp     Quercus_agrifolia_poly.shp     Quercus_corrugata_poly.shp     Quercus_cortesii_poly.shp     Quercus_costaricensis_poly.shp     Quercus_havardii_poly.shp     Quercus_hemisphaerica_poly.shp     Quercus_kelloggii_poly.shp     Quercus_knoblochii_poly.shp     Quercus_laceyi_poly.shp


Substitute part of text file using bash script

I'm writing a shell script (bash) to fetch and build several bits of software. The script also writes several small config files and needs to alter a couple of pre-existing config files. What is the best way to find and substitute a few lines of a text file from a bash script? This sounds like a job for `sed`, but I don't understand the syntax...


Having nVidia OpenGL 32bit driver on a 64bit Debian system in multiarch

I'm trying to install 32 bit nVidia drivers on my 64-bit system (to get wine working with OpenGL). So I tried:               root@grzes:/lib# aptitude install libgl1-nvidia-glx:i386 libxvmcnvidia1:i386     The following NEW packages will be installed:     libgl1-nvidia-glx:i386 libxvmc1:i386{ab} libxvmcnvidia1:i386     0 packages upgraded, 3 newly installed, 0 to remove and 2 not upgraded.     Need to get 6,661 kB of archives. After unpacking 32.2 MB will be used.     The following packages have unmet dependencies:     libxvmc1 : Conflicts: libxvmc1:i386 but 2:1.0.7-1+deb7u2 is to be installed.     libxvmc1:i386 : Conflicts: libxvmc1 but 2:1.0.7-1+deb7u2 is installed.     The following actions will resolve these dependencies:     Remove the following packages:      1) kaffeine      2) kplayer      3) libxine1-x      4) libxine2-x      5) libxvmc1      6) libxvmcnvidia1      7) mencoder      8) mplayer      9) mplayerthumbs      10) nvidia-glx      11) smplayer      12) smplayer-themes      13) smplayer-translations      14) task-desktop      15) task-gnome-desktop      16) xine-ui      17) xserver-xorg-video-all      18) xserver-xorg-video-intel      19) xserver-xorg-video-openchrome          Leave the following dependencies unresolved:      20) digikam recommends mplayerthumbs      21) libgl1-nvidia-glx recommends libxvmcnvidia1      22) nvidia-kernel-dkms recommends nvidia-glx (>= 304.88)     23) youtube-dl recommends mplayer2 | mplayer      Accept this solution? [Y/n/q/?] q     Abandoning all efforts to resolve these dependencies.     Abort.      However, as you can see there is a conflict. How can I make it work?


How to get data shown out of workspace or directly from application?

Because of some reason I had to use another web browser than my main which I use daily and I chose a small browser which I installed long time ago. This brower is called Dooble, version 0.07 (dooble-0.0+svn874) and I have been using it about 2 weeks. In this period of time I opened a lot of sites which I need to open again in future so I need a browsing history. I checked before start of using it that it keeps this history. Now I would like to get an access to the history and save it or export or just look at it. But there is a problem with it. The history is shown on a list, which is in menu bar, like File, Edit or Help. The list is too large to display it on the visible workspace. It rolls down to the end of the workspace and then to the right with no limit (just go out from the screen) and about 95% of content is outside of the visible part of the workspace, so I can't see the history although the browser keeps it. I decided to get it in other way. I was looking for the history on the disk, because I suspected that it may be stored in a file. I checked the list of files it using/generated with command "lsof" and there is no file connected with Dooble. I also searched in ram memory, I copied an image of ram and opened in hex editor and looked for appropriate string with no results. The idea to take a screenshot of the active window is also wrong because it takes only the visible part. There is no possibility to change a resolution of a display in my case. I suppose that browser may encrypt the history stored in ram, like it does in the current version, but my version is very old (2008 probably) and I have no documentation or help files to this with specification. Moreover I use swap, but I can't read its contents. The swap is a file and when I copy it and open like the image of ram there is nothing inside except zeros - the file is full of zeros although swap is full in some part which I can see typing "free" in terminal. Here is the source of this version: http://dooble.sourcearchive.com/documentation/0.0plus- psvn874-0ubuntu2/dir_9cc8d803eb63e208c05c995ec1941f6c.html , I'm not programmer and don't understand it but maybe it would be helpful in finding any solution, if so tell me please how can I use it. I use Ubuntu and Gnome. I can't close the browser and obviously system because the history will be deleted permanently. I really believe that there are people here who know what to do in my case. I'm not good in IT, so I will appreciate every hint.


RHEL - GDM could not write to authorization file

I am getting an error as " **GDM could not write to your authorization file** " if I try to login as a non root user in my RHEL system. I restarted the machine hoping that the _tmp_ files will be cleared and so I will not get this error on booting. However, I still get the error. I ran the `df -h` command and I got the below output.               Filesystem            Size  Used Avail Use% Mounted on     /dev/sda2              39G   39G     0 100% /     /dev/sda5             102G   33G   64G  34% /opt     /dev/sda1              99M   12M   83M  13% /boot     tmpfs                 1.5G     0  1.5G   0% /dev/shm      I read in this link that clearing log files should help. But `logrotate` should be doing it and even if I delete the log files I might encounter the same error in future. Is there any specific reason for this error? What should I try to increase the space on `/dev/sda2` so that I can ensure non-root users can login to the machine?


.inputrc TAB not behaving as expected

I'm on a roll today, here's another question: How come when I put these into `.inputrc`, they both do the same thing?               TAB: menu-complete     Shift-TAB: menu-complete-reverse      i.e. they both do whatever the last one says.


Creating a file counter that includes hidden files

As part of a programming assignment I need to create a piece of code that will count the number of files and directories (including hidden) recursively. I'm not allowed to use the commands `-R`, `find` or `du`. I understand that I can use:               listAllFiles() {     local dir=$1     local file     directoryCounter=0     fileCounter=0     hiddenFileCounter=0     hiddenDirectoryCounter=0          for file in "$dir"/*; do         if [[ -d $file ]]; then             listAllFiles "$file"             directoryCounter+=1         else if [[ -f $file ]]             fileCounter+=1        else if [[hidden directory]]             hiddenDirectoryCounter+=1        else if [[hiddenfile]]             hiddenFileCounter+=1         fi     done}      Is there a way for me to include hidden files and directories in this else if statement.


Fedora 19 Eclipse/NetBeans do not recognize Samsung Galaxy Note phone

I cannot force Eclipse/Netbeans under Fedora 19 to recognize my Samsung Galaxy Note phone and therefore I cannot deploy app neither run it neither debug it. Can someone explain me what do I have to do so IDEs will recognize my phone? From terminal, if I use `lsusb` command, my phone is visible under USB tree.


Rebooting fails randomly

That is, the following command fails at times:               $ sudo reboot      The last message on terminal, after which the machine gets stuck, requiring a power cycle:               Restarting system.      I tried the following `reboot=` boot parameters (source) without success:   * warm   * cold   * triple   * acpi   * force   * efi As advised on that page, I verified by running the following command to ensure the changes took effect:               $ cat /proc/cmdline      In case it might be helpful, here's a list of kernel modules:               $ lsmod      Module                  Size  Used by     ppp_generic            16680  0      slhc                    4055  1 ppp_generic     ath9k_htc              50685  0      mac80211              231186  1 ath9k_htc     ath9k_common            1720  1 ath9k_htc     ath9k_hw              338115  2 ath9k_htc,ath9k_common     ath                    13793  3 ath9k_htc,ath9k_common,ath9k_hw     cfg80211              158343  3 ath9k_htc,mac80211,ath     compat                 29364  5 ath9k_htc,mac80211,ath9k_common,ath9k_hw,cfg80211      This is on an ARM system, running a custom-built Linux **2.6.35**. Also, there is no X server installed, so no Desktop Environment.


Background task finished notification syntax

Last night, before abandoning my computer for the evening, I started a bunch of compiler jobs so they'd be ready in the morning, using `make -f alpha.mak &>alpha.out &`. When I came back and hit return, I saw the following output:               [1]   Done                    make -f alpha.mak &>alpha.out     [2]-  Done                    make -f beta.mak &>beta.out     [3]+  Done                    make -f gamma.mak &>gamma.out      My question: What do the `+` and `-` symbols mean in that output? I'm using bash on RedHat 6.


Repo source for firmware-linux-nonfree?

Which repository source do I need to add to my sources.list to access the package firmware-linux-nonfree? I am using Deb 6 testing 32 bit.


Help installing USB wifi drivers in Debian Wheezy

The Leoxsys Nano adapter that I bought recently does not work in my Debian wheezy, but works flawlessly in my Ubuntu. I tried installing using the `install.sh` script that came with the drivers, but still no luck. This is the output of `install.sh` (the timestamp errors are repeated for various different files. I have removed some of them because the posts was too long, you can see the entire output here:               rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/rtl8188eu_xmit.c     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/rtl8188eu_xmit.c: time stamp 2012-11-16 13:06:39 is 280134634.419668702 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/usb_halinit.c     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/usb_halinit.c: time stamp 2012-11-16 13:06:39 is 280134634.417253308 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/usb_ops_linux.c     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb/usb_ops_linux.c: time stamp 2012-11-16 13:06:39 is 280134634.416732716 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/ifcfg-wlan0     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e/usb: time stamp 2012-11-16 13:06:39 is 280134634.41663481 s in the future     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal/rtl8188e: time stamp 2012-11-16 13:06:37 is 280134632.416591435 s in the future     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/hal: time stamp 2012-11-16 13:06:34 is 280134629.416553349 s in the future     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/ifcfg-wlan0: time stamp 2012-11-16 13:06:37 is 280134632.416436593 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/autoconf.h     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/autoconf.h: time stamp 2012-11-16 13:06:39 is 280134634.416238385 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/basic_types.h     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/basic_types.h: time stamp 2012-11-16 13:06:38 is 280134633.416090583 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/byteorder/     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/byteorder/big_endian.h     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/byteorder/big_endian.h: time stamp 2012-11-16 13:06:38 is 280134633.415909986 s in the future     rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/byteorder/generic.h     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/byteorder/generic.h: time stamp 2012-11-16 13:06:38 is 280134633.415770465 s in the future          [...]          rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/rtw_xmit.h     tar: rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116/include/rtw_xmit.h: time stamp 2012-11-16 13:06:38 is 280134633.360691402 s in the future     Please select card type(1/2):     1) RTL8188eus     2) RTL8189es     #? 1     You have selected RTL8188eus     rtw_version.h has existed!     Authentication requested [root] for make clean:     rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~     rm -fr .tmp_versions     rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order     cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd hal/rtl8188e/usb ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd hal/rtl8188e ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd hal/OUTSRC/rtl8188e ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko      cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko      cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko     Authentication requested [root] for make driver:     make ARCH=i386 CROSS_COMPILE= -C /lib/modules/3.2.0-4-686-pae/build M=/home/vivek/Linux/driver/rtl8188EUS_rtl8189ES_linux_v4.1.2.2_5805.20121116  modules     make: *** /lib/modules/3.2.0-4-686-pae/build: No such file or directory.  Stop.     make: *** [modules] Error 2     ##################################################     Compile make driver error: 2     Please check error Mesg     ##################################################     root@debian:/home/vivek/Linux#


Including .bash_profile over ssh

I am trying to write a script that will:   1. Copy files to a server (I already have a script `copy.sh` that does this task)   2. ssh to that server   3. cd to the directory where the files I just copied are   4. run `make`   5. copy the resulting binary from `make` to another location. My script looks like this:               #!/usr/bin/bash     BUILDSERV=me@server     BUILDDIR=/me/directory          #run my script that copies the files     ./copy.sh          #TARGET is also a var in copy.sh so I make sure it's set properly here     TARGET=root@final_dest:/usr/bin/my_bin          ssh $BUILDSERV "cd $BUILDDIR && make && scp ./my_bin $TARGET"      The issue is that a program I want to run as part of `make` is not in my `PATH`. My `.bash_profile` has a `export PATH=$PATH:/my/bin/` line, but it seems that `bash_profile` is not being read when I ssh in. Is there a way to change my ssh invocation or script in general to make it read my `.bash_profile`?


Is there a way to use/recompile libgio-2.0 on machine with libc-2.5?

I have a program (JavaFX 2, namely), and one of its binaries (libglass.so) requires `libgio-2.0.so.0`. The problem is, the system, on which I need to run the app, is quite old and mostly out of my control (thus I can't update it). I tired copying `libgio` from my machine there, but only to find that `libgio` requires `GLIBC_2.9` - and target machine only has libc-2.5. Is there a way to work around this behavior?


PHP file recursive change array key on find

I used PHP array   > `$lang['module']['1'] = 'Title';`   >  `$lang['module']['2'] = 'Title2';`   >  `$lang['value'] = 'text123';`   > how i can use replace in terminal Key Value to CASE UPPER ? > `$lang['VALUE']`   >  `$lang['MODULE']['1']`   >  `$lang['MODULE']['2']`   >  etc `..` recursion `find /var/www/site.net/blog/ -iname '*.php' | xargs grep -E '\$lang\\[' -sl` finded only $lang[ ... Please help me.


Viewing a screencast encoded with camtasia

I have downloaded the screencast on this page, http://jaderholm.com/screencasts/org-mode/. I can watch in firefox but the viewer has limited controls. So I would rather watch it on a regular video application. The thing is I've tried everything and I get sound in all and video in none. "mediainfo" says it is using the "Shockwave" codec. It is obvious the video was made with Camstudio. I seem to remember that Camstudio uses it's own proprietary codec for recording. Is there an actual Shockwave codec? How can I view a video encoded with it on Linux? How an I view a video using the Camtasia codec on Linux. * * * PS. Technically I am not supposed to link directly to that video since the URL is subject to change. I am supposed to link to: http://jaderholm.com/screencasts.html


How can I check, if my cronjob is runnning on my server via PHP?

I would like to give out a warning If cron is not running or if a certain cronjob is not set in crontab on my server. Is this possible to check with php?


Suppress desktop notifications in fullscreen VLC

How to prevent desktop notifications from showing up when VLC is in fullscreen mode? Some of my scripts display desktop notifications using `notify-send`. The best solution would be to configure that `critical` notifications still show up and `low` prioritised notifications are suppressed. This is how I create the notifications:               notify-send --urgency=low      'Foo' 'Bar'     notify-send --urgency=critical 'Foo' 'Bar'      **EDIT:** I am using Gnome version 3.4.2 and awesome WM v3.4.14 on Debian GNU/Linux sid. It does not make a difference if the Gnome `notification- daemon` is started or if awesome is in charge of displaying the notifications.


Crontab job start +1 min after @reboot

Need a script executed at each reboot in +1 minute. I placed a record `@reboot` but it is too early for my script. How to execute it sometime after reboot?


DEL accel reseted in every boot. (Debian Testing, Nautilus)

Yesterday I did an install of Debian Testing without desktop environment. After installation finished, I installed gnome-shell and gnome-core. I'm facing a problem with Nautilus and DEL for move to trash files. Now the default shortcut is CTRL+DEL but it can be changed (I have done it in all my distros) with dconf-editor in org->gnome->desktop->interface enabling the "can_change_accels" and then going to a Nautilus windows, select a file, go to edit menu, and hit two times DEL in the move to trash action. After this, disable again can_change_accels. The problem I'm having now is that every time I reboot, the configuration is set back to CTRL+DEL. I've never had such problem, not even when I used Debian Testing choosing desktop environment in the installation menu.


Should I let pacman replace glamor-egl with xorg-server?

This is the output of `pacman`. I installed nothing; just wanted to update...               :: Synchronizing package databases...      core is up to date      extra           1761.1 KiB  2.58M/s 00:01 [#######################################################################] 100%      community          2.3 MiB  2.25M/s 00:01 [#######################################################################] 100%      multilib         121.2 KiB  1236K/s 00:00 [#######################################################################] 100%     :: Starting full system upgrade...     :: Replace glamor-egl with extra/xorg-server? [Y/n]      What could cause this? What option should I select?


.Xresources settings in effect

Is there some way to inspect which .Xresources settings are _in effect_ at the moment (unlike `xrdb -query`)? For example, I'm on a host which doesn't seem to respect `*reverseVideo: true`, but I don't know whether that is because I wrote it the wrong way (even `*florb: glorb` doesn't raise an error when running `xrdb -merge $HOME/.Xresources`), because the setting is not supported, or some other reason.


Stitch two JPEGs together into a PDF

I need to take two 8.5in by 11in JPEG images and merge them together into two pages of a PDF. Is there a commandline or GUI tool to help me do this?


Is it possible for a OpenVZ container to interact with a MySQL database on the host?

Say every container and the host itself has its own dedicated, external IP. Is it possible to do this without any problems? And is this really a good plan? Instead of hosting a database per container, hosting a database per host, for all containers to share? This question is sort of related to this one: https://unix.stackexchange.com/questions/114786/giving-ovz-containers-their- own-ip


Append a column

I've trawled through here and a few other places to try and find an answer to this, but it seems so stupidly simple that no one has answered it. All I need to do is add a single value in a new column to the end of every line. The closest thing I've found is using `sed -i "s/$/green/" ./test.txt` but this adds the value green to the next line, I need it added as a new column after the current final column I have a file like this:               chr -   xyz ordered_A01 5480    6144     chr -   xyz ordered_A01 5480    58001      I need it to look like this:               chr -   xyz ordered_A01 5480    6144    green     chr -   xyz ordered_A01 5480    58001   green      But instead I get this:               chr -   xyz ordered_A01 5480    6144     green     chr -   xyz ordered_A01 5480    5801     green


Changing soundtrack in a movie clip

What is the easiest way to change soundtrack of a movie clip? We recorded a clip using our camera, but the sound is not very interesting, hence we would like to use some music instead (we have an mp3 file). How can we swap the original sound in the clip for the one from mp3?


Start notification-daemon as a service

I am running Debian and wish to make use of `notify-send`. But `notify-send` doesn't give me any notification unless I have one of the following running:               # either:     /usr/lib/notification-daemon/notification-daemon     # or:     /usr/lib/notify-osd/notify-osd      I'd like to run one of these as a service, rather than letting them be jobs in my shell. However, when I create a startup script for them in /etc/init.d (using skeleton as a template), trying to start the service results in the following output, and `notify-send` displays no notifications: > (notification-daemon:14467): Gtk-WARNING **: cannot open display:


Unable to reduce core frequency freebsd

I'm working on a FreeBSD project where I need to maintain the temperature of the processor below a threshold value. In order to reduce the temperature I'm trying to dynamically change the frequency of the processor. I've used the following command to set the highest frequency of the processor.               sysctl debug.cpufreq.highest=value (in MHz)      But the change is not happening instantly. I've tried many times and it took random amount of time for changes to take effect. Why is it so?


Low-RAM Linux Distro Specifically for serving static sites

I'm looking for a near-zero-configuration linux distro that is designed specifically for serving static web sites and nothing else on a low-RAM machine (I'm planning on 128MB, but the option of less would be nice). Any ideas of a linux distro specifically tuned for serving static sites in a small footprint?


Squid not forwarding my packets proxied from iptables on router

I am trying to make openwrt's iptables from my router to direct to my squid proxy on my machine (since there is no enough space in router's flash memory) but even if I have my squid config ok ( meaning I set it up as proxy in my system and it works fine) when I set this up I won't get any response               iptables -t nat -I PREROUTING -s 192.168.1.0/255.255.255.0 -p tcp -j DNAT --to-destination 192.168.1.196:3128      What should I change in my config ? I have something like this               iptables -t nat -A PREROUTING -i eth0 -s ! squid-box -p tcp --dport 80 -j DNAT --to squid-box:3128     iptables -t nat -A POSTROUTING -o eth0 -s local-network -d squid-box -j SNAT --to iptables-box      but I do not really understand how should I perform this with my config.               br-lan    Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX                inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0          eth1      Link encap:Ethernet  HWaddr XX:XX:XX:XX:XX:XX               inet addr:188.XXX.XX.XX  Bcast:188.246.39.255  Mask:255.255.252.0


Split logs from cron jobs

I currently have a log file which has no limit and I was hoping to be able to set up a cron job that would start writing to a new file so it doesn't get too big. Would that be possible? So it would keep the old one with a date and start a new one, with a 10MB size limit.


What is the difference between a symlink and binding with fstab?

In Eric Hammond's article Running MySQL on Amazon EC2 with EBS he shows how to add a second drive (`/vol/`) and then progresses to move `mysql`'s config and data there. `/sdh` gets mounted as `/vol` by editing `fstab` and adding:               /dev/sdh /vol xfs noatime 0 0      And next some paths are added like this:               /vol/etc/mysql /etc/mysql     none bind      I don't have a problem with doing this way but I don't quite understand what is going on. I can most closely compare this to using a symlink, something like:               ln -s /etc/mysql /vol/etc/mysql      I've taken a look at `man fstab` without seeing much information about the `bind` syntax and can't find it in the `fstab` section in the Linux Administrator's Handbook either. Can someone shed some light on `fstab`'s `bind` syntax, how it works, what it does, and where I should be able to find more information on it?


Automatic cleanup of Bash history

How can Bash history be automatically cleaned up? For example   * Remove detectable typos from history (`ls-lh` does not show up in `which`, so it is removed, I meant to type `ls -lh`)   * Clean excessive spaces `cd  /` and `cd /   ` should be normalized so they are the same. Can this be done in bash? Maybe a filter on all commands before they are executed, or before they go into history? I hope I don't have to wait until it is written to the file before running a cleanup routine. That would mean logging out before cleanup occurs. `:(`


Linux-distro with built-in Xen?

Are there any Linux-distros with Xen "built-in" and ready to act as host for virtual-computer out-of-the-box? Alternatively, distros where you can easily select "Xen-host" as an install option? I'm after setting-up a Xen-host as easily as possible...


Make the occurrences of a string bold

Now, this is a homework question, but I have simply no idea how to go about solving it. It'll be great if someone could guide me about how to go about it. I've been given a large string of Upper Case Alphabets in a .txt file. I basically need to find two given sub strings(3-4) characters and change the font (or make it bold, or highlight it) of the sub string that is between the two given sub strings.


How can I create a file with multiple lines from the command-line?

How can I enter the following contents in a file:               Hi     abcd      I tried using `echo "Hi\nabcd" >> ab.txt`, but in the file it's written as is (the `\n` is included, instead of a newline)


Linux Fedora 17: locks up with a blank screen after default boot

I have installed Linux Fedora 17 on my new desktop PC, but the default boot ends up with a black screen and no response from the keyboard or mouse. This is after the oval in the centre of the screen fills up and becomes the "curly f" logo. At that point the screen goes blank, and the monitor indicates that it is receiving no input, going into power saving mode. I can boot up ok if I choose the second entry `Fedora Linux` on the grub list, shown below, and then everything seems ok -- I am using it to post this question. A couple of error messages flash up before the grub boot choices appear, but are too brief for me to read them. Here is the content of the grub boot screen:               Fedora (3.9.10.-100.fc17.i686.PAE)     Fedora Linux     Advanced Options for Fedora Linux     Micrsosoft Windows XP Home Edition (on /dev/sda1)      I assume that I should be able to edit `grub` to make the second entry default -- I have to be pretty snappy to catch it before that action goes ahead, so I would also like to lengthen the pause at the same time. However instructions on the Web for working with `grub` seem confusing and contradictory. It seems I should edit my `/etc/default/grub` file, but I don't understand the various instructions on how to do it, so here it is:               [harry@Harry ~]$ cat /etc/default/grub     GRUB_TIMEOUT=5     GRUB_DISTRIBUTOR="Fedora"     GRUB_DEFAULT=saved     GRUB_CMDLINE_LINUX="rd.lvm.lv=vg_harry/lv_swap rd.dm=0 SYSFONT=True rd.md=0  KEYTABLE=uk rd.luks=0 rd.lvm.lv=vg_harry/lv_root LANG=en_US.UTF-8 rhgb quiet"     #GRUB_THEME="/boot/grub2/themes/system/theme.txt"[harry@Harry ~]$       I have no problem with booting Windows if I select that option. I need Windoze for some of the electronics related software I use. Please can anyone help with this? Please don't suggest I go to more up-to-date versions, I work on the principle that "if it works, don't fix it", and I am very happy with Fedora 17, apart from this `grub` problem; and with using Windoze XP3 when I have to.


Prevent Zypper trying to use IPv6

I'm setting up a box with OpenSUSE 13.1. For reasons beyond my comprehension, Zypper utterly _insists_ on using IPv6 addresses and _refuses_ to use IPv4. Which is a problem, since IPv6 doesn't work on our LAN. I've tried disabling IPv6 multiple ways:   * I told YaST to disable IPv6.   * I tried poking and prodding `/etc/modprobe`.   * I tried setting `ipv6.disable=1` as a kernel boot parameter. None of these things had the slightest effect; Zypper _still_ refuses to use real IP addresses and keeps hopelessly trying to use IPv6. Note that I can ping the download server just fine; the `ping` command looks up the IPv4 address of the server, and has no problem pinging it. And yet, Zypper still _insists_ on using IPv6, and then giving up because the destination is unreachable. (Which is it - via IPv6.) I am having the exact problem described in this question. (Even the failing IPv6 address is identical.) That question addresses an older release of OpenSUSE, and the accepted answer just says to disable IPv6, which I already tried. I have now wasted multiple hours of my life trying to perform the trivial task of installing a few software packages. Does _anybody_ know how I can _completely destroy_ IPv6 and get networking to work again?


WiFi error wpa_supplicant

I have a problem with the `wpa_supplicant` program. My problem is about the use of `wpa_cli` which needs `wpa_supplicant`. Error when I'm executing `sudo wpa_cli`:               Could not connect to wpa_supplicant      The manual start of `wpa_supplicant` gives me some errors:               sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf          rfkill: Cannot open RFKILL control device     ioctl[SIOCSIWAP]: Operation not permitted     ioctl[SIOCSIWENCODEEXT]: Invalid argument     ioctl[SIOCSIWENCODEEXT]: Invalid argument     wlan0: CTRL-EVENT-DISCONNECTED bssid=00:00:00:00:00:00 reason=0   ### NEW!!!      Config **dhcp**               ## /etc/dhcp/dhcpd.conf     subnet 192.168.2.0 netmask 255.255.255.0 {        range 192.168.2.2 192.168.2.9;        option domain-name-servers 192.168.1.1;        option domain-name "home";        option routers 192.168.2.1;     }      Config **wpa_supplicant**               ## /etc/wpa_supplicant/wpa_supplicant.conf     ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev     update_config=1     # network={     #   ssid="__SSID__"     #   key_mgmt=WPA-PSK     #   psk="__PASS__"     #   id_str="home"     # }      Config **hostapd**               ## /etc/hostapd/hostapd.conf     interface=wlan0     driver=rtl871xdrv     ieee80211n=1     ssid=__SSID__     hw_mode=g     channel=1     macaddr_acl=0     auth_algs=1     ignore_broadcast_ssid=0     wpa=2     wpa_passphrase=__PASS__     wpa_key_mgmt=WPA-PSK     wpa_pairwise=TKIP     rsn_pairwise=CCMP          # EDIT     ctrl_interface=/var/run/hostapd     ctrl_interface_group=0      Results of `ifconfig` / `iwconfig`               wlan0   Link encap:Ethernet  HWaddr c0:4a:00:17:40:fd               inet adr:192.168.2.1  Bcast:192.168.2.255  Masque:255.255.255.0               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:14 errors:0 dropped:0 overruns:0 frame:0               TX packets:0 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 lg file transmission:1000               RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)          wlan0     IEEE 802.11bgn  ESSID:"__SSID__"  Nickname:"<WIFI@REALTEK>"               Mode:Master  Frequency:2.412 GHz  Access Point: C0:4A:00:17:40:FD               Sensitivity:0/0               Retry:off   RTS thr:off   Fragment thr:off               Power Management:off               Link Quality=100/100  Signal level=0 dBm  Noise level=0 dBm               Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0               Tx excessive retries:0  Invalid misc:0   Missed beacon:0      How can I start `wpa_supplicant` without errors and have `wpa_cli` connect?


I need a program to read the US Census's geodatabase files

I downloaded a file from here, and got something with extension `.gdb.zip`. I want to get one of the tables out of this "geodatabase" and into a format that's easily accessible to other programs; csv or some such would be the obvious goal but anything moderately open will work. The Census Bureau's description of the files is: > TIGER Geodatabases are spatial extracts from the Census Bureau’s MAF/TIGER > database for use with Esri’s ArcGIS. Since ArcGIS for home users costs $100, and I don't want any of its features other than the ability to read this file, I'm hoping there's an open source option.


debian: Remove or reinstall package in a very bad inconsistent state

I'm having a package management problem: At some point, I must have interrupted an update or something, because the bluez package has broken. I've tried removing and/or reinstalling, but I get nothing but errors. I'm unable to perform any operations with apt as long as this package is broken. Output from my attempt to remove the package               $ sudo aptitude remove bluez      The following packages will be REMOVED:         bluez      The following partially installed packages will be configured:       dictionaries-common dmsetup grub-pc ifupdown install-info rsyslog      0 packages upgraded, 0 newly installed, 1 to remove and 235 not upgraded.     Need to get 0 B of archives. After unpacking 1,737 kB will be freed.     dpkg: error processing bluez (--remove):       Package is in a very bad inconsistent state - you should      reinstall it before attempting a removal.     configured to not write apport reports                                           Errors were encountered while processing:      bluez     E: Sub-process /usr/bin/dpkg returned an error code (1)     A package failed to install.  Trying to recover:     Setting up install-info (4.13a.dfsg.1-8) ...     /var/lib/dpkg/info/install-info.postinst: 32: /var/lib/dpkg/info/install-info.postinst: update-info-dir: not found     dpkg: error processing install-info (--configure):      subprocess installed post-installation script returned error exit status 127     Setting up ifupdown (0.7~alpha5+really0.6.15) ...     /var/lib/dpkg/info/ifupdown.postinst: 122: /var/lib/dpkg/info/ifupdown.postinst: update-rc.d: not found     dpkg: error processing ifupdown (--configure):      subprocess installed post-installation script returned error exit status 127     Setting up locales (2.13-18) ...     /var/lib/dpkg/info/locales.postinst: 64: /var/lib/dpkg/info/locales.postinst: locale-gen: not found     dpkg: error processing locales (--configure):      subprocess installed post-installation script returned error exit status 127     Setting up dictionaries-common (1.11.6) ...     /var/lib/dpkg/info/dictionaries-common.postinst: 45: /var/lib/dpkg/info/dictionaries-common.postinst: update-dictcommon-aspell: not found     dpkg: error processing dictionaries-common (--configure):      subprocess installed post-installation script returned error exit status 127     Setting up grub-pc (1.99-12) ...     /var/lib/dpkg/info/grub-pc.postinst: line 438: grub-mkdevicemap: command not found     /var/lib/dpkg/info/grub-pc.postinst: line 263: grub-probe: command not found     /var/lib/dpkg/info/grub-pc.postinst: line 263: grub-probe: command not found     /var/lib/dpkg/info/grub-pc.postinst: line 263: grub-probe: command not found     /var/lib/dpkg/info/grub-pc.postinst: line 559: grub-install: command not found     /var/lib/dpkg/info/grub-pc.postinst: line 669: update-grub: command not found     dpkg: error processing grub-pc (--configure):      subprocess installed post-installation script returned error exit status 127     Setting up dmsetup (2:1.02.65-1) ...     /var/lib/dpkg/info/dmsetup.postinst: 8: /var/lib/dpkg/info/dmsetup.postinst: update-initramfs: not found     dpkg: error processing dmsetup (--configure):      subprocess installed post-installation script returned error exit status 127     Setting up rsyslog (5.8.5-1) ...     /var/lib/dpkg/info/rsyslog.postinst: 45: /var/lib/dpkg/info/rsyslog.postinst: update-rc.d: not found     dpkg: error processing rsyslog (--configure):      subprocess installed post-installation script returned error exit status 127     Errors were encountered while processing:      install-info      ifupdown      locales      dictionaries-common      grub-pc      dmsetup      rsyslog      I'm running Debian testing. Is this problem actually with this particular package, or is it a problem with dpkg? What do I need to do to fix my package manager?


Trouble in adding a column with awk

I'm trying to add a column to a csv file by using:               awk -F "," '{print $0"new_col"}' file.csv      but I got :               new_col8,0.405,0.101     new_col4,0.374,0.100     new_col23,0.342,0.100     new_col130,0.298,0.100      instead of :               68,110,0.362,0.101,new_col     11,98,0.405,0.101,new_col     57,94,0.374,0.100,new_col     61,123,0.342,0.100,new_col     124,130,0.298,0.100,new_col      I tried like this too:               awk -F "," '{{$(NF+1)=",new_col"} print $0 }' file.csv      but i got the same result!!! Is someone already had this problem?


System menu and desktop right click dont appear in Gnome3

I run Arch Linux with Gnome3. I need to escape from the "routine" and change to Gnome for some weeks or even months. When I open it I can't see the system menu (which is supposed to be right of "places") and cannot right click my desktop. Is my Gnome corrupted? Is it rational?


Can I share a folder inside my home directory with another user? I have two users on a system, `agent` and `daemon`. An external server connects as `agent` and rsyncs files to `~agent/incoming` I want `daemon` to have access to the files in `~agent/incoming` but I don't want `agent` to have access to any of `daemon`'s files. I set up a group called `automaton` and added both users to it. I then chmod'ed the `~agent/incoming` folder to `drwxrws---` (notice the sticky bit) and chowned that folder to `agent:automaton`. The process runs and new files are delivered to the `incoming` folder and are set as `agent:automaton` with permissions `-rw-rw----` but `daemon` is not able to view or copy these files:               stat: cannot stat (path here) : Permission denied      What am I doing wrong?


What are the readline word separators?

When I delete a "word" in Bash, it will stop at certain characters like `_` and `/`. For example, if I type               /foo/bar      and activate `backward-kill-word` (typically mapped to `Alt`-`Backspace` and/or `Ctrl`-`w`), the remaining text is               /foo/      . This does _not_ correspond to `$COMP_WORDBREAKS` or `readline`'s `rl_completer_word_break_characters`. How can I detect (preferably in a running system, rather than the defaults in the code, since they presumably can be overridden) which characters are used to determine word breaks?


Tab completion doesn't work for arguments when command is an alias

I have an alias, ee, defined for my favorite editor, mg. When I do something like               mg fo      and then hit tab, if a file foo exists, I get tab completion to:               mg foo      On most systems I use (e.g., all versions of ubuntu for many years now, and some installs of debian),               ee fo      also completes properly to               ee foo      But on one system I use, which has Debian 6.0 and GNU bash 4.1.5(1)-release, tab completion fails for the version with the alias. Note that this is _not_ a problem with completing the alias itself -- it's a problem with completing the _arguments_ of the aliased command. Is there a way to fix this behavior on the Debian system? Upgrade to bash 4.2.x? Fiddle with config files?


Executing commands with PHP: using normal user, but its home directory is /root

I'm using a custom compiled installation of Apache + PHP, listening on port `80`. Apache is configured to run as a normal user, with the proper settings `User` and `Group` of the `httpd.conf` file. After running apache as a service, with `apachectl`, there's one process `httpd` running by root, and 4 others running by that normal user. The problem is this:   * When I run an external command by PHP (using `exec` or `passthru` for instance), it's run by the proper normal user, but `$HOME` environment variable points to `/root`. For example, with the following very simple code:               <?php     echo "Home: " . `echo \$HOME`;     echo "<br />";     echo "Id: " . `id`;      I get:               Home: /root     Id: uid=1000(normaluser) gid=100(users) groups=100(users),17(audio),33(video)      Any command run this way, is actually run by the normal user, so there's no security problem. The major problem is when an external command is run, and that command tries to write and/or read something from the home directory.


Why can't vim find syntax.vim on my fresh Ubuntu installation?

I'm trying to make some basic customizations to vim. All I want is some syntax highlighting, etc. Basically, not just plain text. My `.vimrc` file consists of 7 lines:               backspace=2     syntax on     filetype indent on     set autoindent     set number     colorscheme desert     set nobackup      Every time I launch vim, I get these errors and **see no syntax highlighting** :               E492: Not an editor command: backspace=2     E484: Can't open file /usr/share/vim/syntax/syntax.vim      The latter problem just might stem from the fact that I don't have a `/usr/share/vim` folder. I would have thought that this would have been created when I installed vim. So, what do I do now?


How to feed linux new install drivers?

I'm trying to install a Linux distribution on my new setup, but after the first tries I failed without knowing why. > My configuration:   * Desktop PC HP   * Processor: Intel Core i3 2120 @3.30GHz   * Chipset: Intel Sandy Bridge   * Graphic Interface: NVIDIA GeForce GT 520 > My actions so far:   * 3 X installed Ubuntu 12.10 (64bit) - after boot I get an orange screen (some errors that convinced me to reinstall 3 times).   * tried to install Linux Mint, Mate 32bit but when the installer starts i can see nothing but a scrambled image.   * installed Linux Mint, Mate 64bit - after boot it hangs on some errors Update:I saw some flashing errors about drivers not found. After this tries i was thinking that i need to preload drivers for my configuration in installation files. How do i provide the linux boot disc with such information and where do I get those drivers? Please tell me if you need more info for the drivers. related to this: Hardware problem after fresh Linux Mint install Is there any chance that i can make nvidia drivers avaiable for ubuntu from my windows install? or to put them somewhere to be avaiable for the intaller in order to see them?


How to restore data atomically on a remote server?

I want to be able to backup and restore my home directory of a remote account. The command I use are: **Backup**               ssh myuser@myuser.server.com "tar jcf - ." > backup.tar.bz2      **Restore**               cat backup.tar.bz2 | ssh myuser@myuser.server.com "tar jxf - ."      I'd like to be sure that all the files are restored or none, even if the server gets rebooted in the middle of a restore. Any way to achieve what I want? I'd like to maintain the commands shown above as a base, but other ideas are appreciated as well.


how to identify IP address on eth0 when console isn’t available

I need help about the following I have very old Linux server with one IP address, unfortunately I can’t to access to Linux machine VIA console and I not remember the IP address So I now thinking about way that I could to verify this IP address I don’t sure not it works but maybe by sniffer I can check the server IP ? For example   * Download sniffer on my laptop    * Connect the laptop network to the linux machine VIA LAN cross cable ( END TO END )   * And try to run the sniffer in order to recognize the IP address from ETH0 ( Linux machines ) Please advice if that option could works ? Or if not please advice about the other options I thinking also about the option to build VB script that scan the IP's from 1.1.1.1 to 255.255.255.255 - but this option is very difficult ( I don’t know if somewhere already has this tool ? )


Where can I "hide" easter eggs for students learning about Linux security?

I feel like this isn't the best place to ask this (since there's no single right answer), but I can't think of a better place. If you have a better recommendation, could you please recommend it and I can move the question rather than just having it closed outright? I'm teaching a class of high-school students about general Linux security. At a high level I want them to be able to take a given Linux server and know how to harden it against common security issues - e.g. closing old accounts, using a strong pw hashing algorithm, make sure no strange processes are running or run at boot. Their skill-level is a broad range, and I'm looking for ways to motivate them to use what we've been discussing (e.g. look at crontab; look at users and group configurations; look at open ports). I have been given $200 to hold a competition to encourage them, and I thought maybe I could purchase a bunch of Amazon gift cards in $10 increments. The idea would be to "hide" the redemption codes in various places on our sandbox server for the kids to find. For example, I could store the passwords in plaintext, and have one of the example user accounts assigned a password of one of the codes. Or maybe I could set up a cron job to log one of the codes to a system log every 30 seconds. What I'm looking for is places/methods to hide these codes such that someone looking to secure the server would stumble across them. Thanks!


What YUM is doing after completing process

For instance when we executed               yum update     yum localinstall xyz      at the end of process when it shows               Complete!      and when we execute the next any yum command still it shows               Another app is currently holding the yum lock; waiting for it to exit...      my questions are:   * what type of process it would be doing after displaying final message of complete?   * if we kill this process does it harm to the system?


Taking the Linux Install CD out during Installation?

I'm installing rhel and need to install a driver during installation. The plan is to 'linux dd' at the boot promt and install then. However, I just wanted to know if there would be an issue with removing the Linux install cd at that time to install the driver using a cd, and if so, if there is a workaround. This is because both the driver and Installation are on cds and I only have one disk drive. Moving 1 to different media is not an option.


How can I make Ctrl + Alt act like Alt gr in Ubuntu?

I recently switched to Ubuntu on my laptop and one thing that almost got me to switch back to windows is the fact that I can't make Ctrl + Alt to act like Alt gr. I have programmed in several years and for example I'm so used to make the sign "$" by pressing "ctrl + alt + 4". Here in Ubuntu I have to use "Alt gr + 4" witch almost makes me insane... Is there a fix for this?


how to remove ctrl F in unix file

While editing a unix file I'm getting data as below in vi editor.               MGW:^FVMG107     MGW:^FVMG113     MGW:^FVMG108     MGW:^FVMG103      where in above data `^F` is not viewable in `cat` command. I have tried `dos2unix` & `sed` also, but it still exists. How can I remove `^F`


Backreferencing with sed

I have a database containing a list of unsigned longs representing a bunch of memory addresses followed by an offset within two brackets (e.g. `Mem[offset]`, `0x2322AD4[3]`), and some other data. What I am trying to achieve is separate the offset from the memory address by replacing the opening bracket with a single space and get rid of the closing bracket. The procedure I'm taking goes as follows:   1. Find every digit that is followed by an opening bracket (this is because my other data may contain a bracket that should NOT be messed with).   2. Replace ONLY the bracket with a single space.   3. Find every digit that is followed by a closing bracket, and ONLY replace the closing bracket with a single space. The brackets could be easily handled with the following two commands:               sed 's/\[/ /' #replace the opening bracket with a single space.          sed 's/\]//' #delete the closing bracket      But again, I don't want to mess with the other data stored in the database. My second guess was getting back-referencing involved to handle the job. Is it possible to tell `sed` to find every digit followed by an opening brace and back-reference the digit and add a space right after it, resulting in something like this: > 0x2322AD4 3] So then I can just go ahead and use the second command mentioned above to get rid of the closing brace? If there is a whole difference approach to solve the problem, please post.


How to insert lines with numbers from X to Y into another file after line Z?

I created two files:               echo -e "1\n2\n3\n4\n5" > 123.txt     echo -e "a\nb\nc\nd\ne" > abc.txt      I want to get the file `123.txt` with the following contents:               1     2     3     b     c     d     4     5      So in other words insert the rows with numbers from 2 to 4 of the file `abc.txt` into the file `123.txt` after the third line. I have reviewed the many similar questions here, but did not find a suitable answer. Nevertheless I got the lines:               sed -n '2,4p' abc.txt      and put some text into the file after the third line:               sed -i '3a\mytext' 123.txt      How to do this using the previous command stdout or/and a `sed`/`awk` single command?


how to use "Unusable" sectors outside defined partition boundaries

What might be a convenient way to stash some hidden data in the "Unusable" area following the last partition, or anywhere outside defined partition boundaries? For example, making it appear as a `/dev/___` ready for I/O to my userspace programs. Let's say I don't care if partitioning programs or bootloaders don't recognize that there might be something important there and step on it; I'd do a structure sanity check & re-create data as needed.                                            cfdisk (util-linux 2.19.1)                                          Disk Drive: /dev/sda                              Size: 160041885696 bytes, 160.0 GB                    Heads: 255   Sectors per Track: 63   Cylinders: 19457           Name     Flags     Part Type   FS Type        [Label]        Size (MB)       --------------------------------------------------------------------------------      sda1                Primary    vfat           [ACER]         25827.38         sda2                Primary    ntfs                          90033.92                                            Unusable               13193.35      sda3                Primary    ext4                          16508.14      sda4     Boot       Primary    ext4                          14476.50                                            Unusable                   2.62  *


Is troff/groff relevant anymore?

I've heard that troff/groff have largely been replaced by TeX. Is this true? The only thing that I know actually used troff nowadays is manpages. Is this also true? If not, what are some other uses?


Software developer switching from Linux to OS X, what are the gotchas?

I have used Ubuntu/Fedora/Red Hat/Suse but haven't used OS X at all. If I have to start using OS X regularly, what are the things I should look out for? Tools I use are GNU tool chain, C++/Boost, etc.


How to change icon for Mathematica nb files

I'm using _Mathematica_ 9.0 on Lubuntu 11.10 and its icons on menus work well. But `nb` files (note book files) does not have a nice icon. They appears with a king of engine icon (like configuration icon). I have on `/usr/share/mime/application` a file `mathematica.xml` with               <?xml version="1.0" encoding="utf-8"?>     <mime-type xmlns="http://www.freedesktop.org/standards/shared-mime-info" type="application/mathematica">       <!--Created automatically by update-mime-database. DO NOT EDIT!-->       <comment>Mathematica Notebook</comment>       <comment xml:lang="ar">مذكرة رياضيات</comment>       <comment xml:lang="be">Natatnik Mathematica</comment>       <comment xml:lang="be@latin">Natatnik Mathematica</comment>       <comment xml:lang="bg">Тетрадка — Mathematica</comment>       <comment xml:lang="bs">Mathematica bilješka</comment>       <comment xml:lang="ca">llibreta de notes de Mathematica</comment>       <comment xml:lang="cs">Sešit Mathematica</comment>       <comment xml:lang="da">Mathematica Notebook</comment>       <comment xml:lang="de">Mathematica-Dokument</comment>       <comment xml:lang="en_GB">Mathematica Notebook</comment>       <comment xml:lang="es">notebook de Mathematica</comment>       <comment xml:lang="eu">Mathematica Notebook</comment>       <comment xml:lang="fi">Mathematica-muistilehtiö</comment>       <comment xml:lang="fr">carnet de notes Mathematica</comment>       <comment xml:lang="ga">leabhar nótaí Mathematica</comment>       <comment xml:lang="gl">Mathematica Notebook</comment>       <comment xml:lang="he">מחברת מתמטיקה</comment>       <comment xml:lang="hu">Mathematica notesz</comment>       <comment xml:lang="id">Mathematica Notebook</comment>       <comment xml:lang="it">Notebook Mathematica</comment>       <comment xml:lang="ja">Mathematica ノートブック</comment>       <comment xml:lang="kk">Mathematica Notebook</comment>       <comment xml:lang="ko">Mathematica 노트북</comment>       <comment xml:lang="lt">Mathematica užrašinė</comment>       <comment xml:lang="lv">Mathematica bloknots</comment>       <comment xml:lang="nb">Mathematica notisblokk</comment>       <comment xml:lang="nl">Mathematica-notitieboek</comment>       <comment xml:lang="nn">Mathematica-notatbok</comment>       <comment xml:lang="oc">quasernet de nòtas Mathematica</comment>       <comment xml:lang="pl">Notatnik Mathematica</comment>       <comment xml:lang="pt">Bloco de notas Mathematica</comment>       <comment xml:lang="pt_BR">Caderno do Mathematica</comment>       <comment xml:lang="ro">Carnețel Mathematica</comment>       <comment xml:lang="ru">Mathematica Notebook</comment>       <comment xml:lang="sk">Zošit Mathematica</comment>       <comment xml:lang="sl">Datoteka dokumenta Mathematica</comment>       <comment xml:lang="sq">Notebook matematike</comment>       <comment xml:lang="sv">Mathematica Notebook-dokument</comment>       <comment xml:lang="uk">математичний записник</comment>       <comment xml:lang="vi">Cuốn vở Mathematica</comment>       <comment xml:lang="zh_CN">Mathematica 记事</comment>       <sub-class-of type="text/plain"/>       <generic-icon name="x-office-document"/>       <glob pattern="*.nb"/>       <alias type="application/x-mathematica"/>     </mime-type>      But I don't know how to change the icon. I even don't know if that file is being used. I guess that the line `<generic-icon name="x-office-document"/>` is the main line but what should I write therein? For example, how to use ![this as icons for nb files](http://i.stack.imgur.com/rhdmx.png) as icons for `nb` files?


How to troubleshoot systemd's "contradicts existing jobs" error message

Looking through my system logs, I see the following message in `/var/log/messages`:               Sep  2 15:29:15 <myhostname> systemd[1]: Requested transaction contradicts existing jobs: File exists      So, my question is: How do I troubleshoot this error? What steps should I take to understand what this means, what is causing it, whether it is something to be worried about, and if so, how to correct it? And, what is the meaning of the message "Requested transaction contradicts existing jobs"? I suspect there must be conceptual background that I am missing. In any case, does this error message suggest some candidate next steps to diagnose the cause of this error message and understand what is causing it? I've read the systemd docs, but I did not find them helpful with this. It'd be great to have a general guide on what to look for: I suspect this might be helpful to others who also experience the "... contradicts existing jobs" message.


To recover my system so it shut down normally?

I have Linux mint 13(ubuntu 12.04) installed on my thinkpad T520, running for around 1 year. I'm not able to shut down my machine even if I do: `sudo shutdown now`. At first, it halts after messages of collectmon signal caught and modem-manager signal caught: ![signal caught](http://i.stack.imgur.com/8x1Qa.jpg) I uninstalled both programs. Now it halts "my_username login:". If I shutdown right before login, I have this screen: ![before login](http://i.stack.imgur.com/rCLl1.jpg) And it still refuses to shutdown.I suspect it might be a result after I disabled some of the service through boot-up manager. I didn't take notes exactly what I did and neither there were any problems at that moment. I would like to know what prevents the machine to shut down. Now, I have to press the shut down button every time, which is annoying. This is the screen capture of the services that are still disabled: ![ss of services #1](http://i.stack.imgur.com/4sYJe.jpg) ![ss of services #2](http://i.stack.imgur.com/dtkbs.jpg) ![ss of services #3](http://i.stack.imgur.com/eB8sj.jpg) ![ss of services #4](http://i.stack.imgur.com/3adLi.jpg) ![ss of services #5](http://i.stack.imgur.com/7cAGh.jpg) The link to the original images is here. `ls /etc/init.d/*net*`               /etc/init.d/networking                   /etc/init.d/network-interface-security     /etc/init.d/network-interface            /etc/init.d/network-manager     /etc/init.d/network-interface-container      `ls /etc/init.d/acpid`               /etc/init.d/acpid      `ls /etc/rc0.d/`               K01mdm                  K20vboxautostart-service    S20sendsigs     K01tlp                  K20vboxballoonctrl-service  S30urandom     K09apache2              K20vboxdrv                  S31umountnfs.sh     K10unattended-upgrades  K20vboxweb-service          S35networking     K20acpid                K20virtualbox-guest-utils   S40umountfs     K20hddtemp              K20wicd                     S48cryptdisks     K20mbmon                K20winbind                  S59cryptdisks-early     K20network-interface    K80openvpn                  S60umountroot     K20network-manager      K95collectd                 S90halt     K20speech-dispatcher    README


can't view `split` output files with cat

File `a.txt` contains:               1 one     2 two     3 three     4 four     5 five     6 six      Then the command: `split -2 a.txt output_` yields as output three new files `output_aa`, `output_ab`, `output_ac` When I type: `cat output_aa` I received a message: `no such file or directory`. But I can view `output_aa` in gedit. Why?


Secure wipe (scrub) filesystem of VPS from VPS itself

I have a VPS I'm planning to delete. This particular cloud provider makes no guarantee that the data on the drive will be wiped before giving the disk to the next person. What's a **best effort** attempt I can make to secure-wipe sensitive data (whether existing as files **or as deleted data** ) on the drive?   * Assume the provider does not offer a separate, bootable OS to perform maintenance from   * If not every last bit of sensitive data can be guaranteed to be wiped, that's ok      * (I would have encrypted the data, if it were that critically sensitive!)


64bit Linux or 32bit Linux with PAE kernel causes x server to crash on boot

I have a home server that was running 64bit Linux Mint with Core 2 Duo, 4GB ram, nvidia 7950GT, and RAID 0 two 150GB drives. It was running fine til the power supply failed and I had to replace it. When the power supply failed the video card also got fried unfortunately so I had to switch to an ATI card. I've tried an old Radeon X800 as well as a Radeon HD 4600. Both of these video cards have hard problems with X server in 64bit mode. Even trying to run a liveCD version of different distros they fail at 64bit. Is there a work around for getting 64bit to work? On a side note I've also tried enabling the PAE kernel while still in 32bit OS that also causes X server to crash on startup.


How to pipe the result of 'date' command to 'mv' command

I want to rename my file to the current timestamp.I know how to get the current timestamp("date +%s") but how can I pipe it to 'mv' command?


IP Prefix - how do I declare this?

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


Verify if a system has DVD burners?

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