WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] How to restart Xvesa with different resolution  (Read 13246 times)

Offline saravanan

  • Jr. Member
  • **
  • Posts: 59
[Solved] How to restart Xvesa with different resolution
« on: January 26, 2010, 09:18:24 AM »
Hi all,
         How to restart Xvesa with different resolution in Tinycore.
Please help
« Last Edit: February 01, 2010, 03:13:34 AM by saravanan »

Offline Guy

  • Hero Member
  • *****
  • Posts: 1089
Re: How to restart Xvesa with different resolution
« Reply #1 on: January 26, 2010, 09:28:40 AM »
From the main menu (right click), select Tools -> Xvesa Setup.
Many people see what is. Some people see what can be, and make a difference.

Offline saravanan

  • Jr. Member
  • **
  • Posts: 59
Re: How to restart Xvesa with different resolution
« Reply #2 on: January 26, 2010, 09:32:55 AM »
I need to do this with a command or script.
By default my TC resolution is 1024x786 that is fine, but i also want an option to switch to 800x600 resolution.
Or where do i find the command that is executed behind the process mentioned?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to restart Xvesa with different resolution
« Reply #3 on: January 26, 2010, 09:59:32 AM »
The resolution for Xvesa is controlled in .xsession. The script that menu item calls is xsetup.sh.
The only barriers that can stop you are the ones you create yourself.

Offline saravanan

  • Jr. Member
  • **
  • Posts: 59
Re: How to restart Xvesa with different resolution
« Reply #4 on: January 26, 2010, 10:16:11 AM »
yes i can find the Xvesa startup script in .xsession, when i run xsetup.sh/xsetup command, i can select the resolution and the mouse type, after which i don't find any change in resolution. How to bring the change?


Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to restart Xvesa with different resolution
« Reply #5 on: January 26, 2010, 10:27:57 AM »
Restart X for the changes to take effect - "exit to command line" from the menu, and "startx".
The only barriers that can stop you are the ones you create yourself.

Offline saravanan

  • Jr. Member
  • **
  • Posts: 59
Re: How to restart Xvesa with different resolution
« Reply #6 on: January 26, 2010, 10:41:53 AM »
Restart X for the changes to take effect - "exit to command line" from the menu, and "startx".

Yes it worked curaga, but i just need to change to 800x600 resolution with a single shot, without requiring the user to select the resolution.
Need it on a single click or that may invoke a script/command that will kill the existing GUI and start the X again with new resolution.

if i kill x while being inside x, it will kill the script too.

How to tackle this ?

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: How to restart Xvesa with different resolution
« Reply #7 on: January 26, 2010, 12:15:52 PM »
you could for example use the extension actkbd.

it runs as a daemon by user root in the background and listens for keyboard shortcuts. when pressed, he could invoke a script like

#!/bin/sh
killall Xvesa
DISPLAY=:0 su -c 'startx' tc

the acpi(d) feature in /etc/acpi/events and so on may be used as well.
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline saravanan

  • Jr. Member
  • **
  • Posts: 59
Re: How to restart Xvesa with different resolution
« Reply #8 on: January 26, 2010, 01:20:12 PM »
you could for example use the extension actkbd.

it runs as a daemon by user root in the background and listens for keyboard shortcuts. when pressed, he could invoke a script like

#!/bin/sh
killall Xvesa
DISPLAY=:0 su -c 'startx' tc

the acpi(d) feature in /etc/acpi/events and so on may be used as well.

1000 points for gutmensch, thanks :)

Offline saravanan

  • Jr. Member
  • **
  • Posts: 59
Re: How to restart Xvesa with different resolution
« Reply #9 on: January 27, 2010, 04:37:31 AM »
still i find a problem, when i kill Xveas and restart it by running the command present in .xsession and changing the resolution param like,

Xvesa blah blah 800x600x32 blah blah

starts X, buit there is no background , i can just see the wbar fine and there is no window theme like the proper window border that is used to be there before.

or how to use startx(what does startx command trigger??)  and give startx a 800x600 resolution parameter????

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: How to restart Xvesa with different resolution
« Reply #10 on: January 27, 2010, 04:48:44 AM »
Xvesa is just the X server, there are other programs running as well like the window manager, mouse_config, etc.

Boot tinycore normally, open a terminal, do "$ ps aux" and look what processes are running. By chance there are some, which you have to kill too, otherwise the whole thing doesn't work, cos he restarts Xvesa but e.g. the window manager is still running and doesn't start again  when .xsession is called.

If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline saravanan

  • Jr. Member
  • **
  • Posts: 59
Re: How to restart Xvesa with different resolution
« Reply #11 on: January 27, 2010, 05:03:13 AM »
Thanks gutmensch, but is there any way to kill all processes started by .xsession and then to run another duplicated.xsession script with just the resolution parameter edited?

Offline gutmensch

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 605
  • I can make it disappear, have no fear!
    • remembrance blog
Re: How to restart Xvesa with different resolution
« Reply #12 on: January 27, 2010, 05:15:10 AM »
it doesn't need duplication.. you can edit the .xsession file in place with a command like

sed -i -e 's/800x600/1024x768/' /home/tc/.xsession

which you could call before the restart of Xvesa.

for killing all child processes of .xsession you'll have to do something like here: http://www.unix.com/unix-dummies-questions-answers/5245-script-kill-all-child-process-given-pid.html
If I seem unduly clear to you, you must have misunderstood what I said. (Alan Greenspan)

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: How to restart Xvesa with different resolution
« Reply #13 on: January 27, 2010, 05:37:02 AM »
X apps die when X dies. Possibly startx has to be executed from /home/tc for everything to work:
DISPLAY=:0 su -c ' cd /home/tc; startx' tc
The only barriers that can stop you are the ones you create yourself.

Offline saravanan

  • Jr. Member
  • **
  • Posts: 59
Re: How to restart Xvesa with different resolution
« Reply #14 on: January 27, 2010, 10:52:51 AM »
Nice trick gutmensch, and curaga :)
Thank you,

But rather than invoking this as a key combination triggered event, is there any other way to call the actkbd and run the config file specified?