crashplan systemd startup

[Unit]
Description=CrashPlan Backup Engine
After=network.target

[Service]

Type=forking
PIDFile=/usr/local/crashplan/CrashPlanEngine.pid
EnvironmentFile=/usr/local/crashplan/bin/run.conf

WorkingDirectory=/usr/local/crashplan

ExecStart=/usr/local/crashplan/bin/CrashPlanEngine start
ExecStop=/usr/local/crashplan/bin/CrashPlanEngine stop

[Install]
WantedBy=multi-user.target
~
~

Posted in Linux | Leave a comment

vncviewer over ssh

connect via ssh to remote host

ssh -L 5902:localhost:5904 192.168.1.70

connects ssh on port 2 of localhost to port 5904 on remote host

on Localhost

vncviewer localhost:2

connects vnc to port 2 on localhost which is now connected to port 5904 on remote host

Making VNC more secure using SSH

VNC uses a random challenge-response system to provide the basic authentication that allows you to connect to a VNC server. This is reasonably secure; the password is not sent over the network. Once you are connected, however, traffic between the viewer and the server is unencrypted, and could be snooped by someone with access to the intervening network. We therefore recommend that if security is important to you, you ‘tunnel’ the VNC protocol through some more secure channel such as SSH.If you are using Unix, this is pretty easy; SSH clients and servers are freely available for Unix.  Clients are also available for Windows, Macs, and other machines, but if you want servers on these platforms you may need to go for a commercial version, or to route your connection via a Unix machine (see later). There are links at the bottom of this page to point you in the right direction for all of these things. The rest of this document refers to the Unix world, though the techniques will be relevant for other systems.  Frank Stajano has contributed a page which describes how he uses a free Windows SSH client to connect to a Unix server.

Installation

We won’t go into details here about how to install SSH.  For my Linux machine I found two RPMs called ssh-clients and ssh-server.  I downloaded the source versions, built, and installed them, and this did almost everything, including the generation of a key for my machine.
You can get RPMs at http://rufus.w3.org/linux/RPM/ – for other distributions see the SSH FAQ.

Basic Use

SSH normally just provides you with a ‘Secure SHell’ – i.e. a login window to a remote machine. All traffic is encrypted between the two machines using public key encryption techniques, making it really very difficult for anyone else to spy on it.  Once SSH is installed, you could connect to a machine called ‘snoopy’ from elsewhere simply by running the SSH client:    ssh snoopy

(You may need more options depending on your situation). You would then be prompted for the password of your account on snoopy and you would be logged in, just like a telnet session, but safer.  However, SSH has some nice extra tricks up its sleeve.  You can also request that it listens on a particular port on your local machine, and forwards that down the secure connection to a port on a machine at the other end.   For example,

ssh -L x:localhost:y snoopy

means “Start an SSH connection to snoopy, and also listen on port x on my machine, and forward any connections there to port y on snoopy.”

Now, the VNC protocol normally uses port 59xx, where xx is the display number of the server.  So a VNC server on a Windows machine, which normally uses display number 0, will listen on port 5900.   Most Unix VNC servers will probably use display numbers 1,2, etc and so will be listening on ports 5901, 5902 and so forth.  If you forward these ports to a remote machine, you can make the remote VNC server appear to be a server running on your local machine.

So, imagine you had a VNC server running as display :1 on machine snoopy, and you wanted a secure connection to it from your local machine.  You could start the ssh session using:

ssh -L 5902:localhost:5901 snoopy

and any references to display :2 on your local machine would actually connect to display :1 on snoopy.

Note that the above SSH command-line is deliberately meant to accept incoming connections only from the local machine. This means that to use the SSH connection that we have just set up, we must connect to it from the same machine, using the special name ‘localhost’, rather than using the machine’s own unique name.

So instead of running a vncviewer:

  vncviewer snoopy:1

you could run:

vncviewer localhost:2

 

Posted in Linux | Leave a comment

vncserver with full screen -geometry added under ExecStart

# The vncserver service unit file
#
# Quick HowTo:
# 1. Copy this file to /etc/systemd/system/vncserver@:<display>.service
# 2. Edit <USER> and vncserver parameters appropriately
# (“runuser -l <USER> -c /usr/bin/vncserver %i -arg1 -arg2”)
# 3. Run `systemctl daemon-reload`
# 4. Run `systemctl enable vncserver@:<display>.service`
#
# DO NOT RUN THIS SERVICE if your local area network is
# untrusted! For a secure way of using VNC, you should
# limit connections to the local host and then tunnel from
# the machine you want to view VNC on (host A) to the machine
# whose VNC output you want to view (host B)
#
# [user@hostA ~]$ ssh -v -C -L 590N:localhost:590M hostB
#
# this will open a connection on port 590N of your hostA to hostB’s port 590M
# (in fact, it ssh-connects to hostB and then connects to localhost (on hostB).
# See the ssh man page for details on port forwarding)
#
# You can then point a VNC client on hostA at vncdisplay N of localhost and with
# the help of ssh, you end up seeing what hostB makes available on port 590M
#
# Use “-nolisten tcp” to prevent X connections to your VNC server via TCP.
#
# Use “-localhost” to prevent remote VNC clients connecting except when
# doing so through a secure tunnel. See the “-via” option in the
# `man vncviewer’ manual page.
[Unit]
Description=Remote desktop service (VNC)
After=syslog.target network.target

[Service]
Type=forking
# Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=/bin/sh -c ‘/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :’
ExecStart=/sbin/runuser -l samphar -c “/usr/bin/vncserver %i -geometry 1920×1080”
PIDFile=/home/samphar/.vnc/%H%i.pid
ExecStop=/bin/sh -c ‘/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :’

[Install]
WantedBy=multi-user.target

Posted in Linux | Leave a comment

set systemd to start gui at boot

To change the run level instead of:
# unlink /etc/systemd/system/default.target
# ln -sf /lib/systemd/system/graphical.target /etc/systemd/system/default.target
Type:
# systemctl set-default graphical.target

 

Posted in Linux | Leave a comment

centos 6 lamp stack tutorial

https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-centos-6

Posted in Linux | Leave a comment

vnc on centos 7 starting in mate desktp

Fix Vnc Client blank screen on Mate Desktop – Fedora

 

By default when you run vncserver on Fedora box running gnome, you get desktop on vnc clientconnections.
Whereas with MATE as the only desktop environment, you’ll not get any display on vnc connection. All you get it blank screen. This is probably due to Mate-session is not mentioned in xstartup.

To get display on vnc client add following line in xstartup

/usr/bin/mate-session

E.g

head ~/.vnc/xstartup 
#!/bin/sh

vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
/usr/bin/mate-session

With newer vncserver session, you’ll not face blank vnc client screen.

if you find any missing point in here, please let us know in comment section or tweet us at @linuxreaders. To get more articles like this, subscribe to our RSS feeds / Mails.

Searching for
Posted in Linux | Tagged | Leave a comment

Microsoft moving to HTML 5 in Edge

http://blogs.windows.com/msedgedev/2015/07/02/moving-to-html5-premium-media/

yes silverlight will be gone now everything will work in linux

Posted in Linux | Leave a comment