Tag Info

New answers tagged

1

You have created the script with a DOS (windows) editor, that's added a \r (carriage return) to the end of every line. You can convert the file with: dos2unix check.sh check.sh.tmp && mv check.sh.tmp check.sh I personally usually do vim check.sh and then :set notx and then save the file: :wq


0

As others have pointed out, BounceTerm is no longer required. However, for me, echo -n did not work. In order for my terminal to bounce, I needed echo -e. Here is an example. Paste this in Terminal, then quickly Cmd-TAB away to give focus to a different application: sleep 2; echo -e "\a" You should hear a boop, your Terminal dock icon should bounce, and ...


0

Mount the install RHEL DVD: mkdir -p /mnt/RHEL mount /dev/cdrom /mnt/RHEL Or if you just have the ISO, you can use that instead: mkdir -p /mnt/RHEL mount -o loop /path/to/RHEL.iso /mnt/RHEL Now make a Yum repository which uses the DVD as a repository: /etc/yum.repos.d/rhel-dvd.repo [rhel-dvd] name=Red Hat Enterprise Linux $releasever - $basearch - DVD ...


1

then i modified my vimrc file No. That file is not your vimrc file. Remove everything you have added to /etc/vimrc and put it in your ~/.vimrc. Since we are at it, you don't need to quote "dark" (which doesn't do what you probably think it does anyway), none of those settings have any effect on showing the current mode or the behavior of ...


0

Nevermind. I found out that I had some incorrectly written commands in the .bash_profile file that were overwriting or taking precedence over the default profile commands. I deleted those and everything is working again.


-1

Firstly, I would suggest moving the /etc/vimrc file to your home directory and calling it ".vimrc", as that will only affect your personal use of vim, and shouldn't affect your use of it as root. Also, try commenting out (put double quotes at the start of each line), to see where the problem lies. I've just tried to recreate the problem, and can't, vim works ...


1

This is resolved by changing the baseurl in the fedora.repo and fedora-updates.repo files present in the /etc/yum.repos.d folder. This is needed since Fedora 17 has already past end-of-life.


3

Java is in /usr/bin on my OSX 10.9.4 system: $ which java /usr/bin/java That directory is also in your command path. The entry in /usr/bin is a symbolic link. Maybe you were expecting the actual java install directory to be in your path, but that doesn't have to be the case. Creating symbolic links in /usr/bin is a common practice. $ ls -l /usr/bin/java ...


1

First of all, you'll need to edit your inittab file. On Debian, it's located in /etc/inittab, and I would guess it might be somewhere similar on Ubuntu. The normal TTY prompt is managed with a program called getty, so you'll need to scroll down to where that program is set up. You should see a lot of lines similar to this: # Note that on most Debian systems ...


0

I believe I've found a solution. I'm not sure how correct it is, but it seems to work without issue, at least if you use xterm: If I run export TERM=xterm-256color, then screen acts like vim and man - using the altscreen without clearing the original screen. After some searching, I found this which, although it's about solving a different issue, includes ...


0

I use arp -an mybox $ arp -an ? (172.16.17.135) à f0:1f:af:36:93:fa [ether] sur wlan1 ? (172.16.17.143) à f8:16:54:95:ac:b2 [ether] sur wlan1 ? (172.16.17.65) à 8c:70:5a:a4:74:a8 [ether] sur wlan1 ? (172.16.17.1) à 00:1C:d4:01:06:0c [ether] sur wlan1 If you feel adventurous, you can use arp -a which will try to resolv IP. This will show you only local ...


0

Depending on Linux version and also on network configuration you need to supply network information for arp-scan so it knows what to scan as you may have (and usually you do) multiple interfaces. I'd recommend this command options sudo arp-scan --localnet --interface=en1 First of all, you may need sudo because arp-scan uses some services that require ...


0

Increase only "password" value in macro option (i use 1750ms). Explaination : with this values : Connection:1000 Password: 1050 Login:900 Command: 1250 Puttycm wait 1000ms after the connection command to start logincommand Puttycm wait 900ms after the login command to start password command Puttycm wait 1050ms after the password command to start the ...


2

stty gets/sets IO characteristics of terminals, both physical and virtual. Because of this, it can set parameters that will have no actual effect, like the baud rate of a virtual terminal. First you have to understand the types of terminal on Linux systems: Most of the terminals you will see will be pseudo (virtual) terminals, and live in /dev/pts. These ...


0

Once you do the "CTRL+ALT+T" to open the prompt, just enter "shell" and you get a standard bash prompt, with all the usual bells and whistles. From there, you can ssh to your hearts content. Enjoy


0

I'd love to be proven wrong but it does not appear possible with vt100 terminals, which is what screen emulates, to set their default background color; it is only possible, via a CSI sequence, to change the background color to its default value. It is possible though, providing your host terminal supports it, to send an OSC escape sequence to set the ...


0

To be able to run the commands ifconfig wlan0 up, iwconfig wlan0 essid name key password and dhclient wlan0, you need to be root. So, you have to put the word sudo before those commands (unless you're already logged in as root). The password in the command iwconfig wlan0 essid name key password should be in hexadecimal. If you want to type the ASCII ...


0

The option was added to the code in January 2014, but doesn't appear to be included in the most recent release (v2.0). It can, however, be easily found in the latest nightly builds, at Preferences > Advanced > Terminal: Visual bell flashes the whole screen, not just a bell icon.


-1

In Ubuntu 12.04, I was able to paste using Ctrl+Shift+Insert.


0

You can launch a script in a new Terminal instance with: open -b com.apple.terminal test.sh where test.sh is the name of the script you want to run. Source @anjanbecchu found the following script: TAB_NAME=$1; COMMAND=$2; osascript -e "tell application \"Terminal\"" -e "tell application \"System Events\" to keystroke \"t\" using {command down}" -e ...


1

$ mvim -v file.txt does what you want. You should alias vim to mvim -v, IMO.


0

From memory, Ctrl-G is the bell character, so I think that's why the second one worked. But screen can be picky over what characters it accepts as it takes Ctrl-A as the command code. Try this #!/bin/sh # Ring the terminal bell # echo "\a" # does not work in some shells tput bel I found this on rosettacode, hopefully it will give you some options


0

I ended up using iotop which shows a nice detailed table, showing that there is read activity on the disk... therefore, I am sure the application is not stuck, and I will wait longer. >> sudo iotop


0

The command I was thinking of was seq EXAMPLES # seq 1 3 1 2 3 # seq 3 1 3 2 1 # seq -w 0 .05 .1 0.00 0.05 0.10


0

You can do this using virtual consoles. The /dev/vcs* and /dev/vcsa* devices corresponds to the /dev/tty* devices (the virtual terminals). /dev/tty1 should have a matching /dev/vcs1 and vcsa1. As root, you can cat these devices (e.g. cat /dev/vcs1), and see what's on the corresponding tty. Note that the output does not contain newline characters, so ...


2

start calls the Win32 shell ShellExecuteEx function. There is no direct equivalent in Linux. However, for your purpose of a non-blocking command, you can add a & to the end of a line in bash to run the command in the background. For example: process-photos *.jpg & I may have misinterpreted your question. The first part of this answer more ...


2

I run it with . script That means you execute the script in your current shell, so the exit kills your current shell. This is expected behaviour. You should probably either give the script execute permissions (chmod u+x script) and run ./script, or invoke it with bash script to run it in a new shell process.


0

Sounds like you have print queue passing through to the session from the local client. Have the printer mapping applied in the session on log on. You can do this by using a login script for the server or use Group Policy Preferences to map the printer on log on.


4

If you go into the Putty Configuration screen, under the "Terminals" category, in the "Features" tab, there is a checkbox for "Disable switching to alternate terminal screen". Make sure to check it, and you'll get exactly the behavior you're looking for. From the Putty Documentation: 4.6.4 Disabling switching to the alternate screen Many ...


2

Use TERM=vt100 to leave the content on the screen after exit. You can simply test by doing export TERM=vt100 if using bash. No need to restart the shell. You can set this value in Putty as well, as part of the configuration for that connection.


-2

Just type Q to get back to the command line, from the help module.


0

To resolve this issue I found the following link provided by @duDE helpful: support.apple.com/kb/TA27005 In short, do the following: open your terminal. If it crashes/turns itself off, making it impossible to see the screen try the following: terminal --> prefereces --> settings --> shell --> choose "don't close the window" under WHEN THE SHELL EXITS. ...


1

you can change the color configuration here: settings -> configuration -> terminal Then select a color scheme, for example "Bright". You can click in each of the color and change it as you want.


1

The best solution these days (late 2014) is to download the current screen source and compile it locally. I just verified this works for me on OSX Mavericks. There are some patches that need to be applied for building on Mac OSX. I have applied them and put the source code on Github. Automatic Instuctions git clone ...


0

If your only goal is to keep the terminal open, you could add something like "telnet x.x.x.x 2057; bash". This will launch the bash after telnet closes, keeping the terminal open.


0

Use keyboardcast, which is designed for this.


0

You are missing an ! at the first line of your script I think, it should be: #!/bin/bash By the way, another way to do this, if you have all the .mp4 files in the current directory, would be this in bash: for file in `ls *.mp4 | cut -d '.' -f -1 `; do ffmpeg -i ${file}.mp4 -b:a 192k -vn ${file}.mp3; done You can adjust the glob criteria in the *.mp4 ...


0

Why not using ssh config for this? You can achieve this by creating a config file in your ~/.ssh folder: vim ~/.ssh/config and then add something like this: Host example HostName Server_IP_or_hostname User SSH_USER IdentityFile ~/path/to_your_key And then when you want to ssh all you have to do is type: ssh example <2cents>


1

You can backslash the doublequotes gnome-terminal -e "./script.py -d \"somevalueforscriptpy\" $1" or, for readability, you can switch to singlequotes gnome-terminal -e "./script.py -d 'somevalueforscriptpy' $1"


1

I like you do most of my work on remote systems, I use my local system to do some local tasks but nothing extensive. Based on this requirement I chose to get an Acer C7, which had an internal spinny disk giving a fair amount more storage for reading photos off SD cards and do some backing up. I did use the SSH client in the browser but overall I found it ...


0

You might want to look at the 'screen' unix tool. It's a terminal "multiplexer" that opens multiple terminals over a single connection (ssh, telnet, or local). It's configurable to automatically open multiple shells or commands (eg. vim, top, etc) in different screens with a new connection. It can also preserve sessions across disconnects, so if you are ...


0

After poking around for a bit i was able to do what I wanted with a simple perl script: I was hung up before because I couldnt get a tab to open in the same window. I now realize that the command is built to create a new instance of a terminal window. So: gnome-terminal --tab-with-profile=def won't open a new tab like I wanted, but will open a new ...


1

For those who use a private key with their ssh and want to use the ~/.ssh/config method you can add an 'IdentityFile' attribute to your host followed with the key path. I.e: Host SomeServer User ubuntu HostName someserver.com IdentityFile ~/.ssh/private.key I would've added this bit as a comment to one of the answers, but my reputation is ...


0

This question has been answered here: when running screen on OSX, command+r messes up arrow keys in vim across all screens Copied answer: As a good little Vim advocate, I feel bound to tell you to learn to use hjkl as your cursor keys. Halfway through exploring the problem, I thought it had mysteriously fixed itself, until I realized I was testing using ...



Top 50 recent answers are included