LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Containers
User Name
Password
Linux - Containers This forum is for the discussion of all topics relating to Linux containers. Docker, LXC, LXD, runC, containerd, CoreOS, Kubernetes, Mesos, rkt, and all other Linux container platforms are welcome.

Notices


Reply
  Search this Thread
Old 07-01-2018, 08:32 PM   #1
bgoodwin91006
LQ Newbie
 
Registered: Jul 2018
Posts: 15

Rep: Reputation: Disabled
xwindow fails to open. Missing tty0


I have a desktop PC with 64bit mint Linux which is set up to only boot to the basic console (not to the desktop). By typing 'startx' the desktop environment starts up running xfce. I know I'm old fashioned but I like it that way. Sometimes I want to do something that is strictly CLI.

I've added a container running a 32bit version of linux and using 'aptitude', installed 32bit xorg and 32bit linux mint. From the basic console I can start my container and attach to it but typing 'startx' fails. Xwindow complains that it could not find /dev/tty0. Sure enough, 'ls /dev' shows there is no tty0. there are other tty devices. As yet, I don't know enough about containers to know how to solve this. General internet searches have not provided an answer. xorg man pages don't suggest any way to designate a different option.

Thanks in advance for any information you can provide.

Best regards,
Bob G.
 
Old 07-02-2018, 12:50 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,685

Rep: Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274Reputation: 7274
so do you want to run X in a container? I do not think it is a good idea, but probably possible.
probably this helps: https://unix.stackexchange.com/quest...in-a-container
 
Old 07-05-2018, 07:34 AM   #3
simosx
Member
 
Registered: Jul 2005
Posts: 66

Rep: Reputation: 11
There are a few types of Linux containers. Which one did you use?

It should be possible to get the X server to launch from within a container, since there is no X server running already on the host.
However, it would be a trial-and-error process. You would try to startx, get an error, then solve the error. And continue trying.

/dev/tty0 is a character device.

If you are using LXD, you would need to share the host's /dev/tty0 to the container using a command like:

Code:
lxc config device add mycontainer tty0 unix-char source=/dev/tty0 path=/dev/tty0
Documentation: https://github.com/lxc/lxd/blob/mast...type-unix-char
 
Old 07-23-2018, 08:14 PM   #4
bgoodwin91006
LQ Newbie
 
Registered: Jul 2018
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by simosx View Post
There are a few types of Linux containers. Which one did you use?

It should be possible to get the X server to launch from within a container, since there is no X server running already on the host.
However, it would be a trial-and-error process. You would try to startx, get an error, then solve the error. And continue trying.

/dev/tty0 is a character device.

If you are using LXD, you would need to share the host's /dev/tty0 to the container using a command like:

Code:
lxc config device add mycontainer tty0 unix-char source=/dev/tty0 path=/dev/tty0
Documentation: https://github.com/lxc/lxd/blob/mast...type-unix-char
There have been changes to the syntax since this was formulated but it put me on the right track. What worked was;

Code:
sudo lxc-device -n my-container add /dev/tty0
Thanks for getting me pointed in the right direction.
Best regards, Bob G.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Xorg - parse_vt_settings: cannot open /dev/tty0 cellsheet Linux From Scratch 2 11-16-2016 11:50 PM
Startx error: cannot open /dev/tty0 fortea Linux - General 3 09-01-2011 04:27 AM
fresh netinst of squeeze:X server fails to start, missing /dev/fb0, missing xorg.conf frumpus Debian 7 03-17-2010 12:36 PM
TTY0 missing in newer kernels theNbomr Linux - Kernel 8 01-14-2009 09:34 AM
xf86OpenConsole: Cannot open /dev/tty0 (No such file or directory) souhakubunn Linux - Software 1 10-04-2007 07:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Containers

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