LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   AntiX 16 RC1 can not autoresize screen in Virtualbox 5.0.22 with guest additions installed (https://www.linuxquestions.org/questions/linux-software-2/antix-16-rc1-can-not-autoresize-screen-in-virtualbox-5-0-22-with-guest-additions-installed-4175582627/)

linux1021 06-19-2016 05:34 PM

AntiX 16 RC1 can not autoresize screen in Virtualbox 5.0.22 with guest additions installed
 
Hi! Everyone

I'm running AntiX 16 RC1 in virtualbox 5.0.22, I also successfully installed the guest additions of 5.0.22, virtualbox machine information reports guest additions of 5.0.22 too. When I rebooted the virtual machine, in reverted to low resolution (e.g. 800x600):mad:, I'm talking about the main screen, not the loging screen, my virtual machine usually ubuntu based autoresize to 1366x654x32. So, any ideas? Thanks in advance for your time and help.

dolphin_oracle 06-20-2016 08:11 AM

Quote:

Originally Posted by linux1021 (Post 5563381)
Hi! Everyone

I'm running AntiX 16 RC1 in virtualbox 5.0.22, I also successfully installed the guest additions of 5.0.22, virtualbox machine information reports guest additions of 5.0.22 too. When I rebooted the virtual machine, in reverted to low resolution (e.g. 800x600):mad:, I'm talking about the main screen, not the loging screen, my virtual machine usually ubuntu based autoresize to 1366x654x32. So, any ideas? Thanks in advance for your time and help.

it won't do it automatically, I think because of the lack of an xsettings daemon like the Desktop Environments use.

However, the VirtualBox View Menu has options for "auto-resize guest display" and "adjust window size" that do work. Just play with it a little. I've found the easiest is to resize the virtualbox window to the size you want, then use the "auto-resize guest display" and it will bring the guest resolution to match the window size.

linux1021 06-20-2016 12:06 PM

Running AntiX 16 RC1 in virtualbox 5.0.22
 
Hi! Dolphin_oracle

:) Thanks for the reply, I know about autoresize and window size, and did some fool around with them before I posted here.The only thing is, if I set autoresize and the window size options, it distors my background/wallpaper image into a tile display format and conky (resources monitor display) appeared in the middle, instead on top left like the settings in it tells it to :(. I also remember when I installed AntiX 16 for the first time it run on a full window like normaly ubuntu distro runs, after you installed the guest additions add-on CD. Any ideas, how to fix this?:confused: Thanks in advance for your time and help.

dolphin_oracle 06-20-2016 03:14 PM

I would size the window to where you want, then try this (internal) command.

/usr/local/lib/desktop-session/desktop-session-restart

and see if things get put back where you want them.

linux1021 06-20-2016 04:17 PM

Hi! dolphin_oracle

:hattip: Thanks for the reply. What I did is go to Menu -> Control Centre -> session -> Set screen resolution, then click on outputs -> VGA-0 -> Resolution and selected my resolution of 1366x654, then I clicked on layout -> apply then clicked layout -> save as, and saved it as resolution 1366x654 and quit the app. Then I executed your command as a regular user (not root privileges), in terminal which is /usr/local/lib/desktop-session/desktop-session-restart then every thing seems okay, it WORKED!. Can you guide me, on putting the save file resolution1366x654.sh and your command /usr/local/lib/desktop-session/desktop-session-restart to execute everytime I log into the system, that for now will workaround this glitch/bug, can you please?:) Thanks for your time and help in advance.

dolphin_oracle 06-20-2016 08:48 PM

Quote:

Originally Posted by linux1021 (Post 5563788)
Hi! dolphin_oracle

:hattip: Thanks for the reply. What I did is go to Menu -> Control Centre -> session -> Set screen resolution, then click on outputs -> VGA-0 -> Resolution and selected my resolution of 1366x654, then I clicked on layout -> apply then clicked layout -> save as, and saved it as resolution 1366x654 and quit the app. Then I executed your command as a regular user (not root privileges), in terminal which is /usr/local/lib/desktop-session/desktop-session-restart then every thing seems okay, it WORKED!. Can you guide me, on putting the save file resolution1366x654.sh and your command /usr/local/lib/desktop-session/desktop-session-restart to execute everytime I log into the system, that for now will workaround this glitch/bug, can you please?:) Thanks for your time and help in advance.

ok.

open control center>session>User Desktop Session.

in desktop-session.conf tab

find the Load Conky line, and change from "true" to "false"

then

in startup tab, add at the bottom:
Code:

#set resolution
resolution1366x654.sh (use full path here)

sleep 1

#retile wallpaper
desktop-session-wallpaper

#start conky
conky &

and hopefully that does what you want. the desktop-session-wallpaper command is less drastic than a full restart, which you couldn't run at startup anyway without going into an infinite loop of restarts.

linux1021 06-20-2016 09:27 PM

Hi! dolphin_oracle

Thanks for the reply, I did the steps that you told me and also run sudo chmod +x /root/1366x654-screen-size.sh to make it executable, then reboot. It did not work. So far it only works, when I do it manually , Any ideas? :confused::(. Thanks for your time and help in advance.

dolphin_oracle 06-20-2016 10:22 PM

I think I see what's going on.

1. the script generated by the "set resolution" utility (actually arandr) will set the virtual video display to a mode that is available.

2. the mode is the usual range available to your monitor, plus a custom mode defined by the size of the VB window,created by the vbox additions.

3. that mode is not available if the window isn't the correct size already, replaced by whatever size the window is.

4. so the script will never change the mode because the mode isn't available.


So I'm not sure how to do what you want, other than to resize the window first and use the host OS to remember the window size for later use. XFCE launches the virtualbox window the same size as it was last used. I'm not sure if that's true of other wm/de.

linux1021 06-21-2016 11:55 AM

Hi! dolphin_oracle

Thanks again for the reply :), I kind of know what you mean. But if we can put the 1366x654-screen-size.sh and your /usr/local/lib/desktop-session/desktop-session-restart command to autoexecute after every thing is loaded, it should work, otherwise you have to do the steps that I describe to you at the beginning every single time, which is a pain :rolleyes:. So, if you can guide me where to put this commands to execute at after every thing is loaded, it will be fine for the moment as a workaround the glitch/bug in the system. Thanks for the time and help in advance.

dolphin_oracle 06-21-2016 12:33 PM

Quote:

Originally Posted by linux1021 (Post 5564247)
Hi! dolphin_oracle

Thanks again for the reply :), I kind of know what you mean. But if we can put the 1366x654-screen-size.sh and your /usr/local/lib/desktop-session/desktop-session-restart command to autoexecute after every thing is loaded, it should work, otherwise you have to do the steps that I describe to you at the beginning every single time, which is a pain :rolleyes:. So, if you can guide me where to put this commands to execute at after every thing is loaded, it will be fine for the moment as a workaround the glitch/bug in the system. Thanks for the time and help in advance.

first try putting your 1366x654-screen-size.sh in the startup file (control center>session tab>user desktop session> startup tab) at the bottom. see if the resolution changes.

when I did this last nite, I had to set the file to be owned by the user and not root to get it to execute properly. the underlying xrandr command in the file can run as a regular user so its good. You could also try pasting that command in the script into the startup folder directly.

However, I think you will find that the resolution will not change and that you will get a "mode not available" error if you run it from the terminal. But I could be wrong.

then run desktop-session-wallpaper to reset the wallpaper (instead of desktop-session-restart).

linux1021 06-21-2016 04:49 PM

Hi! dolphin_oracle

Thanks for the reply. I did put the /home/1366x654-screen-size.sh in user desktop session startup at the end of it and the /usr/local/lib/desktop-session/desktop-session-restart command, in separate lanes, save the file and reboot. it did not do nothing, sound like execution permission problem to me, for the startup apps. Because, if I do it manually.

Menu -> Control Centre -> session -> Set screen resolution, then click on outputs -> VGA-0 -> Resolution and selected my resolution of 1366x654, then I clicked on layout -> apply then clicked layout -> save as, and saved it as resolution 1366x654 and quit the app. Then I executed your command as a regular user (not root privileges), in terminal which is /usr/local/lib/desktop-session/desktop-session-restart then every thing seems okay. That is, if you do this every single time, you log in :(.

Any ideas? Thanks for your time and help in advance.

dolphin_oracle 06-22-2016 07:46 PM

try just the xrandr command inside the script created with "Set Resolution". That command should run as a regular user and avoid user ownership problems.

linux1021 06-22-2016 09:00 PM

Hi! dolphin_oracle

HURRAY!!! IT WORKS!!! :hattip::party::thumbsup:. This is what I did.

1) Navigate with spacefm browser in root mode to /root then click on view -> panel 1 view -> click on hidden files to unhide files, then double click on .screenlayout to open folder, right click 1366x654-screen-size.sh and select open -> leafpad. Once the file opens select the line starting with xrandr and right click and select copy.

2) Go to menu -> control center -> session -> user desktop session -> startup tab, at the end of the file put:

# resetting virtualbox screen size with guest additions
(right click and paste the line copied from .screenlayout here)

Then save the file by clicking on file -> save, close geany main window by clicking on file -> quit.

3) then reboot.

Now, the log in will stay small, but the main os window will resize automatically.

It will be nice to tell the user-desktop-session in control centre to save only the xrandr line in the start up boot up file automatically, and then tell it to ask to reboot machine to apply changes. Any ideas on this? Otherwise it is a pain to do this every time to change resolution of the screen with virtualbox 5.0.22 with guest additions installed, or future versions of it.

Thanks for your time and help.


All times are GMT -5. The time now is 09:46 AM.