Cannot connect QEMU guest os with vncviewer

Posted on

The question is as follows. harry@debian:~/workshop1/qemu_test/version1/test$ qemu-system-x86_64 -hda qcow2.img -cdrom domU-x86_64-FS.img -boot d -m 1024 VNC server running on `::1:5900′ harry@debian:~/workshop1/qemu_test/version1/test$ vncviewer 127.0.0.1:1 vncviewer: ConnectToTcpAddr: connect: Connection refused Unable to connect to VNC server Solution (add -vnc parameter for qemu-system-x86_64): harry@debian:~/workshop1/qemu_test/version1/test$ qemu-system-x86_64 -hda qcow2.img -cdrom domU-x86_64-FS.img -boot d -m 1024 -vnc 127.0.0.1:2 harry@debian:~/workshop1/qemu_test/version1/test$ vncviewer 127.0.0.1:2
Read more

How to turn a BIOS-based Linux Mint 17 installation to UEFI booting?

Posted on

I installed Linux Mint 17 in the traditional BIOS mode. However, Windows 8.1 on my computer can only boot in the UEFI mode. I do not want to reinstall the Windows or erase it. How to turn a BIOS-based Linux Mint 17 installation to UEFI booting? You may refer https://help.ubuntu.com/community/UEFIBooting for some information.

How to run programs in different languages from Windows’ language

Posted on

How to run programs in different languages from Windows’ language? For example, some non-unicode programs in Chinese on English version of Windows will display some garbage characters. You can use the AppLocale util provided by Microsoft to run legacy applications without changing language of non-Unicode applications (system locale): https://en.wikipedia.org/wiki/AppLocale You may check this link for
Read more

How to install no-ip update client on Linux Mint?

Posted on

How to install no-ip.com update client noip2 on Linux Mint 17? First, install the noip2 client: sudo su – cd /usr/local/src wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz tar xzf noip-duc-linux.tar.gz cd no-ip-2.1.9-1 make make install Then, generate the configuration file noip2 -C Last, make noip2 daemon run at reboot crontab -e Add this line to crontab: @reboot /usr/local/bin/noip2 I’ve
Read more

How to adjust the system partition (C:) size of Windows?

Posted on

The disk management tools of Windows can adjust it to some level. But there are more space available as far as I can tell. How to further adjust the system partition (C:) size of Windows? You may check these tools: EASEUS Partition Master (free) Includes Partition Manager, Disk & Partition Copy Wizard and Partition Recovery
Read more

How to install multiple versions of sbt on my Linux host?

Posted on

How to install multiple versions of sbt on my Linux host For example, some projects use 0.12.x while some use 0.13.x. Installing neither in the system only is not sufficient enough. You may use the excellent sbt-extras: https://github.com/paulp/sbt-extras Most of the time, it detects the version of sbt needed in the project direoctory automatically: [zma@office
Read more

How to convert between dos and unix file coding in Emacs?

Posted on

How to convert between dos and unix file coding for files in Emacs? From Dos to Unix coding: M-x set-buffer-file-coding-system RET undecided-unix or C-x RET f undecided-unix Then save the file (C-x C-s). From Unix to Dos M-x set-buffer-file-coding-system RET undecided-dos or C-x RET f undecided-dos Then save the file (C-x C-s).

How to change default OS for windows dual boot manager in Windows 7?

Posted on

How to change default OS for windows dual boot manager in Windows 7? The c:/boot/ in older Windows does not exist anymore. Open the Control Panel and click on the System icon. In the left pane, click on the Advanced system settings link. Under the Advanced tab, click on the Settings button under Startup and
Read more

How to make Emacs run in command line by default?

Posted on

How to make Emacs run in command line by default? I do not want to open the X window. You have at least 2 choices. First choice: use emacs-nox and make it the default: # yum install emacs-nox # alternatives –config emacs and choose emacs-nox. Second choice: use emacs but with -nw to disable the
Read more

How to upgrade Fedora 19 to Fedora 20 through the network?

Posted on

How to upgrade Fedora 19 to Fedora 20 through the network? The tool for Fedora to upgrade the distribution is FedUp. Check this page for how to upgrade Fedora 19 to Fedora 20: http://fedoraproject.org/wiki/FedUp#How_Can_I_Upgrade_My_System_with_FedUp.3F Be sure to check the bugs in Fedora 20 before the upgrading: http://fedoraproject.org/wiki/Common_F20_bugs#Upgrade_issues Generally, it contains 3 steps: Preparation # yum
Read more

How to change the fonts of gnome-shell for gnome3?

Posted on

How to change the fonts of gnome-shell for gnome3? Like the system bar. The fonts of gnome-shell is described in its own theme. For the default gnome-shell, you need to edit the file as root: /usr/share/gnome-shell/theme/gnome-shell.css Right, it is a css file. Find the font-family keyword and change the corresponding fonts. Then you can restart
Read more

Random string password generator in Scala

Posted on

Managing our research cluster, I frequently need to generate some string for new users’ password. How to generate them automatically and randomly in Scala? The passwords need characters ‘a’ – ‘z’, ‘A’ – ‘Z’ and ‘0’ – ‘9’ only. This piece of code works very well for me: def randomString(len: Int): String = { val
Read more

How to install Python environment in my own account on Dreamhost?

Posted on

How to install Python environment in my own account on Dreamhost so that my application can use the python that I installed by myself instead of the system-wide one? The post for Bluehost works very well for Dreamhost too: https://my.bluehost.com/cgi/help/python-install In short: mkdir ~/python cd ~/python wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz tar zxfv Python-2.7.2.tgz find ~/python -type d
Read more

Linux timer sources

Posted on

Linux supports different timer sources and a machine can have multiple ones. How to find the available Linux timer source and the current one used? Find the current timer source: $ cat /sys/devices/system/clocksource/clocksource0/current_clocksource Find all available timer sources: $ cat /sys/devices/system/clocksource/clocksource0/available_clocksource

Mount Ext4 Partitions in Windows in read-only mode

Posted on

How to mount Ext4 partitions from Linux in Windows in read-only mode? Read-only is required to ensure safety. Mounting is required so that traditional programs can use the partition without any changes. Ext2Fsd is a great tool for this. Ext2Fsd is a file system driver which allows accessing (both reading and writing) ext2, ext3 or
Read more

Run cron jobs with environmental variables for an account

Posted on

A common error for configuring cron is to use environmental variables for an account in the cron command. However, cron will run the commands without these variables defined. In the crontab -e, adding . $HOME/.profile before the commands play the trick. For example: 0 */8 * * * . $HOME/.profile; ~/bin/my-command Cron is started by
Read more