Showing posts with label KUbuntu. Show all posts
Showing posts with label KUbuntu. Show all posts

2016-08-28

Kubuntu 14.04 black screen after monitor off/on


Whenever I turned my display off and on again after having logged on,  the screen stayed black. After rebooting, the logon screen appeared, but after logon with my user account, the screen got black. Logging with other user accounts had no problem.

This problem occurred using Kubuntu 14.04.  and a Nvidia graphics card connected by a display port cable.

Here is the description how I corrected it.


In short



Change the first false value of your screen definition file 
.kde/share/apps/kscreen/xxxxxxxxxxxxxx
from false to true.
Than make this file read only.



In Detail


Start one of the consoles: Ctrl-Alt-F1
Then enter your OS-User name and password.

Go to the directory .kde/share/apps/kscreen located in your home directory:
cd ~/.kde/share/apps/kscreen

Listing the files in this directory (ls -1), should display at least one file, that looks like the one bellow.
The files name is a mix of number an letters (seems a long hexadecimal number):
ls -1

7134be4579e47853d9bc866485e252fb

If you have/had more than one monitors, several files will be listed.

This is a text file. Its contents can be displayed with the command cat :
cat 7134be4579e47853d9bc866485e252fb

[ { "enabled" : false, "id" : "9a9b7a71150d853203babd861f68d8c5", "metadata" : { "fullname" : "xrandr-Dell Inc.-DELL U2515H-9X2VY61E10XL", "name" : "DP-1" }, "mode" : { "refresh" : 59.9506, "size" : { "height" : 1440, "width" : 2560 } }, "pos" : { "x" : 0, "y" : 0 }, "primary" : true, "rotation" : 1 } ]

Change the false value after "enabled" (from above) to true.

Here I show how to do it using the vi editor, that is available on every Linux system.
vi 7134be4579e47853d9bc866485e252fb

  • Go to the beginning of false by using the arrow keys
  • press the key [DEL] until false is completely deleted
  • press the key [i] in order to enter the insert mode
    (-- INSERT -- will then by displayed at the bottom line)
  • type true
  • press the key [ESC] in order to leave the insert mode
    (-- INSERT -- disappear from the bottom line)
  • press the keys [:] and [x]
    (":" starts the command mode and "x" is the command "exit with saving")

If you display the contents of your file again, the false should now have been replaced by true

Now the Graphical environment can be restarted by entering the command startx.
startx

I could avoid that this problem occurs again I made this file read only


chmod ugo-w 7134be4579e47853d9bc866485e252fb


I hope this helps.



Tags: Problems&Solutions, Kubuntu, Publish, Monitor, Black Screen
August 28, 2016 at 08:52AM

2016-08-06

Sending WakeOnLan (WOL) from Linux (KUbuntu)


In order to have the Synology NAS already been running when I boot up my Ubuntu (KUbuntu) computer, I make my Ubuntu send a WOL packet to the NAS when booting with etherwake.

Here is the command used in the script below (Replace the exemplary MAC address 00:11:22:33:44:55 below by the MAC address of the device you want to be woken up.)
root@Ubuntu:~# etherwake -i eth1 00:11:22:33:44:55


root@Ubuntu:/etc/init.d# cat sendWOLtoNAS
#! /bin/sh
### BEGIN INIT INFO
# Provides: sendWOLtoNAS
# Required-Start:    
# Required-Stop:     
# Default-Start: 2
# Default-Stop:      
# Short-Description: Sends Wake On Lan (WOL) packet to the Synology NAS
# Description: Is used in order to make sure that the NAS will also be started when this computer is starting
### END INIT INFO

MYSELF="/etc/init.d/sendWOLtoNAS"

logger "${MYSELF} Start"
etherwake -i eth1 00:11:22:33:44:55
logger "${MYSELF} WOL sent, sleeping 10s"
sleep 10
logger "${MYSELF} Done"

Making the script be run on startup of Ubuntu
root@Ubuntu:/etc/init.d# update-rc.d sendWOLtoNAS start 20 2 .
 Adding system startup for /etc/init.d/sendWOLtoNAS ...
  /etc/rc2.d/S20sendWOLtoNAS -> ../init.d/sendWOLtoNAS

If you want to undo it:
root@Ubuntu:/etc/init.d# update-rc.d -f sendWOLtoNAS remove 20 2 .
 Removing any system startup links for /etc/init.d/sendWOLtoNAS ...
  /etc/rc2.d/S20sendWOLtoNAS


Tags: ubuntu, Linux, Boot, WOL, Startup, Publish
May 30, 2016 at 09:22PM