Using virtual desktops/workspaces

Moderator: Forum moderators

Post Reply
User avatar
wizard
Posts: 1585
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2127 times
Been thanked: 503 times

Using virtual desktops/workspaces

Post by wizard »

Virtual desktops are a way to increase the "size" of your workspace by letting you switch between desktops. You can have three or four programs running in windows on one desktop, and another three or four running on another desktop and easily switch between them with a click of the mouse or using a "hot key". In many ways this lets you simulate having multiple monitors

Puppy Linux usually comes with 3 desktops available OOTB. You can switch between them using the "switcher" located on the left side of the JWM tray. Hovering the mouse over one of the desktop icons (rectangle) will show the number of that desktop, to change, just click the desktop icon. You can also switch desktops by using hotkeys, alt+1, alt+2, or alt+3.
JWM windows manager also lets you transfer running programs between desktops, i.e, you started Geaney in desktop-1, but want it in desktop-2. Just right click the program in the tray and choose: Send To

switch-sendto.jpg
switch-sendto.jpg (9.14 KiB) Viewed 889 times

To make using virtual desktops even more like having multiple monitors, I created the script: deskedge.sh. It requires xdotool which you can download from the PPM. In use it switches between desktop-1 and desktop-2 when the mouse pointer hits the right or left edge of the screen.

One of my favorite uses of virtual desktops is to connect to a remote computer using VNC on desktop-2. I can then run programs on desktop-1 and switch to desktop-2 to monitor or operate programs on the second computer. This is a good way to increase your computing power using low powered hardware or to increase security since the computers are completely separated.

Note: if using deskedge.sh with VNC, you must size the remote computer window so the local computer desktop can be seen on both the right and left edges.

wizard

deskedge.gif
deskedge.gif (236.68 KiB) Viewed 889 times
Attachments
deskedge.sh.gz
remove fake .gz before using
(354 Bytes) Downloaded 43 times

Big pile of OLD computers

User avatar
mikewalsh
Moderator
Posts: 5575
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 570 times
Been thanked: 1681 times

Re: Using virtual desktops/workspaces

Post by mikewalsh »

@wizard :-

Just to add to the above, JWMDesk will let you increase the number of 'virtual workspaces' up to a maximum of eight, I think.....although I believe JWM will in fact let you run up to 20, or something like that..? Not sure about this.

I used to run with just 4, but in recent years I've increased this to 6. They all get used, too, cos I always hated the way Windoze insisted upon piling windows up one on top of the other; this way, I can spread stuff out and be able to actually see what I'm trying to do at any given moment! :D

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

williwaw
Posts: 1594
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 145 times
Been thanked: 291 times

Re: Using virtual desktops/workspaces

Post by williwaw »

cool tool
but not sure my xdotool version supports the arguments in your script.
are you using a later version?

Code: Select all

1 /files/downloads # ./deskedge.sh
./deskedge.sh: line 8:  9984 Segmentation fault      xdotool behave_screen_edge --delay 700 right set_desktop 1
./deskedge.sh: line 8:  9985 Segmentation fault      xdotool behave_screen_edge --delay 700 left set_desktop 0
1 /files/downloads # xdotool -h
Available commands:
  getactivewindow
  getwindowfocus
  getwindowpid
  search
  help
  version
  click
  getmouselocation
  key
  keydown
  keyup
  mousedown
  mousemove
  mousemove_relative
  mouseup
  type
  windowactivate
  windowfocus
  windowmap
  windowmove
  windowraise
  windowsize
  windowunmap
  set_window
  set_num_desktops
  get_num_desktops
  set_desktop
  get_desktop
  set_desktop_for_window
  get_desktop_for_window
0 /files/downloads # xdotool -v
xdotool version 1.20100416.2809
0 /files/downloads # 
User avatar
wizard
Posts: 1585
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2127 times
Been thanked: 503 times

Re: Using virtual desktops/workspaces

Post by wizard »

@williwaw

I'm using xdotool version 3.20160805.1 from the Fossapup64 9.5 PPM.

Thanks
wizard

Big pile of OLD computers

williwaw
Posts: 1594
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 145 times
Been thanked: 291 times

Re: Using virtual desktops/workspaces

Post by williwaw »

thats quite a bit newer than the version in easy.
I updated with xdotool_3.20160805.1-4_amd64.deb and supplied the needed dep, libxdo3_3.20160805.1-4_amd64.deb.
your script brings a functionality to the desktop I have been missing for a while. thanks
perhaps @BarryK will find this useful also.

williwaw
Posts: 1594
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 145 times
Been thanked: 291 times

Re: Using virtual desktops/workspaces

Post by williwaw »

after using for a while , I have noticed some erratic behavior.. the mouse pointer seems to toggle virtual desktops when crossing window borders, despite having come nowhere near the edge of the screen. the mouse pointer shifts from the default pointer arrow to an i-beam shape when acting erratic.

User avatar
wizard
Posts: 1585
Joined: Sun Aug 09, 2020 7:50 pm
Has thanked: 2127 times
Been thanked: 503 times

Re: Using virtual desktops/workspaces

Post by wizard »

@williwaw

Using Fossapup64 9.5 here and have not seen that behavior, may try it in some other distros. Here's another little tool I wrote first, desk12.sh, it also uses xdotool. I put it's icon on the far right side of the desktop about midway up. In use, it toggles between desktop1 and desktop2. Biggest drawback is you have to size/arrange your windows so you can see it.

Thanks
wizard

desk12.sh.gz
remove fake .gz before using
(258 Bytes) Downloaded 37 times

Big pile of OLD computers

Post Reply

Return to “Utility”