apt python error prevents me from resolving dependency problems for apt-get install

On Debian 6 servers dependency issues are preventing me from installing nis (or any package). When I try to resolve that issue I get a python error. How do I get past this issue and re-gain the ability to install packages? I have googled and found a few people reporting the same error message, but no one had a solution. I also checked SE to no avail. This is affecting 10s of servers at my company.               root 7 # apt-get install nis     Reading package lists... Done     Building dependency tree            Reading state information... Done     You might want to run 'apt-get -f install' to correct these:     The following packages have unmet dependencies:      libglib2.0-dev : Depends: libglib2.0-0 (= 2.24.2-1) but 2.40.0-2 is to be installed      nis : Depends: libdbus-glib-1-2 (>= 0.78) but it is not going to be installed            Depends: libslp1 but it is not going to be installed     E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).      So then I tried to resolve this by following the suggestion:               root 8 # apt-get -f install     Reading package lists... Done     Building dependency tree            Reading state information... Done     Correcting dependencies... Done     The following packages were automatically installed and are no longer required:       xfonts-encodings ttf-dejavu-core xfonts-utils libxfont1 libpango1.0-common libdb5.1 libxcb-render-util0     Use 'apt-get autoremove' to remove them.     The following extra packages will be installed:       libglib2.0-dev     Suggested packages:       libglib2.0-doc     The following packages will be upgraded:       libglib2.0-dev     1 upgraded, 0 newly installed, 0 to remove and 559 not upgraded.     42 not fully installed or removed.     Need to get 0 B/2642 kB of archives.     After this operation, 3982 kB of additional disk space will be used.     Do you want to continue [Y/n]? y     dpkg: error processing /var/cache/apt/archives/libglib2.0-dev_2.40.0-2_amd64.deb (--unpack):      parse error, in file '/var/lib/dpkg/tmp.ci/control' near line 7 package 'libglib2.0-dev':      `Depends' field, invalid package name `python:any': character `:' not allowed (only letters, digits and characters `-+._')     configured to not write apport reports                                           Errors were encountered while processing:      /var/cache/apt/archives/libglib2.0-dev_2.40.0-2_amd64.deb     E: Sub-process /usr/bin/dpkg returned an error code (1)          root 9 #       I also tried               apt-get autoremove      but this just told me to do               apt-get -f install      again. I tried to look at the offending file but I got this:               root 11 # cat /var/lib/dpkg/tmp.ci/control     /var/lib/dpkg/tmp.ci/control: No such file or directory      As requested:               root 14 # apt-cache policy nis libglib2.0-dev libglib2.0-0 libdbus-glib-1-2 libslp1      libglib2.0-0:       Installed: 2.40.0-2       Candidate: 2.40.0-2       Version table:      *** 2.40.0-2 0             500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages             100 /var/lib/dpkg/status     libdbus-glib-1-2:       Installed: (none)       Candidate: 0.102-1       Version table:          0.102-1 0             500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages     libglib2.0-dev:       Installed: 2.24.2-1       Candidate: 2.40.0-2       Version table:          2.40.0-2 0             500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages      *** 2.24.2-1 0             100 /var/lib/dpkg/status     nis:       Installed: (none)       Candidate: 3.17-33       Version table:          3.17-33 0             500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages     libslp1:       Installed: (none)       Candidate: 1.2.1-9       Version table:          1.2.1-9 0             500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages      as requested:               apt-cache policy     Package files:      100 /var/lib/dpkg/status          release a=now      500 http://security.debian.org/ stable/updates/main Translation-en      500 http://security.debian.org/ stable/updates/main amd64 Packages          release v=7.0,o=Debian,a=stable,n=wheezy,l=Debian-Security,c=main          origin security.debian.org      500 http://ftp.us.debian.org/debian/ unstable/main Translation-en      500 http://ftp.us.debian.org/debian/ unstable/main amd64 Packages          release o=Debian,a=unstable,n=sid,l=Debian,c=main          origin ftp.us.debian.org     Pinned packages:


Two users with different permissions on same directory

Is it possible to give two users different permissions on the same directory? I want to use it for ftp: userFull gets R+W and userLim gets only Read, depending on who logs on. Im getting stuck on the ownership versus group rights... (I use CentOS+Directadmin and Proftpd) So the following is what I want if it's possible at all:               /home/myDir  -  userFull  -  read & write     /home/myDir  -  userLim  -  read only


How to change file owner in AIX?

How can I change a owner of a file in AIX? I created a file using my personal account and then I tried to change user for this file:               chown rootuser myfile.csv     chown: myfile.csv: Operation not permitted.      Then I changed to root user               sudo /usr/bin/su - rootuser      and tried to change the owner of this file               chown rootuser myfile.csv     chown: myfile.csv: Not owner      How can I change the owner of this file?


doing an rsync across multiple machines

I have the following setup: Machines A, B , C running linux. I have to do a continuous rsync from machine A to machine C and have a script for that. However, the access to machine C from machine A is only through B. So I have to ssh into B and then I can ssh into C. The way to rsync that I have now is that first I rsync from C to B and then rsync from B to A. However, with the additional copy between the machines, this is


Returning a portion of a line matching a pattern

I have a file (file_name) which contains exactly one occurrance of the string "Result: " at the start of a line. I want to print all the characters after the string "Result: " in that line until I encounter a '.' character. Which shell command should I use?


Where is the "About Gnome" dialog in gnome-shell?

I'm used to Gnome 2 in Debian and Fedora. But recently I've been using Gnome 3 and Gnome-shell (3.0.2). Today I noticed I wasn't able to find the About Gnome dialog. It's been helpful in the past to pull it up to see what version of Gnome I'm running, and see some attribution information. So, questions:   1. Where does the About Gnome dialog live in Gnome 3 / Gnome-shell?   2. If it has been removed, was this a Gnome decision, or my distro (fedora)?   3. Are there relevant software license requirements about attribution that is user-facing?


How to remove Apache from CentOS while keeping php 5.3

I have a problem with removing Apache from my CentOS install. First of all I installed lighty (lighttpd) and then I tried to install php53 which httpd was included with it. I've configured lighty with php and now I don't need httpd for any reason so I want remove it. When I try to remove httpd from my centos 5.7 server with `yum` it prompts to remove php. So how can I remove httpd while keeping php ?


How to install Redhat using the iso image stored on Network

This is the case. I want to install the Redhat 5.6 on my system. But this time i dont want to use the actual DVD but this time i want to install it using the iso image stored on one of our server HDD. How can I do that.


Logstash agent does not send logs to Redis server

I can't ship logs from Logstash to Redis server. Getting this error:               Failed to send event to redis {:event=>#<LogStash::Event:0x7ccb7867 @cancelled=false, @data={"message"=>"welocwelcome", "@timestamp"=>"2014-07-07T21:00:34.583Z", "@version"=>"1", "host"=>"localhost.localdomain"}>, :identity=>"default", :exception=>#<Errno::EHOSTUNREACH: No route to host - SocketChannel.connect>, :backtrace=>["org/jruby/ext/socket/RubyTCPSocket.java:123:in `initialize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:13:in `initialize'", "org/jruby/RubyIO.java:855:in `new'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:74:in `connect'", "org/jruby/ext/timeout/Timeout.java:127:in `timeout'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:73:in `connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/connection/ruby.rb:180:in `connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:273:in `establish_connection'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:69:in `connect'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:292:in `ensure_connected'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:179:in `process'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:258:in `logging'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:178:in `process'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis/client.rb:84:in `call'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:972:in `rpush'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:36:in `synchronize'", "jar:file:/opt/logstash/logstash-1.2.2-flatjar.jar!/META-INF/jruby.home/lib/ruby/1.9/monitor.rb:211:in `mon_synchronize'", "jar:file:/opt/logstash/logstash-1.2.2-flatjar.jar!/META-INF/jruby.home/lib/ruby/1.9/monitor.rb:210:in `mon_synchronize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:36:in `synchronize'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/redis.rb:971:in `rpush'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/outputs/redis.rb:162:in `receive'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/outputs/base.rb:85:in `handle'", "(eval):21:in `initialize'", "org/jruby/RubyProc.java:271:in `call'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:254:in `output'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:213:in `outputworker'", "file:/opt/logstash/logstash-1.2.2-flatjar.jar!/logstash/pipeline.rb:140:in `start_outputs'"], :level=>:warn}      This is content of my logstash config-file:               input { stdin { } }     output {       stdout { codec => rubydebug }       redis { host => "192.168.209.129" data_type => "list" key => "logstash" }     }      I'm a newbie and failing to understand how it could be solved.


vim: replace all character till end of line

Maybe I am being daft but can you replace all the characters from where the cursor is to the end of line by one command? Then use `.` to do the same replace on the next line and so on.


Scan for Network attached devices

Is there a way to scan for computers on the network through the command line and get their IP, MAC and DNS names without knowing anything about them?


How to stop a program running as daemon

I have launched `iperf` in daemon mode with `iperf -s -D` and now I want to stop the service. I tried to use `sudo kill pid` but it neither work nor complain. The daemon is still running when I check through `ps -ef | grep iperf`. As it is not launched by Linux, I cannot find it through `service` as other daemons. How could I stop it?


Find the location of /gnu

I'm working on my university server and trying to find the location of /gnu. I know that it is installed with the latest version as I get the correct version using:`g++ --version` On using find `find gnu` it return no result. How can I find the path to gnu?


Is it not possible to store my local websites in my Dropbox folder?

I have a bunch of web sites that I develop, and I run an Apache server locally to do debugging and design. The web sites use Apache, PHP, and MySQL. To be clear, my Apache server is not serving these sites to the internet, I just access them locally. I develop on two machines. One desktop, and one laptop. Both are running Linux Mint, and I try to keep the settings consistent between them. This means I have to duplicate the Apache and PHP configurations. I keep the directory structures the same. I have to make sure to copy the MySQL databases from one machine to the other if I make changes. Which is not ideal. It's prone to human error, especially with keeping the MySQL databases synched. Sometimes I work on one on one machine, forget to export and import the databases, and then after I've done work on the other machine, I have two versions and I can't easily merge them. Also, it's a hassle for making backups. What does work is that I store all my HTML, CSS, and Javascript in a folder in my Dropbox directory. So any changes I make to those files are automatically syncronized. It also means I have a backup in the cloud. Should the need arise, to restore these files if I ever move to a new machine, I just have to install Dropbox and all the files are recovered. The most I have to do if setting up on a new computer is create a symlink to my Dropbox directory where my HTML files are stored:               sudo ln -s  /home/dave/Dropbox/Websites /var/www/Websites      Is there a way I can do this with my Apache settings and MySQL databases as well? Where I can keep them synchronized across both machines in my Dropbox folder, and have a miminum of set up if I go to a new machine?


How can I delete a hardlink to a directory?

Before I get 100s of answers that tell me it is impossible to hardlink directories in linux: yes, I know that. The file in question appeared in lost+fount after I checked the filesystem with `e2fsck` (its an ext4) and according to stat it /is/ a file with 2 hardlinks:               # stat --format="File \"%n\" is a %F with %h hardlinks" ./#30934353     File "./#30934353" is a directory with 2 hardlinks      Doh. How can I safely delete them without touching the included files? I tried `rm` and `unlink`, both told me that die directory is not empty…


git-upload-pack hangs indefinitely

I have the following call structure:   1. Jenkins runs `fab -Huser@host set_repository_commit_hash:123abc`.   2. `set_repository_commit_hash` runs `git fetch` with `pty = False`.   3. The child process `ssh git@github.com git-upload-pack 'user/repository.git'` never finishes. I've tried running `git fetch` in a local clone and that succeeds, but running `ssh git@github.com git-upload-pack 'user/repository.git'` just returns the following and hangs:               00ab84249d3bb20930c185c08848c60b71f7b28990d6 HEADmulti_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed agent=git/1.8.4     0041cb34b1c8ca75d478df38c794fc15c5f01cc6377e refs/heads/branch_name     004012577068adf47015001bfa0cff9386d6cdf497ce refs/heads/[...]     003f84249d3bb20930c185c08848c60b71f7b28990d6 refs/heads/master     [a couple more lines like the ones above, then:]     0000      Is this a known SSH/Git/Fabric/Jenkins problem? I did `strace` it, but I haven't recorded the session. I believe it was stuck on a `read`. Possibly relevant links:   1. Jenkins issue 14752: SCM Polling / Max # of concurrent polling = 1 hangs github polling   2. Why would git-upload-pack (during git clone) hang?   3. tortoisegit issue 1880: tortoisegit fetch hangs due to running/never-exiting tortoisegitplink (especially comment #7)   4. What is this random never-ending 'git-upload-pack' process?


Bash script and Database

I have an iptables firewall in Linux bridge (RHEL5). I want to extract information like IP address, port number, port type, date and time, etc. from log messages using a Bash script, and then want to upload it to a MySQL database to generate the reports. How can I do this? Is there any way to accomplish the same thing?


Connected to WiFi, no internet access - Linux Mint

I connect to a my AP and I get a message "Connect to ..." but I cant access the internet, nor ping anything exept my gateway. I tried changing the DNS Servers to google ones but with no use. Any advice?               // ifconfig     wlan0     Link encap:Ethernet  HWaddr 00:16:44:e6:18:55                 inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0               inet6 addr: fe80::216:44ff:fee6:1855/64 Scope:Link               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1               RX packets:1128711 errors:0 dropped:0 overruns:0 frame:0               TX packets:928780 errors:0 dropped:0 overruns:0 carrier:0               collisions:0 txqueuelen:1000                RX bytes:1334125475 (1.3 GB)  TX bytes:110564299 (110.5 MB)          // iwconfig     wlan0     IEEE 802.11bg  ESSID:"Baman"                 Mode:Managed  Frequency:2.412 GHz  Access Point: B0:48:7A:AC:74:52                  Bit Rate=54 Mb/s   Tx-Power=20 dBm                  Retry  long limit:7   RTS thr:off   Fragment thr:off               Power Management:off               Link Quality=69/70  Signal level=-41 dBm                 Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0               Tx excessive retries:2  Invalid misc:1   Missed beacon:0


Why can't certain programs (like readlink) take input from a pipe?

I have a symbolic link to a script in my `$PATH` whose file I wanted to edit. I forgot the filepath, so I tried to do the following:               $ which my_script_link | readlink      I expected that to output the filepath, but instead it output               > readlink: missing operand     > Try 'readlink --help' for more information      I have seen similar behavior before in other situations (like trying to pipe a list of files into vim for editing). I know there are workarounds, like a subshell `readlink $(which my_script_link)`, but I want to understand _why_ piping doesn't work the way I think it should in this situation. Thanks!


Killing X-related processes when CrashPlan is running

I am currently running Ubuntu Server 12.04, but this applies to all flavours of Linux really. This server does a bunch of things and is controlled remotely via ssh. Some time ago I have installed XFCE for those times when I didn't really feel like commandlining or to speed up some program configuration. It's off most of the time and I only launch it when I need it. Today I installed CrashPlan to have my other computers on the network backup to the server. For those of you who don't know it, CrashPlan comes with two services, one is the actual backup engine and one is the GUI. So I installed in on the server, launched the GUI to configure it and then killed X (`sudo service lightdm stop`). But now every time I try to login remotely with RDP from my Windows machine (`xdrp` is installed on the server) I am able to connect graphically to the server, which means that all the X-related processes are still running. What have I forgotten? Is it possible to stop running the CrashPlan GUI service and have it never start anymore?


Zaurus and mapping keyboards

Is there still somebody using a `Zaurus`? I got a second-hand SL-C3000 with ROM version _1.11 JP_ and kernel _2.4.20_ , and I cannot manage to remap keys. There is no `xmodmap`, just an application "`KeyMapHelper`" which generates a keymap in text mode.


X.org radeon driver brightness/contrast adjusting

Is there a way I can adjust contrast/brightness of the card (VGA) output when using the open source xorg radeon driver? I have a monitor that has poor image quality when its tweaked using it's knobs, and the only way I can get good image is to tweak it from the graphic card. I was using the proprietary fglrx until now, but i want to switch to radeon.


Why are all files detected as application/octet-stream in nemo?

`nemo` sees all files as `Binary (application/octet-stream)`, so these kinds of things happened:   * All files (`.mkv`, `.mp4`, `.torrent`, anything) lost their association to any program   * All `.pdf` files could not be opened by `evince` They are pdfs, however:                   $ file bla.pdf         bla.pdf: PDF document, version 1.4      `evince bla.pdf` shows:               Unable to open document “file:///tmp/bla.pdf”.     File type application/octet-stream type (application/octet-stream) is not supported      Another example:               $ file bla.mkv      bla.mkv: Matroska data      But when I right click on `nemo` > properties, it's shown as:                                ![enter image description here](http://i.stack.imgur.com/ExfF6.png)   * What's the possible cause of this problem?   * Is there any package that I should re-install? ### Info   * I'm using 64-bit ArchLinux.   * The `~/.local/share/applications/mimeapps.list` exists   * Installing `gnome-defaults-list` doesn't fix the problem.


How Can I Back Up Win7 Before Installing Mint Alongside It

Don't get me wrong, I understand how to install Mint alongside Win7. However, I am wondering how to backup my Windows installation due to the fact that Win7 was preinstalled on my computer and, as such, I don't have an installation disk.


Appending a pem to another

I found a blog that helped me relay postfix through smtp.gmail.com with SASL authentication. One of the steps was:               cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem | \                   sudo tee -a /etc/postfix/smtp_cacert.pem      When I read something like this, I get a little concerned, because I'm not entirely sure what happens if I append the Thawte `.pem` to mine. I built the `.pem` with:               openssl req -new -x509 -days 365 -nodes -out smtp_cacert.pem \                  -keyout smtp_cacert.key`...        * What is the risk of appending the Thawte `.pem` on the one I generated?   * What functionally is this doing to SSL when I append the Thawte `.pem` to mine?


How to install FreeBSD on Thinkpad?

I am trying to install FreeBSD but I am having a problem. My computer is a Thinkpad T400. I followed the instructions to install so I have downloaded the file `FreeBSD-8.3-RELEASE-amd64-dvd1.iso` and burned the ISO image to disc. When I boot with the disc it comes to the Welcome to FreeBSD screen. But when I choose option 1 for Boot FreeBSD [default] nothing happens - it just stays stuck at the welcome screen like it is frozen. Like in the instructions I tried to disable ACPI in the BIOS but I cannot find any option to do this. The closest I found is CPU Power Management which I disabled anyway. I also tried selecting option 2 - Boot FreeBSD with ACPI disabled - but nothing happens. All it does is stay stuck on the welcome screen. I know the install disk is OK because it boots on my desktop computer (I abort the install). How do I install it on my Thinkpad?


synchronize gnome 3 (panel) settings between computers

I'd like to synchronize the configuration of my gnome panel(s) between computers and keep the configuration in Git. How can I dump / import the necessary information? I already found `gconftool2 --dump` but did not find anything that looked like my panel configuration inside. **Update:** I'm using gnome3 classic mode (together with xmonad as window- manager). I found the configuration setting with the dconf-editor below org.gnome.gnome-panel.layout. It's however still cumbersome to come up with the correct shell scripting to extract and sync only the configuration that I want to share. I've opened a wishlist issue in the gnome bugzilla for a dconf sync tool: 710930


What is "SYSV00000000"?

In my `dmesg` this appeared when my window manager (xfwm4, part of XFCE) crashed:               xfwm4[3936]: segfault at 7f3c7c523770 ip 00007f3c7c523770 sp 00007ffffea1ee28 error 15 in SYSV00000000 (deleted)[7f3c7c4e8000+60000]      The same `SYSV00000000` also appears in other places (like `lsof`). So, what is this `SYSV00000000`? I Googled around and found that it's related to virtual memory, but not much else.


Minimalist mouse cursor theme

I'd like to install a X mouse cursor theme like: ![Mouse cursor X](http://i.stack.imgur.com/RKLot.png) I have Lubuntu with lxappearance, but failed to find an appropriate package for this.


find + xargs: argument line too long

I have a line like the following:               find /foo/bar -name '*.mp4' -print0 | xargs -i {} -0 mv -t /some/path {}      but I got the following error:               xargs: argument line too long      I am confused. Isn't the use of `xargs` supposed to precisely help with this problem? **Note:** I know that I can techincally use `-exec` in find, but I would like to understand why the above fails, since my understanding is that `xargs` is supposed to know how to split the input into a manageable size to the argument that it runs. Is this not true? This is all with zsh.


Diagnoising a hardware issue on linux

I have a laptop that completly turns its self off after an unpredictable amount of time. It also doesn't allow for its self to turn it back on after a period of time. To me this sounds like an issue with heat. However, I've tried to max out the heat by running multiple instances of Glspheres. [which got the temperature from 50c to 90c. Still no problems, the fans did turn on. The HD is new, an SSD, and it passed SMART. The /var/log/messages only contain these messages before the crash:               ul 20 23:08:49 ai logger: ACPI event unhandled: thermal_zone TZ0 00000081 00000000     Jul 20 23:08:49 ai logger: ACPI event unhandled: processor CPU0 00000081 00000000     Jul 20 23:08:49 ai logger: ACPI event unhandled: processor CPU1 00000081 00000000     Jul 20 23:08:49 ai logger: ACPI event unhandled: processor CPU2 00000081 00000000     Jul 20 23:08:49 ai logger: ACPI event unhandled: processor CPU3 00000081 00000000     Jul 20 23:08:49 ai logger: ACPI event unhandled: processor CPU4 00000081 00000000     Jul 20 23:08:50 ai logger: ACPI event unhandled: processor CPU5 00000081 00000000     Jul 20 23:08:50 ai logger: ACPI event unhandled: processor CPU6 00000081 00000000     Jul 20 23:08:50 ai logger: ACPI event unhandled: processor CPU7 00000081 00000000      However they are not consistant with completely crashing. So my question is: Is there a way to do a diagnosis on the hardware with linux? I'm using Gentoo, but that won't prevent me from using other tools.


Disc light comes on when pressing keys in Iceweasel Preferences? Is this malevolent?

On Linux,I'm using the Iceweasel web browser (it's effectively Firefox), and in Edit/Preferences/General/Startup, when I type a URL into the "Home Page" box, the hard disc light comes on for EVERY press of a key (eg www.google.com). This seems odd (and unnecessary). I've tried entering text in other boxes in Preferences, and the disc light DOESN'T come on. Do you know why the disc light is coming on, and does it suggest that something sneaky and malevolent is happening?


how to execute commands (remote, asynchronous, pull)

I would like to execute commands on a remote desktop machine, but SSH would be difficult since the remote is offline most of the time, resides in a time tone 10 hours from mine, and may often be behind a firewall / NAT with an unknown IP. So it will have to pull my commands when it can. I am ~~thinking of something around`curl http://.../do.sh | bash`~~ just kidding. **Are there tools available that support such a thing?** I am looking for   1. Something simple and reasonable stable   2. for Linux   3. that pulls commands securely from a web address, mailbox, etc,   4. does require some form of authorization, of course (for example, does not execute anything unsigned)   5. that reports standard output and standard error, and maybe the exit value back to me. I could provide a server with HTTPS, valid certificates, even `sshd` if necessary. I think I am able to hack something myself in theory, but I am afraid that would be really time-consuming. A similar question was asked before, but not really answered (use procmail & code yourself; use our powerful commercial tool for 250$).


How to copy-merge two directories?

I have two directories images and images2 with this structure in Linux:               /images/ad       /images/fe       /images/foo        ... and other 4000 folders and the other is like:               /images2/ad       /images2/fe       /images2/foo      ... and other 4000 folders Each of these folders contain images and the directories' names under images and images2 are exactly the same, however their content is different. Then I want to know how I can copy-merge the images of /images2/ad into images/ad, the images of /images2/foo into images/foo and so on with all the 4000 folders..


How to do dosbox autoexecutable like dosemu on Opensuse

I was trying to migrate an DOS aplication on a dos emulator, I was pretty sure that dosemu was the answer ... but a couple of errors ocurred on the program. So I tryied dosbox. The thing is, under putty a windows user will autenticate to the OpenSUSE server an then the program will autoexecute. I was able to do that on dosemu but **how do I do that on dosbox?** To do that on dosemu, I edited the `.profile` and added this:               stty cols 80 rows 25     dosemu     exit      then on the `.dosemu/drive_c/`, I edited the `autoexec.bat`               lredir f: software_folder     unix -s DOSEMU_VERSION     echo "Welcome to dosemu %DOSEMU_VERSION%!"     unix -e     f:     software_name     exitemu


Fedora and Samba on VirtualBox

I have Linux Fedora 18 installed as a VM Guest. Trying to share directories from the Linux VM Guest box to the Windows 7 Host. ( **NOTE:** VirtualBox is installed on Windows 7, and the Linux virtual machine is created on it). I made my Samba share using text on this link:   * http://www.howtoforge.com/fedora-19-samba-standalone-server-with-tdbsam-backend I made all proper changes in `/etc/samba/smb.conf`, added proper user, etc. I even disabled SeLinux, and flushed the Iptables configuration. Samba is up and running of course. Also, I can ping Linux from Windows. This is the error I'm getting: > Error code 0x800704cf The network location cannot be reached. For > information about network troubleshooting, see Windows Help There are lots of other resources, like:   * http://www.sevenforums.com/network-sharing/113729-password-protected-network-share.html#post978798 I did what is described there, and still having same problem. In all of the cases, I have same error. Can you give me some tips on what I'm doing wrong in this case?


Highlight Files in X and get some function executed, how?

Suppose I want to execute               pdftk input FilesHighlightedInX out specifiedByUserInX      in the following way:   1. User highlights files in X   2. User clicks some button, shortcut, right-mouse-button-select, to execute a Bash script with the `pdftk` command   3. The output file will appear in the directory where the user executed the command (the user can specify the name of the output or not, modular functionality) How can I do this in X?


Download and install latest deb package from github via terminal

I would like to download and install the latest _.deb_ -package from github (https://github.com/elbersb/otr-verwaltung/downloads to be exact). How can I download the latest package (e.g. *otrverwaltung_0.9.1_all.deb*) automatically with a script from github? What I have tried so far:               wget -O- -q --no-check-certificate https://github.com/elbersb/otr-verwaltung/downloads | grep -o -l -e 'otrverwaltung_[0-9.]*_all.deb'     #The filename should be saved in a variable OTRPACKAGE     sudo dpkg -i OTRPACKAGE


How to get system configuration information without dmidecode

In order to collect some system configuration information, I have been using `dmidecode` and the related tool `lshw` to find the information. This works great on most machines, but I have recently got access to a server to test my scripts on. `dmidecode` gives me the error:               # No SMBIOS nor DMI entry point found, sorry.      and `lshw` doesn't work as well. If there is a way to fix this, I would appreciate the help. Otherwise, I need to collect the following information without using `dmidecode`:   * System manufacturer   * System model number   * System serial number   * The BIOS date


How to set up firewall on Debian Squeeze

I have set up Apache, MySQL, PHP, SSH (which I use to connect to the VPS), Node.js, MongoDB and ProFTPd. Now, I want to have a firewall on the system, so that no one hacks the system. For instance, MongoDB is open for all on the default port unless I set it to secure mode and provide a password and so on. But it is recommended to have security mode off, and use a firewall to block requests on that port instead. How would I set up the firewall? (I am not experienced with Linux, and I can only use SSH.)


Mounted own filesystem instead of USB?

I am completely unfamiliar with how *nix handles partitions, but I needed to get a file off of my USB drive so I followed an online post that said you could mount a USB stick with:               sudo mount -t auto /dev/sdb1 /mnt      So I did, but now `ls /mnt` returns the contents of my computer's /home/ directory, and I am afraid to unmount it. How can I get out of this situation without compromising any data? Where can I find an accessible explanation of how to mount a usb drive?


umask is not working for directories

I have an odd problem with umask. My current setting is:               $ umask     0022     $ umask -S     u=rwx,g=rx,o=rx      This only works for files though and not directories:               $ touch abc     $ ll abc     0 -rw-rw-rw- 1 user1 group1 0 Dec 12 11:39 abc     $ mkdir def     $ ll -d def     8.0K drwxrwxrwx+ 2 user1 group1 4.0K Dec 12  2012 def      Can anybody suggest why umask is not working for the directory? Any help is appreciated! This is a new Centos linux system. Edit: thanks for the comments. As some have pointed out, this doesn't work for files either. Extra information: This problem only seems to occur on the home directory which is mounted over NFS, and not on local directories. Could NFS be causing the problem somehow?


ssh X forwarding web browser flash

I have a question regarding ssh X forwarding. Specifically when it comes to forwarding X program i.e. some web browser client, for example Iceweasel. X Server <--(request to display Iceweasel executed on X client)--- X client And lets assume I would like to execute in this web browser some dynamic content like Flash or a Javascript game. My question: Will it be executed on the X server or on the X client?


Searching a file & excluding lines with a specified string

I have a large log file that contains numerous lines of the same entry, lets call it "repeat-info". As an example here is what a portion of the log might look like:               [Timestamp] repeat-info     [Timestamp] repeat-info     [Timestamp] Log information 1     [Timestamp] Log information 2     [Timestamp] repeat-info     [Timestamp] Log information 3     [Timestamp] repeat-info      Is there a command that can output the information in the log file and exclude the repeated information? It becomes a hassle if I have to use `more file.log` and sift through all the repeating information to find what it is I want to look at. I am reading through the man pages for `sed` and `awk` as I saw those appear in searches for my question, however I haven't found anything conclusive that would do what I need. I was searching through the older questions and found this question  which is related to mine. I was looking for a way to do this with a single command, or two piped together, without having to create a script. Any help is appreciated!