Tuesday, July 21, 2015

Set default browser LXDE (Fedora)

For some reason going to Menu>Preferences>Prefered Applications and choosing Google Chrome didn't work. Midori was still handling all my http/https links.
Solution for this is xdg-mime

To check default browser for http and https type in terminal

xdg-mime query default x-scheme-handler/http

xdg-mime query default x-scheme-handler/https

This command will give you output .desktop file which is used to open those links. To set them to Google Chrome, command is

xdg-mime default google-chrome.desktop x-scheme-handler/https

and for http

xdg-mime default google-chrome.desktop x-scheme-handler/https

Instead of google-chrome.desktop you can use any .desktop file to set default application.

Thursday, July 9, 2015

Fedora 22 LXDE VNC server (x11vnc)

For connecting to your machine over the Internet, Teamviewer is super-easy to use. But for one reason or another it's not always possible. Solution to this is x11vnc.

First, install x11vnc to your machine using

sudo dnf install x11vnc

You don't want anybody to be able to connect to your machine so you should setup password

x11vnc -storepasswd

This command will ask you to type in password for remoting-in to your machine and save it to ~/.vnc/passwd

Now, you should test to see if your VNC server works.

x11vnc -forever -rfbauth ~/.vnc/passwd -rfbport 5900

You should be able to connect to your machine with VNC Viewer.

You could run this command every time you start your machine, but it's not really handy. I wanted to setup my machine so that x11vnc server starts as soon as login screen shows (so even if I'm not logged it I could remote connect).

To do that, open file /etc/lxdm/LoginReady and add following line

x11vnc -display :0 -forever -bg -rfbauth /home/locodog/.vnc/passwd

Please note that here you should put whole path to your VNC password file, do not use ~/.vnc/passwd

Reboot your machine and test it out.

If you don't want to go through all this, after installing x11vnc you could just use x11vnc Gui to start your vnc server.

For VNC client, after testing many I recommend Remmina. It has everything I need, bookmarks because I don't want to type in IP address every time I want to connect to remote machine and also, scaling. It's really no fun having to scroll up-down, and left-right in order to reach every corner of remote display. Keep in mind that Remmina will disconnect (or not connect at all) if color depth on client side is not same as on server side.

This post was very helpful:
http://ubuntuforums.org/showthread.php?t=1868554