21.3.16

VirtualBox - How to control virtual machine using shell

How to list virtual machines

To list virtual machines and their UUID execute command:
$ VBoxManage list vms
"Debian - "Kolab dev"" {7ccf631e-a792-4aa3-b09c-96298ab41ff2}
"Crunchbang" {d485f4a1-7794-4502-8775-e6f67a16c8dc}
"Deepin" {6ce34e63-3632-42a4-8f6c-216c691c96b2}
To pretty print virtual machines use command:
$ VBoxManage list vms | sed "s/\"\(.*\)\".*/\1/"
Debian - "Kolab dev"
Crunchbang
Deepin

How to print virtual machine states

To print running virtual machines and their UUID use command:
$ VBoxManage list runningvms
"Crunchbang" {d485f4a1-7794-4502-8775-e6f67a16c8dc}
To list virtual machines and their corresponding states execute command:
$ VBoxManage list vms -l | grep -e ^Name: -e ^State | sed s/\ \ //g | cut -d: -f2- 
Debian - "Kolab dev"
 powered off (since 2013-07-19T21:17:55.000000000)
Crunchbang
 paused (since 2013-07-20T10:13:07.771000000)
Deepin
 powered off (since 2013-06-29T15:56:04.000000000)
Slightly different solution:
$ VBoxManage list vms -l | grep -e ^Name: -e ^State  | sed "s/Name:[ ]*\(.*\)/\1 \//;s/State:[\ ]*//" | paste -d " " - -
Debian - "Kolab dev" / powered off (since 2013-07-19T21:17:55.000000000)
Crunchbang / paused (since 2013-07-20T10:13:07.771000000)
Deepin / powered off (since 2013-06-29T15:56:04.000000000)

How to start virtual machine

You are not forced to use VirtuaBoxManager GUI as it is not desirable in every case, it is also not very ergonomic to use mouse all the time.

Standard GUI

To start virtual machine Crunchbang using standard GUI execute command:
$ VBoxManage startvm Crunchbang --type gui
You can safely omit type parameter in the above mentioned command as the standard GUI is used by default:
$ VBoxManage startvm Crunchbang

Simple GUI

To use simple GUI without controls use command:
$ VBoxSDL --startvm Crunchbang
To start virtual machine using simple GUI without controls in the background execute command:
$ VBoxManage startvm Crunchbang --type sdl

Headless

To start virtual machine without GUI in the background execute command:
$ VBoxManage startvm Crunchbang --type headless
To start virtual machine without GUI execute command:
$ VBoxHeadless --startvm Crunchabang

Headless with VNC

To start virtual machine without GUI, but enabled VNC service execute command:
$ VBoxHeadless --startvm Crunchbang --vnc --vncport 5901 --vncpass passw

How to pause virtual machine

To pause virtual machine execute command:
$ VBoxManage controlvm Crunchbang pause

How to resume paused virtual machine

To resume virtual machine execute command:
$ VBoxManage controlvm Crunchbang resume

How to reset virtual machine

To reset virtual machine execute command:
$ VBoxManage controlvm Crunchbang reset

How to power off virtual machine

To power off virtual machine execute command:
$ VBoxManage controlvm Crunchbang poweroff

How to save state and then stop virtual machine

To save state of the virtual machine and then stop it execute command:
$ VBoxManage controlvm Crunchbang savestate

Notes

Please note that you need to be on user mode $, if you are on root mode # you will not be  able to run some of this commands.

19.3.16

Installing Gnome/KDE (GUI) on Ubuntu/CentOS

Users who prefer a GUI to manage their server can install Gnome or KDE. These are the the most popular GUIs for Linux. In this tutorial, I'll explain how to install Gnome and KDE on both Ubuntu and CentOS.

Installing KDE

KDE is a beautiful GUI. Installing it is very easy. Each of the commands need to be run by the root user. The first thing we're going to do is update everything.
On CentOS, execute:
yum update && yum upgrade
On Ubuntu, execute:
apt-get update && apt-get upgrade
After updating everything, we're going to install the GUI.
On CentOS, execute:
yum -y groupinstall "KDE desktop" "X Window System" "Fonts"
On Ubuntu, execute:
apt-get install kubuntu-desktop
This will also install some apps. If you just want the GUI, execute:
apt-get install kubuntu-desktop --no-install-recommends
Start up the server with the GUI.
On CentOS, edit the file:
vi /etc/inittab
Locate id:3:initdefault: and change 3 to 5.
Now restart your server.
On CentOS, execute:
init 6

Installing Gnome

The first thing we're going to do is update everything. As with KDE, each of the commands need to be run by the root user.
On CentOS, execute:
yum update && yum upgrade
On Ubuntu, execute:
apt-get update && apt-get upgrade
After updating everything, we're going to install the GUI.
On CentOS 7, execute:
yum groupinstall "GNOME Desktop" "Graphical Administration Tools"
On Ubuntu, execute:
apt-get install ubuntu-gnome-desktop
Now we need to start up the server with the GUI.
On CentOS 7, execute:
ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target
To remove Gnome on Ubuntu, execute:
apt-get remove ubuntu-gnome-desktop
Now restart your server.

12.3.16

VLC Sub Seach

Search and download subtitles from opensubtitles.org using the hash of the video currently playing or its title.
INSTALLATION:
- click on the download button below
- save the archive and extract the file "vlsub.lua"
- create a directory "extensions" at this location and put the file "vlsub.lua" inside:
* Windows (all users): %ProgramFiles%\VideoLAN\VLC\lua\extensions\
* Windows (current user): %APPDATA%\vlc\lua\extensions\
* Linux (all users): /usr/lib/vlc/lua/extensions/
* Linux (current user): ~/.local/share/vlc/lua/extensions/
* Mac OS X (all users): /Applications/VLC.app/Contents/MacOS/share/lua/extensions/
* Mac OS X (current user): /Users/%your_name%/Library/Application Support/org.videolan.vlc/lua/extensions/

...or use the installer below if you're on Windows 7 (32 or 64)

To start the extension click on View > VLSub or Vlc > Extensions > VLSub on Mac OS.

/!\ Troubleshooting /!\

If you have other issue you can ask for a solution here or on github but please get the full vlc debug log and add it as a pastebin to your post. The procedure is explained here:
https://github.com/exebetche/vlsub/wiki/Troubleshooting




Changelog:

2014-09-12
Fix error with http 301 redirection

2014-08-19
Fix subtitles loading on Vlc 2.2

2014-05-08
Fix a bug due to opensubtitles header modifications




LicenseGPL

(VLSub 0.9.13)

9.3.16

How to Fix "You've been signed in with a temporary profile" Error in Windows 8, 8.1 and 10

information   Information
This is for when after you sign in to a user account in Windows 8, and notice that a temporary profile has been loaded instead of the profile that corresponds to the current user. Therefore, any changes that you make to the current desktop are lost after you sign out. Additionally, the notification area may display the following error message:

You've been signed in with a temporary profile.

You can't access your files, and files created in this profile will be deleted when you sign out. To fix this, sign out and try signing in later. Please see the event log for more details or contact your system administrator.
This problem usually occurs if the user profile of the account was accidentally corrupted or deleted from the system.


This tutorial will show you how to fix the "You've been signed in with a temporary profile" error a user may get after signing in to their account in Windows 8Windows RTWindows 8.1, andWindows RT 8.1.

 Note
This will basically delete the user profile of the user account that is getting the "You've been signed in with a temporary profile" error in order to reset and rebuild the user profile to fix this error.

user profile is a collection of settings that make the computer look and work the way you want it to for a user account. It contains the account's settings for desktop backgrounds, screen savers, pointer preferences, sound settings, and other features. User profiles ensure that your personal preferences are used whenever you sign in to Windows.


How to read event log details for User Profile Service error:

  • Open Event Viewer (eventvwr.msc), then expand open Windows Logs and Application in the left pane.
  • Right click or press and hold on Application in left pane, click on Find, type 1511 (for Event ID), and click/tap on Find Next.
  • Close the Find dialog, and view details. Repeat to view any other listed 1511 Event IDs if needed.


Click image for larger version

Click image for larger version

EXAMPLE: "You've been signed in with a temporary profile" Notification Message

Name:  You've_been_signed_in_with_a_temporary_profile.jpg
Views: 429577
Size:  39.5 KB

Here's How:

1. If you have another administrator account that is not affected by this user profile error, then sign out of the affected account (ex: Brink), and sign in to the other administrator account. 

Note   Note
If you do not have another administrator account to sign in to, then you could do one of the following options below to enable the built-in Administrator account to sign in to, and continue on to step 2 below.

A) If the affected account is an administrator, then enable the built-in Administrator account, sign out, and sign in to Administrator.

OR

B) Boot into safe mode, enable the built-in Administrator, sign out, and sign in to Administrator.

2. Back up anything that you do not want to lose in the C:\Users\(user-name) profile folder (ex: Brink) of the affected user account to another location. When finished, delete the C:\Users\(user-name) folder.

3. Press the  + R keys to open the Run dialog, type regedit, and click/tap on OK.

4. If prompted by UAC, then click/tap on Yes.

5. In Registry Editor, navigate to the location below. (see screenshot below)

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList


Click image for larger version

6. In the left pane under ProfileList, click on a SID key (S-1-5-21....long number). (see screenshot above)
NOTE: Usually, it will be for the SID key that has .bak at the end of the long number.

A) In the right pane of the SID key, look at the ProfileImagePath value to see if it is for the same user account name (ex: Brink) that has the user profile error.

B) If not, then repeat step 6 until your find it, then go to step 7 below.

7. Right click or press and hold on the SID key (ex: ...-1006.bak) found in step 6, and click/tap on Delete. (see screenshot below step 5)

8. Click/tap on Yes to confirm. (see screenshot below)

Name:  ProfileList_Registry-2.jpg
Views: 402558
Size:  21.0 KB

9. If there is another SID key (ex: ...-1006 at end) with the exact same long number from step 6 for the same user account (ex: Brink) without .bak at the end of it, then repeat step 7 and 8 above for it as well.

Name:  Two_SIDs.jpg
Views: 402769
Size:  10.4 KB

10. When finished, close Registry Editor.

11. See if you are now able to sign in to the user account (ex: Brink) from step 1 without getting the "You've been signed in with a temporary profile" error.

12. If successful, the affected account's (ex: Brink) user profile will be recreated and no longer receives the error. You can then copy any files you want back from the back up created at step 2.







That's it

Tested...



Ajudem nos a melhorar o nosso blog: