You are not logged in.

#1 2008-09-05 06:20:12

colbert
Member
Registered: 2007-12-16
Posts: 809

Server box config for logging in

I have two arch boxes, one server one desktop on home network with router. I have SSH and VNC working great and all between them, but I'm wondering how to set up the server so that I don't have to login. Basically if the power goes out and it turns back on, it boots and goes straight in as my user. I'm the only one w/access to both boxes so unless it's bad for another reason I'd like to do it this way. The server runs a plain fluxbox session, I currently use GDM on the server because I just never bothered to take it off and set this method up hehe. Oh and I know of the option in GDM setup to enable automatc login, but wondering if I can skip GDM altogether to make it quicker.

Thanks for help with this smile

Last edited by colbert (2008-09-05 06:22:04)

Offline

#2 2008-09-05 07:56:42

Denacke
Member
Registered: 2008-04-09
Posts: 106

Re: Server box config for logging in

Offline

#3 2008-09-05 20:56:00

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Server box config for logging in

Thanks Denacke smile

So I did all that and now have ~/.xinitrc with "exec startfluxbox" and I logged out and back in, but how can I have it so that if I log out it automatically logs back in? Is possible? Thx smile

Offline

#4 2008-09-06 01:16:24

Ruckus
Member
Registered: 2007-02-17
Posts: 204

Re: Server box config for logging in

I neded soemthing similar on my media box, I used the C program example from here: http://wiki.archlinux.org/index.php/Aut … on_startup

Along with method 3 from here: http://wiki.archlinux.org/index.php/Start_X_at_boot

Makes it so if you logout it will automatically log you back in etc.

Offline

#5 2008-09-06 02:19:55

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Server box config for logging in

Thanks Ruckus, that's excellent! Now in ~/.bash_profile, is it ok to put "startx" and that will read my ~/.xinitrc which indicates to "exec startfluxbox" ?? This is really fantastic solution smile

Offline

#6 2008-09-06 02:57:22

tam1138
Member
Registered: 2007-09-10
Posts: 238

Re: Server box config for logging in

Why do you a) need to be constantly logged into your server and b) need a graphical environment on your server?

Offline

#7 2008-09-06 03:14:24

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Server box config for logging in

I suppose I do not constantly need X, but I do need it time to time to run mythtv-setup as it's a GUI interface only smile If there is better solution(s) I am of course very open..

Offline

#8 2008-09-06 03:39:51

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Server box config for logging in

Have you ever considered enabling X11 forwarding in your ssh config?  You could ssh from your desktop to your server, start the graphical app, and have it appear on your desktop instead of the server.

Offline

#9 2008-09-06 05:00:41

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Server box config for logging in

peart, I have tried uncommenting these in the server's /etc/ssh/sshd_config:

 X11Forwarding yes

But when I tried for example gedit file, it said cannot open display:. This would be a perfect solution, I hope can get it to work! smile

Offline

#10 2008-09-06 05:05:07

tam1138
Member
Registered: 2007-09-10
Posts: 238

Re: Server box config for logging in

You also have to "turn it on" for the client.  Something like ssh -X or ssh -Y, I can never remember which.

Offline

#11 2008-09-06 05:13:18

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Server box config for logging in

Oops, I just had to do /etc/rc.d/sshd restart. It works!!

The only concern with having it automatically login was that if I need to reboot the box or power goes out or what have you, I'd like a solution where I don't have to go to the basement and log in to the server because I thought I needed to log in in order to use SSH and access the box smile

Offline

#12 2008-09-06 05:17:40

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Server box config for logging in

colbert,

Just add this to ~/.ssh/config on your desktop machine:

Compression yes
CompressionLevel 6
Ciphers arcfour,blowfish-cbc,aes128-cbc,3des-cbc,cast128-cbc,aes192-cbc,aes256-cbc
ForwardX11 yes

The first 2 lines will make X11 forwarding a lot snappier (without compression, it was painfully slow here).  The "Ciphers" line tells ssh to use a weak encryption to speed things up.  If you are worried about security, you may want to drop that line.

HTH,
peart

Offline

#13 2008-09-06 05:33:29

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Server box config for logging in

peart,

I put that in ~/.ssh/config and the X forwarding is as slow as before... I tried putting it in /etc/ssh/sshd_config but trying to restart the daemon I got errors that they are bad lines.

Offline

#14 2008-09-06 06:26:02

peart
Member
From: Kanuckistan
Registered: 2003-07-28
Posts: 510

Re: Server box config for logging in

Sorry colbert, I don't know any other tricks to speed up forwarding.  When I first set it up, it was taking like 30 seconds to display a window.  So I googled and found out about using compression and weak encryption.  That is unfortunately all I know that might help you.

Sorry!

Offline

#15 2008-09-07 19:02:32

colbert
Member
Registered: 2007-12-16
Posts: 809

Re: Server box config for logging in

No sweat peart, thanks a lot for the help! At least it works smile

Offline

#16 2008-09-08 06:46:04

xvalentinex
Member
Registered: 2008-05-31
Posts: 22

Re: Server box config for logging in

A bit off topic, but I do a similar setup, except I run the mythbackend and frontend on the same machine.  So inittab autologins the frontend, but for mythtv-setup and other stuff I use FreeNX to load XFCE.  FreeNX provides an amazingly fast remote desktop.  Maybe something to look into.

Offline

#17 2008-09-08 07:09:07

SiC
Member
From: Liverpool, England
Registered: 2008-01-10
Posts: 430

Re: Server box config for logging in

Hmm... I run X11 forwarding over my network without compression and it works fine. I just ssh into the box and windows appear near instantly.  I'm running it over 802.11g too so, not even ethernet.

Offline

#18 2008-09-08 07:44:03

Ruckus
Member
Registered: 2007-02-17
Posts: 204

Re: Server box config for logging in

SiC wrote:

Hmm... I run X11 forwarding over my network without compression and it works fine. I just ssh into the box and windows appear near instantly.  I'm running it over 802.11g too so, not even ethernet.

Yeah same, I run it tunneled over the internet from home to work all the time, I just set TightVNC to low bandwidth and its very snappy.


Edit:
Home: Comcast 10mbit down/1mbit up
Work: DSL ~2-4mbit down/??

Last edited by Ruckus (2008-09-08 07:46:00)

Offline

Board footer

Powered by FluxBB