LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 06-30-2020, 03:34 PM   #1
frrobert
LQ Newbie
 
Registered: Mar 2008
Location: South Bend, IN
Distribution: Ubuntu 18.04 & 20.04
Posts: 21

Rep: Reputation: 0
startx gives me a black screen on Ubuntu 20.04


Good afternoon,

I am running Ubuntu 20.04 on a Dell Optiplex 7040 with dual monitors. It is a server install plus xorg and i3wm. I did not want all the extras.

After I login if I run startx i3, Xorg starts fine and so does i3.

I then manually run xrdb ~/.Xresources to set some terminal settings and setxkbmap to set some keybindings.

If I put put those commands and exec i3 in my ~/.xinitrc and just use startx I just get a black screen.

I figured there must be something wrong with xorg configuration so I tried to run sudo dpkg-reconfigure xserver-xorg and it just hangs at the password prompt after I type in the password.

Since it works with startx and specifying i3 I am a bit hesitant to remove xorg and start over but that is what I am thinking should be done.

Any ideas?

Thanks.

Last edited by frrobert; 07-01-2020 at 07:16 AM.
 
Old 07-01-2020, 04:20 AM   #2
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 14,586
Blog Entries: 9

Rep: Reputation: 4089Reputation: 4089Reputation: 4089Reputation: 4089Reputation: 4089Reputation: 4089Reputation: 4089Reputation: 4089Reputation: 4089Reputation: 4089Reputation: 4089
Quote:
Originally Posted by frrobert View Post
I am running Ubuntu 20.04 on a Dell Optiplex 7040 with dual monitors. It is a server install plus xorg and i3wm. I did not want all the extras.

After I login if I run startx i3, Xorg starts fine and so does i3.

I then manually run xrdb ~/.Xresources to set some terminal settings and setxkbmap to set some keybindings.

If I put put those commands and exec i3 in my .initrc and just use startx I just get a black screen.

I figured there must be something wrong with xorg configuration so I tried to run sudo dpkg-reconfigure xserver-xorg and it just hangs at the password prompt after I type in the password.

Since it works with startx and specifying i3 I am a bit hesitant to remove xorg and start over but that is what I am thinking should be done.
Show us the content of that file (I hope you meant ~/.xinitrc).
Also, even with ~/.xinitrc present, can you succesfully 'startx i3'?
In other words, are you sure ~/.xinitrc is parsed at all?
I believe not all distros use ~/.xinitrc, maybe in Debian-based ones you have to use ~/.xsessionrc or some such. Check the Debian wiki.
 
Old 07-01-2020, 09:29 AM   #3
frrobert
LQ Newbie
 
Registered: Mar 2008
Location: South Bend, IN
Distribution: Ubuntu 18.04 & 20.04
Posts: 21

Original Poster
Rep: Reputation: 0
I was able to fix the situation. I thought ~/.xinitrc was supposed to have the the same items that /etc/X11/xinit/xintrc had. Once I removed those lines and just used my added lines for xrdb ~/.Xresources, the keybindings, and exec i3 the system was able to go to I3 with just startx.

I do want to answer your questions
First yes I did mean ~/.initrc I fixed my typo in the op.
1. startx i3 worked but ~/.xintrc is not parsed. I believe that if you use startx <wm> the default behavior is not to parse ~/.xinitrc

2. ~/.xsession and ~/.xsessionrc are both symlinks to ~/.xintrc The Ubuntu documentation says it uses ~/.xinitrc but seems to contradict itself about which file it uses so I created the symlinks to cover myself.

Thanks for your willingness to help
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
startx in fluxbox gives an empty black screen! CodyAcer Linux - Software 7 08-27-2014 03:01 AM
[SOLVED] [startx problem] - startx goes to black/grey screen and comes back to command prompt! iNUKE Ubuntu 13 01-07-2011 01:32 PM
Slackware 13 startx gives black screen Rugila Slackware 7 03-26-2010 07:56 AM
Help. Startx gives black screen! sl4ckw4r3 Slackware 23 01-29-2010 05:08 PM
'startx' gives me a black screen on new slackware 10 install evank Linux - Newbie 5 01-07-2005 09:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 03:27 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration