Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-17 Thread German
On Sat, 14 Mar 2015 10:33:59 +
Neil Bothwick n...@digimed.co.uk wrote:

 On Sat, 14 Mar 2015 06:08:34 -0400, German wrote:
 
   Forget about chmod 770. Better do a chmod g+rw. :-)  
  
  Tried it, it also doesn't stay permanently. OK, no solution :(
 
 The correct solution is a udev rule, but it appears that something may be
 overriding that when you login. A kludgy solution is to add the chmod
 command to ~/.bash_profile.
 
The system doesn't appear to have ~/.bash_profile Is that sufficient to run 
nano -w ~/.bash_profile and fill in the blanks?

 
 -- 
 Neil Bothwick
 
 Veni, vermini, vomui
 I came, I got ratted, I threw up


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-17 Thread German
On Sat, 14 Mar 2015 14:03:21 -0400
Tom H tomh0...@gmail.com wrote:

 On Sat, Mar 14, 2015 at 6:08 AM, German gentger...@gmail.com wrote:
  On Sat, 14 Mar 2015 01:16:32 +0100 waben...@gmail.com wrote:
  waben...@gmail.com wrote:
 
  So it seems that after login you first have to chmod 770 the tty
  before you do a su - user (user have to be in group tty of course).
 
  Forget about chmod 770. Better do a chmod g+rw. :-)
 
  Tried it, it also doesn't stay permanently. OK, no solution :(
 
 Because /dev is recreated at every boot.
 
 You have to override the tty rule(s) in
 /lib/udev/rules.d/50-udev-default.rules with a rule/rules in
 /etc/udev/rules.d/.
 
 Since the 50-udev-default.rules is an upstream rule that's shipped by
 all the distros that I use, perhaps you should track down why this is
 happening rather than overriding it.
 
 Canek had asked whether you were using systemd and therefore logind.
 Since you're using openrc, perhaps you should check whether installing
 consolekit is a fix because it's the precursor to logind.

Just to emerge consolekit and see if it fix it?
 


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-17 Thread Tom H
On Tue, Mar 17, 2015 at 11:42 AM, German gentger...@gmail.com wrote:
 On Sat, 14 Mar 2015 14:03:21 -0400, Tom H tomh0...@gmail.com wrote:

 Canek had asked whether you were using systemd and therefore logind.
 Since you're using openrc, perhaps you should check whether installing
 consolekit is a fix because it's the precursor to logind.

 Just to emerge consolekit and see if it fix it?

Yes. This is this is the type scenario that it's meant to handle.

http://www.freedesktop.org/wiki/Software/ConsoleKit/



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-17 Thread German
On Tue, 17 Mar 2015 19:16:42 +0200
Matti Nykyri matti.nyk...@iki.fi wrote:

  On Mar 17, 2015, at 18:11, German gentger...@gmail.com wrote:
  
  Don't hit your head to a brick wall. A small strace to the login process 
  reveals that login set things as you tell it to in /etc/login.defs
  
  In this file change the line:
  TTYPERM 0600
  To:
  TTYPERM 0620
  
  And your problem is fixed.
  
  Sorry, this didn't fix it
 
 Yes. Sorry. The mode was wrong:
 
 TTYPERM 660
 
 Will fix it, if your screen is setgid tty and ttyX is gid tty. If not then:
 
 TTYPERM 666
 
 Will fix it, but also your tty will be world readable. If you don't consider 
 that too big security risk, then just go

Neither 660 nor 666 fixed it. Sorry :(

 ahead.
 
 -- 
 -Matti
 


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-17 Thread Matti Nykyri
 On Mar 17, 2015, at 19:33, German gentger...@gmail.com wrote:
 
 On Tue, 17 Mar 2015 19:16:42 +0200
 Matti Nykyri matti.nyk...@iki.fi wrote:
 
 On Mar 17, 2015, at 18:11, German gentger...@gmail.com wrote:
 
 Don't hit your head to a brick wall. A small strace to the login process 
 reveals that login set things as you tell it to in /etc/login.defs
 
 In this file change the line:
 TTYPERM 0600
 To:
 TTYPERM 0620
 
 And your problem is fixed.
 
 Sorry, this didn't fix it
 
 Yes. Sorry. The mode was wrong:
 
 TTYPERM 660
 
 Will fix it, if your screen is setgid tty and ttyX is gid tty. If not then:
 
 TTYPERM 666
 
 Will fix it, but also your tty will be world readable. If you don't consider 
 that too big security risk, then just go
 
 Neither 660 nor 666 fixed it. Sorry :(

If you have:

TTYPERM 0666

And logout and login. What mode and ownership do you have in you tty 
(/dev/ttyX)?

-- 
-Matti





Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-17 Thread Matti Nykyri
 On Mar 17, 2015, at 18:11, German gentger...@gmail.com wrote:
 
 Don't hit your head to a brick wall. A small strace to the login process 
 reveals that login set things as you tell it to in /etc/login.defs
 
 In this file change the line:
 TTYPERM 0600
 To:
 TTYPERM 0620
 
 And your problem is fixed.
 
 Sorry, this didn't fix it

Yes. Sorry. The mode was wrong:

TTYPERM 660

Will fix it, if your screen is setgid tty and ttyX is gid tty. If not then:

TTYPERM 666

Will fix it, but also your tty will be world readable. If you don't consider 
that too big security risk, then just go ahead.

-- 
-Matti



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-17 Thread Matti Nykyri
 On Mar 17, 2015, at 21:52, German gentger...@gmail.com wrote:
 
 On Tue, 17 Mar 2015 20:39:46 +0200
 Matti Nykyri matti.nyk...@iki.fi wrote:
 
 On Mar 17, 2015, at 19:33, German gentger...@gmail.com wrote:
 
 On Tue, 17 Mar 2015 19:16:42 +0200
 Matti Nykyri matti.nyk...@iki.fi wrote:
 
 On Mar 17, 2015, at 18:11, German gentger...@gmail.com wrote:
 
 Don't hit your head to a brick wall. A small strace to the login process 
 reveals that login set things as you tell it to in /etc/login.defs
 
 In this file change the line:
 TTYPERM 0600
 To:
 TTYPERM 0620
 
 And your problem is fixed.
 
 Sorry, this didn't fix it
 
 Yes. Sorry. The mode was wrong:
 
 TTYPERM 660
 
 Will fix it, if your screen is setgid tty and ttyX is gid tty. If not then:
 
 TTYPERM 666
 
 Will fix it, but also your tty will be world readable. If you don't 
 consider that too big security risk, then just go
 
 Neither 660 nor 666 fixed it. Sorry :(
 
 If you have:
 
 TTYPERM 0666
 
 And logout and login. What mode and ownership do you have in you tty 
 (/dev/ttyX)?
 
 Ok, Matti, 0666 worked, now I can run screen as a user. Thanks. Do you think 
 I have to try to run it 0660? Will it be less security risk?

Well 0666 = 666. The reason it now worked is because you logged out and then 
back in. This is becaus login program only reads the /etc/login.defs-file when 
you login.

With mode 0666 every user on your computer can read everything (every 
character) you have in your screen (so not much privacy). If you set:

TTYGROUP utmp
TTYPERM 0660

And have:

-rwxr-sr-x root utmp /usr/bin/screen

Everything will also work and you have more privacy.

When /bin/login us run it changes ownership of the tty to the user who logs in. 
Su -l does not do this. That is why the screen doesn't work. ConsoleKit is the 
program that is responsible for many of these permission changes. Do you have 
that installed?

-- 
-Matti






Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-17 Thread German
On Tue, 17 Mar 2015 20:39:46 +0200
Matti Nykyri matti.nyk...@iki.fi wrote:

  On Mar 17, 2015, at 19:33, German gentger...@gmail.com wrote:
  
  On Tue, 17 Mar 2015 19:16:42 +0200
  Matti Nykyri matti.nyk...@iki.fi wrote:
  
  On Mar 17, 2015, at 18:11, German gentger...@gmail.com wrote:
  
  Don't hit your head to a brick wall. A small strace to the login process 
  reveals that login set things as you tell it to in /etc/login.defs
  
  In this file change the line:
  TTYPERM 0600
  To:
  TTYPERM 0620
  
  And your problem is fixed.
  
  Sorry, this didn't fix it
  
  Yes. Sorry. The mode was wrong:
  
  TTYPERM 660
  
  Will fix it, if your screen is setgid tty and ttyX is gid tty. If not then:
  
  TTYPERM 666
  
  Will fix it, but also your tty will be world readable. If you don't 
  consider that too big security risk, then just go
  
  Neither 660 nor 666 fixed it. Sorry :(
 
 If you have:
 
 TTYPERM 0666
 
 And logout and login. What mode and ownership do you have in you tty 
 (/dev/ttyX)?

Ok, Matti, 0666 worked, now I can run screen as a user. Thanks. Do you think I 
have to try to run it 0660? Will it be less security risk?
 
 -- 
 -Matti
 
 
 


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-17 Thread German
On Tue, 17 Mar 2015 22:14:03 +0200
Matti Nykyri matti.nyk...@iki.fi wrote:

  On Mar 17, 2015, at 21:52, German gentger...@gmail.com wrote:
  
  On Tue, 17 Mar 2015 20:39:46 +0200
  Matti Nykyri matti.nyk...@iki.fi wrote:
  
  On Mar 17, 2015, at 19:33, German gentger...@gmail.com wrote:
  
  On Tue, 17 Mar 2015 19:16:42 +0200
  Matti Nykyri matti.nyk...@iki.fi wrote:
  
  On Mar 17, 2015, at 18:11, German gentger...@gmail.com wrote:
  
  Don't hit your head to a brick wall. A small strace to the login 
  process reveals that login set things as you tell it to in 
  /etc/login.defs
  
  In this file change the line:
  TTYPERM 0600
  To:
  TTYPERM 0620
  
  And your problem is fixed.
  
  Sorry, this didn't fix it
  
  Yes. Sorry. The mode was wrong:
  
  TTYPERM 660
  
  Will fix it, if your screen is setgid tty and ttyX is gid tty. If not 
  then:
  
  TTYPERM 666
  
  Will fix it, but also your tty will be world readable. If you don't 
  consider that too big security risk, then just go
  
  Neither 660 nor 666 fixed it. Sorry :(
  
  If you have:
  
  TTYPERM 0666
  
  And logout and login. What mode and ownership do you have in you tty 
  (/dev/ttyX)?
  
  Ok, Matti, 0666 worked, now I can run screen as a user. Thanks. Do you 
  think I have to try to run it 0660? Will it be less security risk?
 
 Well 0666 = 666. The reason it now worked is because you logged out and then 
 back in. This is becaus login program only reads the /etc/login.defs-file 
 when you login.
 
I pretty much sure that I logged out and logged in back after setting to 666 
and it didn't work, but setting to 0666 has worked. Strange.

 With mode 0666 every user on your computer can read everything (every 
 character) you have in your screen (so not much privacy). If you set:
 
 TTYGROUP utmp
 TTYPERM 0660
 
 And have:
 
 -rwxr-sr-x root utmp /usr/bin/screen
 
 Everything will also work and you have more privacy.

I'll be the only user on this system. So I guess I can leave it as it is.

 
 When /bin/login us run it changes ownership of the tty to the user who logs 
 in. Su -l does not do this. That is why the screen doesn't work. ConsoleKit 
 is the program that is responsible for many of these permission changes. Do 
 you have that installed?

I think ConsoleKit was installed when I emerged screen, but I am not sure.
 
 -- 
 -Matti
 
 
 
 


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-17 Thread German
On Sat, 14 Mar 2015 20:53:44 +0200
Matti Nykyri matti.nyk...@iki.fi wrote:

  On Mar 14, 2015, at 12:47, German gentger...@gmail.com wrote:
  
  On Sat, 14 Mar 2015 10:33:59 +
  Neil Bothwick n...@digimed.co.uk wrote:
  
  On Sat, 14 Mar 2015 06:08:34 -0400, German wrote:
  
  Forget about chmod 770. Better do a chmod g+rw. :-)  
  
  Tried it, it also doesn't stay permanently. OK, no solution :(
  
  The correct solution is a udev rule, but it appears that something may be
  overriding that when you login.
  
  I have the same udev rule. Yes, something is overriding it.
  
  A kludgy solution is to add the chmod
  command to ~/.bash_profile.
 
 Don't hit your head to a brick wall. A small strace to the login process 
 reveals that login set things as you tell it to in /etc/login.defs
 
 In this file change the line:
 TTYPERM 0600
 To:
 TTYPERM 0620
 
 And your problem is fixed.

Sorry, this didn't fix it
 
 The problem has nothing to do with udev. If you don't like a volatile /dev 
 just remove udev and create everything you wan't by hand (not recommended ;)
 
 Another thing i'm puzzled by is, why do you wan't to login as root and the su 
 to someone else? I usually do it the other way around...
 
 -- 
 -Matti
 
 
 


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-15 Thread Peter Humphrey
On Saturday 14 March 2015 20:53:44 Matti Nykyri wrote:

 Don't hit your head to a brick wall. A small strace to the login
 process reveals that login set things as you tell it to in
 /etc/login.defs
 
 In this file change the line:
 TTYPERM 0600
 To:
 TTYPERM 0620
 
 And your problem is fixed.

Why should he need to do that? I have 0600 here with no problems.

-- 
Rgds
Peter.




Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-15 Thread Matti Nykyri
 On Mar 14, 2015, at 21:23, Alan McKinnon alan.mckin...@gmail.com wrote:
 
 There is a use-case for doing it (but I highly doubt the OP is using it)

Yes. I was just thinking if the OP has a miss configuration in 
/etc/security/access.conf and can't login as himself on a local console. And 
that way is forced to use root login and then su.

-- 
-Matti


Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-14 Thread Alan McKinnon
On 14/03/2015 20:53, Matti Nykyri wrote:
 On Mar 14, 2015, at 12:47, German gentger...@gmail.com wrote:

 On Sat, 14 Mar 2015 10:33:59 +
 Neil Bothwick n...@digimed.co.uk wrote:

 On Sat, 14 Mar 2015 06:08:34 -0400, German wrote:

 Forget about chmod 770. Better do a chmod g+rw. :-)  

 Tried it, it also doesn't stay permanently. OK, no solution :(

 The correct solution is a udev rule, but it appears that something may be
 overriding that when you login.

 I have the same udev rule. Yes, something is overriding it.

 A kludgy solution is to add the chmod
 command to ~/.bash_profile.
 
 Don't hit your head to a brick wall. A small strace to the login process 
 reveals that login set things as you tell it to in /etc/login.defs
 
 In this file change the line:
 TTYPERM 0600
 To:
 TTYPERM 0620
 
 And your problem is fixed.
 
 The problem has nothing to do with udev. If you don't like a volatile /dev 
 just remove udev and create everything you wan't by hand (not recommended ;)
 
 Another thing i'm puzzled by is, why do you wan't to login as root and the su 
 to someone else? I usually do it the other way around...
 


There is a use-case for doing it (but I highly doubt the OP is using it)

Take a system user like eg sybase or rancid. You can't run those apps as
root (it messes with permissions etc, and some scripts detect EUID 0 and
refuse to run). The sybase and rancid users can't log in at all, and the
system is set up so I can't su as me to that account directly. So I have
to go from my login account to root then drop privs to the system user.

-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-14 Thread German
On Sat, 14 Mar 2015 10:33:59 +
Neil Bothwick n...@digimed.co.uk wrote:

 On Sat, 14 Mar 2015 06:08:34 -0400, German wrote:
 
   Forget about chmod 770. Better do a chmod g+rw. :-)  
  
  Tried it, it also doesn't stay permanently. OK, no solution :(
 
 The correct solution is a udev rule, but it appears that something may be
 overriding that when you login.

I have the same udev rule. Yes, something is overriding it.

 A kludgy solution is to add the chmod
 command to ~/.bash_profile.

thanks
 
 
 -- 
 Neil Bothwick
 
 Veni, vermini, vomui
 I came, I got ratted, I threw up


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-14 Thread German
On Sat, 14 Mar 2015 01:16:32 +0100
waben...@gmail.com wrote:

 waben...@gmail.com wrote:
 
  Neil Bothwick n...@digimed.co.uk wrote:
  
   On Fri, 13 Mar 2015 15:16:28 -0400, German wrote:
   
after searching, I found the following solution to chmod tty1,
like so: chmod o+rw /dev/tty1 and this worked, I was able to use
screen as a user, however it doesn't stay permanently; after
reboot, I got the same problem. How to chmod tty1 so changes stay
permenently? Thanks
   
   /dev/tty1 is already group writeable, so you should get the same
   result by adding your user to the tty group.
  
  When I logged in as regular user then ownership of the tty that I
  used for log in is:
  
  crw--- 1 wabe tty  4,  1 13. Mär 17:49 /dev/tty1
  
  When I logged in as root, then owner is root (not surprising).
  
  crw--- 1 root  tty  4,  2 13. Mär 23:47 /dev/tty2
  
  Adding your user to group tty probably wouldn't resolve your problem
  (not tested), because group doesn't have any rights.
  
  So it seems that after login you first have to chmod 770 the tty
  before you do a su - user (user have to be in group tty of course).
 
 Forget about chmod 770. Better do a chmod g+rw. :-)

Tried it, it also doesn't stay permanently. OK, no solution :(
 
 --
 Regards
 wabe
 


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-14 Thread Neil Bothwick
On Sat, 14 Mar 2015 06:08:34 -0400, German wrote:

  Forget about chmod 770. Better do a chmod g+rw. :-)  
 
 Tried it, it also doesn't stay permanently. OK, no solution :(

The correct solution is a udev rule, but it appears that something may be
overriding that when you login. A kludgy solution is to add the chmod
command to ~/.bash_profile.


-- 
Neil Bothwick

Veni, vermini, vomui
I came, I got ratted, I threw up


pgpzByWge2t4y.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-14 Thread Tom H
On Fri, Mar 13, 2015 at 8:14 PM,  waben...@gmail.com wrote:
 waben...@gmail.com wrote:
 Peter Humphrey pe...@prh.myzen.co.uk wrote:
 On Friday 13 March 2015 23:28:32 Neil Bothwick wrote:

 I have this in /lib/udev/rules.d/50-udev-default.rules:

 SUBSYSTEM==tty, KERNEL==tty[0-9]*, GROUP=tty, MODE=0620

 # grep tty /lib/udev/rules.d/50-udev-default.rules
 SUBSYSTEM==tty, KERNEL==ptmx, GROUP=tty, MODE=0666
 SUBSYSTEM==tty, KERNEL==tty, GROUP=tty, MODE=0666
 SUBSYSTEM==tty, KERNEL==tty[0-9]*, GROUP=tty, MODE=0620
 SUBSYSTEM==tty, KERNEL==sclp_line[0-9]*, GROUP=tty,
 MODE=0620 SUBSYSTEM==tty, KERNEL==ttysclp[0-9]*, GROUP=tty,
 MODE=0620 SUBSYSTEM==tty, KERNEL==3270/tty[0-9]*,
 GROUP=tty, MODE=0620 SUBSYSTEM==vc, KERNEL==vcs*|vcsa*,
 GROUP=tty
 KERNEL==tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*,
 GROUP=uucp

 Can't say where all those came from.

 I have the same entries in /lib/udev/rules.d/50-udev-default.rules but
 nevertheless after login the permissions for group tty are gone.

 Before login:
 crw--w 1 root  tty  4, 10 13. Mär 15:12 /dev/tty4

 After login:
 crw--- 1 wabe tty  4,  1 13. Mär 17:49 /dev/tty1

Same here.

IIRC, on a vt, login does the chown and agetty does the chmod.



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-14 Thread Tom H
On Sat, Mar 14, 2015 at 6:08 AM, German gentger...@gmail.com wrote:
 On Sat, 14 Mar 2015 01:16:32 +0100 waben...@gmail.com wrote:
 waben...@gmail.com wrote:

 So it seems that after login you first have to chmod 770 the tty
 before you do a su - user (user have to be in group tty of course).

 Forget about chmod 770. Better do a chmod g+rw. :-)

 Tried it, it also doesn't stay permanently. OK, no solution :(

Because /dev is recreated at every boot.

You have to override the tty rule(s) in
/lib/udev/rules.d/50-udev-default.rules with a rule/rules in
/etc/udev/rules.d/.

Since the 50-udev-default.rules is an upstream rule that's shipped by
all the distros that I use, perhaps you should track down why this is
happening rather than overriding it.

Canek had asked whether you were using systemd and therefore logind.
Since you're using openrc, perhaps you should check whether installing
consolekit is a fix because it's the precursor to logind.



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-14 Thread Matti Nykyri
 On Mar 14, 2015, at 12:47, German gentger...@gmail.com wrote:
 
 On Sat, 14 Mar 2015 10:33:59 +
 Neil Bothwick n...@digimed.co.uk wrote:
 
 On Sat, 14 Mar 2015 06:08:34 -0400, German wrote:
 
 Forget about chmod 770. Better do a chmod g+rw. :-)  
 
 Tried it, it also doesn't stay permanently. OK, no solution :(
 
 The correct solution is a udev rule, but it appears that something may be
 overriding that when you login.
 
 I have the same udev rule. Yes, something is overriding it.
 
 A kludgy solution is to add the chmod
 command to ~/.bash_profile.

Don't hit your head to a brick wall. A small strace to the login process 
reveals that login set things as you tell it to in /etc/login.defs

In this file change the line:
TTYPERM 0600
To:
TTYPERM 0620

And your problem is fixed.

The problem has nothing to do with udev. If you don't like a volatile /dev just 
remove udev and create everything you wan't by hand (not recommended ;)

Another thing i'm puzzled by is, why do you wan't to login as root and the su 
to someone else? I usually do it the other way around...

-- 
-Matti





Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread German
On Fri, 13 Mar 2015 15:59:04 +
Neil Bothwick n...@digimed.co.uk wrote:

 On 13 March 2015 15:52:41 GMT+00:00, German gentger...@gmail.com wrote:
  This is very strange. When I boot up my box and login as a user I can
  use screen. But if I booted up and logged in as root first and then su
  user, the user have the error message displayed in the subject line.
  Any ideas?
  
  -- 
  German gentger...@gmail.com
 
 Try su - l user. 
 -- 
 Sent from my Android phone with K-9 Mail. Please excuse my brevity.

after searching, I found the following solution to chmod tty1, like so:
chmod o+rw /dev/tty1 and this worked, I was able to use screen as a user, 
however it doesn't stay permanently; after reboot, I got the same problem. How 
to chmod tty1 so changes stay permenently? Thanks



-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Yet another update]

2015-03-13 Thread German
On Fri, 13 Mar 2015 15:59:04 +
Neil Bothwick n...@digimed.co.uk wrote:

 On 13 March 2015 15:52:41 GMT+00:00, German gentger...@gmail.com wrote:
  This is very strange. When I boot up my box and login as a user I can
  use screen. But if I booted up and logged in as root first and then su
  user, the user have the error message displayed in the subject line.
  Any ideas?
  
  -- 
  German gentger...@gmail.com
 
 Try su - l user. 

And after a little more searching interwebs I found this solution:
to run script /dev/null after I logged on to the user after root. This allows 
to launch screen
 -- 
 Sent from my Android phone with K-9 Mail. Please excuse my brevity.


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread German
On Sat, 14 Mar 2015 00:00:34 +0100
waben...@gmail.com wrote:

 Neil Bothwick n...@digimed.co.uk wrote:
 
  On Fri, 13 Mar 2015 15:16:28 -0400, German wrote:
  
   after searching, I found the following solution to chmod tty1, like
   so: chmod o+rw /dev/tty1 and this worked, I was able to use screen
   as a user, however it doesn't stay permanently; after reboot, I got
   the same problem. How to chmod tty1 so changes stay permenently?
   Thanks
  
  /dev/tty1 is already group writeable, so you should get the same
  result by adding your user to the tty group.
 
 When I logged in as regular user then ownership of the tty that I
 used for log in is:
 
 crw--- 1 wabe tty  4,  1 13. Mär 17:49 /dev/tty1
 
 When I logged in as root, then owner is root (not surprising).
 
 crw--- 1 root  tty  4,  2 13. Mär 23:47 /dev/tty2
 
 Adding your user to group tty probably wouldn't resolve your problem
 (not tested), because group doesn't have any rights.

Yes, it didn't resolve my problem. The only solution for now is to run script 
/dev/null.
Then I can run screen as a user. People are having the same problem all over 
the net.
 
 So it seems that after login you first have to chmod 770 the tty before
 you do a su - user (user have to be in group tty of course).
 
 Maybe it would ease things when you write a little script for this
 procedure.
 
 --
 Regards
 wabe
 


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread wabenbau
Peter Humphrey pe...@prh.myzen.co.uk wrote:

 On Friday 13 March 2015 23:28:32 Neil Bothwick wrote:
 
  I have this in /lib/udev/rules.d/50-udev-default.rules:
  
  SUBSYSTEM==tty, KERNEL==tty[0-9]*, GROUP=tty, MODE=0620
 
 # grep tty /lib/udev/rules.d/50-udev-default.rules
 SUBSYSTEM==tty, KERNEL==ptmx, GROUP=tty, MODE=0666
 SUBSYSTEM==tty, KERNEL==tty, GROUP=tty, MODE=0666
 SUBSYSTEM==tty, KERNEL==tty[0-9]*, GROUP=tty, MODE=0620
 SUBSYSTEM==tty, KERNEL==sclp_line[0-9]*, GROUP=tty, MODE=0620
 SUBSYSTEM==tty, KERNEL==ttysclp[0-9]*, GROUP=tty, MODE=0620
 SUBSYSTEM==tty, KERNEL==3270/tty[0-9]*, GROUP=tty, MODE=0620
 SUBSYSTEM==vc, KERNEL==vcs*|vcsa*, GROUP=tty
 KERNEL==tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*,
 GROUP=uucp
 
 Can't say where all those came from.
 

I have the same entries in /lib/udev/rules.d/50-udev-default.rules but
nevertheless after login the permissions for group tty are gone.

--
Regards
wabe



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread wabenbau
waben...@gmail.com wrote:

 Peter Humphrey pe...@prh.myzen.co.uk wrote:
 
  On Friday 13 March 2015 23:28:32 Neil Bothwick wrote:
  
   I have this in /lib/udev/rules.d/50-udev-default.rules:
   
   SUBSYSTEM==tty, KERNEL==tty[0-9]*, GROUP=tty, MODE=0620
  
  # grep tty /lib/udev/rules.d/50-udev-default.rules
  SUBSYSTEM==tty, KERNEL==ptmx, GROUP=tty, MODE=0666
  SUBSYSTEM==tty, KERNEL==tty, GROUP=tty, MODE=0666
  SUBSYSTEM==tty, KERNEL==tty[0-9]*, GROUP=tty, MODE=0620
  SUBSYSTEM==tty, KERNEL==sclp_line[0-9]*, GROUP=tty,
  MODE=0620 SUBSYSTEM==tty, KERNEL==ttysclp[0-9]*, GROUP=tty,
  MODE=0620 SUBSYSTEM==tty, KERNEL==3270/tty[0-9]*,
  GROUP=tty, MODE=0620 SUBSYSTEM==vc, KERNEL==vcs*|vcsa*,
  GROUP=tty
  KERNEL==tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*,
  GROUP=uucp
  
  Can't say where all those came from.
  
 
 I have the same entries in /lib/udev/rules.d/50-udev-default.rules but
 nevertheless after login the permissions for group tty are gone.

Before login:
crw--w 1 root  tty  4, 10 13. Mär 15:12 /dev/tty4

After login:
crw--- 1 wabe tty  4,  1 13. Mär 17:49 /dev/tty1

--
Regards
wabe



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread Peter Humphrey
On Friday 13 March 2015 22:28:29 Neil Bothwick wrote:
 A Smith  Weason beats Four Aces everytime.

A Smith and what?

-- 
Rgds
Peter.




Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread wabenbau
Neil Bothwick n...@digimed.co.uk wrote:

 On Fri, 13 Mar 2015 15:16:28 -0400, German wrote:
 
  after searching, I found the following solution to chmod tty1, like
  so: chmod o+rw /dev/tty1 and this worked, I was able to use screen
  as a user, however it doesn't stay permanently; after reboot, I got
  the same problem. How to chmod tty1 so changes stay permenently?
  Thanks
 
 /dev/tty1 is already group writeable, so you should get the same
 result by adding your user to the tty group.

When I logged in as regular user then ownership of the tty that I
used for log in is:

crw--- 1 wabe tty  4,  1 13. Mär 17:49 /dev/tty1

When I logged in as root, then owner is root (not surprising).

crw--- 1 root  tty  4,  2 13. Mär 23:47 /dev/tty2

Adding your user to group tty probably wouldn't resolve your problem
(not tested), because group doesn't have any rights.

So it seems that after login you first have to chmod 770 the tty before
you do a su - user (user have to be in group tty of course).

Maybe it would ease things when you write a little script for this
procedure.

--
Regards
wabe



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread Neil Bothwick
On Fri, 13 Mar 2015 23:22:50 +, Neil Bothwick wrote:

 Interesting, here, as a normal user:
 
 % ls -l /dev/tty1
 crw--w 1 root tty 4, 1 Mar 13 22:26 /dev/tty1
 
  So it seems that after login you first have to chmod 770 the tty
  before you do a su - user (user have to be in group tty of course).
  
  Maybe it would ease things when you write a little script for this
  procedure.  
 
 A udev rule would be less kludgy.

I have this in /lib/udev/rules.d/50-udev-default.rules:

SUBSYSTEM==tty, KERNEL==tty[0-9]*, GROUP=tty, MODE=0620


-- 
Neil Bothwick

Windows Error #09: Game Over. Exiting Windows.


pgpxfz3Tlkmga.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread wabenbau
waben...@gmail.com wrote:

 Neil Bothwick n...@digimed.co.uk wrote:
 
  On Fri, 13 Mar 2015 15:16:28 -0400, German wrote:
  
   after searching, I found the following solution to chmod tty1,
   like so: chmod o+rw /dev/tty1 and this worked, I was able to use
   screen as a user, however it doesn't stay permanently; after
   reboot, I got the same problem. How to chmod tty1 so changes stay
   permenently? Thanks
  
  /dev/tty1 is already group writeable, so you should get the same
  result by adding your user to the tty group.
 
 When I logged in as regular user then ownership of the tty that I
 used for log in is:
 
 crw--- 1 wabe tty  4,  1 13. Mär 17:49 /dev/tty1
 
 When I logged in as root, then owner is root (not surprising).
 
 crw--- 1 root  tty  4,  2 13. Mär 23:47 /dev/tty2
 
 Adding your user to group tty probably wouldn't resolve your problem
 (not tested), because group doesn't have any rights.
 
 So it seems that after login you first have to chmod 770 the tty
 before you do a su - user (user have to be in group tty of course).

Forget about chmod 770. Better do a chmod g+rw. :-)

--
Regards
wabe



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread Neil Bothwick
On Fri, 13 Mar 2015 15:16:28 -0400, German wrote:

 after searching, I found the following solution to chmod tty1, like so:
 chmod o+rw /dev/tty1 and this worked, I was able to use screen as a
 user, however it doesn't stay permanently; after reboot, I got the same
 problem. How to chmod tty1 so changes stay permenently? Thanks

/dev/tty1 is already group writeable, so you should get the same result
by adding your user to the tty group.


-- 
Neil Bothwick

A Smith  Weason beats Four Aces everytime.


pgpdQ83xZeoys.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread Neil Bothwick
On Fri, 13 Mar 2015 23:10:22 +, Peter Humphrey wrote:

 On Friday 13 March 2015 22:28:29 Neil Bothwick wrote:
  A Smith  Weason beats Four Aces everytime.  
 
 A Smith and what?

You have far too much time on your hands!

I only steal taglines, I don't spell-check them.


-- 
Neil Bothwick

Will the last human please uninstall internet.exe.


pgpCAGTSzJ_KF.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread German
On Fri, 13 Mar 2015 23:28:32 +
Neil Bothwick n...@digimed.co.uk wrote:

 On Fri, 13 Mar 2015 23:22:50 +, Neil Bothwick wrote:
 
  Interesting, here, as a normal user:
  
  % ls -l /dev/tty1
  crw--w 1 root tty 4, 1 Mar 13 22:26 /dev/tty1
  
   So it seems that after login you first have to chmod 770 the tty
   before you do a su - user (user have to be in group tty of course).
   
   Maybe it would ease things when you write a little script for this
   procedure.  
  
  A udev rule would be less kludgy.
 
 I have this in /lib/udev/rules.d/50-udev-default.rules:
 
 SUBSYSTEM==tty, KERNEL==tty[0-9]*, GROUP=tty, MODE=0620

thanks, I'll try that as well
 
 
 -- 
 Neil Bothwick
 
 Windows Error #09: Game Over. Exiting Windows.


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread Peter Humphrey
On Friday 13 March 2015 23:28:32 Neil Bothwick wrote:

 I have this in /lib/udev/rules.d/50-udev-default.rules:
 
 SUBSYSTEM==tty, KERNEL==tty[0-9]*, GROUP=tty, MODE=0620

# grep tty /lib/udev/rules.d/50-udev-default.rules
SUBSYSTEM==tty, KERNEL==ptmx, GROUP=tty, MODE=0666
SUBSYSTEM==tty, KERNEL==tty, GROUP=tty, MODE=0666
SUBSYSTEM==tty, KERNEL==tty[0-9]*, GROUP=tty, MODE=0620
SUBSYSTEM==tty, KERNEL==sclp_line[0-9]*, GROUP=tty, MODE=0620
SUBSYSTEM==tty, KERNEL==ttysclp[0-9]*, GROUP=tty, MODE=0620
SUBSYSTEM==tty, KERNEL==3270/tty[0-9]*, GROUP=tty, MODE=0620
SUBSYSTEM==vc, KERNEL==vcs*|vcsa*, GROUP=tty
KERNEL==tty[A-Z]*[0-9]|pppox[0-9]*|ircomm[0-9]*|noz[0-9]*|rfcomm[0-9]*, 
GROUP=uucp

Can't say where all those came from.

-- 
Rgds
Peter.




Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread Neil Bothwick
On Sat, 14 Mar 2015 00:00:34 +0100, waben...@gmail.com wrote:

  /dev/tty1 is already group writeable, so you should get the same
  result by adding your user to the tty group.  
 
 When I logged in as regular user then ownership of the tty that I
 used for log in is:
 
 crw--- 1 wabe tty  4,  1 13. Mär 17:49 /dev/tty1
 
 When I logged in as root, then owner is root (not surprising).
 
 crw--- 1 root  tty  4,  2 13. Mär 23:47 /dev/tty2

Interesting, here, as a normal user:

% ls -l /dev/tty1
crw--w 1 root tty 4, 1 Mar 13 22:26 /dev/tty1

 So it seems that after login you first have to chmod 770 the tty before
 you do a su - user (user have to be in group tty of course).
 
 Maybe it would ease things when you write a little script for this
 procedure.

A udev rule would be less kludgy.


-- 
Neil Bothwick

I wonder how much deeper would the ocean be without sponges.


pgpj9oLUOYYcx.pgp
Description: OpenPGP digital signature


Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check [Update]

2015-03-13 Thread Peter Humphrey
On Friday 13 March 2015 23:25:21 Neil Bothwick wrote:
 On Fri, 13 Mar 2015 23:10:22 +, Peter Humphrey wrote:
  On Friday 13 March 2015 22:28:29 Neil Bothwick wrote:
   A Smith  Weason beats Four Aces everytime.
  
  A Smith and what?
 
 You have far too much time on your hands!

True. It can easily happen once you've been retired for 17 years. :(

 I only steal taglines, I don't spell-check them.

To each his own ;)

-- 
Rgds
Peter.




Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check

2015-03-13 Thread German
On Fri, 13 Mar 2015 15:59:04 +
Neil Bothwick n...@digimed.co.uk wrote:

 On 13 March 2015 15:52:41 GMT+00:00, German gentger...@gmail.com wrote:
  This is very strange. When I boot up my box and login as a user I can
  use screen. But if I booted up and logged in as root first and then su
  user, the user have the error message displayed in the subject line.
  Any ideas?
  
  -- 
  German gentger...@gmail.com
 
 Try su - l user. 

The same error

 -- 
 Sent from my Android phone with K-9 Mail. Please excuse my brevity.


-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check

2015-03-13 Thread German
On Fri, 13 Mar 2015 10:11:58 -0600
Canek Peláez Valdés can...@gmail.com wrote:

 On Fri, Mar 13, 2015 at 10:06 AM, German gentger...@gmail.com wrote:
 
  On Fri, 13 Mar 2015 15:59:04 +
  Neil Bothwick n...@digimed.co.uk wrote:
 
   On 13 March 2015 15:52:41 GMT+00:00, German gentger...@gmail.com
 wrote:
This is very strange. When I boot up my box and login as a user I can
use screen. But if I booted up and logged in as root first and then su
user, the user have the error message displayed in the subject line.
Any ideas?
   
--
German gentger...@gmail.com
  
   Try su - l user.
 
  The same error
 
 Are you using logind?

Good question. What is logind? How I can find out what am I using?
 
 Regards.
 --
 Canek Peláez Valdés
 Profesor de asignatura, Facultad de Ciencias
 Universidad Nacional Autónoma de México


-- 
German gentger...@gmail.com



[gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check

2015-03-13 Thread German
This is very strange. When I boot up my box and login as a user I can use 
screen. But if I booted up and logged in as root first and then su user, the 
user have the error message displayed in the subject line. Any ideas?

-- 
German gentger...@gmail.com



Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check

2015-03-13 Thread Neil Bothwick
On 13 March 2015 15:52:41 GMT+00:00, German gentger...@gmail.com wrote:
 This is very strange. When I boot up my box and login as a user I can
 use screen. But if I booted up and logged in as root first and then su
 user, the user have the error message displayed in the subject line.
 Any ideas?
 
 -- 
 German gentger...@gmail.com

Try su - l user. 
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check

2015-03-13 Thread Canek Peláez Valdés
On Fri, Mar 13, 2015 at 10:06 AM, German gentger...@gmail.com wrote:

 On Fri, 13 Mar 2015 15:59:04 +
 Neil Bothwick n...@digimed.co.uk wrote:

  On 13 March 2015 15:52:41 GMT+00:00, German gentger...@gmail.com
wrote:
   This is very strange. When I boot up my box and login as a user I can
   use screen. But if I booted up and logged in as root first and then su
   user, the user have the error message displayed in the subject line.
   Any ideas?
  
   --
   German gentger...@gmail.com
 
  Try su - l user.

 The same error

Are you using logind?

Regards.
--
Canek Peláez Valdés
Profesor de asignatura, Facultad de Ciencias
Universidad Nacional Autónoma de México


Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check

2015-03-13 Thread Canek Peláez Valdés
On Fri, Mar 13, 2015 at 10:22 AM, German gentger...@gmail.com wrote:
[ ... ]
  Are you using logind?

 Good question. What is logind? How I can find out what am I using?

If you are using systemd, you are using logind. Otherwise you are not.

Regards.
--
Canek Peláez Valdés
Profesor de asignatura, Facultad de Ciencias
Universidad Nacional Autónoma de México


Re: [gentoo-user] Screen: Cannot open your terminal '/dev/tty1' - please check

2015-03-13 Thread German
On Fri, 13 Mar 2015 10:31:11 -0600
Canek Peláez Valdés can...@gmail.com wrote:

 On Fri, Mar 13, 2015 at 10:22 AM, German gentger...@gmail.com wrote:
 [ ... ]
   Are you using logind?
 
  Good question. What is logind? How I can find out what am I using?
 
 If you are using systemd, you are using logind. Otherwise you are not.

No, I am using openRC
 
 Regards.
 --
 Canek Peláez Valdés
 Profesor de asignatura, Facultad de Ciencias
 Universidad Nacional Autónoma de México


-- 
German gentger...@gmail.com