INTERACT FORUM

More => Old Versions => JRiver Media Center 21 for Linux => Topic started by: altsouza on November 22, 2015, 02:37:48 pm

Title: Start Debian without Monitor??
Post by: altsouza on November 22, 2015, 02:37:48 pm
Hello,

Recently I assembled a mini itx computer with Debian amd64.
I liked very much the performance of Debian/jriver 21 combo.
1. How to start debian without a monitor? It does not boot!!!
2. How to set up a vnc server??

I followed the Raspberry tutorial, but don't think it aplied to debian os.

Thanks

Antonio
Title: Re: Start Debian without Monitor??
Post by: mwillems on November 22, 2015, 03:38:27 pm
Hello,

Recently I assembled a mini itx computer with Debian amd64.
I liked very much the performance of Debian/jriver 21 combo.
1. How to start debian without a monitor? It does not boot!!!
2. How to set up a vnc server??

I followed the Raspberry tutorial, but don't think it aplied to debian os.

Thanks

Antonio

The raspbian tutorial (the relevant part) should work on regular Debian.  Have you tried hooking up a monitor to it while it boots to see what's happening at boot?
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 22, 2015, 03:45:05 pm
Hi,

When I connect a Monitor, it does boot.

Also, I used the x11vnc (instead of tightvncserver), because tight gave me a Grey screen.
I have just replaced the tightvncserver name to x11vnc in the nano ~/headless (sorry , I am a Linux newbie)
I cant do vnc and alson I cant boot headless

Thanks
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 22, 2015, 04:55:41 pm
Hi,

Again!

I returned to tightvncserver to give a better explanation of the problem.
I did the same as you did in the raspberry tutorial , but with few doubts.
1. I replaced the name Pi to Debian (how to see my system`s name???)
2. I noticed that tightserver is not loading with the boot. When I start it at console, I can vnc it, but with Grey screen (The gui did not appear)
Title: Re: Start Debian without Monitor??
Post by: mwillems on November 22, 2015, 05:18:26 pm
Hi,

When I connect a Monitor, it does boot.

Also, I used the x11vnc (instead of tightvncserver), because tight gave me a Grey screen.
I have just replaced the tightvncserver name to x11vnc in the nano ~/headless (sorry , I am a Linux newbie)
I cant do vnc and alson I cant boot headless

Thanks

You can't use x11vnc that way because it relies on mirroring the physical display.  When there's no monitor connected, Debian doesn't initialize the physical display, so x11vnc has nothing to mirror.  So you either need to use tightvnc (which creates a virtual desktop), or you need to modify your X configuration to force it to initialize the physical display even when no monitor is present.  Your system is almost certainly booting correctly, it's just not loading the GUI (i.e. you could probably ssh in to try and fiddle with it).

Hi,

Again!

I returned to tightvncserver to give a better explanation of the problem.
I did the same as you did in the raspberry tutorial , but with few doubts.
1. I replaced the name Pi to Debian (how to see my system`s name???)
2. I noticed that tightserver is not loading with the boot. When I start it at console, I can vnc it, but with Grey screen (The gui did not appear)


1. You should replace pi with your user's login name not your system name, as noted on the pi tutorial
Quote
NOTE: If you're using a different username than "pi", you should replace all instances of "pi" in the code below with your username.

2. It's probably not loading at boot because you didn't give it the correct user name to run as, and it's trying to run as a non-existent user.

The reason you're seeing the grey screen is that that's the default configuration of debian and VNC (it loads a very minimal xserver, and that's the main way that it's different from the pi); if you run mediacenter after that, it should appear on the gray screen.  If you want a full desktop experience, you'll need to tell VNC to load your desktop environment or window manager by editing the file at ~/.vnc/xstartup

If you can tell me what desktop environment or window manager you're using, I can offer some advice about how to edit your VNC configuration.  It may be easy (anything but Gnome) or not so easy (with Gnome).
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 22, 2015, 05:52:57 pm
Hi,

I replaced to my user name (luiz).
Now , mc is loading, but tight is still not loading.
When I load it from the terminal, its ok
Here is the Text.

#!/bin/bash
export USER=luiz
ps -e | grep tightvnc || vncserver :1 -geometry 1920x1080
export DISPLAY=':1'
ps -e | grep mediacenter || mediacenter21 /mediaserver

My Gui is Gnome (sorry), but I can replace the Gui if it is easy (you have to teach hor to replace)

Thanks

Title: Re: Start Debian without Monitor??
Post by: mwillems on November 22, 2015, 06:12:22 pm
Hi,

I replaced to my user name (luiz).
Now , mc is loading, but tight is still not loading.
When I load it from the terminal, its ok
Here is the Text.

#!/bin/bash
export USER=luiz
ps -e | grep tightvnc || vncserver :1 -geometry 1920x1080
export DISPLAY=':1'
ps -e | grep mediacenter || mediacenter21 /mediaserver

My Gui is Gnome (sorry), but I can replace the Gui if it is easy (you have to teach hor to replace)

Thanks



If MC is loading, tight is necessarily loading (MC can't run without an xserver).  To repeat, the gray background is expected behavior, and if MC is running everything is working, right?  Can you describe what the current issue is in functional terms:  what do you want to do that you can't currently do (i.e. if MC is loading, what's the issue?)

If what you're saying is you want a full desktop experience over VNC, you've got a tougher case. Gnome and tightVNC are incompatible and have been for a few years unfortunately. So you'll either need to change VNC servers or change desktop environments.  But I'm not sure that's what you want?
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 22, 2015, 06:28:14 pm
Hi,

I build Speakers and Amps for hobby. I am now building a Streamer ( a mini itx computer with Debian-JRiver combo, a song lib in a   Hd (Local music), Wifi (i put an actual wifi router inside) and a DAC. I will put it inside an active Speaker, so it will be a complete standalone system.  I will control it with JRemote. Just turn on the speakers and everything is inside, no wires etc...
I was planing to use Windows, but Linux is more stable, so I opted to use it.
But I still need to control the Os!! Sometimes I need to twek Mc, or I need to copy more music to computer, and so on.
So I need a VNC, as there are no monitor in my Project. I use ultraVnc , and boot it without monitor, with windows with no problem, but Linux is giving me a Headache.

I can replace the Gui if you want. I just need a Gui to copy files, twek the network, adjust the Dsp in Mc, simple tasks I will need in to use the Gui.

Thanks

Antonio
Title: Re: Start Debian without Monitor??
Post by: mwillems on November 22, 2015, 08:16:00 pm
Ok so you do need a full desktop running via VNC, that was the part I was missing.

As noted above, Gnome doesn't work with tightVNC (but does work with more modern VNC servers like TigerVNC).   

Given that you're setting up a system to only ever be headless, I would advise using a lighter weight desktop than gnome like xfce or lxde.  They will work with tightVNC and have a much, much lower memory footprint. Depending on which one you choose, you'll need to modify your ~/.vnc/xstartup to launch the appropriate desktop environment. 

First backup your existing ~/.vnc/xstartup (if you have one).  Then delete the file and create a new one like this:
Code: [Select]
#!/bin/sh/
exec startxfce4

That one is for xfce.  If you use lxde, replace the second line with
Code: [Select]
exec startlxde
If you want to use a different DE or WM, you'll need to look up how to invoke it on the command line (they're not all the same, or obvious from the name of the DE/WM)
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 23, 2015, 03:56:38 am
Ok, how to replace the desktop??
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 23, 2015, 09:43:02 am
Hi,

I replaced Gnome to Xfce, did the mod on the /,vnc/xstartup file , but....
1. Tightvncserver still do not load automactily
2. When I load Tight manually, it still gave a gray screen

Any help is welcome

Thanks

Antonio
Title: Re: Start Debian without Monitor??
Post by: mwillems on November 23, 2015, 09:58:20 am
Hi,

I replaced Gnome to Xfce, did the mod on the /,vnc/xstartup file , but....
1. Tightvncserver still do not load automactily
2. When I load Tight manually, it still gave a gray screen

Any help is welcome

Thanks

Antonio

You have two command typos in your post (you replaced the period in .vnc with a comma, and left out the tilde (~) indicating your users's home directory); were those errors you made while editing the file, or were they posting errors?  If you made those substitutions while editing that's why it isn't loading xfce (VNC's configuration directory has to have the period in front of it, and it needs to be in your user's home directory unless you tell it otherwise)

To help troubleshoot, please post the outputs of each of the following commands separately (please copy and paste to avoid transcription errors)
Code: [Select]
cat ~/.vnc/xstartup
cat ~/headless
crontab -l

Title: Re: Start Debian without Monitor??
Post by: altsouza on November 23, 2015, 04:02:29 pm
#!/bin/sh

# Change "GNOME" to "KDE" for a KDE desktop, or "" for a generic desktop
MODE="GNOME"

#Uncommment this line if using Gnome and your keyboard mappings are incorrect.
#export XKL_XMODMAP_DISABLE=1

# Load X resources (if any)
if [ -e "$HOME/.Xresources" ]
then
        xrdb "$HOME/.Xresources"
fi

# Try a GNOME session, or fall back to KDE
if [ "GNOME" = "$MODE" ]
then
        if which gnome-session >/dev/null
        then
                gnome-session --session=ubuntu-2d &
        else
                MODE="KDE"
        fi
fi

# Try a KDE session, or fall back to generic
if [ "KDE" = "$MODE" ]
then
        if which startkde >/dev/null
        then
                startkde &
        else
                MODE=""
        fi
fi

# Run a generic session
if [ -z "$MODE" ]
then
        xsetroot -solid "#DAB082"
        x-terminal-emulator -geometry "80x24+10+10" -ls -title "$VNCDESKTOP Desktop" &
        x-window-manager &
fi
root@debian:~#


-------------------------------------------------

#!/bin/bash
export USER=luiz
ps -e | grep tightvnc || vncserver :1 -geometry 1920x1080
export DISPLAY=':1'
ps -e | grep mediacenter || mediacenter21 /mediaserver
root@debian:~#

------------------------------------------------------


# Edit this file to introduce tasks to be run by cron.
#
# Each task to run has to be defined through a single line
# indicating with different fields when the task will be run
# and what command to run for the task
#
# To define the time you can provide concrete values for
# minute (m), hour (h), day of month (dom), month (mon),
# and day of week (dow) or use '*' in these fields (for 'any').#
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h  dom mon dow   command

@reboot     /home/luiz/headless > /dev/null

Title: Re: Start Debian without Monitor??
Post by: mwillems on November 23, 2015, 04:36:48 pm
Ok, you clearly didn't change the ~/.vnc/xstartup file as described above (it's still completely at default settings).  Go back and go through the steps above for changing the xstartup file and you should get better results.
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 24, 2015, 07:02:50 am
Hi,
Finally changed the file.
---------
#!/bin/sh

exec startxfce4
------------------------
Now there are no Gray screen, but the Gui I see , JRiver is no loaded in it.
There are few more problems.
1. Tightserver still does not load (I have to load it manualy)
2. How to login automatic (with no password ask - when I boot the system)
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 24, 2015, 07:20:33 am
When I load tightvncserver manually, here is the message i got


New 'X' desktop is debian:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/debian:1.log
Title: Re: Start Debian without Monitor??
Post by: mwillems on November 24, 2015, 07:24:52 am
If it's not loading, it means the cronjob isn't running (or is encountering errors), which is odd;  that's harder to troubleshoot.  

I think I see part of the problem though: in your outputs above it looks like you're running as root, which is a big no no, and is almost certainly a big part of the issues you're seeing. The whole point of exporting your user is that the scripts are supposed to be run as your user in your crontab (not root's crontab).  You should never login as root for normal tasks for a lot of different reasons (security and some programs won't work right).  Additionally, the tilde refers to /root when logged in at root, instead of /home/luiz which is what it refers to when logged in as your user.  So the cronjob won't work correctly.

Can you post the output of the three commands I listed above when logged in as your user (luiz)?  

i.e. login as luiz as run

Quote
cat ~/.vnc/xstartup
cat ~/headless
crontab -l

Also, just for insurance, run and post the output of
Code: [Select]
ls -la /home/luiz
2. How to login automatic (with no password ask - when I boot the system)

If you get my script setup correctly for your user, VNC and MC will load without a password ask, they'll just be waiting there for you.
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 24, 2015, 07:43:12 am
You were right, it was the root problem. Almost everything is ok.
Now the last probmem, the Pc does not boot without monitor.
When i disconect the cable i does not boot
Title: Re: Start Debian without Monitor??
Post by: mwillems on November 24, 2015, 07:46:25 am
You were right, it was the root problem. Almost everything is ok.
Now the last probmem, the Pc does not boot without monitor.
When i disconect the cable i does not boot

You'll have to explain what you mean by "does not boot"?  Like doesn't POST?  That sounds like a hardware problem?
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 24, 2015, 09:04:11 am
It does not boot. The Hdd light stops halfway in the boot process.
When I conect the monitor cable, it boots.

Another question, the Vnc is ok, but when I use a monitor , the desktop seems to be a diferent one, JRiver does not appear.
Does The Desktops can not be the same?? This is optional for me.

Thanks

Title: Re: Start Debian without Monitor??
Post by: mwillems on November 24, 2015, 09:22:24 am
It does not boot. The Hdd light stops halfway in the boot process.
When I conect the monitor cable, it boots.

I have no idea what to tell you about that; have you tried sshing into the machine and seeing what's in the journal?

Quote
Another question, the Vnc is ok, but when I use a monitor , the desktop seems to be a diferent one, JRiver does not appear.
Does The Desktops can not be the same?? This is optional for me.

This was explained above; they're not the same desktops, that's why x11vnc didn't work for you.  If you need them to be the same, that's a good bit more work.
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 24, 2015, 09:31:04 am
mwillems, thank you very much for the support.
I saw your Altec Speaker. Are threre any thread on it???
Last year I build a CornScala Speaker, based on Kilpsch LaScala (Bob Crites Project), and I liked it very much.
Next year I will build another one, but I am looking for projects (I saw David Dicks Full range projects, but I prefer Horns)

thanks again

Antonio
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 24, 2015, 10:48:55 am
Regardind the Monitor issue, I found this on internet. Do you think this will work??
-------------------
Basically install a dummy driver:

sudo apt-get install xserver-xorg-video-dummy
Then write it in the /usr/share/X11/xorg.conf.d/xorg.conf file (create one, if it does not exist):

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 31.5-48.5
    VertRefresh 50-70
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1024x800"
    EndSubSection
EndSection
Then restart the computer.
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 24, 2015, 10:53:49 am
I will use a Dummy Vga adapter, much easier
https://rumorscity.com/2013/12/06/how-to-create-dummy-plugs-for-your-graphics-cards/
Title: Re: Start Debian without Monitor??
Post by: mwillems on November 24, 2015, 10:53:59 am
mwillems, thank you very much for the support.
I saw your Altec Speaker. Are threre any thread on it???
Last year I build a CornScala Speaker, based on Kilpsch LaScala (Bob Crites Project), and I liked it very much.
Next year I will build another one, but I am looking for projects (I saw David Dicks Full range projects, but I prefer Horns)

thanks again

Antonio

No there's no thread; they're entirely home-designed and home-made  ;D  

Regardind the Monitor issue, I found this on internet. Do you think this will work??
-------------------
Basically install a dummy driver:

sudo apt-get install xserver-xorg-video-dummy
Then write it in the /usr/share/X11/xorg.conf.d/xorg.conf file (create one, if it does not exist):

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 31.5-48.5
    VertRefresh 50-70
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1024x800"
    EndSubSection
EndSection
Then restart the computer.

That might work; give it a try.  It looks like it forces initialization of the monitor whether one is attached or not, which might solve your issue.
Title: Re: Start Debian without Monitor??
Post by: BryanC on November 24, 2015, 10:57:14 am
Regardind the Monitor issue, I found this on internet. Do you think this will work??
-------------------
Basically install a dummy driver:

sudo apt-get install xserver-xorg-video-dummy
Then write it in the /usr/share/X11/xorg.conf.d/xorg.conf file (create one, if it does not exist):

Section "Device"
    Identifier  "Configured Video Device"
    Driver      "dummy"
EndSection

Section "Monitor"
    Identifier  "Configured Monitor"
    HorizSync 31.5-48.5
    VertRefresh 50-70
EndSection

Section "Screen"
    Identifier  "Default Screen"
    Monitor     "Configured Monitor"
    Device      "Configured Video Device"
    DefaultDepth 24
    SubSection "Display"
    Depth 24
    Modes "1024x800"
    EndSubSection
EndSection
Then restart the computer.


You may also want to disable kernel mode setting if that doesn't work as-is.
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 24, 2015, 10:59:52 am
Thank you ,

But I will use a Dummy Vga adapter, much easier for me. I tried these post last week and had to re-install the Os!!!
https://rumorscity.com/2013/12/06/how-to-create-dummy-plugs-for-your-graphics-cards/
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 24, 2015, 06:50:41 pm
Unfortunely the Dummy vga adapter did not work
Title: Re: Start Debian without Monitor??
Post by: BryanC on November 24, 2015, 08:54:23 pm
Read up on xvfb. It will create a virtual display in the framebuffer.

Code: [Select]
Xvfb :1 -screen 0 800x600x16
I would probably connect the monitor and check the boot logs to see where the boot is failing first.
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 25, 2015, 09:05:59 am
Hi Bryan. I am a newbie linux user. I would appreciate if you could explain step by step. Thank you
Title: Re: Start Debian without Monitor??
Post by: BryanC on November 25, 2015, 02:02:48 pm
Hi Bryan. I am a newbie linux user. I would appreciate if you could explain step by step. Thank you

You first need to explain clearly what your current situation is. A few posts ago you couldn't even get the computer to boot. Then the next post you were editing xorg.conf files which is pointless if you aren't triggering X. Then you moved onto a physical adapter.

First of all, it's impossible to follow you. Second of all, this process isn't nearly as difficult as you are making it, and is done very regularly with headless servers.

Rationale:
1. You need a dummy x-server (dummy display) for MC to run
2. In order to do this you need to trigger or start an x-server
3. You can trigger an x-server with a VNC server (that is NOT x11vnc since that requires an x-server to already be running--I'm sure there are ways to get x11vnc to trigger an x-server but that will require messing with Xauthority files and such) so that you can manage the computer remotely with a GUI, OR you can just use a dummy framebuffer (Xvfb) if you don't need to do any graphical configuration

The steps to enable a headless VNC server have been well-documented by mwillems in the Raspbian thread as well as in countless tutorials online. I suggest doing a search for "headless server x-server."

In addition to the mwillems thread, there is more info here: https://wiki.archlinux.org/index.php/TigerVNC#Running_vncserver_for_virtual_.28headless.29_sessions

Title: Re: Start Debian without Monitor??
Post by: altsouza on November 25, 2015, 05:05:27 pm
Hi Bryan,

Sorry for the confusion, and let me explain better.
I have computer, based on mini-ITX board (MSI J1800i).
I used Win 8.1 with success. But I decided to install Debian, because  windows 8.1 was a bit unstable.

My prerequisites were.
1. Autostart JRiver
2. Autostart one VNC program for doing maintenance of the system
3. And, very important, be able to start the Pc without a  connected monitor.
The windows 8.1 satisfied all these 3 pre-requisites. All my Win servers satisfy all these 3 pre-requisites

I  had no experience in Linux, but I liked the system. It is stable.

With the help of mwillems, I managed to set up the first two prerequisites (I used raspberry mwillems`s instructions, with small alterations)
but the last one, turn on the computer without monitor, I could not.

When I turn on my computer the Hdd lights stops to blink in the middle of the boot, and it does not start.

I'd appreciate If you could help me.
But I need a step by step tutorial, because I'm new to linux.

Thanks

Antonio
Title: Re: Start Debian without Monitor??
Post by: BryanC on November 25, 2015, 10:58:00 pm
So no POST?

Check your system logs:

Code: [Select]
journalctl -r |less
And see if anything is hanging at the time the system is trying to boot. This way we can rule out xorg issues.

If that doesn't work, try hitting the enter key shortly after setup in order to make sure that grub isn't waiting for input, and see if the computer boots successfully.

If that doesn't work, then look for BIOS options related to "break on error" and disable them.

If that setting is not present, try disabling the IGP/PCIE or some combination thereof in the bios settings so the mobo stops looking for a display.
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 26, 2015, 06:26:19 am
Hi,
I tried all Bios seting, no sucess.
Attached is the  journal file.

Thanks
Title: Re: Start Debian without Monitor??
Post by: BryanC on November 28, 2015, 08:43:05 am
That log isn't nearly long enough to try and diagnose your issue especially as it pertains to a failed boot (it's less than one second of data).

One thing that it does demonstrate is that you are using gdm, which may require an attached display or could possibly conflict with the x-server initiated by tigervnc, depending on your settings.
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 29, 2015, 07:17:05 pm
Sorry Bryan, but I could not copy/paste the journal file correctly. Could you explain how to do it?
Thanks again
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 30, 2015, 09:32:57 am
When i copy/paste it, just one page got copied
Title: Re: Start Debian without Monitor??
Post by: BryanC on November 30, 2015, 09:35:36 am
Sorry Bryan, but I could not copy/paste the journal file correctly. Could you explain how to do it?
Thanks again


Code: [Select]
journalctl | gzip > ~/Desktop/journal_log.gz
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 30, 2015, 09:49:38 am
Here is the file
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 30, 2015, 10:04:09 am
Still can't get the journal right. You to give a step by step instruction.
Sorry, I am newbie in linux
Title: Re: Start Debian without Monitor??
Post by: BryanC on November 30, 2015, 10:06:01 am
Are you sure you typed in 'journalctl' correctly?


Code: [Select]
journalctl | gzip > ~/Desktop/journal_log.gz
It's a one liner. Just copy (Ctrl-C) from here and paste (Ctrl-Shift-V) into the terminal.
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 30, 2015, 04:41:23 pm
Yes, I did just like that!!  Copy and past
I did in the user and also on the root.
No success
-------
luiz@debian:~$ journalctl | gzip > ~/Desktop/journal_log.gz
No journal files were found.
luiz@debian:~$ su -
Password:
root@debian:~# journalctl | gzip > ~/Desktop/journal_log.gz
root@debian:~#
Title: Re: Start Debian without Monitor??
Post by: mattkhan on November 30, 2015, 04:49:17 pm
running it as root at least queried the journal, how big is the resulting file?

Code: [Select]
su -
ls -la  ~/Desktop/journal_log.gz
journalctl|wc -l

show the output

the last one you posted seems like it was empty
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 30, 2015, 05:03:12 pm
It is empty, 20 bytes only
Is there a graphic method to copy/paste the Journal?? When I tried it , it got only one page.
-------
luiz@debian:~$ su -
Password:
root@debian:~# ls -la  ~/Desktop/journal_log.gz
-rw-r--r-- 1 root root 37785 Nov 30 19:39 /root/Desktop/journal_log.gz
root@debian:~# journalctl|wc -l
4232
root@debian:~# journalctl | gzip > ~/Desktop/journal_log.gz
root@debian:~#
Title: Re:
Post by: mattkhan on November 30, 2015, 05:29:32 pm
That file isn't empty, you need to attach the file from root ~ not from luiz ~

i.e. the file you need to attach is /root/Desktop/journal_log.gz

I imagine the 20byte one was from /home/luiz/Desktop
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 30, 2015, 05:51:39 pm
I think I got it
Title: Re: Start Debian without Monitor??
Post by: altsouza on November 30, 2015, 05:56:41 pm
Yes, I got it. Here is the Journal.
Now you can see the problem at the boot (dont boot without monitor conected)
Title: Re: Start Debian without Monitor??
Post by: mattkhan on December 01, 2015, 08:12:06 am
does it boot normally if a monitor is connected?

one of the errors in the logs is reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=784671 but not sure whether you're using that version
Title: Re: Start Debian without Monitor??
Post by: altsouza on December 01, 2015, 09:38:21 am
Yes, I does boot with Monitor Conected.
If I disconect the monitor, the boot stops halfway in the boot process, and the Computer does not start.
Thanks
Title: Re:
Post by: mattkhan on December 01, 2015, 10:23:08 am
It literally doesn't start so you can't SSH into it?
Title: Re: Start Debian without Monitor??
Post by: altsouza 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.
Title: Re: Start Debian without Monitor??
Post by: BryanC 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.
Title: Re: Start Debian without Monitor??
Post by: mattkhan 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.
Title: Re: Start Debian without Monitor??
Post by: BryanC 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
Title: Re: Start Debian without Monitor??
Post by: mwillems 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
Title: Re: Start Debian without Monitor??
Post by: altsouza 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
Title: Re: Start Debian without Monitor??
Post by: BryanC 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