|
Clipboard |
Thomas Fjellstrom
Member #476
June 2000
|
Evert said: It's not even an integral part of X11. Eh, X is mostly useless without a WM, at least if used as a desktop. You can make do without it if you have one X app you want to run, and thats it. I'd agree with the rest of what you said though. Quote: There's several different ones Typically there's two. The X selection buffer, and then (possibly shared) toolkit clipboards that behave like you expect a clipboard to behave. KDE has a nice little tray app that lets you essentially merge the two, or disable one or the other. -- |
Evert
Member #794
November 2000
|
Thomas Fjellstrom said: X is mostly useless without a WM, at least if used as a desktop. You can make do without it if you have one X app you want to run, and thats it.
That's true. I didn't say a window manager isn't something that's useful or desirable, just that it's not an integral part of X11. |
Thomas Fjellstrom
Member #476
June 2000
|
I would say something is "integral" to something else if removing the former caused the later to be more or less useless. -- |
bamccaig
Member #7,536
July 2006
|
I think Evert just means that Gnome isn't the window manager/desktop environment for Linux. Linux is just a kernel, and it's typically up to the distribution and users which window manager to use. -- acc.js | al4anim - Allegro 4 Animation library | Allegro 5 VS/NuGet Guide | Allegro.cc Mockup | Allegro.cc <code> Tag | Allegro 4 Timer Example (w/ Semaphores) | Allegro 5 "Winpkg" (MSVC readme) | Bambot | Blog | C++ STL Container Flowchart | Castopulence Software | Check Return Values | Derail? | Is This A Discussion? Flow Chart | Filesystem Hierarchy Standard | Clean Code Talks - Global State and Singletons | How To Use Header Files | GNU/Linux (Debian, Fedora, Gentoo) | rot (rot13, rot47, rotN) | Streaming |
Edgar Reynaldo
Major Reynaldo
May 2007
|
m c said: Viewing the bitmap in the program is just a white square, and I can neither paste the bitmap nor the text into other programs (in fact they either show the paste option grayed out, or it is active but selecting it does nothing and then after about 10 seconds I get a dialog box saying that there is no data available in the clipboard). The white square may be due to \n to \f conversion but I would think then that only random pixels would be off colored, not entirely white. You really can't paste the text using edit->paste or Ctrl-V? I thought that was working at least. Middle mouse click won't work unless xcsi is run with the -p option for the primary selection (which clipboard.c is not configured to do currently). I'll work on adding binary i/o to/from a file and see if that fixes it I'm still trying to get everything sorted out, I've had to download quite a few packages/libs and CodeBlocks, and doing it over dialup takes a while... m c said: I remember that on linux if you try to paste some data from the clipboard after closing the program that it was copied from, then it is no longer available, so I don't really like the way that copy+paste works on linux. Well, the nice thing about xcsi is that it stays running as long as it is the selection owner, so a program that uses it could close and it would still serve the selection after that. m c said: [EDIT] I just tried again, and it is really 30 seconds not 10 seconds before it says "no data found in clipboard" I don't understand where the delays are coming from. I process Selection Request events as soon as they are received and send the Selection Notify event and XFlush the display right after that. So in theory, a program that requests the selection should know immediately whether or not the data is valid unless they're diddling around doing something else... Maybe I should log all of the events that xcsi is receiving from the display connection... m c said: [EDIT 2] Also to get it to work I had to change many "xcsi blah blah" into "./xcsi blah blah" in Clipboard.c for ALLEGRO_UNIX section I don't remember what the practical difference is between running 'x' and './x'. Could someone explain it to me? Evert said:
Opposite for me: Fedora (and earlier RedHat) has always given me a headache, never had any real problems with SuSE (later OpenSuSE). Well, I just had some sort of lockup in the openSUSE VM. Firefox stopped responding, and then the desktop background turned green, and a little wristwatch mouse icon came up, and then it wouldn't do anything at all. Luckily using VirtualBox's reset command rebooted the VM. Edit - My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Arthur Kalliokoski
Second in Command
February 2005
|
Edgar Reynaldo said: I don't remember what the practical difference is between running 'x' and './x'. Could someone explain it to me? You need to type './x' if the current directory isn't in your path, which is a slight security risk. They all watch too much MSNBC... they get ideas. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
The VirtualBox Shared Folder is not working. It's visible from the File Manager in the openSUSE VM, but it's owner is root so I can't access it. Is there a workaround for this? Shouldn't I be root anyway? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Arthur Kalliokoski
Second in Command
February 2005
|
I used VM's all the time on the old computer, never had to be root. Install VM as root maybe. If you feel brave, try "cd <directory with problem>", "chown -R username ." They all watch too much MSNBC... they get ideas. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Well, I did sudo chown edgar ./sf_VBShared/ and it said nothing, but root still owns it. Can I login as root or something? My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Arthur Kalliokoski
Second in Command
February 2005
|
I just checked the vm folders in the old computer, the uid was my username, and the gid was "users", I dunno how Ubuntu does it. They all watch too much MSNBC... they get ideas. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I got the folder to work by unmounting and mounting it. I suppose I'll have to do this every time I boot, so I wrote a quick script to do it for me, but I can't figure out how to use chmod to set the permissions to execute for my user account. #! bin/sh umount -t vboxsf VBShared mount -t vboxsf VBShared home/edgar/VBShared Is there a way to run this at startup? How do I use chmod to set the correct permissions? When I try to run it using 'sudo ./fixshare.sh' it says 'command not found'. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Arthur Kalliokoski
Second in Command
February 2005
|
I use "su" myself, not sudo, and also normally have a root account running on one of the virtual terminals (Cntr-Alt-F(n)). I never did understand the sudo thing, and if that's all I had, I'd use sudo to make a root account. You need to use the -R option to recurse down into directories using chmod, chown and chgrp. Arthur Kalliokoski said: If you feel brave, try "cd <directory with problem>", "chown -R username ." They all watch too much MSNBC... they get ideas. |
Evert
Member #794
November 2000
|
Edgar Reynaldo said: it's owner is root so I can't access it. Is there a workaround for this? Set read/write permissions for other users/groups. Quote: Shouldn't I be root anyway?
No. You should never be root. Edgar Reynaldo said: Can I login as root or something?
Probably, but if you can sudo commands anyway, you don't have to. Edgar Reynaldo said: Is there a way to run this at startup?
Several. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Well, I'm still working on getting Allegro 4.4.1.1 to fully compile and install. If anyone knows anything about how to write a CMakeLists.txt file, I could use some help in my other thread. Append - Append2 - My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Arthur Kalliokoski
Second in Command
February 2005
|
I'm over my mad now, so I'll try it again when you're done. They all watch too much MSNBC... they get ideas. |
spellcaster
Member #1,493
September 2001
|
This is pretty old, but might be interesting for this thread: -- |
Trezker
Member #1,739
December 2001
|
Nice. How old? But only bitmap copying? I may not have followed this thread in a very concentrated state since I got my job. But it's been mostly discussion about how to get linux copying working in code instead of using the external program, and adding bitmap copying. So I'm not really interested in merging until that stuff is fully operational. If someone can put together the code for windows that'd be great. If you do it with git and send a github pull request that'd be awesome. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
I posted Windows code for copy/paste of text/images a long time ago in this thread. You never mentioned it, so I figured you didn't care. It's also been included in most every zip file I've posted here. For Linux copy/paste your program needs to respond to SelectionRequest events, something an Allegro program could not do without hacking Allegro to expose the X11 events that it monitors. For these reasons, an external program is the best solution to manage copy/paste on Linux. Since xsel, xclip and others don't manage images, I wrote my own program that does, xcsi. Copying to the clipboard (through xcsi) also works better, because xcsi stays running as long as it is the selection owner, as opposed to closing your program and losing the selection data. What we need is someone experienced with MacOSX and obj-C to write clipboard code for OSX. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Trezker
Member #1,739
December 2001
|
https://github.com/trezker/clipboard/issues I've copied the windows code from your latest attachment into my project. I've also added stubs for bitmap copying functions. One issue for me is that you're coding for allegro 4 and I'd like to have an allegro 5 version. It's only a few allegro functions though. In the windows code you need the window handle and convert hbitmap to/from allegro bitmap. I didn't find any function for converting hbitmap in Allegro 5. I don't care much about the windows version though, since I moved to Linux that platform means nothing to me. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Update - Still no luck getting Gimp or Inkscape to paste an image copied with xcsi though. They request the TARGETS property, and so they know that image/bmp is available, but they never request image/bmp when you try to paste inside their applications. It's still a mystery to me. I think I'm going to write the Gimp developer mailing list and see if they know what the problem might be. Anyway, here is the latest version : @Trezker It shouldn't be that hard if people want an Allegro 5 version of this library, just take a look at the A4 source code for convert_hbitmap_to_bitmap and convert_bitmap_to_hbitmap and adapt it to use ALLEGRO_BITMAP's instead of BITMAP's. Then ask the dev's nicely if they'll write a function for A5 on Windows to return a HWND for the window of a passed ALLEGRO_DISPLAY pointer. Similarly for Linux, all you have to do to support copy/paste of images is change the loading/saving of images in Clipboard.c to use A5's image load/save functions instead. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
spellcaster
Member #1,493
September 2001
|
Trezker said: Nice. How old? I think I posted that code in here in 2002. It was used in my "destroy the desktop" mini app. -- |
Trezker
Member #1,739
December 2001
|
Good that you brought up the issue of bundling Edgar. It needs to be available from some stable location so it's easy to fetch and install when people need it for the allegro clipboard library. If it was me I'd set up a new github repository. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Tiny, ridiculous, stupid mistakes... I wasn't properly setting some of the fields of a returned SelectionNotify event after getting a SelectionRequest, so the other programs ex-communicated me. Pasting into Gimp, Inkscape, and Kolourpaint now works for me with the small test bitmap used in the ClipboardTest program. It works with a large (1280 X 677 , 423KB) png as well by using xcsi from the command line. Start your graphics editor, call xcsi with the -s= command and paste away! To be thorough, I should add support for sending (and not just receiving) INCR transfers, but I haven't done that yet. Latest version : Are there any feature requests for xcsi or the clipboard library? It might be nice to support copy/paste of utf-8 strings, which I think may be doable on Windows and Linux. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|
|