LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-06-2014, 10:42 AM   #1
aagaag
Member
 
Registered: Aug 2014
Posts: 42

Rep: Reputation: Disabled
start x window?


I wanted to get X windows to start, but I am stuck. I have installed PuTTY and Xming on my PC, and I have enabled X11 forwarding to display localhost:0.0. On the Archlinux remote, I have installed Xorg.

But nothing works! Doing "startx" on the remote seems to start and immediately stop the server with the following message:

Code:
error setting MTRR (base = 0xf8000000, size = 0x00400000, type = 1) Invalid argument (22)
/etc/X11/xinit/xinitrc: line 55: exec: xterm: not found
/etc/X11/xinit/xinitrc: line 54: xterm: command not found
xinit: connection to X server lost

waiting for X server to shut down error setting MTRR (base = 0xf8000000, size = 0x00400000, type = 1) Invalid argument (22)
(EE) Server terminated successfully (0). Closing log file.

Couldn't get a file descriptor referring to the console
And the PuTTY session just gives me a normal SSH command line but no graphics. What is it that I am doing wrongly?
 
Old 09-06-2014, 11:02 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
You don't use startx.

Startx is intended to start an X server. You don't do that as you don't have control over the console display.

Using X forwarding you just start the X application. The sshd server will forward (if it is configured to do so) the X connections (as defined by the DISPLAY environment variable that sshd sets for you) and your X server (Xming on on your PC) will then display the window.
 
1 members found this post helpful.
Old 09-06-2014, 11:03 AM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
sshd is running at runlevel 3. You need to set Arch up so that sshd runs at runlevel 5. Using google I could find examples of how to do this in Red Hat and Debian but I could not find any Arch examples. Here is a link for Red Hat and Debian:

http://www.ruf.rice.edu/~rlug/help/tips-ssh.html

"On Debian boxes, save this script to your /etc/init.d directory. Then, use update-rc.d to create the symlinks to the appropriate runlevel directories.
update-rc.d -f ssh defaults 20

This will set sshd to start in multiuser runlevels."

----------------------------
Steve Stites
 
Old 09-06-2014, 11:37 AM   #4
aagaag
Member
 
Registered: Aug 2014
Posts: 42

Original Poster
Rep: Reputation: Disabled
Thank you all. My question, then, is: "How do I configure the SSH demon in Arch to forward X connections?".
many thanks in advance!
 
Old 09-06-2014, 04:05 PM   #5
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
If you look in the /etc/ssh/sshd_config there is a line (usually commented out) for XForwarding, and the default value. If the value is no, you can uncomment and change the value to yes. Personally, I prefer to copy the line, then comment it out and change the value. This way there is still some documentation about what the default value really is.
 
1 members found this post helpful.
Old 09-06-2014, 04:07 PM   #6
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Quote:
Originally Posted by jailbait View Post
sshd is running at runlevel 3. You need to set Arch up so that sshd runs at runlevel 5. Using google I could find examples of how to do this in Red Hat and Debian but I could not find any Arch examples. Here is a link for Red Hat and Debian:
normally sshd runs at 3 AND at 5. There should be no need for any changes.
Quote:

http://www.ruf.rice.edu/~rlug/help/tips-ssh.html

"On Debian boxes, save this script to your /etc/init.d directory. Then, use update-rc.d to create the symlinks to the appropriate runlevel directories.
update-rc.d -f ssh defaults 20

This will set sshd to start in multiuser runlevels."

----------------------------
Steve Stites
 
Old 09-06-2014, 05:17 PM   #7
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by jpollard View Post
normally sshd runs at 3 AND at 5. There should be no need for any changes.
Be that as it may agaag was getting the typical error messages that you get when you startx while running at runlevel 3.

----------------------
Steve Stites
 
Old 09-06-2014, 06:06 PM   #8
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
Startx doesn't work over ssh, and cannot. The default X server requires a video access - and an ssh connection doesn't have one, nor can it get one.

Now running a nested X server would work - and also wouldn't get the same errors as nested X servers use the X protocol for the display and not a video connection.
 
Old 09-06-2014, 06:15 PM   #9
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,263
Blog Entries: 24

Rep: Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194Reputation: 4194
Quote:
Originally Posted by jailbait View Post
Be that as it may agaag was getting the typical error messages that you get when you startx while running at runlevel 3.

----------------------
Steve Stites
Not sure what you mean.

"Typically" if you get error messages from X when you startx from runlevel 3 - something is wrong.

More typically, if you startx from runlevel 3, X starts... but not over SSH as jpollard has explained.
 
  


Reply

Tags
putty, xming, xorg



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GNU Screen - Start window numbering at 1, keep window number 0 from ever being used retrovertigo Linux - Software 9 10-04-2010 10:20 AM
How do I start X Window? siliconpie Debian 6 08-25-2006 05:56 PM
Could not start x window petero Linux - Software 1 10-18-2005 04:30 PM
cant start my X window! duker_d_cooker Linux - Software 5 03-25-2004 10:53 PM
Cannot start X window gogo Linux - General 2 07-14-2002 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration