LinkShare rotating banner
Showing posts with label computing. Show all posts
Showing posts with label computing. Show all posts

Tuesday, October 16, 2012

Share your Linux desktop with x11vnc

x11vnc is a pretty useful program that you can use to share your Linux desktop with someone far away. To start x11vnc while using X11 windows, issue the following command:



x11vnc -display :0


This command will work in most cases, assuming there is only one instance of X11 Windows server running. However, the display number could be different. To be sure, type the following command:



xdpyinfo | head


x11vnc will output a lot of information, including the port number it runs on:



The VNC desktop is:      bootcd:2
PORT=5902


Subtracting 5900 from the port number (5902), you'll get the display number (2). Use this number to connect to your desktop remotely. I use gvncviewer.



gvncviewer 192.168.200.83:2


TightVNC viewer on Windows Vista




Administrator To Monitor Someone's Desktop with X11VNC



Let's assume that you are a system administrator with root privilege and want to monitor a user's X11 Windows desktop. You can't just run “x11vnc -display :0” because you are not the user currently using display :0. In that case, you need access to the X11 Windows' xauth file which is located at one of the following locations:




  • /var/lib/gdm
  • /var/lib/kdm
  • /var/lib/xdm/authdir/authfiles
  • /home/USER/.Xauthority


Once you locate the xauth file associated with the user's X11 desktop, you can use x11vnc to monitor his desktop activity.



x11vnc -display :0 -auth /var/lib/gdm/\:0.Xauth


Then, on your desktop as administrator, connect to the user's desktop with a vnc client.



gvncviewer 192.168.200.83:2


x11vnc with SSL



x11vnc supports various connection schemes, including SSL. On Debian and Ubuntu, type the following command to create a SSL certificate for use with x11vnc.



cat /etc/ssl/private/ssl-cert-snakeoil.key /etc/ssl/certs/ssl-cert-snakeoil.pem > /tmp/x11vnc.pem


Then, start x11vnc with -ssl option to run x11vnc in secure mode.



x11vnc -display :0 -auth /var/lib/gdm/\:0.Xauth -ssl /tmp/x11vnc.pem


ssvnc and gvncviewer can be used to connect to x11vnc via SSL connection. The following example command starts x11vnc in anonymous SSL mode that doesn't require X509 exchange.



x11vnc -display :0 -xauth /var/lib/xdm/authdir/authfiles/A\:0-R2x5Db -xkb -nopw -nc_cr -ssl /tmp/x11vnc.pem -vencrypt newdh:nox509:support

Thursday, October 11, 2012

How to Extract Boot Images from Acronis Bootable CD

Acronis Backup and Restore is a great software to purchase for any business that wants to protect and preserve their digital assets from natural or accidental loss. After you purchase Acronis software and deploy it on your computers, you have a chance to create a bootable CD for emergency purpose. The Acronis boot CD will prove useful when you need to restore backups on a compromised or corrupted system.



However, you may want to incorporate Acronis software into your own custom boot CD. The custom CD can be a live Linux CD or live Windows CD. In that case, your ideal CD will have a menu of choices to run Acronis in addition to booting Linux or Windows. To create such a disc, you need to extract boot images from Acronis Boot CD. This post illustrates the steps needed to creat a custom CD containing Acronis software.




  1. Bring your Acronis emergency CD and use the following command to create an ISO file. This assumes that you are using Linux. On Windows, you can use the readom program from my cdrkit build.



    readom dev=/dev/sr0 f=ABR11.5AWUR_en-US.iso speed=8 retries=16 -nocorr -noerror


  2. Acronis uses a special bootloader called BootWiz. To extract the boot image, you need to find the location of area that begins with BOOTWIZ0 string inside the ISO file. This is a hit-or-miss process. hexedit can be used here.



    hexedit ABR11.5AWUR_en-US.iso


  3. In hexedit, press Ctrl+S, then enter 424F4F5457495A30, which translates to BOOTWIZ0. Hit Enter.



    hexedit

  4. Hexedit will find the given string (BOOTWIZ0). Note the address of the line
    (0x1A000). The address (0x1A000) is equivalent to 106496 in decimal, and 208 sectors. After you write down the address, quit Hexedit by pressing Ctrl+C.



    hexedit

  5. Use dd to extract the FAT filesystem image.



    dd if=ABR11.5AWUR_en-US.iso of=abr11.bin skip=208


  6. Use WinImage to convert the image file (abr11.bin) — actually a FAT filesystem image — to a hard disk image format with MBR.



    winimage_export_to_image_mbr

    Normally, you can just put the hard disk image on the CD and boot it using isolinux & memdisk.



    LABEL abr11
    MENU LABEL Acronis Backup & Restore 11
    KERNEL memdisk
    INITRD abr11.bin


  7. Alternatively, you can mount the image file (abr11.bin) and extract only the kernel and initramfs.



    mount -t msdos -o loop,ro abr11.bin /mnt
    cd /mnt
    cp dat*.dat /boot


    The following is an example boot entry for isolinux that starts 64-bit Acronis Backup & Restore.



    LABEL abr11x
    MENU LABEL Acronis Backup & Restore 11 (64-bit)
    KERNEL dat5.dat
    INITRD dat4.dat
    APPEND video=vesa:mtrr vga=0x317 product=bootagent media_for_windows quiet


    The kernel parameters to put as APPEND string can be taken from the efi/boot/bootx64.xml.





Sunday, May 31, 2009

Manually Starting a VNC Server

Manually starting a VNC server is necessary for testing VNC. Once you got VNC to work correctly, you can copy the command line to a script or inetd.conf. First, I created an executable script ~/.vnc/xstartup with the following contents:


#!/bin/sh

exec /etc/X11/Xsession

This file has to be made executable, of course. Prior to starting vnc4server, make sure your X session can start normally by checking your ~/.xsession file. My .xsession file looks like this:


#!/bin/sh

exec openbox

Then, I started vnc4server:


vnc4server -geometry 800x600 -depth 16 -name VNC4

The first time you run vnc4server, it will ask you for the password. Create a password that only you can guess and memorize it. Next, I installed TightVNC U3 package on my Sandisk U3 flash. I went over to another PC running Windows and plugged in my USB flash. The U3 menu popped up and I clicked on the TightVNC icon. Then, I specified the address of my Linux box running vnc4server:


192.168.1.234:1 or

192.168.1.234::5901

After I was done with vnc session, I killed the vnc4server with the following command:


vnc4server -kill :1

When vnc sessions don't seem working, check the log file: ~/.vnc/*.log



Related Posts


Connecting to a VNC Server through a SSH Tunnel

For security and privacy, VNC connection should be done through a SSH tunnel. Here, I am using Putty to set up a SSH Tunnel. First, type in the host name:


Putty_Setup_1003

Next, type in the user name:


Putty_Setup_1010

Check the following options. Also, move Blowfish up for speed:


Putty_Setup_1018

Set up a SSH tunnel. The Source port will be the local port through which the VNC viewer will connect. The destination port is the remote port whereby the VNC server listens. Click Add button:


Putty_Setup_1027

Save the Putty session.


Putty_Setup_1034

Now that you set up a SSH tunnel, you can use a VNC viewer like TightVNC to connect through the SSH tunnel to the remote VNC server. For example, specify localhost::5900 as the server host to TightVNC.



Related Posts


Friday, May 22, 2009

Remote Desktop Session with VNC4Server & TightVNC

We are in a computing era in which we run applications from a remote computer or server. There are many ways for us to have remote desktop sessions. RDP, NX and VNC all are protocols designed to implement remote desktops. Of those, VNC is the most used and supported. This post is about many ways of setting up and using VNC in Linux and Windows. Below I explain how I set up a VNC remote session between my Linux box and a TightVNC viewer running on a Windows PC.



Setting up Inetd to start VNC on Incoming Connections


First, I installed vnc4server on my Debian Linux box. Alternatively, I could install tightvncserver instead. TightVNC is lighter than vnc4server. Anyway, to have inetd automatically start a VNC server on incoming connections, I added the following line to my /etc/inetd.conf file. This is all one line:


5995 stream tcp,rcvbuf=64k,sndbuf=256k wait nobody:nogroup /usr/bin/Xvnc Xvnc -inetd -query localhost -once -geometry 960x600 -depth 16 -AlwaysShared -rfbauth /etc/vnc/passwd -desktop myOffice -dpi 96 -fp /usr/share/fonts/X11/Type1 -co /etc/X11/rgb

For tightvncserver, the inetd.conf line would look slightly different because tightvncserver panics when wait is used instead of nowait. This means that tightvncserver sessions can never be shared when started from inetd:


5960 stream tcp,rcvbuf=64k,sndbuf=256k nowait nobody:nogroup /usr/bin/Xvnc Xvnc -inetd -query localhost -once -geometry 960x600 -depth 16 -desktop myOffice -dpi 96 -fp /usr/share/fonts/X11/Type1 -co /etc/X11/rgb

Typical port values are in the range from 5900 to 5999. Make sure everything in the following checklist is OK for VNC to work:



  • A display manager, such as gdm, kdm, xdm or wdm, must be running and set up to accept XDMCP requests. Read the sections below about setting up XDMCP for VNC sessions.
  • A VNC password must be created and stored in the readable file /etc/vnc/passwd. To create it, run:

    vncpasswd

    mkdir /etc/vnc

    mv ~/.vnc/passwd /etc/vnc

    chmod 644 /etc/vnc/passwd

  • At least, fixed and cursor fonts must be present in the default font paths. If not, specify the font paths with -fp parameter.

Tell inetd to reload settings in /etc/inetd.conf with the following command:


kill -1 $(pidof inetd)


Setting up GDM to handle VNC logins


It is rather simple to make GDM accept XDMCP requests from a VNC server. Open the file /etc/gdm/gdm.conf and add the following lines in the [XDMCP] section:


[xdmcp]

Enable=true

Port=177

DisplaysPerHost=8

The lines above enable GDM to accept logins at UDP port 177. Also, GDM is set up to accept up to 8 users from localhost. Otherwise, GDM may refuse remote logins through SSH tunnel when there are already a couple of users logged in at localhost.


For security, it is recommended to add the following line to /etc/hosts.deny:


gdm: ALL

Then, add the following line to /etc/hosts.allow:


gdm: 127.0.0.1


Setting up XDM for use with VNC


XDM is lighter than gdm or kdm, so XDM is ideal for VNC sessions where network bandwidth and CPU resource are precious. In fact, XDM can coexist with gdm or kdm. In Debian, set HEED_DEFAULT_DISPLAY_MANAGER to false in the script /etc/init.d/xdm:


[ -z "$HEED_DEFAULT_DISPLAY_MANAGER" ] && HEED_DEFAULT_DISPLAY_MANAGER=false

To set up XDM to handle VNC logins and deliver a user's desktop, XDMCP support has to be enabled first. Open the file /etc/X11/xdm/xdm-config and locate the following line:


DisplayManager.requestPort: 0

Change the number 0 to 177. Then, open the file /etc/X11/xdm/Xaccess and specify the range of addresses to allow access to XDM. Usually, it is sufficient to add only the following lines to /etc/X11/xdm/Xaccess:


localhost

127.0.0.1

Optionally, you can change the look of the login screen. Open the file /etc/X11/xdm/Xsetup and enter a command to set the background image:


#!/bin/sh

hsetroot -fill /usr/local/share/pixmaps/Repressed.jpg

You can also change the welcome line and the face image by editing the file /etc/X11/xdm/Xresources:


xlogin*greeting: Remote VNC Session

xlogin*logoFileName: /usr/share/X11/xdm/pixmaps/xorg.xpm



VNC_XDM_2

Using TightVNC in Windows to Run a Linux Destop


I installed TightVNC U3 package on my USB thumbdrive so I can connect to my VNC server anywhere. However, I had to tweak TightVNC a little bit to open a VNC session to my Linux desktop.


TightVNC_options

The default encoding Tight doesn't work well with vnc4server. So I had to change it to CoRRE.



Related Posts


Sunday, November 30, 2008

Demand for ERP professionals rising

Many big corporations use an ERP system to manage their business. ERP, short for enterprise resource planning, is computer software that manages nearly every aspect of a manufacturing or merchandising business. ERP covers everything from order fulfillment, manufacturing, supply chain management, warehouse management, accounting, billing, human resources, to customer resource management. Proficiency in ERP imply being knowledgeable in overall flow of the entire enterprise. Therefore, nowadays new top-level corporate managers are often required to have proficiency in an ERP system. In fact, some MBA courses require you to take an ERP course such as SAP.

At the core of an ERP system is an enterprise-level database. Several companies compete for the ERP software market, namely SAP and Oracle. Being the software that controls fortune 500 companies, it's hard to get your hands on a copy of ERP. But, fortunately there are open-source ERP software, such as Compiere and Adempiere.

A modern business requires computerized information system to manage the business. Small businesses can do well with Microsoft Office and Quickbooks. But when the business expands and grows bigger, it needs an integrated information system such as ERP. Well, if you are interested in building integrated IT system for your business, you might as well get started with ERP such as Adempiere.

Sunday, November 9, 2008

Netbooks On The Rise

This year, we see some new trends in the computer industry. The growth of notebook sales has surpassed desktop PC sales for the first time. In the notebook segment, Macbook sales were remarkable. However, we see a new trend in the notebook market. A new breed of notebooks, called netbooks, are growing in popularity.

Indeed, Windows Vista sales have suffered from the rise of netbooks. Netbooks are typically smaller than regular laptops. They are good for surfing the Web, writing email, and chat. They are cheap, usually around $300. They run a trimmed version of Windows XP or Linux.

The first netbook I spotted was Asus Eee PC. This week at Costco, I saw an 8.9" Acer Aspire One which I think was a netbook. Anyway, I think we're going to see more netbooks around as people prefer smaller, lighter gadgets and wireless connection becomes increasingly available.




Related:


Thursday, October 23, 2008

Backing Up Data

Last Sunday, my 320GB hard drive in a USB enclosure crashed. The hard drive makes clicking noise and is not recognized any more. I think the hard disk crashed due to overheat. I am very disappointed. To my relief, there was no critical data lost.


This incident made me realize the importance of backing up data. Here I give my tips on backing up data.


Backup Medium


Since my hard drive crashed, I don't recommend hard drives as backup media. Hard drives are vulnerable to heat, magnetic force, and electric surge. I recommend Compact Discs, DVD±R, DVD-RAM or flash drives.


Backup Software


If you have a powerful CPU, spare time and huge storage, it may make sense to back up the whole thing including the operating system, applications and all the data. This typically involves backing up the whole hard drive or a hark disk partition.


There are many commercial software that are designed for this kind of task. Popular ones are Norton Ghost and Acronis True Image. There's free one, too. I recommend Clonezilla for free disk imaging solution.


Online Storage


The simplest way to back up your data online is saving it in your email server. Some webmail services such as Yahoo! mail provide unlimited email storage. With Zimbra Desktop, you can save your documents or pictures directly in your mail server.


Otherwise, there are many online services that provide backup solutions. I recommend the online service Carbonite.

Sunday, October 19, 2008

Microsoft Weakening? Upcoming OS Battle

Now that Bill Gates has shifted his endeavors from monopolist Microsoft to his philanthropic foundation, once invincible Microsoft is now constantly threatened by the rise of Apple and Google. With its charismatic leader gone, Microsoft is no longer a leader in technological innovation and trends. Indeed, the Zeitgeist of technology is being dominated by Google and Apple. Microsoft is facing increasing challenges in multiple fronts, one of which is the Internet.


The Internet has become an integral part of modern computing. The Internet has a potential to become a new platform from which applications are delivered on demand. Google is dominating the Internet industry based on its lead in the search market, and expanding to other markets such as cell phone industry. So fascinated with Google, people are willing to follow the trends set by Google, buy the products from Google, and becoming bored with Microsoft. Facing the threat of Google, Microsoft is desperate to take over the Internet for which it has unsuccessfully spent billions of dollars and a decade.


Apple has also stole public spotlight from Microsoft. With the help of public craze over iPods and iPhones, Apple has set out a massive marketing campaign against Microsoft Windows operating system. Thus far, Apple is gaining in sales of Macs and MacBooks.


Microsoft is also facing oppositions from the open-source world. The open source trend has released a multitude of free software whose quality rivals most products from Microsoft. Among the numerous open-source software, we can find many fine software that can be used in place of Microsoft Windows. The main contenders for the operating system market are as follows:




  • Microsoft Windows

    Microsoft Windows come bundled with most new personal computers. Still, many people in business stick with Windows XP, reluctant to switch to Windows Vista because of many problems posed by Vista.


  • Linux

    Linux is gaining popularity especially in the network sector. Linux is also seeing increase in its user base who's trying to find alternatives to Microsoft Windows.


  • OpenBSD

    Another group of contenders for OS market comes from the BSD camp. Besides the popular FreeBSD, I am fond of OpenBSD.


  • OpenSolaris

    Sun Microsystems was once a dominant player in the network server market. However, after its market share dwindling, Sun decided to release its Solaris operating system free to the open-source community. Now people can experience the stability and solid performance of OpenSolaris. It will be interesting to see if OpenSolaris can become a formidable force in the OS market.

About This Blog

KBlog logo This blog seeks to share useful information on freely available fonts on the Internet. Thanks for visiting the blog and posting your comments.

© Contents by KBlog

© Blogger template by Emporium Digital 2008

Followers

Total Pageviews

CyberChimps Professional WordPress Themes
Powered By Blogger