Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 10-14-2009, 01:51 AM   #1
LQ Newbie
Registered: Oct 2009
Distribution: Slackware, Fedora
Posts: 11

Rep: Reputation: 0
Forwarding X from a command line only server

Greetings, first post here, but it seems to be obscure enough that I couldn't find an answer anywhere else, so here goes:

I'm about to finish up my new homebuilt server (mostly serving media over the LAN). I'll be installing Slackware 13(64) this weekend. My initial thought was to make this a headless server that could sit in the closet with only power and ethernet cords to worry about. As such, I'd have no need for any graphical interface. I've had experience with Slackware 12.2 as a headless, command-line only box (accessed via SSH) so this part won't be a problem.

One of the things I wanted to be able to do it remotely control all of my Windows machines that are on the same LAN from elsewhere by using SSH to log into the Slackware machine and then remote desktop into one of the Windows machines. I've used rdesktop to do the second part (it was actually on Fedora, but it should work on Slackware as well), and I've used a program called eXcursion to forward X to a Windows machine.

So my question is can I get this to work?

I know my way around a Linux system fairly well, but I'm less familiar with everything about X windows or window managers or whatever, so I apologize if some of my terminology is unclear. I would think it'd be relatively straight forward to get this working if the Slackware machine was running KDE or some other window system, but I'd rather not even install a window manager if at all possible. Are there certain software groups I need to install? Am I correct in assuming that even with no GUI, the server would have to be running an X server in order to relay the graphical data from one Windows machine to another?

Now, I was wanting to keep this setup as simple as possible, which I figured would mean doing everything via SSH. But is there another way to accomplish this that would be less hassle? I'd like to maintain some semblance of a secure system.

One last thing to consider: my current ISP upload speed is only around 480kbps, so I don't envision transferring files over such a connection, just remote access. Is this too slow to even attempt X forwarding? What about running a straight up VPN server, or would that be even more outrageous?

I haven't attempted anything yet beyond simple SSH, but I'm open to pretty much anything here. My priorities are probably security and performance (but I realize there's only so much my connection can handle).

Any thoughts?
Old 10-14-2009, 06:23 AM   #2
Senior Member
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 89
Welcome to LinuxQuestions

You can run X programs on a headless server, displaying the result on a desktop that's accessing it through ssh.

You will need to install the normal 'x' packages on your headless server, but you do not need to configure it there.
In 'X' terminology, the "X-Server" is the machine that displays the result, so in your case it's not the headless server, but your desktop.
Your desktop acts as a 'graphical server' for the programs hosted on your headless server

On your headless server, you need to configure ssh to "forward" X information:
- simply edit /etc/ssh/sshd_config and change the line reading "#X11Forwarding no" to "X11Forwarding yes" (don't forget to remove the '#')
- restart ssh (you can do this while logged on): "/etc/rc.d/rc.sshd restart"
- on your desktop, close the ssh connection and connect again with "ssh -Y <your-server-ip>"
- test it by running "xcalc" on your server - it should display on your desktop.

This works fine for simple X programs, but programs needing a lot of KDE things running might give different results.

Like the saying goes: YMMV ...

I forgot to mention using X forwarding over the internet...
My example works fine on a local network. Using this over the internet is possible, but the results might not be satisfactory... A simple xcalc will go fine, but do not try to run a CAD program this way over an ADSL line (I recently did...) It's impossible to work with.
If you need to do this over the internet, try solutions like VNC, but then you need to configure & run X on your server as well.

Last edited by niels.horn; 10-14-2009 at 06:29 AM. Reason: extra information
Old 10-14-2009, 07:52 AM   #3
Senior Member
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware-current
Posts: 4,601

Rep: Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509Reputation: 1509
The arrangement you describe is like what I use to access Windows machines on an intranet behind a Slackware server at work from my home PC.
I use a ssh connection with X11 forwarding enabled to the work Slackware server, and then use Firefox to connect to the Windows machines that have VNC (I use RealVNC) installed. The work Slackware server does not have X running.
My connection is via ADSL with 1.5Mb/s download and 256Kb/s upload. I use the -C option to ssh, which gives a usable connection for my needs (mostly running Windows updates).
Old 10-15-2009, 02:44 AM   #4
LQ Newbie
Registered: Oct 2009
Distribution: Slackware, Fedora
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks a bunch guys. It seems I should be able to get this working relatively easily.

So when I go to install Slackware, I should be able to get by with only installing the A, AP, L, and N software sets, right? I obviously won't need the KDE, KDEI, X, and XAP sets. And then if at some point down the road I decide to repurpose this machine I could add some of the other packages to gain their functionality.

This will be going on an 80 GB RAID 1 array. Is there any trick to installing on this type of setup? This is actually the first time I've even tried RAID on any OS, so I'm not sure what to expect.
Old 10-15-2009, 05:27 AM   #5
Senior Member
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 89
If you want to start any X application on your server, even displaying them remotely on your desktop, you'll need to install the X and XAP series.
The same goes for KDE - if you want to run any KDE app.

The question about RAID is a whole different story - probably worthy of a separate thread


cli, remote desktop, slackware, vpn

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
moving files from command line from server A to server B graziano1968 Linux - Server 3 08-25-2008 10:23 AM
ftp to Linux server using One Line command shipon_97 Linux - Newbie 3 08-28-2007 04:46 AM
Is it possible to access samba server from command line? RodWC Linux - General 5 02-02-2006 02:35 AM
Reconfiguring X Server from command line Jongi Mandriva 1 04-10-2005 02:28 AM
start VNC server from command line gyost Mandriva 3 08-18-2004 09:27 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:27 PM.

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