LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-07-2010, 05:46 PM   #1
njb
Member
 
Registered: Apr 2010
Location: Behind the Gateway
Distribution: Slackware 13.1
Posts: 167
Blog Entries: 4

Rep: Reputation: 16
Wink a screen inside a non X environment


You don't run x windows in the cession.
Let say you run init 3 at the prompt and login your acount.
Is it possible to run a command that let you open a little screen with graphic interface and that accept the mouse.
Exactly the inverse of the console in an X environment.

NjB
 
Old 09-07-2010, 07:10 PM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
Well, there's ncurses, but that's not a very advanced graphical interface. For anything else, you'll want to use X -- that's what it's for, after all!
 
0 members found this post helpful.
Old 09-07-2010, 07:36 PM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Quote:
Originally Posted by njb View Post
Is it possible to run a command that let you open a little screen with graphic interface and that accept the mouse.
You could write a program or script using Allegro or SDL that will put the display into graphics mode and do your mouse processing there. However, there is currently no way to create a high-resolution "graphic interface" on a low-resolution console.
 
Old 09-07-2010, 07:41 PM   #4
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
If you enable gpm (which can be setup from within `pkgtool` as root) then you can get basic console mouse activity -- hilight as usual and middle-click to paste (and the mouse is available for ncurses-based programs that accept mouse input). That is about as mouse-friendly as you can get. However, if you learn to use the keyboard effectively and use a terminal multiplexer like GNU screen, along with console-friendly applications, you can be fairly comfortable in a text-only environment. I run screen with indicators about my hard disk and RAM/swap usage, a clock in the corner, and window labels with good keyboard-only controls and I am quite comfortable in a framebuffer console. I run irssi for IRC, raggle for a console RSS reader (raggle is very old and unmaintained now, but it's still my favourite), mutt for reading e-mail, ncmpcpp+mpd for playing music (this is an ideal solution for me, since I can start X, play my music, and if I need to, exit X while my music continues to play), an ssh connection to my server (which runs irssi+rtorrent in a screen session as well), vifm for a good graphical file manager (though most prefer mc), and of course some bash terminal windows. Screen becomes immensely more useful when you create your own custom .screenrc file instead of using the default...it is easy to get lost with a default screen session with no window labels or other indicators. I also run dvtm (another terminal multiplexer) within two of my screen windows (mutt and raggle are grouped together under 'net' and ncmpcpp and an instance of vifm for loading new playlists are coupled under 'music'). elinks is the best console browser in my opinion and runs very nicely under screen -- however, `links -g` is a real graphical browser within the console, provided you have a framebuffer going (though `links -g` does not work in a screen session since it tries to access the framebuffer directly). mplayer plays video perfectly in the console also if you have a framebuffer enabled.

With all that said, I am in X 99% of the time. I am perfectly comfortable outside of X with the exception of the browser; the text-mode browsers just aren't as full-featured (not only in looks but in support for CSS and other web standards...elinks can handle javascript but not out of the box). I usually have a urxvt window running screen alongside firefox when I'm in X. If I need to exit X for whatever reason, I detach my screen session, close firefox and reattach my screen session in the console (so I don't need to restart everything). And of course when I return to X I reattach my screen session there.

Your options in terms of functionality in the console are fairly diverse; however, it takes a lot of getting used to, and some just prefer a graphical environment over the command-line. I can survive happily outside of X excluding the browser -- but that is a big exclusion. If you're looking to spend *all* your time in the CLI then I wish you good luck, but if you just want to spend a little more of your time outside X then there are definitely options available.

Some screenshots for an idea of what is possible with GNU screen:
bash
ncmpcpp

These were taken in X but it looks exactly the same (including the colours, which I have customized in the framebuffer, but of course excluding the background, which is impossible outside of X) in the console. There are framebuffer screenshot applications available but I don't have any installed and I didn't really want to install one just for this post.

Technically with the framebuffer fairly good graphical displays outside of X are possible -- there are framebuffer image viewers, `links -g` is a fantastic truly graphical browser in the framebuffer, mplayer works with the framebuffer, etc. However, duplicating X functionality in the console would basically be reinventing X, and I don't think that's necessary since X already exists.

Last edited by T3slider; 09-07-2010 at 07:44 PM.
 
1 members found this post helpful.
Old 09-07-2010, 08:00 PM   #5
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,463

Rep: Reputation: 299Reputation: 299Reputation: 299
GPM (General Purpose Mouse) allows you to copy and paste.

There does exist a framebuffer UI (FBUI), but that only works with Linux 2.6.9 and partly with 2.6.31.
http://home.comcast.net/~fbui/

Edit: I didn't notice the post above (being slow and looking for that FBUI link)

Last edited by jens; 09-07-2010 at 08:04 PM.
 
Old 09-07-2010, 08:06 PM   #6
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
Ok so you want an empty root window to run one graphical program but with out X. The real question is, what exactly do you want to do? Any program that is linked with the xlibs or wrapper libs (gtk/qt) is going to need some form of the X server runing. So if you want to only run one program, then use some minimal window manager like twm. However, there are some console programs that are designed to run with svgalib or general console framebuffer. If you are looking for some replacement programs for simple use under the console, we would need to know what you want to do. For example "links -g" will give you a graphical mode for a simple browser that runs on the console.
 
Old 09-07-2010, 08:52 PM   #7
njb
Member
 
Registered: Apr 2010
Location: Behind the Gateway
Distribution: Slackware 13.1
Posts: 167

Original Poster
Blog Entries: 4

Rep: Reputation: 16
Wink open a window within the console

The real question is, what exactly do you want to do?You know at the beginning when you start learning Linux, you start for example with ubuntu which is very intuitive and automated.
But the more you advance in Linux and you realize that you can do extremely powerful things with only a few commands in a console.
So you open a console to run these commands.
After a while you realise that you can do mostly everything with command lines.
So you open more and more the console.

I can imagine that at a certain moment you spend more time in the console than in the x environment.

And that's why I was thinking about inverting the engine and work without x, but with possibility to open a window within the console.

NjB
 
Old 09-08-2010, 09:01 AM   #8
jens
Senior Member
 
Registered: May 2004
Location: Belgium
Distribution: Debian, Slackware, Fedora
Posts: 1,463

Rep: Reputation: 299Reputation: 299Reputation: 299
Quote:
Originally Posted by njb View Post
The real question is, what exactly do you want to do?
You know at the beginning when you start learning Linux, you start for example with ubuntu which is very intuitive and automated.
But the more you advance in Linux and you realize that you can do extremely powerful things with only a few commands in a console.
So you open a console to run these commands.
After a while you realise that you can do mostly everything with command lines.
So you open more and more the console.

I can imagine that at a certain moment you spend more time in the console than in the x environment.

And that's why I was thinking about inverting the engine and work without x, but with possibility to open a window within the console.

NjB
I honestly don't see why you would dump X for that (unless it's for a learning experience).
Most of us (CLI users) started without X and added it later on (X wasn't always as functional as it is today).

I still set up all my desktops to work without it if needed.

Just looking at my current system, I mostly use this:

GNU Screen (I couldnt' live without it).
GPM (mouse support)

Text:
*Emacs (it does need some tweaking to make it work well with screen)
*Vi
*Nano
*TeX

Mail
*Gnus (Part of emacs. It's what made me use emacs again. I dislike mutt more than anything else. My second choice would be Alpine).

Web
*wget
*surfraw
*w3m
*Links
*rTorrent
*hellanzb (abandoned)

Multi-Media
*Mplayer
*mpd
*imagemagick

...and many other tools (the GNU and BSD tools, MC, ...).

It's easy to build a full desktop system without X, but it will not be as functional.
 
1 members found this post helpful.
Old 09-08-2010, 09:03 AM   #9
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
....

Last edited by mrclisdue; 09-08-2010 at 09:05 AM. Reason: submitted before finished, and it made no sense...
 
Old 09-08-2010, 09:47 AM   #10
harryhaller
Member
 
Registered: Sep 2004
Distribution: Slackware-14.2
Posts: 468

Rep: Reputation: Disabled
http://hg.suckless.org/dws/

Quote:
leinwand is a new DRM-based window system in order to replace the obsolete X
Window System and to provide a modern and frugal window system on DRM-capable
Unices, such as Linux.
It's now called dws.

Last edited by harryhaller; 09-08-2010 at 09:50 AM.
 
Old 09-09-2010, 09:59 PM   #11
speck
Member
 
Registered: Nov 2001
Location: US
Distribution: Slackware 14.2
Posts: 375

Rep: Reputation: 115Reputation: 115
It's not a Slackware specific site, but K.Mandla's blog is a very good resource if you're interested in using only the console. His blog covers mostly console applications and the Howtos section is especially helpful.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vim doesn't clear screen inside of screen eddified Linux - Software 4 01-04-2010 10:44 AM
[SOLVED] File descriptor inside screen gagou7 Linux - Newbie 2 09-10-2009 08:05 AM
Ubuntu inside Vista on a Toshiba P200 -- no screen Makar Linux - Laptop and Netbook 1 11-15-2008 07:38 AM
Login screen when running Linux inside of windows bkdc Linux - General 3 10-28-2008 01:45 PM
how to program some action inside screen dugave_111 Programming 2 10-22-2006 06:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration