LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-17-2014, 08:34 PM   #1
Dark_Oppressor
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Linux Mint
Posts: 45

Rep: Reputation: 15
Compilation results differ when run over ssh via screen


I've been working on an automated build setup on my Linux Mint 17 server, and I've run into a weird problem.
Here's how my setup works:
I ssh in and run a build script. The script has 3 options for building:
1. Just run the build commands over ssh, showing the results in the ssh terminal.
2. First do 'export DISPLAY=:0.0' and then do exactly what 1 does.
3. Same as 2, but instead of running ./build, run 'screen -m -d -S $NAME ./build'

The reason there are so many options is that I am using a Code::Blocks project. Code::Blocks does allow you to do builds from the console, but it insists on opening a graphical window as it builds, which is a pain over ssh. I was using Xming (in Windows) to allow the graphical window to work so my build process could be done over ssh. However, that got annoying, and so I added option 2, to use the server's X for that stuff. This still tied up the ssh terminal while building, though, so I added option 3, which is 2, but it does everything in a detached screen so I can move on with my day (and not open another terminal).

So that's my setup. Options 1 and 2 work fine. Option 3 works fine, except for one specific target in the Code::Blocks project, which reliably fails to build (but again, ONLY with option 3). Thus, I've narrowed it down (as far as I can tell) to some kind of problem with running the build in a detached screen. The failing target is a cross-compilation using a compiler I built on the machine.

I don't know much about screen, and just recently discovered it when I started doing lots of stuff over ssh. Is there perchance an obvious reason I might have such a problem? Is the screen environment different in some way from my regular ssh shell?

EDIT: I can give more details, like the actual build error (it happens during linking), but this post was already getting really long, and I wanted to make sure there isn't some obvious trait of how screen works that might cause this first.

Last edited by Dark_Oppressor; 10-17-2014 at 08:37 PM.
 
Old 10-18-2014, 12:11 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,686

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
I would say the environment is different, something is missing/overwritten during option 3, using screen.
Probably it is related to the differences between login and non-login shells, the .*rc files
 
Old 10-22-2014, 02:25 PM   #3
Dark_Oppressor
Member
 
Registered: Apr 2005
Location: Oklahoma, USA
Distribution: Linux Mint
Posts: 45

Original Poster
Rep: Reputation: 15
OK, thanks. I've not gotten a chance to look really hard at this again yet, but it is good to know I was in the right ballpark at least.
 
  


Reply


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
How to display the results of a command screen by screen in a shell? Linux-at-last Linux - Newbie 4 03-09-2014 04:41 PM
/var/run/utmp permissions differ from those suggested in man 5 utmp pwc101 Slackware 5 02-14-2011 10:46 PM
[SOLVED] Custom kernel compilation results in black screen when booting Allamgir Slackware 10 08-25-2009 03:19 AM
Startx results in a black screen with VGA and screen errors kwosource Linux - Newbie 4 03-11-2005 02:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:19 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