Category: Uncategorized

vnc server to linux

Quick guide to install vnc server into your vps or linux machine

 

sudo apt install xvfb x11vnc blackbox

after that edit file vncserver.bash

nano vncserver.bash

#!/bin/bash
killall Xvfb
killall x11vnc
export DISPLAY=:1
Xvfb :1 -screen 0 1200x720x16 &

sleep 2

blackbox &
x11vnc -nap -noxdamage -nopw -display :1 -shared -forever -bg -listen yourip10.0.0.x -repeat -rfbport 5900 &
xterm

Then just chmod 755 vncserver.bash and start it. remember replace your ip to right one.

For blackbox config edit file .blackboxrc and change line
session.menuFile:       /home/riku/.blackbox/menu

then create a menu file nano /home/riku/.blackbox/menu
Insert:

[begin] (b l a c k b o x )
[exec] (XTERM MUSTA) {xterm -bg black -fg white}
[nop] ()
[submenu] (terminals) {terminals}
[exec] (XTERM MUSTA) {xterm -bg black -fg white}
[exec] (Eterm) {Eterm -x -0 --trans --scrollbar=off --buttonbar 0 --geometry 79x35+13+495 --font-fx none -f lightgrey}
[exec] (aterm) {aterm -tr -bg black -fg lightgrey -fn 7x14 -fb 7x14 +vb +sb -geometry 79x32+13+495}
[exec] (gterm) {gnome-terminal}
[exec] (xterm) {xterm -ls}
[end]
[submenu] (internet) {}
[exec] (firefox) {firefox}
[end]
[nop] ()
[workspaces] (workspace list)
[config] (configuration)
[nop] ()
[submenu] (startup) {}
[exec] (gnome-settings-daemon ) {gnome-settings-daemon &}
[exec] (conky) {conky &}
[exec] (Esetroot) {Esetroot .blackbox/backgrounds/Complex_2.jpg}
[exec] (wmbutton) {wmbutton &}
[exec] (wmweather) {wmweather -w -s KROC &}
[exec] (wmcpuload ) {wmcpuload &}
[exec] (wmclock) {wmclock -12 -led white &}
[end]
[nop] ()
[reconfig] (reconfigure)
[restart] (restart) {}
[exit] (exit)
[end]

 

 

Reviewing Macbook Pro 17″ early 2011 with dead GPU

Got this old MacBook Pro over year ago, cost 20eur, it was completely dead.

However recently i tried to search for more information about it, finds out it has GPU issues, only way to review this unit is by putting iGPU (integrated HD from intel CPU working), well mine was so broken not even a chime came, so it was silent.

Reason why i started to look into this mac, it is 2th generation i7 CPU what is very usable, i needed something to dual boot onto linux to do dev testing stuff. And it is quite rare 17 inch, it has BIG screen compared 13inch models.

How i got it chiming, well i removed r8911 resistor to have it turn off, describing here https://realmacmods.com/macbook-2011-radeon-gpu-disable/

After that, i hear chime working with black screen. that was a good news, then i downloaded Linux grub onto usb EFI stick and booted with https://gist.github.com/blackgate/48c57e3ac5f82a1b43c6c2cb8be98fec
I inserted outb and went try Linux, screen came on first time ever on this computer, i was happy, at this point that Linux was so broken, only joy was the logo. I saw the screen was intact and the backlight ok.

After that a lot documents read, how i suppose do that rescue mode thing without screen? Google at this point knew nothing, almost everyone was having bad gpu but it was working somehow, mine was just dead.

Turn out the only way was to take a HDD insert it on USB case and use other mac to install High Sierra into it and then moving USB HDD into a broken mac, well it started but stayed into a boot loop with probably kernel panic. as there was no screen, i have no idea what happens, i tried use grub outb things and no help, as pressing ALT to go boot menu with dead screen it didn’t work! The whole machine hangs there, no matter press enter or arrow keys.. well…
Next, i booted, even more, the machine i managed to get into sierra(keyboard light came) then i got this new thinking, what about remote desktop?
Here we go again, move hdd into other mac, boot it after that turn screen sharing on and move HDD back onto 2011 mac. Surprise it worked, i was able go into it via VNC… Then i started to do things..

The first thing i did was NVRAM

sudo nvram fa4ce28d-b62f-4c99-9cc3-6815686e30f9:gpu-power-prefs=%01%00%00%00

After that i rebooted, nothing.. well was doing hour different things.. was about go bed i shutdown mac then i started it, and.. there screen came on, it needed to a cold start to get command work.. i was so happy get the screen on.. after struggling a long time doing different things i was now able do everything including going single user mode etc, even reinstalled macOS because it broke after an update. at this point HDD needed to be on SATA port, not on USB.

after that i started to get into sleep mode, how we get that work,  https://realmacmods.com/macbook-2011-radeon-gpu-disable/ provided a simple solution, the jump wire, soldered into it, and sleep works now.

Now as of last thing proper brightness is missing. it can be use by brightness software, but that will not lower LED consumption, so.. continue later this article…

Only bad is when reset NVRAM you need to have VNC server running on backround incase need to reinput the nvram parameter.