INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]   Go Down

Author Topic: Start Debian without Monitor??  (Read 24488 times)

altsouza

  • World Citizen
  • ***
  • Posts: 138
Re: Start Debian without Monitor??
« Reply #50 on: December 01, 2015, 02:24:17 pm »

Sorry, i did not understand you question.
I start with monitor only for test. I can vnc it (anohter screen) and I see the MC21 in the other screen.
But I need to start it without a monitor.
Logged
Nuc > Cambridge Audio Cxn Streamer > Cambridge 851e Pré
Parasound A21 Amp > Nordost Cable > Kef R300 Speaker
Prog Rock Fan (Yes.....)

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Start Debian without Monitor??
« Reply #51 on: December 01, 2015, 02:45:00 pm »

There's no indication that your computer is not booting, but it is clear that your headless configuration is a mess.

For instance, why do you have xrdp starting from ~/headless? That's not in any of the tutorials. You probably have DISPLAY conflicts all over the place, which is why gdm is throwing a fit.

At this point I'd recommend that you reinstall Debian and follow ONE of the tutorials in getting a headless server running. It's just too difficult to walk through all of the different possibilities of how your configuration could potentially be messed up. So far you've indicated that you've used x11vnc, your log file shows that you are currently using xrdp, and what you really want to use (for simplicity) is vncserver.

I'm not saying that it's impossible to fix your problems but it's going to require some thorough undoing of your experimentation. Also this isn't necessarily a bad thing, it's how you learn to become a better Linux user through trial and error.

If you don't want to start from scratch purge the remote desktop programs
Code: [Select]
sudo apt-get purge tightvncserver x11vnc xrdp delete any cron jobs you've created in
Code: [Select]
crontab -e remove the ~/headless script and then follow mwillem's tutorial closely (and only mwillem's tutorial). I can't guarantee this will work since I'm not sure what other services you may have installed to get you to this point.
Logged

mattkhan

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 4226
Re: Start Debian without Monitor??
« Reply #52 on: December 01, 2015, 03:00:42 pm »

I would strongly advise starting from scratch in this situation and following a guide religiously. No good can come of attempting to rescue an installation without knowing what you are doing.
Logged

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Start Debian without Monitor??
« Reply #53 on: December 01, 2015, 03:25:54 pm »

Note, I haven't used a debian-based OS in a decade so this is coming from some ancient knowledge mixed with cross-compatibility systemd.

This is the best I can come up with to potentially get you fixed up in lieu of reinstalling.

Code: [Select]
#!/bin/bash
sudo vncserver -kill :0
sudo vncserver -kill :1
sudo apt-get purge xrdp x11vnc vnc4server
sudo rm ~/headless
crontab -r
sudo apt-get install vnc4server
echo "#!/bin/sh" > ~/.vnc/xstartup
echo "unset SESSION_MANAGER" >> ~/.vnc/xstartup
echo "exec /etc/X11/xinit/xinitrc"  >> ~/.vnc/xstartup
echo "gnome-session &" >> ~/.vnc/xstartup
echo "" >> ~/.vnc/xstartup
echo "[Unit]" > ~/vncserver@:1.service
echo "Description=Remote desktop service (VNC)" >> ~/vncserver@:1.service
echo "After=syslog.target network.target" >> ~/vncserver@:1.service
echo "" >> ~/vncserver@:1.service
echo "[Service]" >> ~/vncserver@:1.service
echo "Type=forking" >> ~/vncserver@:1.service
echo "User=luiz" >> ~/vncserver@:1.service
echo "PAMName=login" >> ~/vncserver@:1.service
echo "" >> ~/vncserver@:1.service
echo "ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'" >> ~/vncserver@:1.service
echo "ExecStart=/usr/bin/vncserver -geometry 1440x900 -alwaysshared -fg %i" >> ~/vncserver@:1.service
echo "ExecStop=/usr/bin/vncserver -kill %i" >> ~/vncserver@:1.service
echo "Restart=on-failure" >> ~/vncserver@:1.service
echo "RestartSec=10" >> ~/vncserver@:1.service
echo "" >> ~/vncserver@:1.service
echo "[Install]" >> ~/vncserver@:1.service
echo "WantedBy=multi-user.target" >> ~/vncserver@:1.service
echo "" >> ~/vncserver@:1.service
sudo mv ~/vncserver@:1.service /etc/systemd/system/vncserver@:0.service
sudo systemctl --system daemon-reload
sudo systemctl enable vncserver@:0.service

Then reboot.

If that doesn't work, then:

Code: [Select]
sudo systemctl stop vncserver@:0.service
sudo systemctl disable vncserver@:0.service
sudo mv /etc/systemd/system/vncserver@:0.service /etc/systemd/system/vncserver@:1.service
sudo systemctl enable vncserver@:1.service


...in case you still have some rogue x-server running on :0.

There's probably an error in there but go ahead and try and run it and it might get you up and going. You probably still have gdm conflicts that can be sorted out later. Since you will be launching gnome with .vnc, it's probably best to remove gdm completely or disable it.
Code: [Select]
sudo systemctl disable gdm
Logged

mwillems

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 5234
  • "Linux Merit Badge" Recipient
Re: Start Debian without Monitor??
« Reply #54 on: December 02, 2015, 08:40:29 am »

Bryan and Matt, thanks for weighing in with detailed help (I've been side-tracked with a 1 year old), and Bryan that's a pretty nice VNC systemd service you wrote.  I've been meaning to do that to simplify things for folks (instead of a cron start), but the cron solution was developed for a wheezy based raspbian setup guide where there was no systemd to run the service (so it wouldn't have been much help). Do you mind if I test it, tweak, and add it to my tutorials?

I did want to add a note though: he can't run Gnome in this context because gnome has a well-documented bug where it no longer works with TightVNC (debian's default VNC server).  It just shows a black screen.  It does work with more modern VNC implementations like TigerVNC, but that's not in the Debian repos.  So upthread I suggested that he migrate to xfce4 (which is compatible with TightVNC).  

So other than that, your suggestions are very good, especially the part about disabling GDM.  Modern GDM instances do some truly bizarro display stuff (and from 3.16 up are running a wayland session by default and occupying two ttys among other discontents).

So OP, a reinstall is not a bad idea and make sure to select XFCE4 during the install.  

If you're trying to rescue your install, definitely disable GDM as BryanC suggested, and run his commands, but replace the "gnome-session" line with
Code: [Select]
echo "exec startxfce4 &" >> ~/.vnc/xstartup
Logged

altsouza

  • World Citizen
  • ***
  • Posts: 138
Re: Start Debian without Monitor??
« Reply #55 on: December 02, 2015, 12:24:23 pm »

Hi mwillems, BryanC and mattkhan,

Thanks guys for all patience dispensed to try to resolve the issue.
Unfortunately I will have to re-install Debian.
Next week I will try to reconfigure with the mwillems's  instructions.

Thank you again
Antonio
Logged
Nuc > Cambridge Audio Cxn Streamer > Cambridge 851e Pré
Parasound A21 Amp > Nordost Cable > Kef R300 Speaker
Prog Rock Fan (Yes.....)

BryanC

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 2661
Re: Start Debian without Monitor??
« Reply #56 on: December 02, 2015, 09:33:48 pm »

Bryan and Matt, thanks for weighing in with detailed help (I've been side-tracked with a 1 year old), and Bryan that's a pretty nice VNC systemd service you wrote.  I've been meaning to do that to simplify things for folks (instead of a cron start), but the cron solution was developed for a wheezy based raspbian setup guide where there was no systemd to run the service (so it wouldn't have been much help). Do you mind if I test it, tweak, and add it to my tutorials?

Of course, this is the Linux board...not the Mac or Windows board.  ;D
Logged
Pages: 1 [2]   Go Up