Tag Info

Hot answers tagged

38

OK, I've just found it, and it still works! Really funny. You don’t need any fancy applications, instant messengers or the like. With this command you send your audio to the remote host. arecord -f cd -t raw | oggenc - -r | ssh <user>@<remotehost> mplayer - Or if you like ffmpeg better ffmpeg -f alsa -ac 1 -i hw:3 -f ogg - \ | ssh ...


15

Has been an issue with firefox for quite a while, try running firefox as firefox -no-remote (setting MOZ_NO_REMOTE=1 as environment variable should work as well). Here's more info


13

You can use X11 forwarding over SSH; make sure the option X11Forwarding yes is enabled in /etc/ssh/sshd_config, and either enable X11 forwarding by hand with ssh -X remoteserver or add a line saying ForwardX11 yes to the relevant host entry in ~/.ssh/config Of course, that requires a working X display at the local end, so if you're using Windows ...


11

You'll need to download the content of the script in some way. You could do ssh remote-host cat script.bash | bash But that would have the same kind of problem as: cat script.bash | bash namely that stdin within the script would be the script itself (which could be an issue if commands within the script need to get some input from the user). Then, a ...


10

rsync is able to do this. rsync --ignore-existing <src> <dest> You can perform also various kinds of updates. Just have a look at the man page.


10

One simple way is to turn on vnc screen sharing by going to System Preferences -> Sharing -> Screen Sharing on the machine you want to share. For client compatibility reasons you may need to select both "Anyone may request permission to control this screen" and the "VNC viewers may control this screen with a password" checkboxes. Once you've set up the ...


10

SSHFS is wonderful; it can mount remote directories in a local directory. You could install ssh on both sides: # apt-get install ssh On the client side, or both sides if desired, install sshfs and fuse utilities: # apt-get install fuse-utils sshfs Without reboot, load the kernel module: # modprobe fuse Create a mount point for the remote file ...


10

In a screen or tmux session, set up a shell that will reverse your changes after a delay. I don't know anything about iptables, so can't help with that, but something like this has saved my proverbial bacon on numerous occasions while altering live firewall configs on FreeBSD: # In one `screen` or `tmux` window % sleep 60 && <command to reverse ...


8

No packets are received for several seconds and then ~6 are sent back in quick succession. This is symptomatic of two similar phenomena: network congestion or network discards (usually due to congestion). In the first case, a router between here and there has a burst of traffic unrelated to your activities which cause your traffic to be buffered in ...


8

If you can install software on your work computer, then you could install win-sshfs and a ssh client such as PuTTY on your Windows machine. You can then ssh into the remote Ubuntu server to run LaTex and create your files, after which you could use win-sshfs to access those files from the Windows machine. This way, you'd only need the one ssh port open on ...


7

First, the easy way: rsync has a --bwlimit parameter. That's a constant rate, but you can use that to easily throttle it down. Now, if you want the adaptive rate, there is the linux traffic control framework, which is actually fairly complicated. There are several references I'm aware of: Linux Advanced Routing & Traffic Control Traffic Control HOWTO ...


7

Most of the time you will use ssh. vncviewer might be available, but often it isn't (most servers will not have X11 or anything graphics-related). Why use SSH? From the CentOS documentation: After an initial connection, the client can verify that it is connecting to the same server it had connected to previously. The client transmits its ...


7

The reason you are not getting the correct error code is because local is actually the last thing executed. You need to declare the variable as local prior to running the command. local RESULTS RESULTS=$(ssh user@server /usr/local/scripts/test_ping.sh) echo $? You can see the issue here: $ bar() { foo=$(ls asdkjasd 2>&1); echo $?; }; bar 2 $ bar() ...


7

You can do this using WebDAV. This is an HTTP extension that is supported by most web servers, including IIS and Apache. WebDAV can be mounted in linux via the davfs2 FUSE module.


7

This can be done by installing Cygwin and an openssh server on your Windows machine. Cygwin will come with bash, which can run your script, and openssh can be installed under Cygwin, and will allow you to login to the Windows machine remotely. Before logging in, you can transfer your script to the Windows machine using scp, and then run it directly with ssh. ...


6

What you have is not a unix command line, what you have is an FTP session. FTP is designed primarily to upload and download files, it's not designed for general file management, and it doesn't let you run arbitrary commands on the server. In particular, as far as I know, there is no way to trigger a file copy on the server: all you can do is download the ...


6

You may find useful xinput list and xinput test <device>. For example, $ xinput list ⎡ Virtual core pointer id=2 [master pointer (3)] ⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)] ⎜ ↳ SynPS/2 Synaptics TouchPad id=11 [slave pointer (2)] ⎣ Virtual core keyboard id=3 ...


6

If I had to make an educated guess about what's going on here, I'd say that firefox first looks for an open firefox window before launching, and if that exists sends it a message using X to just start a new browser window. Because the remote system is using your local display, whatever it uses for detection is picking up the local window. (This would also ...


6

This line is printed by the shell. Different shells implement looking for mail in slightly different ways, but unless can count on people to configure their shells to your liking (and possibly pick a different shell), you need to send them mail. Good shells designed for interactive use have a way to run arbitrary commands before displaying a prompt, in ...


6

You don't need to know your own host's IP address in order to copy files to it. Simply use scp to copy the file from the remote host: $ scp user@rhost.com:path/to/read.txt ~/path/to/newRead.txt If you want to copy to your local host from your remote host, get your own IP address with ifconfig and issue the following: $ scp path/to/read.txt ...


6

I would say the answer is maybe but I wouldn't do it and I would STRONGLY recommend you DO NOT TO ATTEMPT IT. The idea is fairly simple but requires perfect execution which Murphy's Law will mess up. If your hardware has PXE boot and another Linux machine on the network where your server resides you can set up a Network Boot Environment wipe your MBR on ...


6

Beside solutions with sudo, that can be script-friendly be configured (no extra password-prompt for specific commands) or setuid solutions which are not easy to do secure, I suggest the usage of ssh public-key authorization with the command= restriction. For this, you need to enable password-less login to the root user if not yet done (PermitRootLogin ...


6

I'm exactly sure about what you are looking for. But to launch a new application inside a running X server you can use for example: DISPLAY=":0" mplayer -fs video.ogg You can choose the id of the X server, and you may add an optional screen identifier like :0.1 to launch the application in screen number 1.


6

In linux, you would choose for NFS (also check out the article on archwiki about it which may have applicable information for your distribution aswell). It has more advanced features then samba. If you need to lock (i.e. concurrent acces) files you should look into lockd aswell because nfs is stateless. However it is harder to configure than smb. I would ...


5

You could check out VirtualGL together with TurboVNC should provide you with 20fps @ 1280x1024 on 100 Mbit (see wikipedia). Do note that it might not work with all applications, it depends on how they use OpenGL.


5

There is no standard per-user file that is run for non-interactive logins. You need to either make the program self-contained, so that it's able to find its dependencies without relying on non-default environment variables, or else explicitly set the environment, typically with ssh somehost '. ~/.profile; exec ~/some/path/somescript.py' You shouldn't be ...


5

Using rsync --exclude is the more obvious choice here, but if you really want to just send a few files or folders and have something specific to exclude, you can use shell globing with scp. First make sure you have the right globing options set in your shell. For bash run shopt -s extglob and for zsh use setopt ksh_glob. Then something like this: scp ...


5

Use rsync, and specify --ignore-existing if you do not want to update existing files: rsync -e ssh -av --ignore-existing /my/source/directory jim@foreign.machine.egg:/data/ A popular additional option I usually add is --progress so you see what's going on. If you expect interruptions, also say --partial, but I'm not sure how "partial" and ...



Only top voted, non community-wiki answers of a minimum length are eligible