ODROID-C1: No hardware cursor in terminal

This forum is for supported devices using an ARMv7 Amlogic SoC.

Re: ODROID-C1: No hardware cursor in terminal

Postby ViCy » Sun Mar 08, 2015 10:05 pm

After much research, I've found a way to turn on the soft cursor in the TTY console.

From your home directory:
$this->bbcode_second_pass_code('', '
#infocmp >> ~/terminfo.txt
#sed -i.bak -e 's/?0c/?112c/g' -e 's/?8c/?48;0;64c/g' terminfo.txt
#tic terminfo.txt
#tput cnorm
')

related commands include
- tput cvvis (make cursor very visible)
- tput civis (make cursor invisible)

You'll need to issue #tput cnorm with every login, or create a way to issue the command at startup or login.

The commands above change the termcaps for the linux terminal to use a software cursor instead of a hardware cursor.
If you are interested, there are some clues to what the changes mean at this site:
http://linuxgazette.net/137/anonymous.html
Cursor colors can be changed, but I haven't found a way to change the cursor shape.
ViCy
 
Posts: 4
Joined: Sun Mar 08, 2015 9:45 pm

Re: ODROID-C1: No hardware cursor in terminal

Postby skipmonkey » Fri Mar 27, 2015 12:02 am

Have managed to get red block software cursor that works at login, stays on in nano and is still there after exit nano and back in terminal. here's what I did, not sure all steps are necessary.

first created sh file:
#nano rc.sh

enter script, save and exit:
#!/bin/bash
echo -n -e '\e[?17;0;64c'

make executable:
#chmod +x rc.sh

run to make sure works:
#./rc.sh

if you got red cursor, copy to /etc/profile.d:
#cp rc.sh /etc/profile.d/rc.sh

reboot, after login cursor should be there but isn't for nano or in shell after nano??

so looked at info on: http://emacswiki.org/emacs/CursorOnLinuxConsole
and followed bit about edit Linux term entry

#infocmp linux > linux-term-orig
#infocmp linux > linux-term-edited
#nano linux-term-edited
line that starts with [clear=], edit to: clear=\E[H\E[J, cnorm=\E[?25h\E[?17;0;64c, cr=^M,
line that starts with [cvvis=], edit to: cvvis=\E[?25h\E[?17;0;64c,
leave rest of code as is, save and exit
Install edited file:
#tic linux-term-edited
reboot, login and try in terminal, nano, back to terminal.
is working on mine, hope does for others
skipmonkey
 
Posts: 1
Joined: Thu Mar 26, 2015 11:32 pm

Re: ODROID-C1: No hardware cursor in terminal

Postby ViCy » Sun Mar 29, 2015 4:10 pm

Here's a follow-up to my post above to turn on the soft cursor.

To enable the soft cursor at every login, after making the changes in my message above,
do the following from your home directory:
$this->bbcode_second_pass_code('', '
$echo 'tput' cnorm' > setcursor.sh
$cd /etc/profile.d
$sudo cp ~/setcursor.sh .
$sudo chmod +755 setcursor.sh
$cd ~
')
Now the soft cursor should show up after reboot and re-login.
You can delete the setcursor.sh from your home directory if you'd like.
ViCy
 
Posts: 4
Joined: Sun Mar 08, 2015 9:45 pm

Previous

Return to Amlogic

Who is online

Users browsing this forum: No registered users and 5 guests