screen resolution as headless server

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
I am new to the raspberry pi but not to Linux.  My plan is to connect to  
the Raspberry Pi through VNC but with no screen, keyboard etc attached to  
the RP.

I have managed to do this using my Ubuntu machine as client and it works  
fine except for the screen resolution.

When I have a screen physically attached to the RP, the image on my  
client screen is fine.  However, when there is no screen attached the  
image on my client drops to 640X480 which means that icons look huge and  
windows overlap the screen size.

I need to tell the RP that it has a high resolution screen even when none  
is attached.  

Any ideas?

Best Regards,
             Jack Fearnley, enthusiastic new user.


              

Re: screen resolution as headless server
On 1/2/2018 16:20, Jack Fearnley wrote:
Quoted text here. Click to load it

The simplest way I've found is to edit /boot/config.txt and add:

framebuffer_width19%20
framebuffer_height10%80

or whatever size you want.

--  

Knute Johnson

Re: screen resolution as headless server
On Tue, 02 Jan 2018 17:00:31 -0600, Knute Johnson wrote:

Quoted text here. Click to load it
Curiosity: why use VNC when you can use SSH? The RPi default installation  
starts sshd and IIRC "X11Forwarding yes" is set by default - more or less  
has to be otherwise you couldn't run GUI programs on the RPi.

IME the screen colour palette is usually better with a forwarded X11  
connection than it is with VNC.

Quoted text here. Click to load it
I just ran a test here by executing "zenity --calendar", both locally and  
over X11 from my RPi and it looks very much as if the copy of zenity  
running on the RPi is getting the screen size passed to it from this  
laptop because the zenity calendar display put up by the RPi is very  
similar in size and font size to that shown by a locally run copy.

To double check, I ran up a full screen application on this laptop and  
another copy via ssh on my house server: both put up identical sized  
windows containing identical font sizes: this laptop is a Lenovo T440  
with an 1600x900 display while the house server has an ancient flat VGA  
display.  

I'm running Raspbian on the RPi and 64-bit Fedora 27 on both laptop and  
house server, but I'd be surprised if Ubuntu doesn't do exactly the same  
as Fedora.

HTH


--  
Martin    | martin at
Gregorie  | gregorie
We've slightly trimmed the long signature. Click to see the full one.
Re: screen resolution as headless server
On Wed, 03 Jan 2018 00:26:12 +0000, Kiwi User wrote:

Quoted text here. Click to load it

Thanks for this.

I am using VNC because I want an exact image of the RPi screen on my  
Ubuntu.  I am learning about networking which has always been a mystery  
to me.  Perhaps your approach is simpler but I would probably need some  
hand holding to get it working.

I bought the RPi so that I could do these kind of experimental setups  
without compromising my main computer.

Jack

Re: screen resolution as headless server
On Wed, 03 Jan 2018 02:59:57 +0000, Jack Fearnley wrote:

Quoted text here. Click to load it
Understood, though as I said, you may find the colour resolution a bit  
ropey since IME vnc crams the colour info into fewer bits than SSH uses.
  
Quoted text here. Click to load it
I think its worth looking at, since  you can use the scp and sftp  
utilities for scriptable or command-line file transfers. In addition,  
quite a lot of GUI ftp clients, such as gftp, also implement the SFTP  
file transfer protocol, so don't need an ftp server to be running on the  
RPi.

It may also be worth knowing that a networked RPi can also use source  
version control systems, e.g. csv and git, to access code repositories on  
your other hosts.
  

--  
Martin    | martin at
Gregorie  | gregorie
We've slightly trimmed the long signature. Click to see the full one.
Re: screen resolution as headless server
Quoted text here. Click to load it
That's exactly what I have always done, probably because I started
doing this sort of thing before VNC existed! :-)

However I agree about display etc., it always seems a bit clunky when
using VNC.  Horses for courses though, if you want to run a number of
GUI programs remotely then VNC probably makes sense.  I tend to simply
run a couple of ssh connections to command line on the Pi and maybe
just one or two GUI programs as needed.

--  
Chris Green


Re: screen resolution as headless server
On Wed, 3 Jan 2018 10:02:31 +0000

Quoted text here. Click to load it

    I've always used ssh -X (or -Y) to get a forwarded X connection
when running GUI applications remotely, for example my Calibre server runs
headless so when I need the GUI I just run ...

ssh -Y calibre@library

    ... from any machine with a display and the authorised keys (the
calibre user has shell set to the calibre GUI). There are no other X
clients in that jail, in particular no desktop environment, window manager
or even terminal. The only things the server exports are the GUI
application and a web interface, you can get to the console with physical
access but the console runs in text mode and can't display the calibre GUI.

    It always seemed wrong to forward the desktop when all you want is
the application(s), even more so when there is no desktop to forward.

--  
Steve O'Hara-Smith                          |   Directable Mirror Arrays
C:\>WIN                                     | A better way to focus the sun
We've slightly trimmed the long signature. Click to see the full one.
Re: screen resolution as headless server
On 03/01/18 14:14, Ahem A Rivet's Shot wrote:
Quoted text here. Click to load it
I have been using the facility of X apps to fowraed to a remote server.

This is the script I use to start and redirect an X application  
(kaffeine) to a machine that has logged in with ssh

#!/bin/sh
# start in the right place
cd /var/videos
# this fixes some errors that I don't understand
export $(dbus-launch)
#detect IP address of remote client
IP=`echo $SSH_CONNECTION | awk '{print $1}'`
#redirect pulse audio to it
PULSE_SERVER=$IP:'4713'
# set default X display to remote client
DISPLAY=$IP:0.0
# DBUS_SESSION_BUS_ADDRESS=""
export PULSE_SERVER
export DISPLAY
#kaffeine > /dev/null 2>&1
kaffeine


On the client machines you need something like

xhost +
ssh -t myserver pathtomyscript

assuming you have passwordless ssh set up.

Ex of gigabit ethernet, this isn't fast enough to play movies, but its  
good enough for most other purposes



--  
"Women actually are capable of being far more than the feminists will  
let them."



Re: screen resolution as headless server
Quoted text here. Click to load it

That's horribly insecure.

Remove the references to DISPLAY above, and just do:

ssh -X -C  

to tunnel the X session back over ssh, rather than making the
X server available for the whole world to see what you're doing
and tamper.

Quoted text here. Click to load it

--  
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]

Re: screen resolution as headless server
On 03/01/18 22:25, Andrew Gabriel wrote:
Quoted text here. Click to load it

Oh dear.

The whole world?

That would be me and just who?

No one else is on the network

And any car parked near enough to have the wifi would be extremely  
visible, and there are no cars along this lane



Quoted text here. Click to load it


--  
New Socialism consists essentially in being seen to have your heart in  
the right place whilst your head is in the clouds and your hand is in  
We've slightly trimmed the long signature. Click to see the full one.
Re: screen resolution as headless server
On Thu, 04 Jan 2018 05:23:43 +0000, The Natural Philosopher wrote:

Quoted text here. Click to load it
This may be teaching grandma to suck eggs, but... are you sure - IOW do  
you know that your external LAN interface is secure? Have you tested it?

A surprising number of them aren't, having 'features' such as exposing  
their admin port to the outside world as well as to the LAN and default  
admin passwords which a lot of people never change.  

I hardened mine so that, according to Gibson Research Labs Shields-Up  
tool [*], it now leaves nothing visible to the outside world.  This  
required configuration changes from its default setup as well as a  
password change.

[*]  https://www.grc.com/x/ne.dll?bh0bkyd2


--  
Martin    | martin at
Gregorie  | gregorie
We've slightly trimmed the long signature. Click to see the full one.
Re: screen resolution as headless server
Quoted text here. Click to load it
What do you mean by 'external LAN interface'?  His (and my) LAN is on
a private IP range and is mostly wired and within the house.  There is
WiFi but I doubt if it reaches anyone else's house and you can't stop
in the lane outside without causing an obstruction (and lots of dog
barking).


Quoted text here. Click to load it
Ah, you mean the outside facing *WAN* interface of the NAT router.
Yes, there can be security holes put there by ISPs and such but since
I (and probably The Natural Philosopher) use our own (not the ISP's)
router that's unlikely.  


Quoted text here. Click to load it
I ran some tests of this sort on mine a while ago, seemed to confirm
that it's fairly 'hard'.


--  
Chris Green


Re: screen resolution as headless server
Chris Green wrote:
Quoted text here. Click to load it

Your router does connect you to the Internet, doesn't ist? External
administration is so "convenient" and "comfortable" that it may be
offered by default and if not your security need not be worth much.

On the other hand, getting at you that way will require knowledge and
effort. I expect you to be safe just because nobody as qualified would
consider it worth his time to look at your PI experiments. Now, if you
hosted a sizeable customer database there of ran a political website ...

--  




/ \  Mail | -- No unannounced, large, binary attachments, please! --

Re: screen resolution as headless server
On 04/01/18 11:47, Axel Berger wrote:
Quoted text here. Click to load it

No. External administration is not offered by defaukt on a second hand  
Cisco 527W

Quoted text here. Click to load it

Even there, its surprsinsing how resileinet one can be. I do run a very  
public websitre

Have a look at what was happening in October...

...a massive increase in traffic TO the server...

Till I got bored with the huge logs and firwalled out the fruitless  
attempts to log in as root with every possible password.

Hint to hackers. Root login is in any case disallowed. Even with the  
roopt password.

My point is that even with a relatively high profile and exposed machine  
that has sshd enabled to all comers, they couldnt hack the thing in a  
month of trying.

Whereas I know of people with varoius 'web tools' like joomla who were  
hacked every few DAYS




--  
Future generations will wonder in bemused amazement that the early  
twenty-first century?s developed world went into hysterical panic over a  
We've slightly trimmed the long signature. Click to see the full one.
Re: screen resolution as headless server
Quoted text here. Click to load it
Yes, it's amazing how many hits an open ssh port gets!  :-)

I have mine set up to only allow connections from two outside sites
where I have ssh login accounts.  Thus I connect from 'somewhere' to
one of these two accounts and then from there to my home system.

--  
Chris Green


Re: screen resolution as headless server
On 04/01/18 19:11, Chris Green wrote:
Quoted text here. Click to load it
Basically I have unlimited access from my (fixed) home address - I had  
opened ssh up so I could access it from  abroad, but I am back home now,  
so I have shut the lot down.

Now the only globally open ports are smtp, ssmtp, pop3, http and https.  
And one other I won't mention.

ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:www
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ssmtp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:https
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:xxxxx
REJECT     all  --  anywhere             anywhere            reject-with  
icmp-port-unreachable

On the internet the default should always be 'only let in what you  
absolutely need, and then only once you have worked out how to hack it,  
and blocked that too'

I havenm't had a virus since I abandonedd Windows, and I have never been  
hacked. Yet. But I have been subjected to sccessful denial of service  
attacks.

Greens dont like gridwatch.


--  

Re: screen resolution as headless server
On Thu, 04 Jan 2018 19:45:44 +0000, The Natural Philosopher wrote:

Quoted text here. Click to load it
Fair comment
  
Quoted text here. Click to load it
Most of these are obvious and sensible given that you're running a  
webserver and, presumably, a mainserver that accepts SMTP connections.

Indeed, but one has me curious: why is pop3 open?  

I assume you're running a public or semi-public POP3 server, since using  
it to collect mail from an ISP doesn't require an externally accessible  
POP3 port.
  

--  
Martin    | martin at
Gregorie  | gregorie
We've slightly trimmed the long signature. Click to see the full one.
Re: screen resolution as headless server
On 04/01/18 20:41, Kiwi User wrote:
Quoted text here. Click to load it

Correct. A friend is also using it, from a BT dynamic IP setup.

I dont understand what you mean by 'using it to collect mail from an ISP'.

Why on earth would I want to be 'collecting mail from an ISP'?

Since ISPS don't have mail to collect. They are merely connectivity devices.

I mean what is the POINT of having your own domains and server, if you  
then 'use it to collect mail from somewhere else?

Mail comes on and out via SMTP and SSMTP

POP3 is how it gets to me inside my network, as I don't want to open an  
SMTP port into my home network



--  
"I am inclined to tell the truth and dislike people who lie consistently.
This makes me unfit for the company of people of a Left persuasion, and  
We've slightly trimmed the long signature. Click to see the full one.
Re: screen resolution as headless server
On Thu, 04 Jan 2018 22:28:44 +0000, The Natural Philosopher wrote:

Quoted text here. Click to load it
It probably would not suit you, but the following setup works exactly the  
way I want it to:

My Postfix MTA sends outgoing mail via my ISP's mail host and I use  
getmail to retrieve incoming mail from from my ISP's mail host using POP3,  
passing it to my MTA for local delivery via Dovecot. My mail volume is  
fairly small, so this system handles it easily while allowing me to  
receive and send mail without having any ports externally visible or  
accessible.

I do run a web server, but only for internal use. My published websites  
are hosted by my ISP. These are maintained locally and published by using  
FTP to mirror them onto my ISP's webhosting servers.


--  
Martin    | martin at
Gregorie  | gregorie
We've slightly trimmed the long signature. Click to see the full one.
Re: screen resolution as headless server
On 04/01/18 23:39, Kiwi User wrote:
Quoted text here. Click to load it
Good gid. I wouldnt rteuts my ISP tro host a cklown party for 5 year olds.

I run about 20 websites on a linux virtual private server, plus half a  
dozen doamins I keep for my email and other nefarious purposes plus a  
few other people's websites and email.

This isnt at home stuff. Behind some firewall. This is out there on the  
backbone shit.

The only firewall is iptables.

--  
"Anyone who believes that the laws of physics are mere social  
conventions is invited to try transgressing those conventions from the  
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline