Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

strange vi behavior

Featured Replies

When I telnet from XP to the unraid server, vi behaves erratically.  Initially the file does not display correctly, arrow keys produce control chars, a simple 'x' erases the whole screen.  As an example, my working go file looks like this after a 'vi go' from the command prompt.

 

[0;10;7mUsage: [[
installpkg /boot/packages/socat-1.7.0.0-i486-2bj.tgzk12.1.tgz
installpkg /boot/packages/unraid_notify-2.54-noarch-unRAID.tgz
rontab -l >/tmp/crontab
echo "0 2 * * * /boot/daily_backups.sh 1>/dev/null 2>&1" >>/tmp/crontab
cp /tmp/crontab /var/spool/cron/crontabs/root-
crontab /tmp/crontab

 

There are missing lines, missing letters and garbage at the top.  I tried changing terminal type to vt100, but that didn't work.  I have ensured there are not PC newlines.  Any suggestions on what is going on?

 

Best,

Aaron

  • Author

So, I got sshd running and tried logging in with that.  When I try to vi via ssh, I get

 

  vi: cygwin: unknown terminal type

 

What a pain.  Can someone help me understand what up?

 

Thanks,

Aaron

So, I got sshd running and tried logging in with that.  When I try to vi via ssh, I get

 

  vi: cygwin: unknown terminal type

 

What a pain.  Can someone help me understand what up?

 

Thanks,

Aaron

After logging in, type:

TERM=ansi

export TERM

 

If that does not work, try TERM=xterm

 

Then try again

  • Author

 

Thanks for the suggestions.  I found a solution (below), but I tried these to see if they would help.

 

The TERM was already set to ansi, so the first one didn't help.

Setting the TERM to xterm was even worse.

 

After I found out that vi was a link to nvi

 

  vi -> nvi*

 

I decided to try vim instead.  It works just dandy for TERM=ansi.

 

Strange that this isn't a common problem given my relatively vanilla configuration. 

 

Regards,

Aaron

Most users never connect directly to the server and edit files.  Esp through vi which as you know is a "acquired taste".

 

I installed openssh through unmenu and connect with putty and had no issues using vi (that I can remember).

  • Author

 

So, this prompts a follow up question.  How to most users edit files like /boot/config/go remotely?

 

My unraid server is sitting in a closet, so it seems the options are

- copy file to location on shared disks, edit, copy it back

- sneaker net the usb to my desktop, edit, sneaker net back

- use vi

 

Am I missing some easier way?  I just get by in vi, so not love lost ;-)

 

Thx, A

 

So, this prompts a follow up question.  How to most users edit files like /boot/config/go remotely?

 

My unraid server is sitting in a closet, so it seems the options are

- copy file to location on shared disks, edit, copy it back

- sneaker net the usb to my desktop, edit, sneaker net back

- use vi

 

Am I missing some easier way?  I just get by in vi, so not love lost ;-)

 

Thx, A

The "go" script is processed to remove extra carriage returns before it is executed.  It is one of the files where you can use any editor.

 

So, on your windows PC, open file explorer, type

\\tower\flash\config

in the path, then open and edit "go" using anything you like. 

 

This is not true of many of the native linux configuration files, but it will work just fine for the "go" script.

 

 

  • Author

 

Doh, when I configured several weeks ago I chose not the export the flash drive b/c I couldn't think why I would need to at the time.  Completely forgot it could be exported.  That was the bit I was missing.

 

Thanks for all the help!!!

 

 

A person who is man enough to use vi should not attempt doing it from a M$ Windows command prompt window unless he is brave enough to drop into ex editor :)

A person who is man enough to use vi should not attempt doing it from a M$ Windows command prompt window unless he is brave enough to drop into ex editor :)

It was almost 5 years before a UNIX box I was on had ANY visual editor.  "ed" was all we had, and paper teleprinters were the I/O device...  Did not even have a CRT attached.   Did I mention the teleprinter was at a blazing 300 baud?  I wrote many programs on it under the Mashey shell.  It even had labels and "goto" in the shell... ahh the old days... (John Mashey's shell pre-dated the Borne shell, and the Korn shell)

 

I can do "ex" commands...  (Although I'll admit, it has been years since I had to drop into "ex"...  (Capital "Q"  ;D)

 

Joe l.

It takes an old-timer (like me) to remember that "ex" exists.  You must be OLD TOO!!!.

 

 

 

It takes an old-timer (like me) to remember that "ex" exists.  You must be OLD TOO!!!.

 

 

Suffice it to say I wrote my first program in 1980. It was Fortran-IV, punch cards and an old IBM/360 computer :)

Though I have never made any money by writing programs...

So, this prompts a follow up question.  How to most users edit files like /boot/config/go remotely?

 

My unraid server is sitting in a closet, so it seems the options are

- copy file to location on shared disks, edit, copy it back

- sneaker net the usb to my desktop, edit, sneaker net back

- use vi

 

Am I missing some easier way?  I just get by in vi, so not love lost ;-)

 

I too can get around in vi if I have to, but would rather not.  My personal favorite for years has been 'jove' (Jonathan's Own Version of Emacs).  It's not a full implementation of Emacs but has more than enough for everyday use and programming, plus it's small and fast and can be built for most any unix-like os.  Works well over putty or even telnet in a windows cmd window.

 

Of course, the command set is all emacs, which some would also say is an acquired taste...

 

Look for jove-4.16.0.61-i386-1.tgz or newer.

 

--Bill

...and for the rest of us, who are not so masochistically inclined, there's [ftp=ftp://slackware.osuosl.org/pub/slackware/slackware-13.0/slackware/ap/nano-2.0.9-i486-1.txz]nano[/ftp].    ;) 

 

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.