determine server is window or linux on VPS - vps

I have access to a virtual private server , The OS is windows Server 2008,
How can I determine what OS is installed on the Real server?
is there any command prompt code or something to figure this out?

You can use compiler predefined macros to detect the operating system type.
#if !defined(_WIN32)

Related

Running a program located in Mac machine from a windows machine

I have a situation like, I need to run a program inmy Mac machine from a windows machine. Both are in same network.
If I have written the program as jar executable and located it in Mac ,
Will it be able to execute remotely from a windows machine.
I know this can be achieved by hosting a web service in Mac and accessing this service from windows can be done.
I need to know is there any other way so that I can execute a shell command in windows and trigger this program in Mac
The program will be a command line app. I need to programmatically invoke this app from windows PC
On the Mac, you need to enable Remote Login in the Sharing pane of System Preferences. On the Windows machine, you need an SSH client. You can then use the SSH client to connect to the Mac (with the proper credentials) and issue commands.

Is there a way to psexec into my own virtual machine (windows xp mode)?

I am trying to run commands on the cmd prompt of my windows xp mode virtual machine from my main computer which is in windows 7. I've tried to look at the name of the windows xp mode computer which is virtualXP-63912, so i tried : "psexec \\virtualXP-63912 cmd" but it doesn't work. Any ideas of how I can get this to work?
As seen here, you need to change your VM from 'NAT' mode, which allows for web access but no local network connectivity (which is what you need to be able to psexec or run remote powershell commands on your XP mode VM, and also to be able to access the \computername\admin$ share, which is what PSExec uses for remoting) to NIC mode, which will bridge your VM to the network, and give it a local routable IP address.
In short, open the Windows XP Mode console, select your XP Mode Vm and go to settings, then change the network setting to bridged, as discussed in this post from Microsoft on the issue.
Finally, if I may suggest it, move off of XP Mode. It's not supported well these days and the new replacement, Hyper-V for Windows 8.0 and above is built-in to the desktop OS and is much, much more feature filled. You can copy and paste from your desktop into a VM, and run machines with Linux, even OSX on your Windows machine.

Operating System Debugging using KGDB tool

I want to learn how to connect original machine with windows 7 and Linux virtual machine for the debugging purpose.
I am having windows 7 as original operating system and one virtual machine with ubuntu operating system.I want to connect them and try to debug using kgdb.
I am new in this so please give me some advise and right path to do this.
Thanks in advance.
BS.
You can start from its manual. You can also check this other guide.

Windows driver in wine

I have a printer in my job, Brother HL-2240D, and i need somre driver for linux to get the status information for that (toner level, empty paper, ...).
Actualy I use a driver for linux and I print ok, but this driver dont't get me the status for the printer. Windows driver is the only driver who get the status.
I have found a few days, but it doesn't exist, so I have an idea, install the windows driver in Wine. Can anybody help me to install this drivers in wine?
Thanks.
There are is some weird printer related stuff to wine but I doubt you'll be able to get status working like you hoped. My advice is to either dual boot with windows (or have a separate machine running windows) or even run a virtual machine on your linux pc and have windows running in that. You could then use the virtual version of windows to connect to the printer and receive the printer status stuff with the windows driver and tools.

What's the best way to run a Linux virtual server in Windows 7?

I need a virtual server for web development, it'll host Apache+Postgres+Ruby+something else.
What's the most effective software to run such a server? (ie with least virtualization overhead)
Is there a way to run Linux as as service?
I use VirtualBox at the moment, but it's inconvenient in some ways, such as it needs an emulator window open which also captures keyboard input when alttabbed into.
(Also, coLinux hangs at boot on my machine, so it's probably not an option)
Check out the features of VMWare Server. It's free, you just have to register.
I've never found VMware to be much of a performance hog unless running 3+ virtual machines.
The latest free server version (VMware Server 2) runs as a service IIRC, so you can set up your dev server to start up and shut down when your PC does, and you can either log on to the VM's console through the web interface, or create a shortcut on your desktop so it's fairly non-obtrusive.
There is a very convenient utility that hides VirtualBox from the foreground completely: vboxctrl. With vboxctrl you can run a Linux server on your Windows machine, make it automatically go to sleep when Windows shuts down or hibernates; then use any SSH client to log in to the server. Or you can use Xming to open graphical windows from the Linux server; I've worked quite a lot of time in GVim open through Xming.
If anyone needs more details, leave a comment, I may write an article about this.

Resources