Discussion:
[yocto] how to execute bitbake menuconfig from ssh server
yahia farghaly
2017-09-13 07:08:53 UTC
Permalink
Hi,

I am working with yocto from a remote server using ssh. i want to
execute *bitbake
-c menuconfig virtual/kernel* . It fails to open since it tries to open
another shell.
how can i redirect output of menuconfig to my current ssh session ?
--
Yahia Farghaly
Graduated from Faculty of Engineering - Electronics and Communications
Department at Cairo University.
Linkedin <https://linkedin.com/in/yahiafarghaly> - GitHub
<https://github.com/yahiafarghaly>



‌
Yusuke Mitsuki
2017-09-13 08:54:29 UTC
Permalink
Hello

You can use screen.
If your host is ubuntu,you can get via apt as follows.

sudo apt install screen.

If necessary , you can set auto or screen to OE_TERMINAL environment.
Hi,
I am working with yocto from a remote server using ssh. i want to execute *bitbake
-c menuconfig virtual/kernel* . It fails to open since it tries to open
another shell.
how can i redirect output of menuconfig to my current ssh session ?
--
Yahia Farghaly
Graduated from Faculty of Engineering - Electronics and Communications
Department at Cairo University.
Linkedin <https://linkedin.com/in/yahiafarghaly> - GitHub
<https://github.com/yahiafarghaly>
‌
--
_______________________________________________
yocto mailing list
https://lists.yoctoproject.org/listinfo/yocto
yahia farghaly
2017-09-13 11:17:36 UTC
Permalink
can you give some steps on how to do this ?


‌
Post by Yusuke Mitsuki
Hello
You can use screen.
If your host is ubuntu,you can get via apt as follows.
sudo apt install screen.
If necessary , you can set auto or screen to OE_TERMINAL environment.
Hi,
I am working with yocto from a remote server using ssh. i want to execute *bitbake
-c menuconfig virtual/kernel* . It fails to open since it tries to open
another shell.
how can i redirect output of menuconfig to my current ssh session ?
--
Yahia Farghaly
Graduated from Faculty of Engineering - Electronics and Communications
Department at Cairo University.
Linkedin <https://linkedin.com/in/yahiafarghaly> - GitHub
<https://github.com/yahiafarghaly>
‌
--
_______________________________________________
yocto mailing list
https://lists.yoctoproject.org/listinfo/yocto
--
Yahia Farghaly
Graduated from Faculty of Engineering - Electronics and Communications
Department at Cairo University.
Linkedin <https://linkedin.com/in/yahiafarghaly> - GitHub
<https://github.com/yahiafarghaly>
Aaron Schwartz
2017-09-13 11:24:42 UTC
Permalink
Tmux [0] also works well for this, and I've never tried it with Screen (a
similar utility) so here's instructions using Tmux:

You need to install Tmux on the server you are using SSH to connect to,
then as soon as you SSH into the server run `$ tmux`. Then when you run `$
bitbake -c menuconfig ...` it will automatically open a second pane on the
bottom half of your screen where you can edit your kernel config. That
pane will close automatically when you exit the menuconfig application.

I hope that helps!
Aaron


0) https://github.com/tmux/tmux/wiki
Post by yahia farghaly
can you give some steps on how to do this ?
‌
On 13 September 2017 at 10:54, Yusuke Mitsuki <
Post by Yusuke Mitsuki
Hello
You can use screen.
If your host is ubuntu,you can get via apt as follows.
sudo apt install screen.
If necessary , you can set auto or screen to OE_TERMINAL environment.
Post by yahia farghaly
Hi,
I am working with yocto from a remote server using ssh. i want to
execute *bitbake -c menuconfig virtual/kernel* . It fails to open
since it tries to open another shell.
how can i redirect output of menuconfig to my current ssh session ?
--
Yahia Farghaly
Graduated from Faculty of Engineering - Electronics and Communications
Department at Cairo University.
Linkedin <https://linkedin.com/in/yahiafarghaly> - GitHub
<https://github.com/yahiafarghaly>
‌
--
_______________________________________________
yocto mailing list
https://lists.yoctoproject.org/listinfo/yocto
--
Yahia Farghaly
Graduated from Faculty of Engineering - Electronics and Communications
Department at Cairo University.
Linkedin <https://linkedin.com/in/yahiafarghaly> - GitHub
<https://github.com/yahiafarghaly>
--
_______________________________________________
yocto mailing list
https://lists.yoctoproject.org/listinfo/yocto
--
Aaron Schwartz
Production
Logic Supply
Direct: +1 802 861 2300 Ext. 530
Main: +1 802 861 2300
www.logicsupply.com

Google+ <https://plus.google.com/+Logicsupply/posts> | Twitter
<https://twitter.com/logicsupply> | LinkedIn
<https://www.linkedin.com/company/logic-supply> | YouTube
<https://www.youtube.com/user/logicsupply>
Alex Lennon
2017-09-13 11:51:19 UTC
Permalink
Hi Yahia,
Post by Aaron Schwartz
Tmux [0] also works well for this, and I've never tried it with Screen
You need to install Tmux on the server you are using SSH to connect
to, then as soon as you SSH into the server run `$ tmux`.  Then when
you run `$ bitbake -c menuconfig ...` it will automatically open a
second pane on the bottom half of your screen where you can edit your
kernel config.  That pane will close automatically when you exit the
menuconfig application.
I hope that helps!
Aaron
I mostly remote into my server via SSH too. And I use the screen method
to run menuconfig and devshell and so forth. Works well.

As Yusuke says you can install screen on the server (if it is Ubuntu or
similar) if you need to with

$ sudo apt install screen

You might need to tell the bitbake tooling to use the screen utility
which you can do with something like

$ export  OE_TERMINAL=screen

I see there are some notes here

https://books.google.co.uk/books?id=yNi6BwAAQBAJ&pg=PA35&lpg=PA35&dq=yocto+OE_TERMINAL+screen&source=bl&ots=HYab5gQgCg&sig=-qLFfrNLtglXCKwagcbU2Uqg1WM&hl=en&sa=X&ved=0ahUKEwie667diqLWAhUkLcAKHfXDBZwQ6AEIQzAD#v=onepage&q=yocto%20OE_TERMINAL%20screen&f=false

...

I hadn't heard of tmux. Thanks Aaron - I will have a look into that...

...

Sometimes I need a graphical environment. For example when I want to run
up a Yocto Poky build for testing on a QEmu emulated machine easily.

For this I have VNC Server installed on the build box. I then run this
up and it creates a new desktop. Your default desktop is usually :0 and
in my case VNC then creates a :1 desktop

This usually ends up on build box local port 5901 as I recall (if not it
will be a similar number, you can check with netstat -anp)

You can then port forward the VNC TCP port 5901 over SSH and use a VNC
client on your client local port.

I often use Windows as a client so use Putty for the port forwarding and
TightVNC for the VNC client.

This could well sound quite fiddly but it's fine when you get it setup.

There are some notes here which might be useful

https://www.theurbanpenguin.com/creating-an-ssh-tunnel-with-putty-to-secure-vnc/

Cheers,

Alex

--
yahia farghaly
2017-09-13 12:00:35 UTC
Permalink
Nice Aaron, it worked as charm. Thank you !

Alex, i will try your way. but you can test qemu without vnc by
specifying *serial
nographic* of runqemu options
‌
Post by Alex Lennon
Hi Yahia,
Post by Aaron Schwartz
Tmux [0] also works well for this, and I've never tried it with Screen (a
You need to install Tmux on the server you are using SSH to connect to,
then as soon as you SSH into the server run `$ tmux`. Then when you run `$
bitbake -c menuconfig ...` it will automatically open a second pane on the
bottom half of your screen where you can edit your kernel config. That
pane will close automatically when you exit the menuconfig application.
I hope that helps!
Aaron
I mostly remote into my server via SSH too. And I use the screen method to
run menuconfig and devshell and so forth. Works well.
As Yusuke says you can install screen on the server (if it is Ubuntu or
similar) if you need to with
$ sudo apt install screen
You might need to tell the bitbake tooling to use the screen utility which
you can do with something like
$ export OE_TERMINAL=screen
I see there are some notes here
https://books.google.co.uk/books?id=yNi6BwAAQBAJ&pg=PA35&lpg
=PA35&dq=yocto+OE_TERMINAL+screen&source=bl&ots=HYab5gQgCg&
sig=-qLFfrNLtglXCKwagcbU2Uqg1WM&hl=en&sa=X&ved=0ahUKEwie667d
iqLWAhUkLcAKHfXDBZwQ6AEIQzAD#v=onepage&q=yocto%20OE_
TERMINAL%20screen&f=false
...
I hadn't heard of tmux. Thanks Aaron - I will have a look into that...
...
Sometimes I need a graphical environment. For example when I want to run
up a Yocto Poky build for testing on a QEmu emulated machine easily.
For this I have VNC Server installed on the build box. I then run this up
and it creates a new desktop. Your default desktop is usually :0 and in my
case VNC then creates a :1 desktop
This usually ends up on build box local port 5901 as I recall (if not it
will be a similar number, you can check with netstat -anp)
You can then port forward the VNC TCP port 5901 over SSH and use a VNC
client on your client local port.
I often use Windows as a client so use Putty for the port forwarding and
TightVNC for the VNC client.
This could well sound quite fiddly but it's fine when you get it setup.
There are some notes here which might be useful
https://www.theurbanpenguin.com/creating-an-ssh-tunnel-with-
putty-to-secure-vnc/
Cheers,
Alex
--
Yahia Farghaly
Graduated from Faculty of Engineering - Electronics and Communications
Department at Cairo University.
Linkedin <https://linkedin.com/in/yahiafarghaly> - GitHub
<https://github.com/yahiafarghaly>
Alex Lennon
2017-09-13 12:05:41 UTC
Permalink
Nice Aaron, it worked as charm.  Thank you !
Alex, i will try your way. but you can test qemu without vnc by
specifying /serial nographic/ of runqemu options
‌
Yes. I'm generally have a need for graphical output for testing though :)

You can actually use the in-built qemu VNC server if you change the
options too...

ref: https://wiki.archlinux.org/index.php/QEMU#vnc

Cheers!

Alex
Alex Lennon
2017-09-13 12:05:46 UTC
Permalink
Nice Aaron, it worked as charm.  Thank you !
Alex, i will try your way. but you can test qemu without vnc by
specifying /serial nographic/ of runqemu options
‌
Yes. I generally have a need for graphical output for testing though :)

You can actually use the in-built qemu VNC server if you change the
options too...

ref: https://wiki.archlinux.org/index.php/QEMU#vnc

Cheers!

Alex
yahia farghaly
2017-09-13 12:55:35 UTC
Permalink
For technical knowledge, why is it failing from the first place ?

from my observation, It seems to try to execute gnome-terminal by default,
so i installed it but it failed to open it. even when i tried with ssh -X ,
it opened gnome-terminal but print the same failure messages within it.


‌
Post by yahia farghaly
Nice Aaron, it worked as charm. Thank you !
Alex, i will try your way. but you can test qemu without vnc by specifying *serial
nographic* of runqemu options
‌
Yes. I generally have a need for graphical output for testing though :)
You can actually use the in-built qemu VNC server if you change the
options too...
ref: https://wiki.archlinux.org/index.php/QEMU#vnc
Cheers!
Alex
--
Yahia Farghaly
Graduated from Faculty of Engineering - Electronics and Communications
Department at Cairo University.
Linkedin <https://linkedin.com/in/yahiafarghaly> - GitHub
<https://github.com/yahiafarghaly>
Loading...