is there a way to pause gnome from other tty? - gnome

To run a virtual machine on my computer and to have more resources for it, I'd like to pause gnome. The idea is to go on other tty pause gnome from it and run my virtual machine with lower ram for the host than necessary with the use of gnome.
I did not found anything, I supposed it is not possible. But I'd like to be sure. That's why I ask the question here
My OS is linux mint 13.
Have a good day.

There isn't any way currently to freeze a process to disk on Linux and remove it from RAM, and even if there was, what you call GNOME is made up of many processes and programs that are all running at the same time so trying to co-ordinate what processes you needed to freeze would be tricky

If you want to have more resources for your VM, you could sign out of Gnome and use another Desktop Environment while you use the virtual machine. If you used window maker you would save hundreds of megabytes of ram. Window Maker only uses a few megabytes, and takes very little disk space.
If you do use Window Maker, then it is a little confusing at first. To access your applications, right click on the desktop, to get a menu. There is an application dock on the side of the screen, but by default it only holds an xterm launcher.
If your application is not in the applications menu, then you will need to start it using xterm. When is icon appears, drag it to the dock, and you will be able to launch it from there. To edit the application menu you need to right click on the desktop and select Configure Window Maker.

Related

Making a GUI in Linux without booting the OS's GUI

Sorry if I'm using wrong terminology here.
I'd like to make an appliance for users that's running from a Raspberry Pi. When it's booted, I'd like users to see my own GUI that I'll design (hopefully in PyQT but I'm not sure about that yet.)
The thing I don't know how to do: I don't want the users to see the Linux operating system on the screen at all. I don't want them to see the desktop and launch my app. I want my app to be automatically launched on startup. I want it to be the only thing accessible and visible to the users. i.e. it should be full-screen and a user wouldn't be able to exit it or interact with the OS in any way.
How can I do that?

Does a window need a graphical environment to exist?

This one is a pretty strange question of mine so I'll try to explain the best I can.
On a DOS Linux distribution, without having installed any graphical environment, if I start an application which is supposed to have a GUI, will I be able to interact with that window via code?
What I thought is that if KDE/GNOME's role is to graphically represent an existing GUI, I should be able to interact with it but if these graphical environments have an active role in the window creation there is nothing I can do.
You won't be able to run a graphical program without a window manager.
The reason is that the window manager is doing a lot more than just allowing the window to be shown to the user. It comes with libraries and services for constructing windows and components and interacting with them. Without these libraries and services, the program won't be able to start.
The only exception would be if a program contained all the graphical code built into it, and didn't rely on a window manager. Realistically this would only happen for a fairly simple program and in special cases; for instance, Raspbian includes OMXPlayer, which shows full screen video without relying on any window manager.
Quoting (with some adaptation) from https://raspberrypi.stackexchange.com/a/3974 which answers how to start mplayer in X11 without a window manager:
The X server is really usually called X and you can just start it. You can set the DISPLAY number as an argument along with some other things.
You might want to have some sort of session, though, and still go through xinit or such and start X with startx. You can use .xinitrc or such as a script and simply not start a window manager there. You will need a "magic client" as the last command that stays running so X doesn't terminate immediately. In a traditional "failsafe" session, that was an xterm. If you know what to launch and launch once only, it could be that program or any UI/wrapper that does the launching for you. When the last ("magic") client in the init script terminates, X terminates.
If all you want to do is play video, you might see if you can run mplayer with directfb instead and skip using X11 entirely.

How does xTerm communicate with the XWindows session that contains it?

I want to script opening chromium in kiosk mode under Linux (openSUSE 12.3) and XWindows, while controlling which monitor chromium appear in. I also need to have this script be run outside of a standard xterm, e.g. via ssh into the machine where chromium AND the display will run (i.e. I want the application to appear on one of the displays of the machine I'm connecting to, not the machine I'm connecting from).
I can do everything I want by hand in xterm on the target machine, but I won't be running these scripts in xterm. Somehow, the xterm environment is special: it knows how to talk to the containing XWindows session, and in fact knows which actual monitor it is hosted on. For example:
When I ssh into the machine and try to run an XWindows GUI on the target machine's display, it (reasonably) complains "Can't open display". However, even when I set the DISPLAY environment variable to the same value I see in xterm, I still get the error (although it now includes the current DISPLAY value). I've also tried setting DISPLAY to a variety of permutations on ":X.Y", where X and Y are small integers, but again to no avail.
If I run chromium in --kiosk mode from xterm, it takes over the monitor that currently contains the xterm window. If I drag xterm to my other monitor then chromium will launch in that monitor. I want that control when I launch chromium from my script, but can't figure out the background magic.
For window manipulation, I've seen suggestions to use wmctrl or devilspie, but I'm a bit nervous about depending on tools that haven't been updated in years. I'd also prefer to have chromium launch in the right place right off the bat, rather than having it appear in the wrong place and then be moved. And neither app can help me launch the app remotely.
So, here are the questions. First, how does xterm tell chromium how to connect to the right XWindows session and monitor? Second, how do I simulate that from a completely separate ssh connection? (Again: it's more than just the DISPLAY variable.)
Thanks,
Dan
You can't open X client on the target machine's display because of permissions: not anyone that can ssh into a machine may "take ownership" of it's screen. These are things controlled by xset -- read up on it.
As for the display: I assume that the specific monitor is controlled by the second part of the DISPLAY environment. At least that's what I remember from reading about X. I've never actually worked in a multi-monitor X environment.
Xterm is not special. Your mouse pointer is. Chromium will appear on the monitor your mouse pointer happens to be in. This is probably the default behaviour of your window manager.
Chromium does not respect the usual window position requests. You cannot tell Chromium where to appear, you must tell your window manager where to place the Chromium window. Methods of doing that, if they exist, totally depend on what window manager you have.
If you ssh to your machine as the user that has started the X session, you should have no problem connecting to that session.

How to simultaneously run multiple window managers (esp. xmonad) for VNC

I'll start with a little background. A small project of mine has been to try to use my Android tablet as an external monitor for my laptop using a VNC client (vnc4server). There are two main options for doing this that I have seen. The simplest is to use xrandr and widen the screen, creating a section just for the tablet. However, this can cause some graphics issues if I understand correctly, although it has the benefit of permitting windows to cross displays. The other option is to run a separate desktop session for the VNC server.
I have chosen to go the route of a second desktop as the session can live and die without significantly affecting my main session and can in theory be tailored specifically to the tablet. A little tool called x2vnc allows me to connect to the VNC server in a similar manner to the more popular Synergy and use it like a n external monitor. I also have the nice little benefit of being able to easily and cleanly switch from landscape to portrait using xrandr.
This brings me to my current issue. So far, I have only been able to reliably use plain x-windows. Although this is entirely functional, I would prefer something more complete. Although xstartup examples have been posted for a variety of window managers, none of these seem to run properly. I suspect all of these are for headless systems. Gnome/Unity are each unforgivably slow and seem to conflict with my existing session. I also feel that these are a little too cluttered for my ten inch tablet. On the other hand, Xmonad simply crashes as soon as I try to open a second window in addition to not updating the graphics properly.
I would like to know anything that will lead me in the direction of a better stable desktop environment. This includes configuration tips and alternate window managers.
I am currently running Ubuntu 12.04 with gnome-xmonad (recently Unity). My xstartup is plain x-window-manager. I have tried any readily available examples for gnome and xmonad that I have been able to find.

How to start a gtk application after booting up without logging in?

I have got a gtk application. I want it to start automatically when I boot up the system, such that instead of getting usual login screen, my application greets the user.
My application is a sort of cash dispensing application. So user should not even see the login screen of linux. Whenever machine in boot up, after loading services and all that, my application should appear on the screen. One should not have to put any password or login in anyway to start that application.
Now so far I have tried the following but all in vain.
I put the command in my /etc/rc.local file
/home/EXE/cashier
Then rebooted machine in run level 5. But nothing happens. I get the usual login screen. Other programs that do not involve any gui or gtk, they are automatically started in this manner but not the gtk application.
Then I put
xint /home/EXE/cahier
and later
xint /home/EXE/./cashier
But they too didn't work. When I looked into details, I found out that "An Xserver is already running on screen 0, cannot open other server" or something like that.
Then I tried booting into run level 3, this time it worked.
xint /home/EXE/.cachier
But in run level 3, the font and icon sizes are smaller. Moreover some windows do not cover the whole screen.
Now I will really appreciate a way to run my application in run level 5, without showing login screen automatically.
Regards
Edit
Currently, the application is running on fedora core 2
This is more a question about linux distribution startup than it is about Gtk applications. The specifics are going to depend on your distribution, but the essence is:
Disable the gdm facility, which is normally responsible for spawning your X server.
Run xinit (not "xint") to start the server manually. This takes a client as its argument. It may work to run your Gtk application directly (it needs to be smart enough to position and size itself instead of relying on a window manager), but more likely you will want to pick a window manager to run it in. The easiest way to do this is via script that you pass to xinit.

Resources