LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   VirtualBox and Slackware guest (problems resizing desktop) (https://www.linuxquestions.org/questions/slackware-14/virtualbox-and-slackware-guest-problems-resizing-desktop-654852/)

gmartin 07-10-2008 08:52 AM

VirtualBox and Slackware guest (problems resizing desktop)
 
My travails installing Slack 12.1 as a vbox guest are documented in other threads. Thanks to T3slider for his assistance so far. My latest thing is trying to resize the desktop higher than 1024x768.

I've added a couple extra entries to the mode line of my xorg.conf, but the KDE display properties still only list three possible resolutions (640x, 800x & 1024x). From the docs and other posts, that appears all I need to do. Any tips?

Code:

Section "Screen"
    Identifier  "Screen 1"
    Device      "VESA Framebuffer"
    Monitor    "My Monitor"

# If your card can handle it, a higher default color depth (like 24 or 32)
# is highly recommended.

#  DefaultDepth 8
#  DefaultDepth 16
  DefaultDepth 24
#  DefaultDepth 32

# "1024x768" is also a conservative usable default resolution.  If you
# have a better monitor, feel free to try resolutions such as
# "1152x864", "1280x1024", "1600x1200", and "1800x1400" (or whatever your
# card/monitor can produce)

    Subsection "Display"
        Depth      8
        Modes "1024x768" "800x600" "640x480"
    EndSubsection
    Subsection "Display"
        Depth      16
        Modes "1920x1200" "1680x1050" "1280x1024" "1024x768" "800x600" "640x480"
    EndSubsection
    Subsection "Display"
        Depth      24
        # Modes "1920x1200" "1680x1050" "1280x1024" "1024x768"
        Modes "1680x1050" "1280x1024"
    EndSubsection
    Subsection "Display"
        Depth      32
        Modes "1024x768" "800x600" "640x480"
    EndSubsection

EndSection


T3slider 07-10-2008 08:43 PM

I don't have time right now to look further into it, but I remember someone getting it to work at higher resolutions in this thread. However, they did not really post a satisfactory solution in full, so I am really just posting the thread so you can follow what happened and possibly go from there. I tried a while ago (although very briefly) to get fullscreen resolution working, but I couldn't figure it out with both OpenSuSE and Slackware guest OSes. I may give it a try over the weekend if nothing has materialized by then (but I won't have time until then). It may be possible to use a custom Modeline in VirtualBox, but I haven't tried it and I have no idea if the VESA drivers will even support such a thing (plus I don't think the Modeline should be necessary if everything is working correctly). Just throwing ideas (good or bad) out there.

gmartin 07-10-2008 10:34 PM

Thanks, T3.
In a nutshell, that thread says load the additions and edit xorg.conf. I've done this. The xorg.0.log shows the vbox video driver is loading. I'll try the docs again but I've been there a couple times already.

gmartin 07-17-2008 08:01 PM

Bumping this should anyone have a tip.

T3slider 07-18-2008 08:31 PM

I may get some time this weekend to work on this (though I won't promise anything). I haven't had time to do much in Slackware as of late, but I'll play around with xorg.conf, the guest additions, Modelines, etc. and see what I can rig up. I'm most certainly not promising success here though.

Ilgar 07-19-2008 03:15 AM

I have virtual Slackware machine running under VirtualBox. I installed the guest additions and even if I don't specify 1280x800 i.e. my host native resolution in the (virtual) xorg.conf (the maximal I wrote is 1024x768), I can get that resolution when I use the fullscreen mode. The virtual X adjusts itself to the VBox window size in a way. The driver I specified is "vboxvideo", which comes with guest additions. I gave 32 MB memory for graphics, but you may need more for higher resolutions. Also, I think this dynamic adjusting of the resolution is taken care of by the VBoxClient program running in the bacground of the guest. It's in the autostarted applications list of XFCE, for example (it should be added there automatically).

T3slider 07-19-2008 03:18 PM

OK, it works. Make sure you are using the vboxvideo driver (that was my problem) in /etc/X11/xorg.conf. I had to manually add my resolution in xorg.conf (just switching to Fullscreen mode would just leave big black bars around the sides), but it works perfectly when adding my resolution to xorg.conf (no Modeline was needed either). If you want cutting and pasting to work between the guest OS and host OS you have to run `vboxadd-xclient` (you can add it to your .xinitrc or add it to a startup script in your WM/DE). That solves basically everything I think.

Thanks Ilgar!

Ilgar 07-19-2008 05:19 PM

You're welcome, I'm glad to hear that it works now.

gmartin 07-19-2008 10:33 PM

T3, I couldn't find the vboxadd-xclient file on my system. I looked at the additions file contents and found a reference to 98vboxadd-xclient. It's a script that does nothing but call /usr/bin/VBoxClient but after the vboxadditions install, it is nowhere to be found on my pc. Loading /usr/bin/VBoxClient in /xinitrc allowed me to resize my screen.

I did some more poking around. There is a file called
/etc/xdg/autostart/vboxclient.desktop the content are this:
[Desktop Entry]
Type=Application
Encoding=UTF-8
Version=1.0
Name=vboxclient
Name[C]=vboxclient
Comment[C]=VirtualBox Client
Comment=VirtualBox Client
Exec=/usr/bin/VBoxClient
X-GNOME-Autostart-enabled=true

I can'y find much information about xdg, it it appears this should start the client s/w

Ilgar 07-20-2008 03:02 AM

As I mentioned above it's VBoxClient that takes care of screen resizing (and maybe more, like shared clipboard). That xdg directory should be related to freedesktop.org's desktop standards. Not all window managers fully support it yet. The XFCE desktop on my virtual system recognizes freedesktop's autostart directory so it automatically starts VBoxClient. For other window managers you may have to start it manually.

T3slider 07-20-2008 10:41 AM

I had heard mention of 98vboxadd-xclient and VBoxClient, but neither are present on my guest OS with Guest Additions installed. However, I am a few VirtualBox versions behind, so that may have something to do with it. Since everything works as it should for me, I'm happy -- but most people should probably follow your advice instead of mine.


All times are GMT -5. The time now is 12:49 AM.