when i boots up my raspberry pi desktop become black - linux

I try to auto start a python script at startup, then reboot my Raspberry Pi to see if it works.
sudo nano /etc/xdg/lxsession/LXDE/autostart
Instead of a normal desktop display, I get a blank screen open box that can only open the menu by right click. So I tried to delete the code I have implemented on start up then reboot again, but the same thing happens. I uninstall open box hoping that it would solve the problem, but I still get the blank screen and the mouse cursor becomes an "X" icon. Has anybody encountered this problem before?

I had a similar problem with my Pi and, after checking the link provided by Matt (lxde wiki), I found what the problem was and the solution.
I had 2 autostart files:
Global commands:
/etc/xdg/lxsession//autostart
Local commands:
~/.config/lxsession/LXDE-pi/autostart
And, according to documentation "If both files are present, only the entries in the local file will be executed."
And my local file was empty.
After deleting the empty file, LXDE desktop was back and no more black screen.

The blank screen open box is the default openbox theme (for lack of a better word). Openbox is required for lxde so you should reinstall that first. To autostart something in LXDE you can create desktop files in your ~/.config/autostart directory (according to the lxde wiki) to avoid messing with the autostart file
Try reinstalling openbox and returning the /etc/xdg/lxsession/LXDE/autostart to the way you found it and see what happens. You might have accidentally messed up another autostart command

I went into ~/.config/autostart and found a file named lxde.desktop which I edited and commented out (using #) a line that began with something like OnlyShowIn or something similar. (After a reboot that line disappeared so I don't remember exactly what It was, It "could" have been NotShowIn but I thought it was something different)
After a reboot my desktop came back *fine!
*I had a bunch of GDBus.Error:org.freedesktop.PolicyKit1 errors which I cleared up by typing lxsession-edit in a terminal window and then unchecking LXDE and rebooting
If you figure out my "OnlyShowIn" confusion - please comment to clear it up for myself and others

I experienced same behavior, and found the following mistake I made:
I ran:
sudo dd bs=1m if=raspbian.img of=/dev/disk2 conv=sync
but I accidentally omitted the r before disk2
I Reran:
sudo dd bs=1m if=raspbian.img of=/dev/rdisk2 conv=sync
and it booted up properly.
The successful boot on Pi showed a blue square immediately saying "reformatting disk".

My solution was to format the SD card with the ZIP file directly instead of the IMG file found inside after extraction. I got the zip file from the Raspbian download page found here:
https://www.raspberrypi.org/downloads/raspbian/
With an SD card formatted from the ZIP rather than its contained IMG, my operating system is loading as expected.
This solution was applied in Mac OSX using Apple Pi Baker software and the above linked image.

Related

"libz.so.1: cannot open shared object file: No such file or directory"

I am getting this error as:
apt-get: error while loading shared librarie: libz.so.1:cannot open shared object file: No such file or directory
When trying:
sudo apt-get zlib1g
I'm using a Ubuntu 16.04 os and i can't log into the graphic interface, after booting I can only see a blinking underscore on the top left corner of the screen, so i pressed "alt+f4" to open a terminal session.
In my commands historical I found the command:
rm -rf zlib-1.6.37
(That command was executed from the root directory of my user.) And i don't know if that is the cause.
I do need some solution to thia problem as soon as possible please.
If you need some more info just ask for it, I will reply with the answer as soon as I can.
Ok, I've figured it out, it was quite simple, but i just got desperate
The solution was just to recreate the symlink that was damaged (libz.so.1) and that fixed the problem, now I have another issue, it seems like I'm connected to network but i don't have internet at all anyway that's for another question.
Thanks if somebody tried helping me, even if the question just have like 2 hours from posted.

Disabling asterisks in Linux Mint 19.1

I recently switched to Linux Mint 19.1.
While typing passwords in terminal it shows asterisks. How can I edit my sudoers file to disable them (not deleting but disabling)?
Just execute the script below:
sudo mv /etc/sudoers.d/0pwfeedback /etc/sudoers.d/0pwfeedback.disabled
The above line will disable the functionality of the 0pwfeedback package. Thus, the asterisks will be disappeared. Many solutions on the web are saying to delete it. Do not do that. In case you will need the asterisks back you will enable it again. This is how it must be done.

Removed '/bin/tempfile', now problems with X

I just undeliberately deleted my bin/tempfile, please don't ask why.
I experienced no issues, however, after a reboot, I wasn't able to login anymore. When I entered my password and pressed ENTER, I got a black screen, and 2 seconds later the login screen appeared again.
My system is Kubuntu 17.10 on 4.14.11 Kernel.
I did some research on it, but I still got no clue what this file does, or how I can restore it (it was deleted by rm).
Until now I did the following:
touch /bin/tempfile
chown root:root /bin/tempfile
chmod 755 /bin/tempfile
Finally I got back into KDE, and everything works fine this far, except an error, which I receive immediately after logging in: Xsession: Xsession: Warning: unable to write to ; X session may exit. The message is not in the style of my normal KDE desktop windows, it looks like a very old design, because the message probably comes from X itself. (I have no clue about this, sorry if it's rubbish)
In your case you can easily fix your issue by executing the following command:sudo apt-get --reinstall install debianutils.
Hope this helps.

StartX failing to run:- Arch linux openbox

I am a linux noob trying to setup openbox on an arch linux base. I am trying to get it as lightweight as possible in terms of resources used.
My final plan is to use openbox, with tint1 and conky.
however I am having an issue getting openbox to start. I have followed numerous guides and am struggling to figure out the problem.
I have so far installed the following (and done this config)
openbox (installed default option with the extras asked for)
create ~/.conifg/openbox
copied, rc.xml, menu.xml, autostart, environment to the above location
pyxdg
xorg-xinit
xorg-server
this didn't work so I the installed the full
xorg
still nothing, although when I try to run startx the screen goes black for a second as though it is trying, but then goes back to text mode saying it has failed.
I have had a look at the attached log file, but I don't know enough to be able to interpret it properly.
log file: https://www.dropbox.com/s/r76fowkooi822y9/Xorg.log?dl=0
I would appreciate any assistance.
Thanks
Steve
still nothing, although when I try to run startx the screen goes black for a second as though it is trying, but then goes back to text mode saying it has failed.
what is it saying?
There is only one error: (EE) open /dev/fb0: Permission denied, try starting your environment with the same configuration as root - just to see if it works. Maybe its a problem related to rootless X.
Have you configured/checked your installation (xserver, graphics driver, xinit config) using the following guides?
https://wiki.archlinux.org/index.php/xorg
https://wiki.archlinux.org/index.php/xinitrc
Try to start a minimal X (As described in the xinitrc article) to see if your xserver and graphics driver is working correctly.

Stop Raspberry Pi from running program at boot

I was trying to figure out how to run a program at boot, but after realizing this program is an infinite loop, I have no way of getting out, or back to the terminal. Right when I give the Pi power it just goes right to the program on a black background. I don't remember exactly what I did to make it run at boot, I believe I just added some code in a place right above something that said "exit 0" and below something that says "esac". I don't remember the command that even got me there. (I am new to the Pi and Python and have just been playing around..unsucessfully.)
If anyone could help me either delete this program or get me to be able to edit it so I can fix the infinite loop that would be great. I'd rather not have to completely over-write the sd card with a fresh raspbian. But like I said I can't do anything at boot, and Ctrl + C doesn't do anything nor Ctrl + Alt + Delete.
EDIT: When I put the SD card in my computer, I see a list of 11 files:
bootcode
cmdline
config
fixup
fixup_cd
issue
kernel
kernel_cutdown
kernel_emergency
start.elf
start_cd.elf
None of these mean anything to me...
Update: Looks like I failed to get that you want to interrupt the running bootprocess and stop the script.
The simplest idea would be to turn of the pi, unplug the sd card and plug it into your desktop, (re)move the script and boot again.
Processes spawned during boot are stored in scripts in /etc/init.d/.... These scripts are called by the init process, the first process on a Linux machine (PID:1)
But init starts not all scripts in /etc/init.d. This depends on the run level. On a debian system there are 7 run levels.
For every run level there is a folder called like:
/etc/rc0.d
...
/rc6.d
in which are softlinks to scripts from /etc/init.d are stored.
To remove a script from being executed on every boot you'll delete all links from that folders. Usually on debian systems this is done using the update-rc.d tool:
update-rc.d NAME_OF_INIT_SCRIPT remove
You should also have a look at the file /etc/rc.local
Alt + PrintScn + k to kill the process stuck running from rc.local
You can use the cmdline.txt.
First, add or modify the cmdline.txt file on your sd card. Add "init=/bin/sh", then restart your Pi, and you can see a command line prompt.
Type 'sudo nano /etc/rc.local' to edit the file, and comment or delete the line containing the error. After that restart.
I had exactly the same issue, couldn't quit the process using CTRL+C. I edited the cmdline.txt like stated above, but then the pi didn't load the necessary usb drivers for my keyboard.
So eventually I logged in over SSH to the pi, and modified my rc.local file that way.
In my case worked combination "Alt" + "F4", it stops the current session and opens the login screen
I had the same problem as explained at the beginning of this Post. My Python app was caught in an endless loop.
I tried the Ctrl+Alt+F2 Command as recommended in many posts found in Internet without any terminal window being open. Apparently, after many other trials and reboots I saw a glimpse of a Terminal window each time the loop of my application restarted. It was impossible to catch anything until I started recording the screen using the slow motion video of my mobile phone and, yes, a terminal window with the Linux prompt was active, and able to accept keyboard entries.
All I did was (almost blindly) editing the culprit file with the
sudo nano filename command
and entering some characters in order to actually corrupt such file, saving and closing it, a rebooting the Pi.
At the end of the boot, the file produced an error but the system kept ready to operate.
I was then able to fix the bug in a normal way.
It hope this may be useful to others. In my case it spared me of burning a new Raspbian and losing all my previous work.
I got myself stuck in exactly the same problem. Luckily I had the ssh enabled, apparently this is disabled by default on Raspbian Jessie, so this may not work for all.
The exit 0 is the line in /etc/rc.local where you would have added in the script that is now running in a continuous mode. If you can ssh into the Pi using Putty and the Pi's IP address then
sudo nano /etc/rc.local
Scroll down to the bottom of the file and remove the offending program, then sudo reboot
They way to prevent this issue from happening is to add an & (ampersand) to the end of the line to fork the process and run it as a separate process like so
python /home/pi/myscript.py &
as specified in https://www.raspberrypi.org/documentation/linux/usage/rc-local.md
The ampersand allows the command to run in a separate process and continue booting with the process running.

Resources